config.h 775 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef __CONFIG_H__
  2. #define __CONFIG_H__
  3. #include "tc_system.h"
  4. typedef struct modbus_hw_config
  5. {
  6. char* serverip;
  7. char* port;
  8. short enable_ssl;
  9. short maxI_GUNA;
  10. short maxI_GUNB;
  11. }modbus_hw_config_t;
  12. typedef struct TCU_CONFIG
  13. {
  14. short tcu_id;
  15. short enable_modbus_hw;
  16. short enable_hmi;
  17. short enable_ocpp;
  18. char* ast_tty;
  19. char* ifname;
  20. modbus_hw_config_t modbus_hw;
  21. char* xhlog_ip;
  22. int xhlog_port;
  23. char* xhupdate_ip;
  24. int xhupdate_port;
  25. }tcu_config_t;
  26. void tcu_config_init(const char* filename);
  27. void tcu_config_save(const char* filename);
  28. void tcu_config_exit(void);
  29. extern tcu_config_t tcu_config;
  30. extern char* config_filename;
  31. #endif//__CONFIG_H__