You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.6 KiB

2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
  1. #pragma once
  2. #include <fstream>
  3. #include <functional>
  4. #include <iostream>
  5. #include <list>
  6. #include <map>
  7. #include <memory>
  8. #include <mutex>
  9. #include <set>
  10. #include <sstream>
  11. #include <string>
  12. #include <vector>
  13. //
  14. namespace xsync {
  15. using namespace std;
  16. #pragma pack(1)
  17. typedef struct {
  18. uint16_t type;
  19. uint16_t index;
  20. uint16_t cmd;
  21. uint16_t ndata;
  22. uint32_t data[]; // first is always checksum
  23. } iflytop_xsync_packet_header_t;
  24. typedef struct {
  25. uint32_t eventid;
  26. uint32_t data[];
  27. } iflytop_xsync_event_report_packet_t;
  28. #pragma pack()
  29. typedef enum {
  30. ktimecode_report_event = 0,
  31. kxsync_work_state_report_event = 1,
  32. } iflytop_event_type_t;
  33. typedef enum {
  34. kxsync_packet_type_none = 0,
  35. kxsync_packet_type_reg_read = 1,
  36. kxsync_packet_type_reg_write = 2,
  37. kxsync_packet_type_reg_read_regs = 3,
  38. kxsync_packet_type_timecode_report = 4,
  39. } xsync_protocol_cmd_t;
  40. typedef enum {
  41. kxsync_packet_type_cmd = 0,
  42. kxsync_packet_type_receipt = 1,
  43. kxsync_packet_type_report = 2,
  44. } xsync_protocol_packet_type_t;
  45. typedef enum {
  46. kxsync_device_type_none = 0,
  47. kxsync_device_type_xsync = 1,
  48. kxsync_device_type_puck_station = 2,
  49. kxsync_device_type_encoder = 3,
  50. } xsync_device_type_t;
  51. typedef enum {
  52. xsync_stm32_action_none = 0, //
  53. xsync_stm32_action_generator_new_mac = 1, //
  54. xsync_stm32_action_factory_reset = 2, //
  55. xsync_stm32_action_reboot = 3, //
  56. xsync_stm32_action_storage_cfg = 4, //
  57. } xsync_stm32_action_t;
  58. typedef enum {
  59. obtaining_ip_mode_type_static = 0,
  60. obtaining_ip_mode_type_dhcp = 1,
  61. } obtaining_ip_mode_t;
  62. } // namespace xsync