opcua_transportLayer.h 981 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * opcua_transportLayer.h
  3. *
  4. * Created on: Dec 19, 2013
  5. * Author: opcua
  6. */
  7. #ifndef OPCUA_TRANSPORTLAYER_H_
  8. #define OPCUA_TRANSPORTLAYER_H_
  9. #include "opcua_byteArrayConverter.h"
  10. struct TL_message
  11. {
  12. struct TL_header Header;
  13. char *message;
  14. };
  15. struct TL_header
  16. {
  17. Byte MessageType[3];
  18. Byte Reserved;
  19. UInt32 MessageSize;
  20. };
  21. const UInt32 HEADER_LENGTH = 8;
  22. struct TL_messageBodyHEL
  23. {
  24. UInt32 ProtocolVersion;
  25. UInt32 ReceiveBufferSize;
  26. UInt32 SendBufferSize;
  27. UInt32 MaxMessageSize;
  28. UInt32 MaxChunkCount;
  29. UA_String EndpointUrl;
  30. };
  31. struct TL_messageBodyACK
  32. {
  33. UInt32 ProtocolVersion;
  34. UInt32 ReceiveBufferSize;
  35. UInt32 SendBufferSize;
  36. UInt32 MaxMessageSize;
  37. UInt32 MaxChunkCount;
  38. UA_String EndpointUrl;
  39. };
  40. struct TL_messageBodyERR
  41. {
  42. UInt32 Error;
  43. UA_String Reason;
  44. };
  45. //functions
  46. void TL_getHELMessage_test();
  47. void TL_getHELMessage(char *message, struct TL_messageBodyHEL *HELmessage, struct TL_header *messageHeader);
  48. #endif /* OPCUA_TRANSPORTLAYER_H_ */