High Performance OPC UA Server SDK
1.2.0.193
|
Structure to represent a monitoreditem in the server. More...
#include <monitoreditem.h>
Public Types | |
enum | ua_monitoreditem_type |
Data Fields | |
enum ua_monitoreditem_type | type |
bool | discard_oldest |
uint32_t | user_data [2] |
uint32_t | sampling_interval |
uint32_t | client_handle |
uint32_t | timeout_hint |
uint32_t | id |
ua_statuscode | operation_result |
enum ua_monitoringmode | monitoring_mode |
struct util_ringqueue | value_queue |
struct ua_nodeid | nodeid |
struct ua_subscription * | subscription |
union ua_monitoreditem_fields | fields |
Structure to represent a monitoreditem in the server.
The fields of this structure should not be accessed directly, but its getter/setter functions should be used. If a getter/setter does not exist for a field it most certainly should not be accessed at all.
Type of an item, either UA_MONITOREDITEM_TYPE_DATA or UA_MONITOREDITEM_TYPE_EVENT.
|
inline |
Get the attributeid for an item
.
|
inline |
Get the server-assigned Id of an item
. It is unique among all items from all subscriptions on the server. The Id is implemented as versioned handle, so it will take rather long until an Id is reused.
|
inline |
Get the monitoring mode for an item
.
static const struct ua_nodeid * ua_monitoreditem_get_nodeid | ( | struct ua_monitoreditem * | item | ) |
Get the nodeid an item
is subscribed to.
|
inline |
Get the number of indexranges for an item
.
static struct ua_indexrange * ua_monitoreditem_get_range | ( | struct ua_monitoreditem * | item | ) |
Get the array of indexranges for an item
, the length of the array can be retrieved with ua_monitoreditem_get_num_ranges.
|
inline |
Get the sampling interval for an item
.
struct uasession_session * ua_monitoreditem_get_session | ( | struct ua_monitoreditem * | item | ) |
Get the session belonging to a monitoreditem.
item |
|
inline |
Get the timeout hint for an item
. This hint should be respected by the provider during the create, modifiy and delete operation. 0 means no timeout.
|
inline |
Get the timestamps to return for an item
.
|
inline |
Get the type of an item
.
|
inline |
Get user data set with ua_monitoreditem_set_user_data from an item
.
index | Select the slot, either 0 or 1. |
|
inline |
Returns true if the item
has an indexrange set.
int ua_monitoreditem_new_value | ( | struct ua_monitoreditem * | item, |
struct ua_datavalue * | value | ||
) |
Add a new value to a monitoreditem.
Add a newly sampled value to the monitoreditem, the functions checks if the value changed and enqueues it if necessary.
In case of success the function takes ownership of the value
and finally clears it and calls ipc_free on the pointer. In case of failure the caller is responsible for cleaning the value
up.
item | Monitoreditem to add a new value to. |
value | The new value. |
|
inline |
Set the result of the create, modify or delete operation for an item
.
|
inline |
Set the sampling interval of an item
. This might be done during creation or modification of the item, this will be returned to the client as revised sampling interval.
sampling_interval | New sampling interval in milliseconds. |
|
inline |
Set user date for an item
, this can be arbitrary data used by the provider. There are currently two slots for values of type uint32_t available.
index | Select the slot, either 0 or 1. |