UA_stack.h 932 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * UA_stack.h
  3. *
  4. * Created on: 04.04.2014
  5. * Author: mrt
  6. */
  7. #ifndef UA_STACK_H_
  8. #define UA_STACK_H_
  9. #include "opcua.h"
  10. #include "UA_connection.h"
  11. #include "UA_list.h"
  12. #define UA_TL_MAXCONNECTIONS_DEFAULT 10
  13. enum UA_TRANSPORTLAYERDESCRIPTION_ENCODING_enum {
  14. UA_TL_ENCODING_BINARY = 0,
  15. UA_TL_ENCODING_XML = 1,
  16. };
  17. enum UA_TRANSPORTLAYERDESCRIPTION_CONNECTION_enum {
  18. UA_TL_CONNECTIONTYPE_TCPV4 = 0,
  19. UA_TL_CONNECTIONTYPE_TCPV6 = 1,
  20. };
  21. typedef struct T_UA_TL_Description {
  22. UA_Int32 encoding;
  23. UA_Int32 connectionType;
  24. UA_Int32 maxConnections;
  25. TL_buffer localConf;
  26. } UA_TL_Description;
  27. extern UA_TL_Description UA_TransportLayerDescriptorTcpBinary;
  28. typedef struct T_UA_TL_data {
  29. UA_TL_Description* tld;
  30. UA_String endpointUrl;
  31. int listenerHandle;
  32. pthread_t listenerThreadHandle;
  33. UA_list_List connections;
  34. } UA_TL_data;
  35. UA_Int32 UA_Stack_init(UA_TL_Description* tlDesc, UA_Int32 port);
  36. #endif /* UA_STACK_H_ */