S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_pub_source_variable.h File Reference
#include "sopc_event_handler.h"
#include "sopc_mutexes.h"
#include "sopc_pubsub_conf.h"
#include "sopc_types.h"

Go to the source code of this file.

Data Structures

struct  SOPC_PubSheduler_GetVariableRequestContext
 

Typedefs

typedef struct SOPC_PubSheduler_GetVariableRequestContext SOPC_PubSheduler_GetVariableRequestContext
 
typedef struct SOPC_PubSourceVariableConfig SOPC_PubSourceVariableConfig
 
typedef struct SOPC_SourceVariableCtx SOPC_SourceVariableCtx
 
typedef SOPC_DataValueSOPC_GetSourceVariables_Func(const OpcUa_ReadValueId *nodesToRead, const int32_t nbValues)
 The publisher calls this callback cyclically to get the values to publish.
 

Functions

SOPC_PubSourceVariableConfigSOPC_PubSourceVariableConfig_Create (SOPC_GetSourceVariables_Func *callback)
 
void SOPC_PubSourceVariableConfig_Delete (SOPC_PubSourceVariableConfig *sourceConfig)
 
SOPC_DataValueSOPC_PubSourceVariable_GetVariables (const SOPC_PubSourceVariableConfig *sourceConfig, const SOPC_SourceVariableCtx *sourceVariable)
 
SOPC_SourceVariableCtxSOPC_PubSourceVariable_SourceVariablesCtx_Create (const SOPC_PublishedDataSet *pubDataset)
 Create and Initialize Source Variable context for the user to get source variables.
 
void SOPC_PubSourceVariable_SourceVariableCtx_Delete (SOPC_SourceVariableCtx **pubSourceVariable)
 

Typedef Documentation

◆ SOPC_PubSheduler_GetVariableRequestContext

typedef struct SOPC_PubSheduler_GetVariableRequestContext SOPC_PubSheduler_GetVariableRequestContext

◆ SOPC_PubSourceVariableConfig

Configuration to provide as source variable config when starting publisher

◆ SOPC_SourceVariableCtx

Data transfered by scheduler to user callback

◆ SOPC_GetSourceVariables_Func

typedef SOPC_DataValue * SOPC_GetSourceVariables_Func(const OpcUa_ReadValueId *nodesToRead, const int32_t nbValues)

The publisher calls this callback cyclically to get the values to publish.

Given the nodesToRead, it should produce an array of DataValues of length nbValues.

Note
Ownership of the returned DataValue array and its elements is transferred to the publisher library.
Returns
An array of DataValue of length nbValues or NULL in case of error

Function Documentation

◆ SOPC_PubSourceVariableConfig_Create()

SOPC_PubSourceVariableConfig * SOPC_PubSourceVariableConfig_Create ( SOPC_GetSourceVariables_Func * callback)

◆ SOPC_PubSourceVariableConfig_Delete()

void SOPC_PubSourceVariableConfig_Delete ( SOPC_PubSourceVariableConfig * sourceConfig)

◆ SOPC_PubSourceVariable_GetVariables()

SOPC_DataValue * SOPC_PubSourceVariable_GetVariables ( const SOPC_PubSourceVariableConfig * sourceConfig,
const SOPC_SourceVariableCtx * sourceVariable )

Function used by publisher scheduler to get source variables

Returns
an array of DataValue of the size of the PublishedDataSet (number of fields) or NULL in case of error

◆ SOPC_PubSourceVariable_SourceVariablesCtx_Create()

SOPC_SourceVariableCtx * SOPC_PubSourceVariable_SourceVariablesCtx_Create ( const SOPC_PublishedDataSet * pubDataset)

Create and Initialize Source Variable context for the user to get source variables.

Parameters
pubDatasetpublished dataset of the dataSetMessage which field we update
Returns
An initialize source variable context and NULL in case of error

◆ SOPC_PubSourceVariable_SourceVariableCtx_Delete()

void SOPC_PubSourceVariable_SourceVariableCtx_Delete ( SOPC_SourceVariableCtx ** pubSourceVariable)