S2OPC OPCUA Toolkit
|
Contains the types to be used by the method call manager to configure the Call service. SOPC_MethodCallManager is thread-safe for adding methods at runtime. 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... | |
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. | |
typedef void | SOPC_MethodCallFunc_Free_Func(void *data) |
Type of the function to free param of SOPC_MethodCallFunc. | |
Contains the types to be used by the method call manager to configure the Call service. SOPC_MethodCallManager is thread-safe for adding methods at runtime.
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 synchronously.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 |
param | user defined parameter provided to SOPC_MethodCallManager_AddMethod |
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 |
SOPC_MethodCallManager * SOPC_MethodCallManager_Create | ( | void | ) |
Provide an instance of MethodCallManager. This implementation can be used with SOPC_MethodCallManager_AddMethod or SOPC_MethodCallManager_AddMethodWithType to add methods.
void SOPC_MethodCallManager_Free | ( | SOPC_MethodCallManager * | mcm | ) |
Free MethodCallManager created with SOPC_MethodCallManager_Create.
SOPC_ReturnStatus SOPC_MethodCallManager_AddMethod | ( | SOPC_MethodCallManager * | mcm, |
const SOPC_NodeId * | methodId, | ||
SOPC_MethodCallFunc_Ptr * | methodFunc, | ||
void * | param, | ||
SOPC_MethodCallFunc_Free_Func * | fnFree ) |
Associates a C function to a NodeId of a Method.
mcm | a valid pointer on a SOPC_MethodCallManager returned by SOPC_MethodCallManager_Create. |
methodId | a valid pointer on a SOPC_NodeId of the method, content will be copied. |
methodFunc | a valid pointer on a C function to associate with the given methodId. |
param | a pointer on data to give as parameter when calling methodFunc. It might be NULL. |
fnFree | a pointer on a C function to free param. Can be NULL. |
SOPC_ReturnStatus SOPC_MethodCallManager_AddMethodWithType | ( | SOPC_MethodCallManager * | mcm, |
const SOPC_NodeId * | methodInstanceId, | ||
const SOPC_NodeId * | methodTypeId, | ||
SOPC_MethodCallFunc_Ptr * | methodFunc, | ||
void * | param, | ||
SOPC_MethodCallFunc_Free_Func * | fnFree ) |
Associates a C function to two NodeId of a Method (one for method instance and one for method in object type)
mcm | a valid pointer on a SOPC_MethodCallManager returned by SOPC_MethodCallManager_Create. |
methodInstanceId | a valid pointer on a SOPC_NodeId of the method instance, content will be copied. |
methodTypeId | a valid pointer on a SOPC_NodeId of the method instance declaration in type, content will be copied. |
methodFunc | a valid pointer on a C function to associate with the given methodId. |
param | a pointer on data to give as parameter when calling methodFunc. It might be NULL. |
fnFree | a pointer on a C function to free param. Can be NULL. |
SOPC_MethodCallFunc * SOPC_MethodCallManager_GetMethod | ( | SOPC_MethodCallManager * | mcm, |
const SOPC_NodeId * | methodId ) |