VPCD protocol support (for vsmartcard.git PCD/PICC code)

vsmartcard.git contains an implementation of a virtual card reader
(vpcd) which registers with PC/SC (such as pcsc-lite).  It simply
binds to a TCP port and waits for a TCP client to connect to it,
implementing APDU transfer over TCP.

This code implements the related protocol as a TTCN-3 test port
for Eclipse TITAN, which will enable us to implement a 'virtual smart
card' in TTCN-3 tets cases, primarily for testing remsim-bankd at
this point.

Change-Id: Iac37dd231a0f2e1efd484887bca1a9d672b446bb
diff --git a/library/VPCD_CodecPort_CtrlFunct.ttcn b/library/VPCD_CodecPort_CtrlFunct.ttcn
new file mode 100644
index 0000000..62b79c5
--- /dev/null
+++ b/library/VPCD_CodecPort_CtrlFunct.ttcn
@@ -0,0 +1,52 @@
+module VPCD_CodecPort_CtrlFunct {
+
+  import from VPCD_CodecPort all;
+  import from IPL4asp_Types all;
+
+  external function f_IPL4_listen(
+    inout VPCD_CODEC_PT portRef,
+    in HostName locName,
+    in PortNumber locPort,
+    in ProtoTuple proto,
+    in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_connect(
+    inout VPCD_CODEC_PT portRef,
+    in HostName remName,
+    in PortNumber remPort,
+    in HostName locName,
+    in PortNumber locPort,
+    in ConnectionId connId,
+    in ProtoTuple proto,
+    in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_close(
+    inout VPCD_CODEC_PT portRef,
+    in ConnectionId id,
+    in ProtoTuple proto := { unspecified := {} }
+  ) return Result;
+
+  external function f_IPL4_setUserData(
+    inout VPCD_CODEC_PT portRef,
+    in ConnectionId id,
+    in UserData userData
+  ) return Result;
+
+  external function f_IPL4_getUserData(
+    inout VPCD_CODEC_PT portRef,
+    in ConnectionId id,
+    out UserData userData
+  ) return Result;
+
+  external function f_IPL4_setGetMsgLen(
+    inout VPCD_CODEC_PT portRef,
+    in ConnectionId id,
+    inout f_IPL4_getMsgLen f,
+    in ro_integer msgLenArgs
+  );
+
+
+}
+