123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef UA_CONNECTION_H_
- #define UA_CONNECTION_H_
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "ua_types.h"
- typedef struct UA_ByteStringArray {
- UA_UInt32 stringsSize;
- UA_ByteString *strings;
- } UA_ByteStringArray;
- typedef enum UA_ConnectionState {
- UA_CONNECTION_OPENING,
- UA_CONNECTION_CLOSING,
- UA_CONNECTION_ESTABLISHED
- } UA_ConnectionState;
- typedef struct UA_ConnectionConfig {
- UA_UInt32 protocolVersion;
- UA_UInt32 sendBufferSize;
- UA_UInt32 recvBufferSize;
- UA_UInt32 maxMessageSize;
- UA_UInt32 maxChunkCount;
- } UA_ConnectionConfig;
- extern UA_EXPORT UA_ConnectionConfig UA_ConnectionConfig_standard;
- struct UA_SecureChannel;
- typedef struct UA_SecureChannel UA_SecureChannel;
- typedef void (*UA_Connection_writeCallback)(void *handle, const UA_ByteStringArray buf);
- typedef void (*UA_Connection_closeCallback)(void *handle);
- typedef struct UA_Connection {
- UA_ConnectionState state;
- UA_ConnectionConfig localConf;
- UA_ConnectionConfig remoteConf;
- UA_SecureChannel *channel;
- void *callbackHandle;
- UA_Connection_writeCallback write;
- UA_Connection_closeCallback close;
- } UA_Connection;
- UA_StatusCode UA_EXPORT UA_Connection_init(UA_Connection *connection, UA_ConnectionConfig localConf, void *callbackHandle,
- UA_Connection_closeCallback close, UA_Connection_writeCallback write);
- void UA_EXPORT UA_Connection_deleteMembers(UA_Connection *connection);
- #ifdef __cplusplus
- }
- #endif
- #endif
|