High Performance OPC UA Server SDK
1.2.0.193
|
Request the server to return NotificationMessages and acknowledge received NotificationMessages. More...
#include <publishrequest.h>
Data Fields | |
struct ua_subscriptionacknowledgement * | subscription_acknowledgements |
The list of acknowledgements for one or more Subscriptions. More... | |
int32_t | num_subscription_acknowledgements |
Number of elements in ua_publishrequest::subscription_acknowledgements. | |
Related Functions | |
void | ua_publishrequest_init (struct ua_publishrequest *t) |
Initialize an ua_publishrequest struct with a valid value. More... | |
void | ua_publishrequest_clear (struct ua_publishrequest *t) |
Clear all resources alloctated in an ua_publishrequest struct. More... | |
int | ua_publishrequest_compare (const struct ua_publishrequest *a, const struct ua_publishrequest *b) |
Compare two ua_publishrequest structs. More... | |
int | ua_publishrequest_copy (struct ua_publishrequest *dst, const struct ua_publishrequest *src) |
Create a copy of a ua_publishrequest struct. More... | |
static int | ua_publishrequest_resize_subscription_acknowledgements_array (struct ua_publishrequest *val, int32_t new_len) |
Resize the subscription_acknowledgements array of a ua_publishrequest struct. More... | |
Request the server to return NotificationMessages and acknowledge received NotificationMessages.
This Service is used for two purposes. First, it is used to acknowledge the receipt of NotificationMessages for one or more Subscriptions. Second, it is used to request the Server to return a NotificationMessage or a keep-alive message. Since Publish requests are not directed to a specific Subscription, they may be used by any Subscription.
Client strategies for issuing Publish requests may vary depending on the networking delays between the Client and the Server. In many cases, the Client may wish to issue a Publish request immediately after creating a Subscription, and thereafter, immediately after receiving a Publish response.
In other cases, especially in high latency networks, the Client may wish to pipeline Publish requests to ensure cyclic reporting from the Server. Pipelining involves sending more than one Publish request for each Subscription before receiving a response. For example, if the network introduces a delay between the Client and the Server of five seconds and the publishing interval for a Subscription is one second, then the Client will have to issue Publish requests every second instead of waiting for a response to be received before sending the next request.
A server should limit the number of active Publish requests to avoid an infinite number since it is expected that the Publish requests are queued in the Server. But a Server shall accept more queued Publish requests than created Subscriptions. It is expected that a Server supports several Publish requests per Subscription. When a Server receives a new Publish request that exceeds its limit it shall dequeue the oldest Publish request and return a response with the result set to Bad_TooManyPublishRequests. If a Client receives this Service result for a Publish request it shall not issue another Publish request before one of its outstanding Publish requests is returned from the Server.
Clients can limit the size of Publish responses with the maxNotificationsPerPublish parameter passed to the CreateSubscription Service. However, this could still result in a message that is too large for the Client or Server to process. In this situation, the Client will find that either the SecureChannel goes into a fault state and needs to be reestablished or the Publish response returns an error and calling the Republish Service also returns an error. If either situation occurs then the Client will have to adjust its message processing limits or the parameters for the Subscription and/or MonitoredItems.
The return diagnostic info setting in the request header of the CreateMonitoredItems or the last ModifyMonitoredItems Service is applied to the Monitored Items and is used as the diagnostic information settings when sending Notifications in the Publish response.
|
related |
Clear all resources alloctated in an ua_publishrequest struct.
Frees allocated memory like arrays and resets numeric values. The ua_publishrequest struct itself is not freed and must be freed by the caller if required. This function always succeeds for a valid ua_publishrequest struct, that was validly decoded or initilized by ua_publishrequest_init.
|
related |
Compare two ua_publishrequest structs.
Compares the content of the ua_publishrequest struct a
to the content of the ua_publishrequest struct b
. If a
is smaller than b
, an integer less than zero is returned, if a
is bigger than b
, an integer greater than zero is returned. If both structs are equal zero is returned.
This function creates a total order on ua_publishrequest structs, so it is well suited to not only determine equality, but also sort multiple instances of this struct.
|
related |
Create a copy of a ua_publishrequest struct.
Copy all fields from struct ua_publishrequest src
to dst
. Creates a deep copy so all content is recusively copied and both src
and dst
can be used and must be freed separately.
dst
is not cleared before the copy operation, so it must not have any allocated data. It may or may not be initilized by the caller before copy.
|
related |
Initialize an ua_publishrequest struct with a valid value.
After initialization the fields of the struct are set to valid and consistent values and can safley be accessed. An initialized ua_publishrequest struct can also be passed to ua_publishrequest_clear. This function will always succeed as long as an ua_publishrequest struct is passed to it.
|
related |
Resize the subscription_acknowledgements array of a ua_publishrequest struct.
Depending on new_len
and the current size of the array, the array will be created, increased, decreased or deleted. In case array members are removed these are cleared properly, new array members are initialized with zero.
new_len | New length of the subscription_acknowledgements array in number of members. |
subscription_acknowledgements |
The list of acknowledgements for one or more Subscriptions.
This list may contain multiple acknowledgements for the same Subscription (multiple entries with the same).