opcua_connectionHelper.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * opcua_connectionHelper.h
  3. *
  4. * Created on: Jan 13, 2014
  5. * Author: opcua
  6. */
  7. #ifndef OPCUA_CONNECTIONHELPER_H_
  8. #define OPCUA_CONNECTIONHELPER_H_
  9. #include "opcua_builtInDatatypes.h"
  10. enum packetType
  11. {
  12. packetType_HEL,
  13. packetType_ACK,
  14. packetType_ERR,
  15. packetType_OPN,
  16. packetType_MSG,
  17. packetType_CLO
  18. };
  19. enum connectionState
  20. {
  21. connectionState_CLOSED,
  22. connectionState_OPENING,
  23. connectionState_ESTABLISHED,
  24. };
  25. typedef struct buffer_t
  26. {
  27. UInt32 recvBufferSize;
  28. UInt32 sendBufferSize;
  29. UInt32 protocolVersion;
  30. UInt32 maxMessageSize;
  31. UInt32 maxChunkCount;
  32. }TL_buffer;
  33. struct TL_connection
  34. {
  35. Int32 socket;
  36. UInt32 connectionState;
  37. TL_buffer clientBuffers;
  38. TL_buffer serverBuffers;
  39. UA_String endpointURL;
  40. };
  41. struct SL_connection
  42. {
  43. T_ApplicationInstanceCertificate clientCertificate;
  44. UInt32 requestType;
  45. UA_String secureChannelId;
  46. UInt32 securityMode;
  47. UA_String clientNonce;
  48. UA_Duration requestedLifetime;
  49. UInt32 connectionState;
  50. };
  51. struct SS_connection
  52. {
  53. };
  54. typedef struct UA_connection_t
  55. {
  56. struct TL_connection transportLayer;
  57. struct SL_connection secureLayer;
  58. struct SS_connection serviceLayer;
  59. }UA_connection;
  60. #endif /* OPCUA_CONNECTIONHELPER_H_ */