ua_transport_binary.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef OPCUA_TRANSPORT_BINARY_H_
  2. #define OPCUA_TRANSPORT_BINARY_H_
  3. #include <stdio.h>
  4. #include "ua_transport_binary.h"
  5. #include "ua_transport_connection.h"
  6. #include "ua_server.h"
  7. //transport errors begin at 1000
  8. #define UA_ERROR_MULTIPLE_HEL 1000
  9. #define UA_ERROR_RCV_ERROR 1001
  10. //variables which belong to layer
  11. #define TL_SERVER_PROTOCOL_VERSION 0
  12. #define TL_SERVER_MAX_CHUNK_COUNT 1
  13. #define TL_SERVER_MAX_MESSAGE_SIZE 8192
  14. /* Transport Layer Connection */
  15. //struct TL_Connection_T; // forward declaration
  16. //typedef UA_Int32 (*TL_Writer)(struct TL_Connection_T* connection, const UA_ByteString** gather_bufs, UA_Int32 gather_len); // send mutiple buffer concatenated into one msg (zero copy)
  17. /*
  18. typedef struct TL_Connection_T {
  19. UA_Int32 connectionHandle;
  20. UA_UInt32 connectionState;
  21. TL_Buffer localConf;
  22. TL_Buffer remoteConf;
  23. TL_Writer writerCallback;
  24. UA_String localEndpointUrl;
  25. UA_String remoteEndpointUrl;
  26. struct SL_Channel_T* secureChannel;
  27. } TL_Connection;
  28. */
  29. UA_Int32 TL_Send(UA_TL_Connection *connection, const UA_ByteString** gather_buf, UA_UInt32 gather_len);
  30. UA_Int32 TL_Process(UA_TL_Connection *connection, UA_Server *server, const UA_ByteString* msg);
  31. #endif /* OPCUA_TRANSPORT_BINARY_H_ */