Data Fields
UA_ServerNetworkLayer Struct Reference

#include <ua_server.h>

Data Fields

void * nlHandle
UA_StatusCode(* start )(void *nlHandle, UA_Logger *logger)
UA_Int32(* getWork )(void *nlhandle, UA_WorkItem **workItems, UA_UInt16 timeout)
UA_Int32(* stop )(void *nlhandle, UA_WorkItem **workItems)
void(* free )(void *nlhandle)
UA_StringdiscoveryUrl

Detailed Description

Remove timed or repeated work Interface to the binary network layers. This structure is returned from the function that initializes the network layer. The layer is already bound to a specific port and listening. The functions in the structure are never called in parallel but only sequentially from the server's main loop. So the network layer does not need to be thread-safe.


Field Documentation

String containing the discovery URL that will be add to the server's list contains the protocol the host and the port of the layer

void(* UA_ServerNetworkLayer::free)(void *nlhandle)

Deletes the network layer. Call only after a successful shutdown.

UA_Int32(* UA_ServerNetworkLayer::getWork)(void *nlhandle, UA_WorkItem **workItems, UA_UInt16 timeout)

Gets called from the main server loop and returns the work that accumulated (messages and close events) for dispatch. The networklayer does not wait on connections but returns immediately the work that accumulated.

Parameters:
workItemsWhen the returned integer is positive, *workItems points to an array of WorkItems of the returned size.
timeoutThe timeout during which an event must arrive in microseconds
Returns:
The size of the returned workItems array. If the result is negative, an error has occured.

Starts listening on the the networklayer.

Returns:
Returns UA_STATUSCODE_GOOD or an error code.
UA_Int32(* UA_ServerNetworkLayer::stop)(void *nlhandle, UA_WorkItem **workItems)

Closes the network connection and returns all the work that needs to be finished before the network layer can be safely deleted.

Parameters:
workItemsWhen the returned integer is positive, *workItems points to an array of WorkItems of the returned size.
Returns:
The size of the returned workItems array. If the result is negative, an error has occured.

The documentation for this struct was generated from the following file: