opcua_connectionHelper.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. #include "opcua_types.h"
  11. enum packetType
  12. {
  13. packetType_HEL,
  14. packetType_ACK,
  15. packetType_ERR,
  16. packetType_OPN,
  17. packetType_MSG,
  18. packetType_CLO
  19. };
  20. enum connectionState
  21. {
  22. connectionState_CLOSED,
  23. connectionState_OPENING,
  24. connectionState_ESTABLISHED,
  25. };
  26. typedef struct buffer_t
  27. {
  28. UInt32 recvBufferSize;
  29. UInt32 sendBufferSize;
  30. UInt32 protocolVersion;
  31. UInt32 maxMessageSize;
  32. UInt32 maxChunkCount;
  33. }TL_buffer;
  34. struct TL_connection
  35. {
  36. Int32 socket;
  37. UInt32 connectionState;
  38. TL_buffer clientBuffers;
  39. TL_buffer serverBuffers;
  40. UA_String endpointURL;
  41. };
  42. struct SL_connection
  43. {
  44. T_ApplicationInstanceCertificate clientCertificate;
  45. UInt32 requestType;
  46. UA_String secureChannelId;
  47. UInt32 securityMode;
  48. UA_String clientNonce;
  49. UA_Duration requestedLifetime;
  50. UInt32 connectionState;
  51. };
  52. struct SS_connection
  53. {
  54. };
  55. typedef struct UA_connection_t
  56. {
  57. struct TL_connection transportLayer;
  58. struct SL_connection secureLayer;
  59. struct SS_connection serviceLayer;
  60. }UA_connection;
  61. #endif /* OPCUA_CONNECTIONHELPER_H_ */