![]() |
Tani OpcPipe protocol
1.0.5
Tani OpcPipe protocol
|
Macros | |
#define | WmkProtDisableUpdate() WmkProtDisableUpdate__("", 0) |
#define | WmkProtRestoreUpdate() WmkProtRestoreUpdate__("", 0) |
Functions | |
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 OpcPipeExit | ( | void | ) |
unloads the library from memory
EXTERN_C int WENTRY_C OpcPipeQueryLoadPath | ( | char * | path, |
int | len | ||
) |
retrieves OpcPipe library load path.
[out] | path | the path is stored here |
[in] | len | length of path |
EXTERN_C int WENTRY_C OpcPipeQueryVersion | ( | W_UINT32 * | version | ) |
retrieves OpcPipe library version.
[out] | version | pointer to the version |
EXTERN_C int WENTRY_C WmkProtActivateItem | ( | W_UINT32 | handle, |
W_UINT32 | itemsCount, | ||
WMK_PROT_HANDLE_ITEM_DATA * | pipeItemHandles | ||
) |
Activates an item. After activation the server side may respond with data.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvActivateItem.
[in] | handle | client connection handle |
[in] | itemsCount | number of items to activate |
[in] | pipeItemHandles | items to activate |
EXTERN_C int WENTRY_C WmkProtBasePresetInit | ( | CORE_PRESET_VALUES * | preset | ) |
Initializing the server functionality of the transport.
[in] | preset | Structure with initialized preset values |
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 | ||
) |
Starts a browsing operation.
The data is returned with PLC_OPCPIPE_CONFIRMS::confirmCliBrowseData.
[in] | handle | client connection handle |
[in] | browseHandle | reference browse handle for this browse operation |
[in] | browseOpcode | Browse opcodes |
[in] | startOffset | start offset for browsing request if not all data can be returned in one response |
[in] | path | browsing path. Can be 0 for root list |
[in] | browseParams | additional browse parameters. |
[in] | typ | return elements with this type. 0 returns all |
[in] | browseFlags | return only elements with this browse flags set (values for PLC_OPCPIPE_BROWSEITEMDATA::Flags, bitcoded). Can be 0 for all 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 | ||
) |
Asynchronously returns item browse data.
On the client side this will call PLC_OPCPIPE_CONFIRMS::confirmCliBrowseItemData.
[in] | handle | server connection handle |
[in] | browseHandle | reference browse handle for this browse operation |
[in] | dataLen | length of browse data in bytes |
[in] | data | browse data |
[in] | confirm | function to be called if data is no longer needed |
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.
[in,out] | status | struct for changing status information |
EXTERN_C int WENTRY_C WmkProtClientInit | ( | PLC_OPCPIPE_CONFIRMS * | confirm | ) |
Inizialising the client of the transport.
[in] | confirm | Structure with initialized confirm functions |
EXTERN_C int WENTRY_C WmkProtClientInitEx | ( | PLC_OPCPIPE_CONFIRMS_EX * | confirm | ) |
Inizialising the client of the transport.
[in] | confirm | Structure with initialized confirm functions |
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.
[in] | handle | connection handle |
[in] | disableConfirms | if true, no more confirms will arrive after this function returns |
EXTERN_C int WENTRY_C WmkProtClientTerminate | ( | void | ) |
Terminates the complete opcpipe client calls. This function does no house keeping, only connections are closed and internal memory is freed. No confirm will come after calling this.
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.
[in,out] | status | struct for requesting status information |
EXTERN_C int WENTRY_C WmkProtCreateItem | ( | W_UINT32 | handle, |
W_UINT32 | itemsCount, | ||
WMK_PROT_CREATE_ITEM_DATA * | items | ||
) |
Creates an item. The item is created under a given topic. Items are created in inactive state, activate them with WmkProtActivateItem.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvCreateItem. The server result is asynchronously returned via PLC_OPCPIPE_CONFIRMS::confirmCliCreateItem.
[in] | handle | client connection handle |
[in] | itemsCount | number of items to create |
[in,out] | items | items to create |
EXTERN_C int WENTRY_C WmkProtCreateItemData | ( | W_UINT32 | handle, |
int | createErr, | ||
W_UINT32 | itemsCount, | ||
WMK_PROT_CREATE_ITEM_DATA * | items | ||
) |
Returns type information after creating an item.
[in] | handle | client connection handle |
[in] | createErr | result of item create, error values |
[in] | itemsCount | number of items created |
[in] | items | items created |
EXTERN_C int WENTRY_C WmkProtCreateItemEx | ( | W_UINT32 | handle, |
W_UINT32 | itemsCount, | ||
WMK_PROT_CREATE_ITEM_DATA_EX * | items | ||
) |
Creates an item. The item is created under a given topic. Items are created in inactive state, activate them with WmkProtActivateItem.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvCreateItem. The server result is asynchronously returned via PLC_OPCPIPE_CONFIRMS::confirmCliCreateItem.
[in] | handle | client connection handle |
[in] | itemsCount | number of items to create |
[in,out] | items | items to create |
EXTERN_C int WENTRY_C WmkProtCyclicReadData | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | ackHandle, | ||
W_UINT32 | itemsCount, | ||
WMK_PROT_RW_ITEM_DATA * | items | ||
) |
On the server side this is called if new data are availible from the device with the given topic item combination.
There is an optional cache which compares new to old data. The cache is used if in startup the server capabilities is set to TU_CAP_DISPATCH_SAME_ELEMENTS and the data format is not set to TU_FORMAT_ALWAYSNEW. If this is true the function compares the quality. If it is equal to the last it compares the data. If they are equal too, no data sent is made, the function returns immediately with ok.
On the client side this will call PLC_OPCPIPE_CONFIRMS::confirmCliCyclicReadData.
[in] | handle | server connection handle |
[in] | ackHandle | ack handle for recognizing the answer |
[in] | itemsCount | number of item values |
[in] | items | item values |
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.
[out] | memdest | destination memory |
[in] | memsrc | source memory |
[in] | type_dest | destination data type, TYP_USE_xx |
[in] | typ_dest_flags | destination data flags, TYP_FLAGS_xx |
[in] | type_src | source data type, TYP_USE_xx |
[in] | typ_src_flags | source data flags, TYP_FLAGS_xx |
[in] | inbytes | length of source data |
[in] | maxmem | available memory for destination data |
[out] | retbytes | actual destination data length |
[in] | info | Additional info for conversions, mostly for string conversions. May be zero. |
EXTERN_C int WENTRY_C WmkProtDeactivateItem | ( | W_UINT32 | handle, |
W_UINT32 | itemsCount, | ||
WMK_PROT_HANDLE_ITEM_DATA * | pipeItemHandles | ||
) |
Deactivates an item. After deactivation the server side will not respond with data.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvDeactivateItem.
[in] | handle | client connection handle |
[in] | itemsCount | number of items to deactivate |
[in] | pipeItemHandles | items to deactivate |
EXTERN_C int WENTRY_C WmkProtDeleteEvents | ( | W_UINT32 | handle, |
W_UINT32 | eventCount, | ||
W_UINT32 * | eventHandles | ||
) |
Stops monitoring OPC UA event sources.
On the server side this will be handled internally.
[in] | handle | client connection handle |
[in] | eventCount | number of events to remove |
[in] | eventHandles | list of event handles to remove |
EXTERN_C int WENTRY_C WmkProtDeleteItem | ( | W_UINT32 | handle, |
W_UINT32 | itemsCount, | ||
WMK_PROT_HANDLE_ITEM_DATA * | pipeItemHandles | ||
) |
Deletes an item created with WmkProtCreateItem.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvDeleteItem.
[in] | handle | client connection handle |
[in] | itemsCount | number of items to delete |
[in] | pipeItemHandles | items to delete |
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.
[in] | handle | client connection handle |
[in] | pipeItemHandle | pipe item handle |
[out] | itemName | Pointer to space for the returned topic name, This space needs to be as long as given in namelen plus one byte for the null terminator. An item name can be very long. |
[in] | namelen | Len of the space in bytes for the item name. |
EXTERN_C int WENTRY_C WmkProtDiagnostics | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | diagHandle, | ||
WMK_OPCPIPE_HANDLE * | pipeTopicHandle, | ||
W_UINT32 | no | ||
) |
Requests diagnostics information.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvDiagnosticsData. The data is returned with PLC_OPCPIPE_CONFIRMS::confirmCliDiagnosticsData.
[in] | handle | client connection handle |
[in] | diagHandle | reference diagnostics handle for this operation |
[in] | pipeTopicHandle | list of pipe topic handles for which to return diagnostics |
[in] | no | length if topic handle list |
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.
[in] | handle | client connection handle |
[in] | pipeTopicHandle | pipe topic handle |
[out] | topicName | Pointer to space for the returned topic name, This space needs to be as long as given in namelen plus one byte for the null terminator. |
[in] | namelen | Len of the space in bytes for the topic name. |
EXTERN_C int WENTRY_C WmkProtDisableUpdate__ | ( | const char * | file, |
int | line | ||
) |
This suspends all OPCpipe internal modifications of its internal tables. This stops in reality the OPCpipe from working. So handle this with care.
[in] | file | file of fucntion call, used for debug only |
[in] | line | line of fucntion call, used for debug only |
EXTERN_C int WENTRY_C WmkProtEventData | ( | W_UINT32 | handle, |
EVENT_RESULT * | event | ||
) |
Emits an OPC UA event.
The core will add additional values (like EventId and Timestamp).
On the client side this will call PLC_OPCPIPE_CONFIRMS::confirmCliEventData.
[in] | handle | client or server connection handle |
[in] | event | event to emit |
EXTERN_C int WENTRY_C WmkProtEventHistoryReadData | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | readHandle, | ||
WMK_PROT_HISTORY_EVENT_DATA * | event | ||
) |
On the server side this is called if event history read data are availible from the device.
[in] | handle | server connection handle |
[in] | readHandle | read handle for recognizing the answer |
[in] | event | event values |
EXTERN_C int WENTRY_C WmkProtGetAppData | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | pipeTopicHandle, | ||
void ** | appTopicData, | ||
WMK_OPCPIPE_HANDLE | pipeItemHandle, | ||
void ** | appItemData | ||
) |
Get application specific pointers. This function is guaranteed not to call any confirms and can be called within any semaphore.
[in] | handle | client or server connection handle |
[in] | pipeTopicHandle | pipe topic handle |
[out] | appTopicData | application specific topic data pointer is stored here, may be 0 |
[in] | pipeItemHandle | pipe item handle or 0 if only topic information should be retrieved |
[out] | appItemData | application specific item data pointer is stored here, may be 0 |
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.
[in] | handle | client or server connection handle |
[out] | capabilities | connection capabilities, values for PLC_OPCPIPE_CONFIRMS.Capabilities, bit wise |
EXTERN_C int WENTRY_C WmkProtHandleFromPointer | ( | W_UINT32 | handle, |
OPCPIPE_TOPIC * | topic, | ||
OPCPIPE_ITEM * | item, | ||
WMK_OPCPIPE_HANDLE * | retHandle | ||
) |
Calculate pipe topic or item handle from struct pointer
[in] | handle | client or server connection handle |
[in] | topic | pointer to topic, 0 on client |
[in] | item | pointer to item, 0 on server if topic handle should be returned |
[out] | retHandle | returned handle |
EXTERN_C int WENTRY_C WmkProtHistoryReadData | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | readHandle, | ||
WMK_PROT_HISTORY_ITEM_DATA * | item | ||
) |
On the server side this is called if history read data are availible from the device.
On the client side this will call PLC_OPCPIPE_CONFIRMS::confirmCliHistoryReadData.
[in] | handle | server connection handle |
[in] | readHandle | read handle for recognizing the answer |
[in] | item | item values |
EXTERN_C int WENTRY_C WmkProtHistoryReadEvent | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | readHandle, | ||
WMK_PROT_HISTORY_EVENT_DATA * | event | ||
) |
This will read history events from the device.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvHistoryReadEvent. The server calls WmkProtEventHistoryReadData after reading is complete. This will result in PLC_OPCPIPE_CONFIRMS::confirmCliEventHistoryReadData be called on the client.
EXTERN_C int WENTRY_C WmkProtHistoryReadItem | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | readHandle, | ||
WMK_PROT_HISTORY_ITEM_DATA * | item | ||
) |
This will read history data from the device.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvHistoryReadItem. The server calls WmkProtHistoryReadData after reading is complete. This will result in PLC_OPCPIPE_CONFIRMS::confirmCliHistoryReadData be called on the client.
[in] | handle | client connection handle |
[in] | readHandle | reference read handle for this read operation |
[in] | item | item to read |
EXTERN_C int WENTRY_C WmkProtIndexFromHandle | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | topicOrItemHandle, | ||
W_UINT32 * | retIndex | ||
) |
calculates array offset from pipe topic or item handle
[in] | handle | client or server connection handle |
[in] | topicOrItemHandle | pipe topic or item handle |
[out] | retIndex | returned index |
EXTERN_C int WENTRY_C WmkProtItemList | ( | W_UINT32 | handle, |
W_UINT32 * | tablen, | ||
OPCPIPE_ITEM ** | table | ||
) |
Gives the base pointer to the OPCpipe client internal lists of items and all their IDs and states. The tables are organized with one table in each connection.
[in] | handle | client or server connection handle |
[out] | tablen | Pointer to a variable which will return the table length in elements. |
[out] | table | Pointer to the internal base table. 0 will be returned if no tables will exist. |
EXTERN_C int WENTRY_C WmkProtModifyMonitorEvents | ( | W_UINT32 | handle, |
W_UINT32 | eventCount, | ||
EVENT_REQUEST * | events | ||
) |
Change a created Event subscription.
Only PipeEventHandle, MonitoringFlags, FieldNames, FieldNamesLen are used.
On the server side this will be handled internally. The data is returned with PLC_OPCPIPE_CONFIRMS::confirmCliEventData.
[in] | handle | client connection handle |
[in] | eventCount | number of events to change |
[in] | events | events to change |
EXTERN_C int WENTRY_C WmkProtMonitorEvents | ( | W_UINT32 | handle, |
W_UINT32 | eventCount, | ||
EVENT_REQUEST * | events | ||
) |
Monitors OPC UA Event sources
On the server side this will be handled internally. The data is returned with PLC_OPCPIPE_CONFIRMS::confirmCliEventData.
[in] | handle | client connection handle |
[in] | eventCount | number of events to monitor |
[in] | events | events to monitor |
EXTERN_C int WENTRY_C WmkProtQueryItemInformation | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | pipeItemHandle, | ||
WMK_OPCPIPE_ITEM_INFO * | itemInfo | ||
) |
Requests the data type and additional information of a created item.
[in] | handle | client connection handle |
pipeItemHandle | pipe item handle | |
[in,out] | itemInfo | on input, the Cb element shows how much memory was allocated, PipeItemHandle is the item to query; on output the complete structure will be initialized |
EXTERN_C int WENTRY_C WmkProtReadDebugBuffer | ( | char * | buffer, |
W_UINT32 | buflen | ||
) |
query internal debug buffer
[out] | buffer | debug data is stored here |
[in] | buflen | maximum length of buffer |
EXTERN_C int WENTRY_C WmkProtRefreshItem | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | readHandle, | ||
W_UINT32 | itemsCount, | ||
WMK_PROT_RW_ITEM_DATA * | items | ||
) |
Refreshes one or all active items. This will be done from the server's internal data caches or from the external application.
If the external application needs to be called because caching is disabled the PLC_OPCPIPE_CONFIRMS::confirmSrvRefreshItem confirm is called. Active items will be refreshed only if all items are requested. If an item has bad quality the quality value will given. The quality if it was good will be QUALITY_LAST_KNOWN_VALUE. The server calls WmkProtSyncReadData after reading is complete.
In any case this will result in PLC_OPCPIPE_CONFIRMS::confirmCliSyncReadData be called on the client.
[in] | handle | client connection handle |
[in] | readHandle | reference read handle for this read operation |
[in] | itemsCount | number of items to read |
[in] | items | items to read |
EXTERN_C int WENTRY_C WmkProtRegisterServer | ( | W_UINT32 | handle, |
W_UINT16 | port, | ||
int | isOnline | ||
) |
registers an opc ua server with a discovery server
[in] | handle | client connection handle ; must be OPC UA |
port | !< [in] port of server to register | |
isOnline | !< [in] true if the server is online, false if not |
EXTERN_C int WENTRY_C WmkProtRestoreUpdate__ | ( | const char * | file, |
int | line | ||
) |
Restarts the OPCpipe for working.
[in] | file | file of fucntion call, used for debug only |
[in] | line | line of fucntion call, used for debug only |
EXTERN_C int WENTRY_C WmkProtRpcCall | ( | W_UINT32 | handle, |
W_UINT32 | callHandle, | ||
W_UINT32 | rpcId, | ||
const char * | name, | ||
W_UINT32 | paramCount, | ||
RPC_PARAMETER * | params | ||
) |
Calls an RPC.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvRpcCall. The data is returned with PLC_OPCPIPE_CONFIRMS::confirmCliRpcData.
[in] | handle | client connection handle |
[in] | callHandle | call handle |
[in] | rpcId | id of RPC to call, well-known functions for OPC UA RPC calls |
[in] | name | name parameter, meaning depends on rpcId |
[in] | paramCount | number of RPC parameters |
[in] | params | RPC parameters |
EXTERN_C int WENTRY_C WmkProtRpcData | ( | W_UINT32 | handle, |
W_UINT32 | callHandle, | ||
W_UINT32 | errorCode, | ||
W_UINT32 | resultCount, | ||
RPC_PARAMETER * | results | ||
) |
Asynchronously returns RPC call result.
On the client side this will call PLC_OPCPIPE_CONFIRMS::confirmCliRpcData.
[in] | handle | client connection handle |
[in] | callHandle | call handle |
[in] | errorCode | error values error code |
[in] | resultCount | number of RPC results |
[in] | results | RPC results |
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
[in] | handle | client or server connection handle |
[in] | request | request |
[out] | response | response |
[in] | responseMemlen | maximum response size |
EXTERN_C int WENTRY_C WmkProtServerInit | ( | PLC_OPCPIPE_CONFIRMS * | confirm | ) |
Terminates the complete opcpipe server calls. This function does no house keeping, only connections are closed and internal memory is freed. No confirm will come after calling this.
[in] | confirm | server confirm functions and capabilities |
EXTERN_C int WENTRY_C WmkProtServerInitEx | ( | PLC_OPCPIPE_CONFIRMS_EX * | confirm | ) |
Terminates the complete opcpipe server calls. This function does no house keeping, only connections are closed and internal memory is freed. No confirm will come after calling this.
[in] | confirm | server confirm functions and capabilities |
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.
[in] | handle | connection handle |
[in] | disableConfirms | if true, no more confirms will arrive after this function returns |
EXTERN_C int WENTRY_C WmkProtServerTerminate | ( | void | ) |
Terminates the complete opcpipe server calls. This function does no house keeping, only connections are closed and internal memory is freed. No confirm will come after calling this.
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.
[in] | handle | client or server connection handle |
[in] | pipeTopicHandle | pipe topic handle |
[in] | appTopicData | application specific topic data pointer, may be 0 |
[in] | pipeItemHandle | pipe item handle or 0 if topic information should be changed |
[in] | appItemData | application specific item data pointer, may be 0 |
EXTERN_C int WENTRY_C WmkProtSetSecurity | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | pipeTopicHandle, | ||
ACCESS_VALUES * | access | ||
) |
Set access rights per topic.
[in] | handle | client or server connection handle |
[in] | pipeTopicHandle | pipe topic handle |
EXTERN_C int WENTRY_C WmkProtStopBrowse | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | browseHandle, | ||
W_UINT32 | browseOpcode | ||
) |
Stops browse started with WmkProtBrowse.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvStopBrowse.
[in] | handle | client connection handle |
[in] | browseHandle | reference browse handle for this browse operation |
[in] | browseOpcode | Browse opcodes |
EXTERN_C int WENTRY_C WmkProtStopSyncReadItem | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | readHandle | ||
) |
This will cancel a SyncRead or Refresh operation.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvStopSyncReadItem.
[in] | handle | client connection handle |
[in] | readHandle | reference read handle for this read operation |
EXTERN_C int WENTRY_C WmkProtStopWriteItem | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | writeHandle | ||
) |
This will cancel a Write operation.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvStopWriteItem.
[in] | handle | client connection handle |
[in] | writeHandle | reference write handle for this write operation |
EXTERN_C int WENTRY_C WmkProtSymbolsChanged | ( | W_UINT32 | handle, |
const char * | browsePath | ||
) |
[in] | handle | client or server connection handle |
[in] | browsePath | the path at which the change occured; or 0 if not known or all symbols changed |
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 | ||
) |
On the server side this is called if sync read data are availible from the device with the given topic item combination.
This opcode bypasses the data cache and always sends the data.
On the client side this will call PLC_OPCPIPE_CONFIRMS::confirmCliSyncReadData.
[in] | handle | server connection handle |
[in] | readHandle | read handle for recognizing the answer |
[in] | ackHandle | ack handle for recognizing the answer |
[in] | itemsCount | number of item values |
[in] | items | item values |
EXTERN_C int WENTRY_C WmkProtSyncReadItem | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | readHandle, | ||
W_UINT32 | itemsCount, | ||
WMK_PROT_RW_ITEM_DATA * | items | ||
) |
This will read data from the device. Will work even on deactivated items.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvSyncReadItem. The server calls WmkProtSyncReadData after reading is complete. This will result in PLC_OPCPIPE_CONFIRMS::confirmCliSyncReadData be called on the client.
[in] | handle | client connection handle |
[in] | readHandle | reference read handle for this read operation |
[in] | itemsCount | number of items to read |
[in] | items | items to read |
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.
[in,out] | timings | timing parameters in here |
[in] | func | 1 - read parameters; 0 - write parameters |
EXTERN_C int WENTRY_C WmkProtTopicHandleFromItemHandle | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | itemHandle, | ||
WMK_OPCPIPE_HANDLE * | retHandle | ||
) |
extracts topic handle from item handle
[in] | handle | client or server connection handle |
[in] | itemHandle | pipe item handle |
[out] | retHandle | returned handle |
EXTERN_C int WENTRY_C WmkProtTopicList | ( | W_UINT32 | handle, |
W_UINT32 * | tablen, | ||
OPCPIPE_TOPIC ** | table | ||
) |
Gives the base pointer to the OPCpipe server internal lists of topics and their corresponding items and all their IDs and states. The tables are organized with a base table in each connection and sub tables. The base table is corresponding with the topics, the sub tables are corresponding with the items for the topic.
[in] | handle | client or server connection handle |
[out] | tablen | Pointer to a variable which will return the table length in elements. |
[out] | table | Pointer to the internal base table. 0 will be returned if no tables will exist. |
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.
[in] | handle | connection handle |
[in] | confirm | confirm function |
EXTERN_C int WENTRY_C WmkProtWriteComplete | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | writeHandle, | ||
W_UINT32 | itemsCount, | ||
WMK_PROT_RW_ITEM_DATA * | items | ||
) |
This will be called the acknowledge after written data to the device.
On the client side this will call PLC_OPCPIPE_CONFIRMS::confirmCliWriteComplete.
[in] | handle | server connection handle |
[in] | writeHandle | write handle for recognizing the answer |
[in] | itemsCount | number of items written |
[in] | items | items written |
EXTERN_C int WENTRY_C WmkProtWriteItem | ( | W_UINT32 | handle, |
WMK_OPCPIPE_HANDLE | writeHandle, | ||
W_UINT32 | itemsCount, | ||
WMK_PROT_RW_ITEM_DATA * | items | ||
) |
Sends data to the server side.
On the server side this will call PLC_OPCPIPE_CONFIRMS::confirmSrvWriteItem. The server calls WmkProtWriteComplete after writing is complete. This will result in PLC_OPCPIPE_CONFIRMS::confirmCliWriteComplete be called on the client.
[in] | handle | client connection handle |
[in] | writeHandle | reference write handle for this write operation |
[in] | itemsCount | number of items to write |
[in] | items | items to write |