Tani OpcPipe protocol  1.0.5
Tani OpcPipe protocol
Classes | Macros | Typedefs | Functions
PlcOpcPipeCore.h File Reference

OpcPipe core definitions, used for all protocol variants. More...

Classes

struct  CORE_PRESET_VALUES
 OPC UA startup timing. More...
 
struct  opcpipe_timeval
 represents a point in time More...
 
struct  ACCESS_VALUES
 specifies access levels for topics More...
 
struct  OPCPIPE_STATUS
 
struct  HANDLE_PAIR
 
struct  DATAVALUE
 used to store data values (small in direct memory, bigger as allocated memory) More...
 
struct  OPCPIPE_ITEM
 
struct  OPCPIPE_TOPIC
 
struct  OPCPIPE_BROWSE_REQUEST_PARAMS
 
struct  PLC_OPCPIPE_BROWSEITEMDATA
 
struct  PLC_OPCPIPE_BROWSEITEMDATA_INFO
 
struct  PLC_OPCPIPE_DIAGITEM
 
struct  PLC_OPCPIPE_DIAGTOPIC
 
struct  PLC_OPCPIPE_DIAG_ELEMENT
 
struct  PLC_OPCPIPE_DIAG_REQUEST
 
struct  PLC_OPCPIPE_DIAG_RESPONSE
 
struct  PLC_OPCPIPE_TIMINGS
 use to get or set opcpipe timing values More...
 
struct  WMK_PROT_CREATE_ITEM_DATA
 API Struct for creating items. More...
 
struct  WMK_PROT_CREATE_ITEM_DATA_EX
 API Struct for creating items. More...
 
struct  WMK_PROT_HANDLE_ITEM_DATA
 API Struct for deleting, activating and deactivating items. More...
 
struct  WMK_PROT_RW_ITEM_DATA
 API Struct for reading and writing items. More...
 
struct  WMK_PROT_HISTORY_ITEM_DATA
 
struct  WMK_OPCPIPE_ITEM_INFO
 
struct  DATA_CONVERT_INFO
 API Struct for WmkProtDataConvert info mostly used in string conversions. More...
 
struct  RPC_PARAMETER
 API struct for calling RPCs. More...
 
struct  EVENT_FIELD
 API struct for monitoring OPC UA events. More...
 
struct  EVENT_REQUEST
 API struct for monitoring OPC events. More...
 
struct  EVENT_VALUE
 API struct for monitoring OPC UA events. More...
 
struct  EVENT_RESULT
 API struct for monitoring OPC UA events. More...
 
struct  HISTORY_EVENT_RESULT
 
struct  WMK_PROT_HISTORY_EVENT_DATA
 
struct  PLC_OPCPIPE_CONFIRMS
 Structure for registering confirm functions. More...
 
struct  PLC_OPCPIPE_CONFIRMS_EX
 Structure for registering confirm functions. More...
 

Macros

#define OPCPIPE_BORWSEFLAG_DIR   0x01
 bit set if this node can be expanded (it has sub-nodes)
 
#define OPCPIPE_BORWSEFLAG_WRITE   0x02
 bit set if this node is a variable that can be written
 
#define OPCPIPE_BORWSEFLAG_READ   0x04
 bit set if this node is a variable that can be read
 
#define OPCPIPE_BORWSEFLAG_HAS_COMMENT   0x08
 bit set if the browsing structure contains a comment
 
#define OPCPIPE_BORWSEFLAG_HAS_EXT_INFO   0x10
 on request: return extended info More...
 
#define OPCPIPE_BORWSEFLAG_NAME_ONLY   0x20
 request only item names, no type/size/xxx (may be faster on OPC UA)
 
#define OPCPIPE_BORWSEFLAG_HAS_PARAMS   0x40
 on request: "browseParams" parameter is an OPCPIPE_BROWSE_REQUEST_PARAMS struct; not set: "browseParams" is a char* mask (legacy)
 
#define OPCPIPE_BORWSEFLAG_BLOCKED   0x80
 bit set on last returned node to indicate that more data are available
 
#define OPCPIPE_BORWSEFLAG_RWX   (OPCPIPE_BORWSEFLAG_DIR | OPCPIPE_BORWSEFLAG_WRITE | OPCPIPE_BORWSEFLAG_READ)
 
#define TU_CAP_NO_AUTOMATIC_RESTORE   0x0002
 Client only: do not save topics and items for reconnect.
 
#define TU_CAP_ALL_ANSWERS   0x0008
 Both, exchanged: all client requests will give answers.
 
#define TU_CAP_HAVE_CREATEITEMDATA_EX   0x0010
 Both, exchanged: can use CREATEITEMDATA_EX opcode.
 
#define TU_CAP_IGNORE_EQUAL_VALUES   0x0020
 Server only: If the content of an item data send from device has the same data they are not sent again.
 
#define TU_CAP_COMBINE_EQUAL_TOPICS   0x0040
 Server only: same topics in multiple connections are combined, one create only is called in server.
 
#define TU_CAP_CONNECTION_DATAACKS   0x0100
 Both, exchanged: send life data acks.
 
#define TU_CAP_SYNTAXCHECK   0x0400
 Both: WmkProtCyclicReadData and WmkProtSyncReadData syntax check.
 
#define TU_CAP_DEVICE_DATA_ACK   0x2000
 Both, exchanged: Data from device are confirmed.
 
#define TUPCAPCLIENT_MASK   (TU_CAP_NO_AUTOMATIC_RESTORE | TU_CAP_SYNCHRONOUS)
 capabilities which can not be overwritten from server side
 
#define TUPCAPSERVER_MASK   (TU_CAP_IGNORE_EQUAL_VALUES | TU_CAP_COMBINE_EQUAL_TOPICS | TU_CAP_DEVICE_DATA_ACK)
 capabilities which can not be overwritten from client side
 
#define OPCPIPE_STATUS_FLAG_SUSPENDED   0x01
 set if the connection is suspended (it will not be estanblished)
 
#define OPCPIPE_STATUS_FLAG_NETWORK_OK   0x02
 set if the network (IP) connection is established
 
#define OPCPIPE_STATUS_FLAG_LOGIC_OK   0x04
 set if the complete conneciton is established (including login) and data exchange can occur
 
#define TU_OPT_SENDCACHE_OVERWRITE   0x0001
 data in send cache will be overwritten else no send cache
 
#define TU_OPT_BLOCK   0x0002
 all functions are blocking if the connection exists and send buffer is full
 
#define TU_OPT_MEMLIM_10M   0x0004
 limit memory for frames to 10 MB
 
#define TU_OPT_MEMLIM_1M   0x0008
 limit memory for frames to 1 MB
 
#define TU_OPT_MEMLIM_100K   0x0010
 limit memory for frames to 100 K
 
#define TU_OPT_MEMLIM_50K   0x0020
 limit memory for frames to 50 K
 
#define TU_OPT_MEMLIM_MASK   0x003c
 mask for memory limits
 
#define TU_OPT_DEVICE_DATA_ACK   0x0040
 connection uses acks for device data
 
#define TU_OPT_NO_WRITE_WITH_WRONG_TYPE   0x0080
 disable data conversion on write; required for strict UA spec compatibility
 
#define TU_OPT_ENABLE_REC_QUEUE   0x0100
 enable receive queue in PLC Engine (useful mainly for MQTT)
 
#define TUFLAG_ITEM_ACTIVATED   0x0001
 Server/Client: Item is activated.
 
#define TUFLAG_NEED_SEND_CREATE   0x0002
 Server: app has called create item data, but not sent. More...
 
#define TUFLAG_NEED_SEND_ACTIVATE   0x0004
 Server: must call activate after create returns, required for recursive create calls. More...
 
#define TUFLAG_NEED_SEND_DELETE   0x0008
 Server: create item failed, must call delete after leaving create call (item->Quality contains the create error) More...
 
#define TUFLAG_NEED_SEND   0x0010
 Server: app has called Send Item Data but not sent. More...
 
#define TUFLAG_ITEM_DEAD   0x0020
 Server/Client: app has deleted Topic/Item, do not give data but remove element if last reference is gone.
 
#define TUFLAG_CREATE_RUNS   0x0040
 Server: item create runs, used to catch recursive confirm.
 
#define TUFLAG_NEED_SYNCREAD   0x0040
 Client: app has called Sync Read Item but not sent.
 
#define TUFLAG_NOT_CREATED   0x0080
 Server: don't have createitemdata yet. More...
 
#define TUFLAG_USED   0x0100
 Server/Client: structure is in use.
 
#define TUFLAG_RECREATE   0x0800
 Client: set if this item was created and must be recreated after connection failure. More...
 
#define TUFLAG_VALUE_CACHE_VALID   0x1000
 Server: old/new compare cache valid.
 
#define TUFLAG_NEED_SEND_CREATE_LATER   0x1000
 Client: must set the TUFLAG_NEED_SEND_CREATE bit again after timeout.
 
#define QUALITY_MASK   0xfff
 the mask for the quality variable which contains more bits than the quality number
 
#define QUALITY_GOOD   0
 value good
 
#define QUALITY_CONFIGURATION_ERROR   1
 value not ok because of configuration error
 
#define QUALITY_NOT_CONNECTED   2
 value not ok because of connection not exist
 
#define QUALITY_DEVICE_FAILURE   3
 value not pl because of device failure
 
#define QUALITY_SENSOR_FAILURE   4
 value not ok because of sensor failure
 
#define QUALITY_LAST_KNOWN_VALUE   5
 last known good value (for resend from cache)
 
#define QUALITY_COMM_FAILURE   6
 value not ok because of connection failure. The connection does exist
 
#define QUALITY_OUT_OF_SERVICE   7
 value not ok because of device is out of service
 
#define QUALITY_WAITING_INITIAL_DATA   8
 no value retrieved yet
 
#define QUALITY_WRITE_PROTECTED   9
 write failed because value is read only
 
#define QUALITY_CORRECTED_VALUE   10
 invalid float to min or max
 
#define QUALITY_MORE_TO_COME   11
 in browse lists in last entry: call more.NoElements -> next offset
 
#define QUALITY_READ_PROTECTED   12
 read failed because value is not readable
 
#define QUALITY_CONVERT_FAILED   13
 data conversion failed
 
#define QUALITY_OVERLOAD   14
 not enough resources to handle the data
 
#define QUALITY_CERTIFICATE_BAD   15
 mostly UA
 
#define QUALITY_CERTIFICATE_UNTRUSTED   16
 mostly UA
 
#define QUALITY_CERTIFICATE_EXPIRED   17
 mostly UA
 
#define QUALITY_CERTIFICATE_CHAIN   18
 mostly UA
 
#define QUALITY_CERTIFICATE_SECURITY   19
 mostly UA
 
#define QUALITY_CERTIFICATE_REVOKED   20
 mostly UA
 
#define QUALITY_CERTIFICATE_HOST   21
 mostly UA
 
#define QUALITY_CERTIFICATE_ISSUER   22
 mostly UA
 
#define QUALITY_BOUND_NOT_FOUND   23
 for historian, marks oldest/newest value
 
#define QUALITY_DATA_LOST   24
 for historian, marks power off/on
 
#define QUALITY_DATA_SUBNORMAL   25
 for historian, marks aggregates with bad values
 
#define QUALITY_NO_DATA   100
 for user data and browsing
 
#define QUALITY_WAIT   101
 request completes asynchronously; used only between app and pipe lib
 
#define QUALITY_OPC_GOOD   QUALITY_GOOD
 value good
 
#define ERR_OPCPIPE_OK   0
 no error occured
 
#define ERR_OPCPIPE_NOT_INITIALIZED   1
 library not initialized correctly
 
#define ERR_OPCPIPE_ALREADY_INITIALIZED   2
 library already initialized
 
#define ERR_OPCPIPE_NUMBER_EXHAUSTED   3
 too many connections
 
#define ERR_OPCPIPE_BAD_HANDLE   4
 wrong handle given in call
 
#define ERR_OPCPIPE_MEMERR   5
 memory allocation error
 
#define ERR_OPCPIPE_BAD_RIGHTS   6
 access rights wrong
 
#define ERR_OPCPIPE_BAD_ITEMHANDLE   7
 itemhandle wrong
 
#define ERR_OPCPIPE_BAD_ITEMSYNTAX   8
 itemsyntax wrong ("will never work")
 
#define ERR_OPCPIPE_ITEM_UNKNOWN   9
 item doesn't exist; itemsyntax (possibly) correct ("doesn't work now, maybe works later")
 
#define ERR_OPCPIPE_BAD_TOPICPATH   10
 topic name wrong
 
#define ERR_OPCPIPE_DUPLICATENAME   12
 name duplicate
 
#define ERR_OPCPIPE_BAD_SESSION   13
 used for circumventing bugs in some UA servers
 
#define ERR_OPCPIPE_BAD_PASSWORD   20
 password wrong
 
#define ERR_OPCPIPE_BAD_PARAMETERS   21
 parameters wrong
 
#define ERR_OPCPIPE_BAD_OPCODE   22
 opcode wrong or not implemented
 
#define ERR_OPCPIPE_BAD_TOPICHANDLE   23
 topic handle wrong
 
#define ERR_OPCPIPE_BAD_NETPARAMS   24
 network parameters wrong
 
#define ERR_OPCPIPE_WAIT   25
 request not completed yet, answer will arrive asynchrnously
 
#define ERR_OPCPIPE_IS_INACTIVE   26
 operation not possible on inactive item
 
#define ERR_OPCPIPE_TRY_AGAIN   27
 try again later
 
#define ERR_OPCPIPE_CONNECTION   28
 conection failure
 
#define ERR_OPCPIPE_ITEMDATA_DROPPED   29
 data dropped because of error or stall
 
#define ERR_OPCPIPE_SYNTAXINVALID   30
 data syntax invalid
 
#define ERR_OPCPIPE_SYNTAXWARN   31
 data syntax possibly wrong
 
#define ERR_OPCPIPE_ACKMODE   32
 data_ack mode enabled on other side
 
#define ERR_OPCPIPE_IS_ACTIVE   33
 operation not possible on active item
 
#define ERR_OPCPIPE_BAD_ARRAYINDEX   34
 array index format bad
 
#define ERR_OPCPIPE_ARRAYINDEX_OUT_OF_RANGE   35
 array index out of range
 
#define ERR_OPCPIPE_STRUCTURE_MISSING   36
 the structure is missed
 
#define ERR_OPCPIPE_NO_PREFIX   37
 for redirect confirm: value is not a prefix, thus not useable for browsing
 
#define SETBIT_RESET_CLIENT   1
 reset the connection in Handle (all if handle is 0)
 
#define SETBIT_RESET_SERVER   2
 reset the connection in Handle (all if handle is 0)
 
#define SETBIT_DA_TOPIC_INSENSITIVE   4
 The opc da topic are handled case insensitive.
 
#define OPCPIPE_ERR_FLAG_SENDER_HANDLE   0x0001
 handles in error telegram are sender's handles
 
#define OPCPIPE_ERR_FLAG_RECEIVER_HANDLE   0x0002
 handles in error telegram are receiver's handles
 
#define WMK_OPCPIPE_HANDLE   W_UINT32
 must be W_UINT32 to maintain compatibility
 
#define OPCPIPE_TIMER_MS   30
 timer calls every 30 ms
 
#define RPC_ID_GENERIC   0
 generic RPC call, name is a function name to call, param and result can be any
 
#define RPC_ID_FILE_OPEN   1
 open file, name is the file name, param is W_UINT32 openMode (defines for openMode parameter ofref RPC_ID_FILE_OPEN andref RPC_ID_FILE_CREATE), result is W_UINT32 fileHandle
 
#define RPC_ID_FILE_CLOSE   2
 close file, name is unused, param is W_UINT32 fileHandle, result is empty
 
#define RPC_ID_FILE_READ   3
 read file, name is unused, params are W_UINT32 fileHandle, W_INT32 length, result is W_UINT8 data[]
 
#define RPC_ID_FILE_WRITE   4
 write file, name is unused, params are W_UINT32 fileHandle, W_UINT8 data[], result is empty
 
#define RPC_ID_FILE_TELL   5
 get position in file, name is unused, param is W_UINT32 fileHandle, result is W_UINT64 position
 
#define RPC_ID_FILE_SEEK   6
 set position in file, name is unused, params are W_UINT32 fileHandle, W_UINT64 position, result is empty
 
#define RPC_ID_FILE_CREATE   7
 create a new file, name is the file name, param is W_UINT32 openMode (defines for openMode parameter ofref RPC_ID_FILE_OPEN andref RPC_ID_FILE_CREATE), result is W_UINT32 fileHandle
 
#define RPC_ID_FILE_DELETE   8
 delete a file, name is the file name, param is empty, result is empty
 
#define RPC_ID_FILE_MOVE   9
 move a file, name is the file name, param is char newName[], result is empty
 
#define RPC_ID_FILE_COPY   10
 copy a file, name is the file name, param is char newName[], result is empty
 
#define RPC_ID_FILE_ATTR   11
 get attributes of file or directory, name is the file/directory name, param is empty, result is W_UINT64 size, W_UINT8 rwd
 
#define RPC_ID_DIR_CREATE   12
 create a new directory, name is the directory to create, params is empty, result is empty
 
#define RPC_ID_DIR_DELETE   13
 delete a directory (recursively, if needed), name is the directory name, param is empty, result is empty
 
#define RPC_ID_DIR_MOVE   14
 move a directory (recursively, if needed), name is the directory name, param is char newName[], result is empty
 
#define RPC_ID_DIR_COPY   15
 copy a directory (recursively, if needed), name is the directory name, param is char newName[], result is empty
 
#define RPC_ID_DIR_LIST   16
 list contents of directory, name is the directory name, param is W_UINT32 startOffset, result is PLC_OPCPIPE_BROWSEITEMDATA list[]
 
#define RPC_ID_NODE_CREATE   100
 creates a new node, name is the name to create, params are W_UINT16 type[, W_UINT32 arrayLen[, char comment[][, char structName[]]]], result is empty
 
#define RPC_ID_NODE_DELETE   101
 deletes a node, name is the name to delete, param is empty, result is empty
 
#define RPC_ID_ALARM_ACK   102
 acknowledge alarm, name is the condition ID, param is W_UINT8 eventId[], char comment[], result is empty
 
#define RPC_ID_ALARM_CONF   103
 confirm alarm, name is the condition ID, param is W_UINT8 eventId[], char comment[], result is empty
 
#define RPC_ID_TRIGGER_IMPORT   104
 trigger structure/enum import, name is unused, param is W_UINT32 id, bool isEnum, result is empty
 
#define RPC_ID_ADD_COMMENT   105
 add acomment to a condition, name is the condition ID, param is W_UINT8 eventId[], char comment[], result is empty
 
#define RPC_ID_UPDATE_CERT   106
 update server certificate, name is unused, params are W_UINT8 cert[], W_UINT8 key[]
 
#define RPC_ID_GENERIC_INPUT_PARAMS   0xFFFFFFF0
 get list of input parameters for generic call, name is the function, param is empty, result is the list of parameters (PLC_OPCPIPE_BROWSEITEMDATA[])
 
#define RPC_ID_GENERIC_OUTPUT_PARAMS   0xFFFFFFF1
 get list of output parameters for generic call, name is the function, param is empty, result is the list of parameters (PLC_OPCPIPE_BROWSEITEMDATA[])
 
#define RPC_ID_CANCEL_CALL   0xFFFFFFF2
 cancel an RPC call, name, param, result are empty (only the callHandle is used)
 
#define RPC_OPEN_MODE_READ   0x01
 open for reading
 
#define RPC_OPEN_MODE_WRITE   0x02
 open for writing
 
#define RPC_OPEN_MODE_TRUNCATE   0x04
 when open for writing, set file length to zero; ignored otherwise
 
#define RPC_OPEN_MODE_APPEND   0x08
 seek to file end
 
#define WMK_PROT_BROWSE_ITEMS   1
 
#define WMK_PROT_BROWSE_ONE_ITEM   2
 
#define WMK_PROT_BROWSE_SERVER   3
 
#define WMK_PROT_BROWSE_STRUCTURES   4
 
#define WMK_PROT_BROWSE_ONE_STRUCTURE   5
 
#define WMK_PROT_BROWSE_ENUMERATIONS   6
 
#define WMK_PROT_BROWSE_ONE_ENUMERATION   7
 
#define WMK_PROT_BROWSE_EVENT_TYPES   8
 
#define WMK_PROT_BROWSE_EVENTS   9
 
#define WMK_PROT_BROWSE_EVENT_FIELDS   10
 
#define WMK_PROT_BROWSE_ONE_EVENT_TYPE   11
 
#define WMK_PROT_HISTORY_ENABLED_VALUES   0x01
 value history enabled
 
#define WMK_PROT_HISTORY_ENABLED_EVENT   0x02
 event history enabled
 
#define OPCPIPE_DIRECT_DATA_LEN   8
 
#define DATAVALUE_GET_DATA(val)   DatavalueGetData(val) /* TODO replace in OpcDA lib */
 
#define EVENT_TYPES_BROWSE_FLAG_BROWSE_ALARMS   0x0001
 browse alarm types; not set: browse event types
 
#define OPCPIPE_BROWSEINFO_VALID_POLLRATE   0x0004
 set if the poll rate value is valid
 
#define OPCPIPE_BROWSEINFO_VALID_FORMATSTRING   0x0008
 set if the FormatString is valid (was OPCPIPE_BROWSEINFO_VALID_DATA)
 
#define OPCPIPE_BROWSEINFO_VALID_SPECIAL_FLAGS   0x0010
 set if the SpecialFlags value is valid
 
#define OPCPIPE_BROWSEINFO_VALID_STRUCTNAME   0x0020
 set if the StructName is valid (including StructNameLen)
 
#define OPCPIPE_BROWSEINFO_VALID_INTERNALNAME   0x0040
 set if the InternalName is valid (including InternalNameLen)
 
#define OPCPIPE_BROWSEINFO_VALID_ORIGINALTYPE   0x0080
 set if the OriginalType is valid
 
#define OPCPIPE_BROWSEINFO_VALID_NAMESPACE_IDX   0x0100
 set if the NamespaceIndex is valid
 
#define OPCPIPE_BROWSEINFO_VALID_EVENT_INFO   0x0200
 set if the EventInfo is valid
 
#define OPCPIPE_BROWSEINFO_FLAG_SYSTEM_CONN   0x0001
 is system connection
 
#define OPCPIPE_BROWSEINFO_FLAG_MEMORY_CONN   0x0002
 is internal memory connection
 
#define OPCPIPE_BROWSEINFO_FLAG_CONN_ALIAS   0x0004
 is connection alias
 
#define OPCPIPE_BROWSEINFO_FLAG_RAW_CONN   0x0008
 is raw (or file/fieldbus/...) connection, event data only
 
#define OPCPIPE_BROWSEINFO_FLAG_ITEM_REDIRECT   0x0010
 is an entry from item redirect
 
#define OPCPIPE_BROWSEINFO_FLAG_UA_ITEM_CONN   0x0020
 is an OPC UA item connection
 
#define OPCPIPE_BROWSEINFO_FLAG_EVENT_SOURCE   0x0040
 is an OPC UA event source
 
#define OPCPIPE_BROWSEINFO_FLAG_NOT_IMPORTED   0x0080
 structure/enum not imported yet; variable would be useable after import
 
#define OPCPIPE_BROWSEINFO_FLAG_CONFIG_CONN   0x0100
 is configuration connection
 
#define OPCPIPE_BROWSEINFO_FLAG_HISTORIAN_CONN   0x0200
 is historian connection
 
#define OPCPIPE_BROWSEINFO_FLAG_HISTORY_ENABLED   0x0400
 variable has history read functionality
 
#define OPCPIPE_BROWSEINFO_FLAG_MANDATORY   0x0800
 is a mandatory item (e.g. for UA types)
 
#define OPCPIPE_BROWSEINFO_FLAG_EVENT_HISTORY_ENABLED   0x0800
 element has event history read functionality
 
#define OPCPIPE_BROWSEINFO_EVENT_PARENT   0x0001
 this is the parent in the event tree
 
#define OPCPIPE_BROWSEINFO_EVENT_CHILD   0x0002
 this is a child in the event tree
 
#define OPCPIPE_BROWSEINFO_EVENT_NO_ITEMS   0x0004
 on request: don't include normal items
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_USED   0x0008
 set if the nodeclass bits below are used
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_OBJECT   0x0000
 Nodeclass: Object.
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_VARIABLE   0x0010
 Nodeclass: Variable.
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_METHOD   0x0020
 Nodeclass: Method.
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_OBJECTTYPE   0x0030
 Nodeclass: ObjectType.
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_VARTYPE   0x0040
 Nodeclass: VariableType.
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_REFTYPE   0x0050
 Nodeclass: ReferenceType.
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_DATATYPE   0x0060
 Nodeclass: DataType.
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_VIEW   0x0070
 Nodeclass: View.
 
#define OPCPIPE_BROWSEINFO_EVENT_NODECLASS_MASK   0x00F0
 
#define OPCPIPE_DIAG_FLAG_GROUP_NO_VALID   0x0001
 PLC_OPCPIPE_DIAGITEM::GroupNo is valid.
 
#define DIAG_ELEMENT_OPCODE_DEVICE   0x01
 
#define DIAG_ELEMENT_OPCODE_TOPIC   0x02
 
#define DIAG_ELEMENT_OPCODE_ITEM   0x03
 
#define DIAG_ELEMENT_OPCODE_CLIENT   0x04
 
#define DIAG_ELEMENT_OPCODE_GROUP   0x05
 
#define DIAG_ELEMENT_FLAG_ACTIVE   0x0001
 active item
 
#define DIAG_ELEMENT_FLAG_NODE   0x0002
 used only as node in hierarchical items, not as real item
 
#define DIAG_ELEMENT_FLAG_EXPAND   0x0004
 can be expanded
 
#define DIAG_REQUEST_OPCODE_FROM_TOPIC   0x01
 
#define DIAG_REQUEST_OPCODE_FROM_CLIENT   0x02
 
#define DIAG_REQUEST_FLAG_HIERARCHICAL_ITEMS   0x0001
 
#define DIAG_RESPONSE_FLAG_MORE_DATA   0x0001
 
#define OPCPIPE_CREATEITEM_FLAG_RETURN_DUPLICATE   0x01
 set to return the existing handles and applicationData if the item is already created; unset to return an error
 
#define WMK_PROT_HISTORY_AGGREGATE_NONE   0
 no aggregate calculation, return raw values
 
#define WMK_PROT_HISTORY_AGGREGATE_MIN   1
 return minimum value
 
#define WMK_PROT_HISTORY_AGGREGATE_MAX   2
 return maximum value
 
#define WMK_PROT_HISTORY_AGGREGATE_COUNT   3
 return number of stored values
 
#define WMK_PROT_HISTORY_AGGREGATE_AVG   4
 return average value
 
#define WMK_PROT_HISTORY_AGGREGATE_STDDEV   5
 return standard derivation
 
#define WMK_PROT_HISTORY_DATA_FLAG_INCLUDE_BOUNDS   0x01
 set to include one value outside of the specified bounds
 
#define EVENT_REQUEST_FLAG_REFRESH_CONDITIONS   0x0001
 
#define EVENT_REQUEST_FLAG_ALL_EVENT_TYPES   0x0002
 
#define EVENT_REQUEST_FLAG_ALL_EVENT_NOTIFIERS   0x0004
 
#define EVENT_REQUEST_FLAG_ALL_EVENT_CATEGORIES   0x0008
 
#define WmkProtDisableUpdate()   WmkProtDisableUpdate__("", 0)
 
#define WmkProtRestoreUpdate()   WmkProtRestoreUpdate__("", 0)
 

Typedefs

typedef void(WMK_CALL_CONFIRM * RpcParamConfirm) (W_UINT32 resultCount, RPC_PARAMETER *results)
 
typedef int(* pConfirmCliCreateItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_CREATE_ITEM_DATA *items)
 
typedef int(* pConfirmCliCyclicReadData) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
typedef int(* pConfirmCliSyncReadData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
typedef int(* pConfirmCliWriteComplete) (W_UINT32 handle, WMK_OPCPIPE_HANDLE writeHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
typedef int(* pConfirmCliBrowseData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, W_UINT32 dataLen, void *data)
 
typedef int(* pConfirmCliDiagnosticsData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE diagHandle, W_UINT32 len, void *data)
 
typedef int(* pConfirmCliError) (W_UINT32 handle, WMK_OPCPIPE_HANDLE itemHandle, WMK_OPCPIPE_HANDLE reqHandle, W_UINT16 opcode, W_UINT32 errcode, W_UINT32 len, void *parameters)
 
typedef int(* pConfirmCliRpcData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE callHandle, W_UINT32 errorCode, W_UINT32 resultCount, RPC_PARAMETER *results)
 
typedef int(* pConfirmCliCreateEventData) (W_UINT32 handle, W_UINT32 resultCount, EVENT_REQUEST *results)
 
typedef int(* pConfirmCliEventData) (W_UINT32 handle, W_UINT32 resultCount, EVENT_RESULT *results)
 
typedef int(* pConfirmCliHistoryReadData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_ITEM_DATA *item)
 
typedef int(* pConfirmCliHistoryReadEventData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_EVENT_DATA *data)
 
typedef int(* pConfirmConnStatus) (W_UINT32 handle, W_UINT32 statusFlags)
 
typedef int(* pConfirmSrvCreateTopic) (W_UINT32 handle, const char *topicName, WMK_OPCPIPE_HANDLE pipeTopicHandle, WMK_OPCPIPE_HANDLE *appTopicHandle)
 
typedef int(* pConfirmSrvDeleteTopic) (W_UINT32 handle, WMK_OPCPIPE_HANDLE topicHandle)
 
typedef int(* pConfirmSrvCreateItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_CREATE_ITEM_DATA *items)
 
typedef int(* pConfirmSrvDeleteItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_HANDLE_ITEM_DATA *itemHandles)
 
typedef int(* pConfirmSrvActivateItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_HANDLE_ITEM_DATA *itemHandles)
 
typedef int(* pConfirmSrvDeactivateItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_HANDLE_ITEM_DATA *itemHandles)
 
typedef int(* pConfirmSrvWriteItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE writeHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
typedef int(* pConfirmSrvSyncReadItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items, WMK_OPCPIPE_HANDLE *ackHandle)
 
typedef int(* pConfirmSrvRefreshItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items, WMK_OPCPIPE_HANDLE *ackHandle)
 
typedef int(* pConfirmSrvDeviceDataAck) (W_UINT32 handle, WMK_OPCPIPE_HANDLE ackHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *itemHandles)
 
typedef int(* pConfirmSrvBrowseItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, W_UINT32 startOffset, const char *topicName, const char *path, OPCPIPE_BROWSE_REQUEST_PARAMS *browseParams, W_UINT16 typ, W_UINT8 browseFlags, W_UINT32 *len, PLC_OPCPIPE_BROWSEITEMDATA **data, WMK_PTR_CONFIRM *confirm)
 
typedef int(* pConfirmSrvBrowseOneItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, const char *topicName, const char *itemName, W_UINT8 browseFlags, W_UINT32 *len, PLC_OPCPIPE_BROWSEITEMDATA **data, WMK_PTR_CONFIRM *confirm)
 
typedef int(* pConfirmSrvBrowseGeneric) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, W_UINT32 browseOpcode, W_UINT32 startOffset, const char *path, OPCPIPE_BROWSE_REQUEST_PARAMS *browseParams, W_UINT16 typ, W_UINT8 browseFlags, W_UINT32 *len, PLC_OPCPIPE_BROWSEITEMDATA **data, WMK_PTR_CONFIRM *confirm)
 
typedef int(* pConfirmSrvStopBrowseItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle)
 
typedef int(* pConfirmSrvDiagnosticsData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE diagHandle, W_UINT32 *len, void **mem, WMK_PTR_CONFIRM *confirm)
 
typedef int(* pConfirmSrvRedirectItem) (W_UINT32 handle, const char *topicItemName, char **newTopicItemName, WMK_PTR_CONFIRM *confirm)
 
typedef void(* pConfirmSrvSamplerateChanged) (W_UINT32 handle)
 
typedef int(* pConfirmSrvExtDiagnostics) (W_UINT32 handle, WMK_OPCPIPE_HANDLE topicHandle, WMK_OPCPIPE_HANDLE itemHandle, PLC_OPCPIPE_DIAG_ELEMENT *data, W_UINT32 memlen)
 
typedef int(* pConfirmSrvRpcCall) (W_UINT32 handle, WMK_OPCPIPE_HANDLE callHandle, W_UINT32 rpcId, const char *name, W_UINT32 paramCount, RPC_PARAMETER *params, W_UINT32 *resultCount, RPC_PARAMETER **results, RpcParamConfirm *confirm)
 
typedef int(* pConfirmSrvQueryItemInformation) (W_UINT32 handle, WMK_OPCPIPE_HANDLE topicHandle, WMK_OPCPIPE_HANDLE itemHandle, WMK_OPCPIPE_ITEM_INFO *itemInfo)
 
typedef int(* pConfirmSrvStopWriteItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE writeHandle)
 
typedef int(* pConfirmSrvStopSyncReadItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle)
 
typedef int(* pConfirmSrvHistoryReadItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_ITEM_DATA *item)
 
typedef int(* pConfirmSrvHistoryEnabled) (W_UINT32 handle, const char *symbol, W_UINT8 *result)
 
typedef int(* pConfirmSrvHistoryReadEvent) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_EVENT_DATA *event)
 
typedef int(* pConfirmSrvEventFieldsChanged) (W_UINT32 handle, EVENT_FIELD *fields, W_UINT32 noOfFields)
 
typedef int(* pConfirmSrvStopHistoryReadItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle)
 
typedef struct _FILTER_HANDLE FILTER_HANDLE
 

Functions

EXTERN_C int WENTRY_C DatavalueReserveData (DATAVALUE *val, W_UINT32 datalen)
 
EXTERN_C W_UINT8 *WENTRY_C DatavalueGetData (DATAVALUE *val)
 
EXTERN_C int WENTRY_C DatavalueSetData (DATAVALUE *val, W_UINT8 *data, W_UINT32 datalen)
 
EXTERN_C int WENTRY_C DatavalueClearData (DATAVALUE *val)
 
 WMK_STATIC_ASSERT (sizeof(((PLC_OPCPIPE_DIAG_ELEMENT *) 0) ->Counters.Item)<=sizeof(((PLC_OPCPIPE_DIAG_ELEMENT *) 0) ->Counters.C), PLC_OPCPIPE_DIAG_ELEMENT_Counters_Item_is_too_big)
 
 WMK_STATIC_ASSERT (sizeof(((PLC_OPCPIPE_DIAG_ELEMENT *) 0) ->Counters.Topic)<=sizeof(((PLC_OPCPIPE_DIAG_ELEMENT *) 0) ->Counters.C), PLC_OPCPIPE_DIAG_ELEMENT_Counters_Topic_is_too_big)
 
 WMK_STATIC_ASSERT (sizeof(((PLC_OPCPIPE_DIAG_ELEMENT *) 0) ->Counters.Connection)<=sizeof(((PLC_OPCPIPE_DIAG_ELEMENT *) 0) ->Counters.C), PLC_OPCPIPE_DIAG_ELEMENT_Counters_Connection_is_too_big)
 
 WMK_STATIC_ASSERT (sizeof(((PLC_OPCPIPE_DIAG_ELEMENT *) 0) ->Counters.Group)<=sizeof(((PLC_OPCPIPE_DIAG_ELEMENT *) 0) ->Counters.C), PLC_OPCPIPE_DIAG_ELEMENT_Counters_Group_is_too_big)
 
EXTERN_C int WENTRY_C OpcPipeExit (void)
 
EXTERN_C int WENTRY_C OpcPipeQueryVersion (W_UINT32 *version)
 retrieves OpcPipe library version. More...
 
EXTERN_C int WENTRY_C OpcPipeQueryLoadPath (char *path, int len)
 retrieves OpcPipe library load path. More...
 
EXTERN_C int WENTRY_C OpcPipeDebugSetShareHandle (void *givenShare)
 Tani internal debug only!
 
EXTERN_C int WENTRY_C WmkProtBasePresetInit (CORE_PRESET_VALUES *preset)
 
EXTERN_C int WENTRY_C WmkProtServerInit (PLC_OPCPIPE_CONFIRMS *confirm)
 
EXTERN_C int WENTRY_C WmkProtServerInitEx (PLC_OPCPIPE_CONFIRMS_EX *confirm)
 
EXTERN_C int WENTRY_C WmkProtClientInit (PLC_OPCPIPE_CONFIRMS *confirm)
 
EXTERN_C int WENTRY_C WmkProtClientInitEx (PLC_OPCPIPE_CONFIRMS_EX *confirm)
 
EXTERN_C int WENTRY_C WmkProtServerTerminate (void)
 
EXTERN_C int WENTRY_C WmkProtClientTerminate (void)
 
EXTERN_C int WENTRY_C WmkProtClientValidateLibVersions (void)
 
EXTERN_C int WENTRY_C WmkProtServerValidateLibVersions (void)
 
EXTERN_C int WENTRY_C WmkProtConnStatus (OPCPIPE_STATUS *status)
 Checks the actual status of the OPCpipe connection. The element Handle need to be initialized with the net handle before call. More...
 
EXTERN_C int WENTRY_C WmkProtChangeConnStatus (OPCPIPE_STATUS *status)
 Changes properties of the OPCpipe connection. The element Handle need to be initialized with the net handle before call. Flags and FlagsMask are set according to the properties to be changed. More...
 
EXTERN_C int WENTRY_C WmkProtServerStopConnection (W_UINT32 handle, int disableConfirms)
 Stops one server connection. There is no housekeeping on this function, only the connection is closed and internal memory is freed. More...
 
EXTERN_C int WENTRY_C WmkProtClientStopConnection (W_UINT32 handle, int disableConfirms)
 Stops one client connection. There is no housekeeping on this function, only the connection is closed and internal memory is freed. More...
 
EXTERN_C int WENTRY_C WmkProtWaitConfirm (W_UINT32 handle, WMK_CONFIRM confirm)
 Registers the wait ready confirm. The confirm will be called each time the OPCpipe connection changes from the wait state to the normal state. This happens if a call returns with TU_STATUS_WAIT and now the next call can be made. More...
 
EXTERN_C int WENTRY_C WmkProtClientSetConnectionName (W_UINT32 handle, const char *connectionName)
 sets the connection name, used to separate structure names for different connections.
 
EXTERN_C int WENTRY_C WmkProtElementCount (W_UINT16 type, W_UINT16 typeFlags, W_UINT32 datalen, const void *data, W_UINT32 *retBytes)
 Brings the length in bytes of the requested element type, flags and len.
 
EXTERN_C int WENTRY_C WmkProtByteLen (W_UINT16 type, W_UINT32 elements, W_UINT32 *retBytes)
 calculates the memory length of an array of simple variables
 
EXTERN_C int WENTRY_C WmkProtStringArraySize (W_UINT16 typeFlags, W_UINT32 datalen, const void *data, W_UINT32 *ret)
 calculates the length of a string array
 
EXTERN_C int WENTRY_C WmkProtMultilangStringArraySize (W_UINT16 typeFlags, W_UINT32 datalen, const void *data, W_UINT32 *ret)
 
EXTERN_C int WENTRY_C WmkProtDataConvert (void *memdest, const void *memsrc, W_UINT16 type_dest, W_UINT16 typ_dest_flags, W_UINT16 type_src, W_UINT16 typ_src_flags, W_UINT32 inbytes, W_UINT32 maxmem, W_UINT32 *retbytes, DATA_CONVERT_INFO *info)
 Convers binary data between different data formats. More...
 
EXTERN_C int WENTRY_C WmkProtTimings (PLC_OPCPIPE_TIMINGS *timings, int func)
 Handling of internal timings like life data ack send rate and check rate, and reset of connections. More...
 
EXTERN_C int WENTRY_C WmkProtCreateItem (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_CREATE_ITEM_DATA *items)
 
EXTERN_C int WENTRY_C WmkProtCreateItemEx (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_CREATE_ITEM_DATA_EX *items)
 
EXTERN_C int WENTRY_C WmkProtDeleteItem (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_HANDLE_ITEM_DATA *pipeItemHandles)
 
EXTERN_C int WENTRY_C WmkProtActivateItem (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_HANDLE_ITEM_DATA *pipeItemHandles)
 
EXTERN_C int WENTRY_C WmkProtDeactivateItem (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_HANDLE_ITEM_DATA *pipeItemHandles)
 
EXTERN_C int WENTRY_C WmkProtRefreshItem (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
EXTERN_C int WENTRY_C WmkProtSyncReadItem (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
EXTERN_C int WENTRY_C WmkProtHistoryReadItem (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_ITEM_DATA *item)
 
EXTERN_C int WENTRY_C WmkProtHistoryReadEvent (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_EVENT_DATA *event)
 
EXTERN_C int WENTRY_C WmkProtStopSyncReadItem (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle)
 
EXTERN_C int WENTRY_C WmkProtWriteItem (W_UINT32 handle, WMK_OPCPIPE_HANDLE writeHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
EXTERN_C int WENTRY_C WmkProtStopWriteItem (W_UINT32 handle, WMK_OPCPIPE_HANDLE writeHandle)
 
EXTERN_C int WENTRY_C WmkProtQueryItemInformation (W_UINT32 handle, WMK_OPCPIPE_HANDLE pipeItemHandle, WMK_OPCPIPE_ITEM_INFO *itemInfo)
 
EXTERN_C int WENTRY_C WmkProtBrowse (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, W_UINT32 browseOpcode, W_UINT32 startOffset, const char *path, OPCPIPE_BROWSE_REQUEST_PARAMS *browseParams, W_UINT16 typ, W_UINT8 browseFlags)
 
EXTERN_C int WENTRY_C WmkProtStopBrowse (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, W_UINT32 browseOpcode)
 
EXTERN_C int WENTRY_C WmkProtRpcCall (W_UINT32 handle, W_UINT32 callHandle, W_UINT32 rpcId, const char *name, W_UINT32 paramCount, RPC_PARAMETER *params)
 
EXTERN_C int WENTRY_C WmkProtMonitorEvents (W_UINT32 handle, W_UINT32 eventCount, EVENT_REQUEST *events)
 
EXTERN_C int WENTRY_C WmkProtModifyMonitorEvents (W_UINT32 handle, W_UINT32 eventCount, EVENT_REQUEST *events)
 
EXTERN_C int WENTRY_C WmkProtDeleteEvents (W_UINT32 handle, W_UINT32 eventCount, W_UINT32 *eventHandles)
 
EXTERN_C int WENTRY_C WmkProtDiagnostics (W_UINT32 handle, WMK_OPCPIPE_HANDLE diagHandle, WMK_OPCPIPE_HANDLE *pipeTopicHandle, W_UINT32 no)
 
EXTERN_C int WENTRY_C WmkProtDiagTopicName (W_UINT32 handle, WMK_OPCPIPE_HANDLE pipeTopicHandle, char *topicName, W_UINT16 namelen)
 This enables querying the topic name from the return values of the diagnostics calls. More...
 
EXTERN_C int WENTRY_C WmkProtDiagItemName (W_UINT32 handle, WMK_OPCPIPE_HANDLE pipeItemHandle, char *itemName, W_UINT16 namelen)
 This enables querying the item name from the return values of the diagnostics calls. More...
 
EXTERN_C int WENTRY_C WmkProtCreateItemData (W_UINT32 handle, int createErr, W_UINT32 itemsCount, WMK_PROT_CREATE_ITEM_DATA *items)
 
EXTERN_C int WENTRY_C WmkProtCyclicReadData (W_UINT32 handle, WMK_OPCPIPE_HANDLE ackHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
EXTERN_C int WENTRY_C WmkProtSyncReadData (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_OPCPIPE_HANDLE ackHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
EXTERN_C int WENTRY_C WmkProtHistoryReadData (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_ITEM_DATA *item)
 
EXTERN_C int WENTRY_C WmkProtEventHistoryReadData (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_EVENT_DATA *event)
 
EXTERN_C int WENTRY_C WmkProtWriteComplete (W_UINT32 handle, WMK_OPCPIPE_HANDLE writeHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)
 
EXTERN_C int WENTRY_C WmkProtBrowseItemData (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, W_UINT32 dataLen, PLC_OPCPIPE_BROWSEITEMDATA *data, WMK_PTR_CONFIRM confirm)
 
EXTERN_C int WENTRY_C WmkProtRpcData (W_UINT32 handle, W_UINT32 callHandle, W_UINT32 errorCode, W_UINT32 resultCount, RPC_PARAMETER *results)
 
EXTERN_C int WENTRY_C WmkProtSetSecurity (W_UINT32 handle, WMK_OPCPIPE_HANDLE pipeTopicHandle, ACCESS_VALUES *access)
 Set access rights per topic. More...
 
EXTERN_C int WENTRY_C WmkProtEventData (W_UINT32 handle, EVENT_RESULT *event)
 
EXTERN_C int WENTRY_C WmkProtSymbolsChanged (W_UINT32 handle, const char *browsePath)
 
EXTERN_C int WENTRY_C WmkProtGetAppData (W_UINT32 handle, WMK_OPCPIPE_HANDLE pipeTopicHandle, void **appTopicData, WMK_OPCPIPE_HANDLE pipeItemHandle, void **appItemData)
 
EXTERN_C int WENTRY_C WmkProtSetAppData (W_UINT32 handle, WMK_OPCPIPE_HANDLE pipeTopicHandle, void *appTopicData, WMK_OPCPIPE_HANDLE pipeItemHandle, void *appItemData)
 Set application specific pointers. More...
 
EXTERN_C int WENTRY_C WmkProtFindTopicByName (W_UINT32 handle, const char *topicName, W_UINT32 *appTopicHandle, W_UINT32 *pipeTopicHandle)
 
EXTERN_C int WENTRY_C WmkProtFindItemByName (W_UINT32 handle, WMK_OPCPIPE_HANDLE pipeTopicHandle, const char *itemName, W_UINT32 *appItemHandle, W_UINT32 *pipeItemHandle)
 
EXTERN_C int WENTRY_C WmkProtTopicList (W_UINT32 handle, W_UINT32 *tablen, OPCPIPE_TOPIC **table)
 
EXTERN_C int WENTRY_C WmkProtItemList (W_UINT32 handle, W_UINT32 *tablen, OPCPIPE_ITEM **table)
 
EXTERN_C int WENTRY_C WmkProtHandleFromPointer (W_UINT32 handle, OPCPIPE_TOPIC *topic, OPCPIPE_ITEM *item, WMK_OPCPIPE_HANDLE *retHandle)
 
EXTERN_C int WENTRY_C WmkProtIndexFromHandle (W_UINT32 handle, WMK_OPCPIPE_HANDLE topicOrItemHandle, W_UINT32 *retIndex)
 
EXTERN_C int WENTRY_C WmkProtTopicHandleFromItemHandle (W_UINT32 handle, WMK_OPCPIPE_HANDLE itemHandle, WMK_OPCPIPE_HANDLE *retHandle)
 
EXTERN_C int WENTRY_C WmkProtDisableUpdate__ (const char *file, int line)
 
EXTERN_C int WENTRY_C WmkProtRestoreUpdate__ (const char *file, int line)
 
EXTERN_C int WENTRY_C WmkProtIsUpdateDisabled (int byThisThread)
 used for debug only
 
EXTERN_C int WENTRY_C WmkProtReadDebugBuffer (char *buffer, W_UINT32 buflen)
 query internal debug buffer More...
 
EXTERN_C int WENTRY_C WmkProtGetCapabilities (W_UINT32 handle, W_UINT64 *capabilities)
 Queries the connection capabilities. This may be used for checking functionality or requested things in the partner or local configuration. More...
 
EXTERN_C int WENTRY_C WmkProtServerDiagnostics (W_UINT32 handle, PLC_OPCPIPE_DIAG_REQUEST *request, PLC_OPCPIPE_DIAG_RESPONSE *response, W_UINT32 responseMemlen)
 query extended server diagnostics More...
 
EXTERN_C int WENTRY_C WmkProtRegisterServer (W_UINT32 handle, W_UINT16 port, int isOnline)
 registers an opc ua server with a discovery server More...
 
EXTERN_C int WENTRY_C OpcUaParseFilterExpression (const char *filter, FILTER_HANDLE **result)
 
EXTERN_C int WENTRY_C OpcUaEvaluateFilterExpression (FILTER_HANDLE *filter, EVENT_RESULT *event)
 
EXTERN_C int WENTRY_C OpcUaDeleteFilterExpression (FILTER_HANDLE *event)
 

Detailed Description

OpcPipe core definitions, used for all protocol variants.

Author
Werner Krings, Werner Mehrbrodt
Copyright: © 2018 Tani GmbH
werne.nosp@m.r.kr.nosp@m.ings@.nosp@m.tani.nosp@m.ndust.nosp@m.rie..nosp@m.de
formatted with tab size of 6
Date
Created on 20 apr 18
last modified 13 Jan 2021

Typedef Documentation

◆ pConfirmCliBrowseData

typedef int(* pConfirmCliBrowseData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, W_UINT32 dataLen, void *data)

Called after browsing items

Parameters
[in]handleclient connection handle
[in]browseHandlebrowse handle
[in]dataLenlength of browse data in bytes
[in]dataresult data, depending on the request (see Browse opcodes)
Returns
error values

◆ pConfirmCliCreateEventData

typedef int(* pConfirmCliCreateEventData) (W_UINT32 handle, W_UINT32 resultCount, EVENT_REQUEST *results)

called after an event create call returns

Parameters
[in]handleserver connection handle
[in]resultCountnumber of results returned
[in]resultslist if results returned
Returns
error values

◆ pConfirmCliCreateItem

typedef int(* pConfirmCliCreateItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_CREATE_ITEM_DATA *items)

called if the server has created an item.

Parameters
[in]handleclient connection handle
[in]itemsCountnumber of created items
[in]itemsnumber of created items
Returns
error values

◆ pConfirmCliCyclicReadData

typedef int(* pConfirmCliCyclicReadData) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)

Called if data or quality is returned from the server.

Parameters
[in]handleclient connection handle
[in]itemsCountnumber of item values
[in]itemsitem values
Returns
error values

◆ pConfirmCliDiagnosticsData

typedef int(* pConfirmCliDiagnosticsData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE diagHandle, W_UINT32 len, void *data)

Called after request diagnostics

Parameters
[in]handleclient connection handle
[in]diagHandlediagnostics handle
[in]lenlength of diagnostics data
[in]datadiagnostics data
Returns
error values

◆ pConfirmCliError

typedef int(* pConfirmCliError) (W_UINT32 handle, WMK_OPCPIPE_HANDLE itemHandle, WMK_OPCPIPE_HANDLE reqHandle, W_UINT16 opcode, W_UINT32 errcode, W_UINT32 len, void *parameters)

Called if a request brings an error

Parameters
[in]handleclient connection handle
[in]itemHandleapp item handle or 0 if none
[in]reqHandleread/write/ack handle or 0 if none
[in]opcodeOpcode that produced the error
[in]errcodeerror values error code
[in]lenlength of additional parameters in bytes
[in]parametersadditional parameters
Returns
error values

◆ pConfirmCliEventData

typedef int(* pConfirmCliEventData) (W_UINT32 handle, W_UINT32 resultCount, EVENT_RESULT *results)

called after Event data is returned from the server

Parameters
[in]handleserver connection handle
[in]resultCountnumber of results returned
[in]resultslist if results returned
Returns
error values

◆ pConfirmCliHistoryReadData

typedef int(* pConfirmCliHistoryReadData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_ITEM_DATA *item)

Called if history data is returned from the server.

Parameters
[in]handleclient connection handle
[in]readHandleread handle for recognizing the answer
[in]itemitem values
Returns
error values

◆ pConfirmCliHistoryReadEventData

typedef int(* pConfirmCliHistoryReadEventData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_EVENT_DATA *data)

Called if history event data is returned from the server.

Parameters
[in]handleclient connection handle
[in]readHandleread handle for recognizing the answer
[in]dataevent data
Returns
error values

◆ pConfirmCliRpcData

typedef int(* pConfirmCliRpcData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE callHandle, W_UINT32 errorCode, W_UINT32 resultCount, RPC_PARAMETER *results)

called after RPC results returned

Parameters
[in]handleserver connection handle
[in]callHandlecall handle for recognizing the answer
[in]errorCodeerror values error code
[in]resultCountnumber of results returned
[in]resultslist if results returned
Returns
error values

◆ pConfirmCliSyncReadData

typedef int(* pConfirmCliSyncReadData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)

Called if sync data or quality is returned from the server.

Parameters
[in]handleclient connection handle
[in]readHandleread handle for recognizing the answer
[in]itemsCountnumber of item values
[in]itemsitem values
Returns
error values

◆ pConfirmCliWriteComplete

typedef int(* pConfirmCliWriteComplete) (W_UINT32 handle, WMK_OPCPIPE_HANDLE writeHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)

Called if the data are written on the server side.

Parameters
[in]handleclient connection handle
[in]writeHandlewrite handle for recognizing the answer
[in]itemsCountnumber of written item
[in]itemswritten item
Returns
error values

◆ pConfirmConnStatus

typedef int(* pConfirmConnStatus) (W_UINT32 handle, W_UINT32 statusFlags)

Called if the connection status changes. Details can be requested via WmkProtConnStatus.

Parameters
[in]handleconnection handle (client or server)
[in]statusFlagsconnection status flags, values for OPCPIPE_STATUS::Flags
Returns
error values

◆ pConfirmSrvActivateItem

typedef int(* pConfirmSrvActivateItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_HANDLE_ITEM_DATA *itemHandles)

called if the client activates an item.

Parameters
[in]handleserver connection handle
[in]itemsCountnumber of items to activate
[in]itemHandlesapp item handles
Returns
error values

◆ pConfirmSrvBrowseGeneric

typedef int(* pConfirmSrvBrowseGeneric) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, W_UINT32 browseOpcode, W_UINT32 startOffset, const char *path, OPCPIPE_BROWSE_REQUEST_PARAMS *browseParams, W_UINT16 typ, W_UINT8 browseFlags, W_UINT32 *len, PLC_OPCPIPE_BROWSEITEMDATA **data, WMK_PTR_CONFIRM *confirm)

Called if the client browses something.

May either return the data immediately in data (with length len) or return ERR_OPCPIPE_WAIT and call WmkProtBrowseItemData later.

Parameters
[in]handleserver connection handle
[in]browseHandlebrowse handle for recognizing the answer
[in]browseOpcodebrowese operation
[in]startOffsetstart offset for browsing request if not all data can be returned in one response
[in]pathrequest path. may be 0 for root list.
[in]browseParamsadditional browse parameters.
[in]typdata type to search for. 0 returns all items
[in]browseFlagsvalues for PLC_OPCPIPE_BROWSEITEMDATA::Flags, bitcoded to search for. 0 returns all items. if OPCPIPE_BORWSEFLAG_HAS_EXT_INFO is set, try to return extended information
[out]lenlength of browse data
[out]databrowsing data can be stored here
[out]confirmfunction to be called if data is no longer needed
Returns
error values

◆ pConfirmSrvBrowseItems

typedef int(* pConfirmSrvBrowseItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, W_UINT32 startOffset, const char *topicName, const char *path, OPCPIPE_BROWSE_REQUEST_PARAMS *browseParams, W_UINT16 typ, W_UINT8 browseFlags, W_UINT32 *len, PLC_OPCPIPE_BROWSEITEMDATA **data, WMK_PTR_CONFIRM *confirm)

Called if the client browses the items. This call searches items via the topic name.

May either return the data immediately in data (with length len) or return ERR_OPCPIPE_WAIT and call WmkProtBrowseItemData later.

Parameters
[in]handleserver connection handle
[in]browseHandlebrowse handle for recognizing the answer
[in]startOffsetstart offset for browsing request if not all data can be returned in one response
[in]topicNametopic name to browse. may be 0 for topic list
[in]pathrequest path. may be 0 for root list.
[in]browseParamsadditional browse parameters.
[in]typdata type to search for. 0 returns all items
[in]browseFlagsvalues for PLC_OPCPIPE_BROWSEITEMDATA::Flags, bitcoded to search for. 0 returns all items. if OPCPIPE_BORWSEFLAG_HAS_EXT_INFO is set, try to return extended information
[out]lenlength of browse data
[out]databrowsing data can be stored here
[out]confirmfunction to be called if data is no longer needed
Returns
error values

TODO: remove for V3

◆ pConfirmSrvBrowseOneItem

typedef int(* pConfirmSrvBrowseOneItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle, const char *topicName, const char *itemName, W_UINT8 browseFlags, W_UINT32 *len, PLC_OPCPIPE_BROWSEITEMDATA **data, WMK_PTR_CONFIRM *confirm)

Called if the client wants information about one single item. Some information may only be available if the item is created.

May either return the data immediately in data (with length len) or return ERR_OPCPIPE_WAIT and call WmkProtBrowseItemData later.

Parameters
[in]handleserver connection handle
[in]browseHandlebrowse handle for recognizing the answer
[in]topicNametopic name to query
[in]itemNameitem name to query
[in]browseFlagsvalues for PLC_OPCPIPE_BROWSEITEMDATA::Flags, bitcoded to search for. 0 returns all items.
[out]lenlength of browse data
[out]databrowsing data can be stored here
[out]confirmfunction to be called if data is no longer needed
Returns
error values

TODO: remove for V3

◆ pConfirmSrvCreateItem

typedef int(* pConfirmSrvCreateItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_CREATE_ITEM_DATA *items)

Called if the client creates an item.

May give data or error immediately or return ERR_OPCPIPE_WAIT and later call WmkProtCreateItemData.

Parameters
[in]handleserver connection handle
[in]itemsCountnumber of items to create
[in,out]itemsitems to create
Returns
error values

◆ pConfirmSrvCreateTopic

typedef int(* pConfirmSrvCreateTopic) (W_UINT32 handle, const char *topicName, WMK_OPCPIPE_HANDLE pipeTopicHandle, WMK_OPCPIPE_HANDLE *appTopicHandle)

called if the client creates a topic.

Parameters
[in]handleserver connection handle
[in]topicNametopic name
[in]pipeTopicHandlepipe topic handle
[out]appTopicHandleapp topic handle
Returns
error values

◆ pConfirmSrvDeactivateItem

typedef int(* pConfirmSrvDeactivateItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_HANDLE_ITEM_DATA *itemHandles)

called if the client deactivates an item.

Parameters
[in]handleserver connection handle
[in]itemsCountnumber of items to deactivate
[in]itemHandlesapp item handles
Returns
error values

◆ pConfirmSrvDeleteItem

typedef int(* pConfirmSrvDeleteItem) (W_UINT32 handle, W_UINT32 itemsCount, WMK_PROT_HANDLE_ITEM_DATA *itemHandles)

called if the client deletes an item.

Parameters
[in]handleserver connection handle
[in]itemsCountnumber of items to delete
[in]itemHandlesapp item handles
Returns
error values

◆ pConfirmSrvDeleteTopic

typedef int(* pConfirmSrvDeleteTopic) (W_UINT32 handle, WMK_OPCPIPE_HANDLE topicHandle)

called if the client deletes a topic.

Parameters
[in]handleserver connection handle
[in]topicHandleapp topic handle
Returns
error values

◆ pConfirmSrvDeviceDataAck

typedef int(* pConfirmSrvDeviceDataAck) (W_UINT32 handle, WMK_OPCPIPE_HANDLE ackHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *itemHandles)

called if client acknowledged read value (only if enabled with TU_CAP_DEVICE_DATA_ACK).

Parameters
[in]handleserver connection handle
[in]ackHandleacknowledge handle for recognizing the answer
[in]itemsCountnumber of items to read
[in,out]itemHandlesitems to read
Returns
error values

◆ pConfirmSrvDiagnosticsData

typedef int(* pConfirmSrvDiagnosticsData) (W_UINT32 handle, WMK_OPCPIPE_HANDLE diagHandle, W_UINT32 *len, void **mem, WMK_PTR_CONFIRM *confirm)

called if the client calls diagnostics.

Parameters
[in]handleserver connection handle
[in]diagHandlediagnostics handle for recognizing the answer
[out]lenlength of diagnostics data
[out]memdiagnostics data can be stored here
[out]confirmfunction to be called if mem is no longer needed
Returns
error values

◆ pConfirmSrvExtDiagnostics

typedef int(* pConfirmSrvExtDiagnostics) (W_UINT32 handle, WMK_OPCPIPE_HANDLE topicHandle, WMK_OPCPIPE_HANDLE itemHandle, PLC_OPCPIPE_DIAG_ELEMENT *data, W_UINT32 memlen)

called for extended servia diagnostivs via WmkProtServerDiagnostics.

Parameters
[in]

◆ pConfirmSrvHistoryEnabled

typedef int(* pConfirmSrvHistoryEnabled) (W_UINT32 handle, const char *symbol, W_UINT8 *result)

called to check if history is enabled for an item.

Parameters
[in]handleserver connection handle
[in]itemNameitem name to query
[out]resulthistory status is returned here, defines for pConfirmSrvHistoryEnabled
Returns
error values

◆ pConfirmSrvHistoryReadEvent

typedef int(* pConfirmSrvHistoryReadEvent) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_EVENT_DATA *event)

called if the client requests event history read.

Parameters
[in]handleserver connection handle
[in]readHandleread handle for recognizing the answer
[in,out]eventevent to read
Returns
error values

◆ pConfirmSrvHistoryReadItem

typedef int(* pConfirmSrvHistoryReadItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, WMK_PROT_HISTORY_ITEM_DATA *item)

called if the client requests history read.

Parameters
[in]handleserver connection handle
[in]readHandleread handle for recognizing the answer
[in,out]itemitem to read
Returns
error values

◆ pConfirmSrvQueryItemInformation

typedef int(* pConfirmSrvQueryItemInformation) (W_UINT32 handle, WMK_OPCPIPE_HANDLE topicHandle, WMK_OPCPIPE_HANDLE itemHandle, WMK_OPCPIPE_ITEM_INFO *itemInfo)

called after creating an item that has a struct type, to get more informations

Parameters
[in]handleserver connection handle
[in]topicHandleapp topic handle
[in]itemHandleapp item handle
[out]itemInfoon call, Cb indicates the allocated memory, AppItemHandle is the item to query; on return the structure is filled
Returns
error values ; ERR_OPCPIPE_MEMERR indicates that not enough memory was available, itemInfo->Cb says how much is needed

◆ pConfirmSrvRedirectItem

typedef int(* pConfirmSrvRedirectItem) (W_UINT32 handle, const char *topicItemName, char **newTopicItemName, WMK_PTR_CONFIRM *confirm)

called before each item create. allows to change the item name.

Parameters
[in]

◆ pConfirmSrvRefreshItem

typedef int(* pConfirmSrvRefreshItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items, WMK_OPCPIPE_HANDLE *ackHandle)

called if the client refreshes an item.

Parameters
[in]handleserver connection handle
[in]readHandleread handle for recognizing the answer
[in]itemsCountnumber of items to read
[in,out]itemsitems to read
[out]ackHandleack handle for recognizing the answer
Returns
error values

◆ pConfirmSrvRpcCall

typedef int(* pConfirmSrvRpcCall) (W_UINT32 handle, WMK_OPCPIPE_HANDLE callHandle, W_UINT32 rpcId, const char *name, W_UINT32 paramCount, RPC_PARAMETER *params, W_UINT32 *resultCount, RPC_PARAMETER **results, RpcParamConfirm *confirm)

called if client calls RPC

Parameters
[in]handleserver connection handle
[in]callHandlecall handle for recognizing the answer
[in]rpcIdid of RPC to call, well-known functions for OPC UA RPC calls
[in]namename parameter, meaning depends on rpcId
[in]paramCountnumber of RPC parameters
[in]paramsRPC parameters
[out]resultCountnumber of results returned if immediate answer
[out]resultsreturned results if immediate answer
[out]confirmconfirm to call after result is not needed anymore
Returns
error values

◆ pConfirmSrvSamplerateChanged

typedef void(* pConfirmSrvSamplerateChanged) (W_UINT32 handle)

called after sub item create/delete/activate/deactivate if the item sample rate of any item has changed.

Parameters
[in]handleserver connection handle

◆ pConfirmSrvStopBrowseItems

typedef int(* pConfirmSrvStopBrowseItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE browseHandle)

called if the client cancels browsing the items.

Parameters
[in]handleserver connection handle
[in]browseHandlebrowse handle
Returns
error values

◆ pConfirmSrvStopHistoryReadItems

typedef int(* pConfirmSrvStopHistoryReadItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle)

called if the client cancels reading items via HistoryRead.

Parameters
[in]handleserver connection handle
[in]readHandleread handle for recognizing the answer
Returns
error values

◆ pConfirmSrvStopSyncReadItems

typedef int(* pConfirmSrvStopSyncReadItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle)

called if the client cancels reading items via SyncRead or Refresh.

Parameters
[in]handleserver connection handle
[in]readHandleread handle for recognizing the answer
Returns
error values

◆ pConfirmSrvStopWriteItems

typedef int(* pConfirmSrvStopWriteItems) (W_UINT32 handle, WMK_OPCPIPE_HANDLE writeHandle)

called if the cancels writing items.

Parameters
[in]handleserver connection handle
[in]writeHandlewrite handle for recognizing the answer
Returns
error values

◆ pConfirmSrvSyncReadItem

typedef int(* pConfirmSrvSyncReadItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE readHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items, WMK_OPCPIPE_HANDLE *ackHandle)

called if the client requests sync read.

Parameters
[in]handleserver connection handle
[in]readHandleread handle for recognizing the answer
[in]itemsCountnumber of items to read
[in,out]itemsitems to read
[out]ackHandleack handle for recognizing the answer
Returns
error values

◆ pConfirmSrvWriteItem

typedef int(* pConfirmSrvWriteItem) (W_UINT32 handle, WMK_OPCPIPE_HANDLE writeHandle, W_UINT32 itemsCount, WMK_PROT_RW_ITEM_DATA *items)

called if the client has data sendig to the device.

Parameters
[in]handleserver connection handle
[in]writeHandlewrite handle for recognizing the answer
[in]itemsCountnumber of items to write
[in]itemsitems to write
Returns
error values

◆ RpcParamConfirm

typedef void(WMK_CALL_CONFIRM* RpcParamConfirm) (W_UINT32 resultCount, RPC_PARAMETER *results)

Pointer to function that frees the given RPC_PARAMETER structures.

Parameters
[in]resultCountlength of reuslt array.
[in]resultstata to free.