1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- #ifndef UA_PLUGIN_PUBSUB_H_
- #define UA_PLUGIN_PUBSUB_H_
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "ua_server_pubsub.h"
- #ifdef UA_ENABLE_PUBSUB
- typedef enum {
- UA_PUBSUB_CHANNEL_RDY,
- UA_PUBSUB_CHANNEL_PUB,
- UA_PUBSUB_CHANNEL_SUB,
- UA_PUBSUB_CHANNEL_PUB_SUB,
- UA_PUBSUB_CHANNEL_ERROR,
- UA_PUBSUB_CHANNEL_CLOSED
- } UA_PubSubChannelState;
- struct UA_PubSubChannel;
- typedef struct UA_PubSubChannel UA_PubSubChannel;
- struct UA_PubSubChannel{
- UA_UInt32 publisherId;
- UA_PubSubChannelState state;
- UA_PubSubConnectionConfig *connectionConfig;
- UA_Int32 sockfd;
- void *handle;
-
-
- UA_StatusCode (*send)(UA_PubSubChannel *channel, UA_ExtensionObject *transportSettings,
- const UA_ByteString *buf);
-
- UA_StatusCode (*regist)(UA_PubSubChannel * channel, UA_ExtensionObject *transportSettings);
-
- UA_StatusCode (*unregist)(UA_PubSubChannel * channel, UA_ExtensionObject *transportSettings);
-
- UA_StatusCode (*receive)(UA_PubSubChannel * channel, UA_ByteString *,
- UA_ExtensionObject *transportSettings, UA_UInt32 timeout);
-
- UA_StatusCode (*close)(UA_PubSubChannel *channel);
- };
- typedef struct UA_PubSubTransportLayer{
- UA_String transportProfileUri;
- UA_PubSubChannel * (*createPubSubChannel)(UA_PubSubConnectionConfig *connectionConfig);
- } UA_PubSubTransportLayer;
- #endif
- #ifdef __cplusplus
- }
- #endif
- #endif
|