AudiCust.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #ifndef _AUDI_CUSTOM_H_
  2. #define _AUDI_CUSTOM_H_
  3. #include <stdint.h>
  4. //------------------------------------------------------------------------------
  5. //--- //For Audi for Audi customization ---
  6. //------------------------------------------------------------------------------
  7. #define ShmAudiCustInfoKey 1014
  8. #define SEL_GUN_RELEASE 0x00
  9. #define SEL_GUN_CONFIRM 0x01
  10. #define SEL_GUN_ATHOR 0x02
  11. #define SEL_GUN_PLUG_IT 0x03
  12. //#define SEL_GUN_CHARGING 0x04
  13. //#define SEL_GUN_CHARGING_COMP 0x05
  14. #define LEFT_GUN_NUM 0
  15. #define RIGHT_GUN_NUM 1
  16. #define SEL_GUN_TIMEOUT 120
  17. #define DESTROY_ALL_SEL 0x03
  18. #define FAIL_BALANCE_PRICES -65535.00
  19. //------------------------------------------------------------------------------
  20. //--- remote control ---
  21. //------------------------------------------------------------------------------
  22. //#define RT_NON_ACTION 0x00
  23. //#define RT_HARDWARE_REBOOT 0x01
  24. //#define RT_SOFTWARE_RESTART 0x02
  25. //------------------------------------------------------------------------------
  26. //--- power cabinet Ethernet device status ---
  27. //------------------------------------------------------------------------------
  28. #define DEV_ST_DISABLE 0x00
  29. #define DEV_ST_ENABLE_USE 0x01
  30. #define DEV_ST_ENABLE_NO_USE 0x02
  31. #define EV_BOARD_STOP_CHARGING 1
  32. #define POWER_CABINET_STOP_CHARGING 2
  33. //------------------------------------------------------------------------------
  34. typedef struct StEthDevStatus {
  35. uint8_t Backend;
  36. uint8_t Ethernet;
  37. uint8_t Wifi;
  38. uint8_t FourG;
  39. } EthDevStatus;
  40. typedef struct StSelGunInfo {
  41. uint8_t LeftGun;
  42. uint8_t RightGun;
  43. uint8_t Reserved[2];
  44. } SelGunInfo;
  45. typedef struct StPricesInfo {
  46. //uint8_t Currency;
  47. float UserPrices; //unit = 0.01 dollar, value / 100
  48. //float TotalCost; //unit = 0.01 dollar, value / 100
  49. float Balance; //unit = 0.01 dollar, value / 100
  50. //float DefaultPrices; //unit = 0.01 dollar, value / 100
  51. uint8_t Reserved[4];
  52. } PricesInfo;
  53. //typedef struct StOperativeInfo {
  54. // uint8_t ChangeReq;
  55. // uint8_t ConnectorID;
  56. // uint8_t AvailabilityReq;
  57. // uint8_t Reserved;
  58. //} OperativeInfo;
  59. //typedef struct StStartCharge {
  60. // uint8_t ConnectorID;
  61. // uint8_t Status;
  62. // uint8_t Reserved[2];
  63. //} StartCharge;
  64. typedef struct StRemoteSetup {
  65. //uint8_t Execution;
  66. uint16_t ConnectionTimeout;
  67. //float DefaultPrices;
  68. //OperativeInfo Operative;
  69. //StartCharge StartCharge;
  70. uint8_t Reserved[2];
  71. } RemoteSetup;
  72. typedef struct StAudiCustInfo {
  73. SelGunInfo SelGunInfo;
  74. PricesInfo PricesInfo[2];
  75. RemoteSetup RemoteSetup;
  76. EthDevStatus EthDevStatus;
  77. } AudiCustInfo;
  78. #endif /* _AUDI_CUSTOM_H_ */