S2OPC OPCUA Toolkit
|
Contains the types to be used by the method call manager to configure the Call service. More...
Go to the source code of this file.
Data Structures | |
struct | SOPC_MethodCallFunc |
Object to describe of function associated to a method and user parameter. More... | |
struct | SOPC_MethodCallManager |
The SOPC_MethodCallManager object defines the common interface for the method manager. More... | |
Typedefs | |
typedef struct SOPC_MethodCallManager | SOPC_MethodCallManager |
typedef struct SOPC_MethodCallFunc | SOPC_MethodCallFunc |
typedef SOPC_StatusCode | SOPC_MethodCallFunc_Ptr(const SOPC_CallContext *callContextPtr, const SOPC_NodeId *objectId, uint32_t nbInputArgs, const SOPC_Variant *inputArgs, uint32_t *nbOutputArgs, SOPC_Variant **outputArgs, void *param) |
Type of the function to call associated to a method. More... | |
typedef void | SOPC_MethodCallFunc_Free_Func(void *data) |
Type of the function to free param of SOPC_MethodCallFunc. More... | |
typedef void | SOPC_MethodCallManager_Free_Func(void *data) |
typedef SOPC_MethodCallFunc * | SOPC_MethodCallManager_Get_Func(SOPC_MethodCallManager *mcm, SOPC_NodeId *methodId) |
Functions | |
SOPC_MethodCallManager * | SOPC_MethodCallManager_Create (void) |
Provide a basic implementation of MethodCallManager. This implementation can be used with SOPC_MethodCallManager_AddMethod to add method. More... | |
void | SOPC_MethodCallManager_Free (SOPC_MethodCallManager *mcm) |
Free MethodCallManager created with SOPC_MethodCallManager_Create. More... | |
SOPC_ReturnStatus | SOPC_MethodCallManager_AddMethod (SOPC_MethodCallManager *mcm, SOPC_NodeId *methodId, SOPC_MethodCallFunc_Ptr *methodFunc, void *param, SOPC_MethodCallFunc_Free_Func *fnFree) |
Associate a C function to a NodeId of a Method. This function should be used only with the basic implementation of SOPC_MethodCallManager provided by the toolkit. More... | |
Contains the types to be used by the method call manager to configure the Call service.
typedef struct SOPC_MethodCallManager SOPC_MethodCallManager |
typedef struct SOPC_MethodCallFunc SOPC_MethodCallFunc |
typedef SOPC_StatusCode SOPC_MethodCallFunc_Ptr(const SOPC_CallContext *callContextPtr, const SOPC_NodeId *objectId, uint32_t nbInputArgs, const SOPC_Variant *inputArgs, uint32_t *nbOutputArgs, SOPC_Variant **outputArgs, void *param) |
Type of the function to call associated to a method.
callContextPtr
shall be used to interact with server address space.callContextPtr | context provided by server on connection/session associated to method call |
objectId | a valid pointer to the object on which the method is called or a type if the method is static |
nbInputArgs | number of input argument |
inputArgs | an array of input argument of the method. The size is nbInputArgs. |
nbOutputArgs | a valid pointer in which the number of output argument is written by the function |
outputArgs | a valid pointer to an SOPC_Variant[] in which the output arguments are allocated and written by the function |
typedef void SOPC_MethodCallFunc_Free_Func(void *data) |
Type of the function to free param of SOPC_MethodCallFunc.
data | a pointer to the object to free. Can be NULL |
typedef void SOPC_MethodCallManager_Free_Func(void *data) |
typedef SOPC_MethodCallFunc* SOPC_MethodCallManager_Get_Func(SOPC_MethodCallManager *mcm, SOPC_NodeId *methodId) |
SOPC_MethodCallManager* SOPC_MethodCallManager_Create | ( | void | ) |
Provide a basic implementation of MethodCallManager. This implementation can be used with SOPC_MethodCallManager_AddMethod to add method.
void SOPC_MethodCallManager_Free | ( | SOPC_MethodCallManager * | mcm | ) |
Free MethodCallManager created with SOPC_MethodCallManager_Create.
SOPC_ReturnStatus SOPC_MethodCallManager_AddMethod | ( | SOPC_MethodCallManager * | mcm, |
SOPC_NodeId * | methodId, | ||
SOPC_MethodCallFunc_Ptr * | methodFunc, | ||
void * | param, | ||
SOPC_MethodCallFunc_Free_Func * | fnFree | ||
) |
Associate a C function to a NodeId of a Method. This function should be used only with the basic implementation of SOPC_MethodCallManager provided by the toolkit.
mcm | a valid pointer on a SOPC_MethodCallManager returned by SOPC_MethodCallManager_Create(). |
methodId | a valid pointer on a SOPC_NodeId of the method (mcm will manage its deallocation, do not reuse this nodeId after call) |
methodFunc | a valid pointer on a C function to associate with the given methodId. |
param | a pointer on data to give as parameter when call methodFunc. Can be NULL. |
fnFree | a pointer on a C function to free param. Can be NULL. |