A datasource is the interface to interact with a local data provider. More...
#include <ua_server.h>
Data Fields | |
void * | handle |
UA_StatusCode(* | read )(void *handle, UA_Boolean sourceTimeStamp, UA_DataValue *value) |
void(* | release )(void *handle, UA_DataValue *value) |
UA_StatusCode(* | write )(void *handle, const UA_Variant *data) |
A datasource is the interface to interact with a local data provider.
Implementors of datasources need to provide functions for the callbacks in this structure. After every read, the handle needs to be released to indicate that the pointer is no longer accessed. As a rule, datasources are never copied, but only their content. The only way to write into a datasource is via the write-service.
It is expected that the read and release callbacks are implemented. The write callback can be set to null.
void* UA_DataSource::handle |
UA_StatusCode(* UA_DataSource::read)(void *handle, UA_Boolean sourceTimeStamp, UA_DataValue *value) |
void(* UA_DataSource::release)(void *handle, UA_DataValue *value) |
UA_StatusCode(* UA_DataSource::write)(void *handle, const UA_Variant *data) |