ua_transport_binary.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. //transport errors begin at 1000
  7. #define UA_ERROR_MULTIPLE_HEL 1000
  8. #define UA_ERROR_RCV_ERROR 1001
  9. //variables which belong to layer
  10. #define TL_SERVER_PROTOCOL_VERSION 0
  11. #define TL_SERVER_MAX_CHUNK_COUNT 1
  12. #define TL_SERVER_MAX_MESSAGE_SIZE 8192
  13. /* Transport Layer Connection */
  14. //struct TL_Connection_T; // forward declaration
  15. //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)
  16. /*
  17. typedef struct TL_Connection_T {
  18. UA_Int32 connectionHandle;
  19. UA_UInt32 connectionState;
  20. TL_Buffer localConf;
  21. TL_Buffer remoteConf;
  22. TL_Writer writerCallback;
  23. UA_String localEndpointUrl;
  24. UA_String remoteEndpointUrl;
  25. struct SL_Channel_T* secureChannel;
  26. } TL_Connection;
  27. */
  28. UA_Int32 TL_Send(UA_TL_Connection connection, const UA_ByteString** gather_buf, UA_UInt32 gather_len);
  29. UA_Int32 TL_Process(UA_TL_Connection connection, const UA_ByteString* msg);
  30. #endif /* OPCUA_TRANSPORT_BINARY_H_ */