1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #ifndef UA_CLIENT_INTERNAL_H_
- #define UA_CLIENT_INTERNAL_H_
- #include "ua_securechannel.h"
- #include "queue.h"
- /**************************/
- /* Subscriptions Handling */
- /**************************/
- #ifdef ENABLE_SUBSCRIPTIONS
- typedef struct UA_Client_NotificationsAckNumber_s {
- UA_SubscriptionAcknowledgement subAck;
- LIST_ENTRY(UA_Client_NotificationsAckNumber_s) listEntry;
- } UA_Client_NotificationsAckNumber;
- typedef struct UA_Client_MonitoredItem_s {
- UA_UInt32 MonitoredItemId;
- UA_UInt32 MonitoringMode;
- UA_NodeId monitoredNodeId;
- UA_UInt32 AttributeID;
- UA_UInt32 ClientHandle;
- UA_UInt32 SamplingInterval;
- UA_UInt32 QueueSize;
- UA_Boolean DiscardOldest;
- void (*handler)(UA_UInt32 handle, UA_DataValue *value);
- LIST_ENTRY(UA_Client_MonitoredItem_s) listEntry;
- } UA_Client_MonitoredItem;
- typedef struct UA_Client_Subscription_s {
- UA_UInt32 LifeTime;
- UA_Int32 KeepAliveCount;
- UA_DateTime PublishingInterval;
- UA_UInt32 SubscriptionID;
- UA_Int32 NotificationsPerPublish;
- UA_UInt32 Priority;
- LIST_ENTRY(UA_Client_Subscription_s) listEntry;
- LIST_HEAD(UA_ListOfClientMonitoredItems, UA_Client_MonitoredItem_s) MonitoredItems;
- } UA_Client_Subscription;
- #endif
- /**********/
- /* Client */
- /**********/
- typedef enum {
- UA_CLIENTSTATE_READY,
- UA_CLIENTSTATE_CONNECTED,
- UA_CLIENTSTATE_ERRORED
- } UA_Client_State;
- struct UA_Client {
- /* State */ //maybe it should be visible to user
- UA_Client_State state;
- /* Connection */
- UA_Connection connection;
- UA_SecureChannel channel;
- UA_String endpointUrl;
- UA_UInt32 requestId;
- /* Session */
- UA_UserTokenPolicy token;
- UA_NodeId sessionId;
- UA_NodeId authenticationToken;
- UA_UInt32 requestHandle;
-
- #ifdef ENABLE_SUBSCRIPTIONS
- UA_Int32 monitoredItemHandles;
- LIST_HEAD(UA_ListOfUnacknowledgedNotificationNumbers, UA_Client_NotificationsAckNumber_s) pendingNotificationsAcks;
- LIST_HEAD(UA_ListOfClientSubscriptionItems, UA_Client_Subscription_s) subscriptions;
- #endif
-
- /* Config */
- UA_Logger logger;
- UA_ClientConfig config;
- UA_DateTime scExpiresAt;
- };
- #endif /* UA_CLIENT_INTERNAL_H_ */
|