AudiCust.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. typedef struct StSelGunInfo {
  27. uint8_t LeftGun;
  28. uint8_t RightGun;
  29. uint8_t Reserved[2];
  30. } SelGunInfo;
  31. typedef struct StPricesInfo {
  32. //uint8_t Currency;
  33. float UserPrices; //unit = 0.01 dollar, value / 100
  34. //float TotalCost; //unit = 0.01 dollar, value / 100
  35. float Balance; //unit = 0.01 dollar, value / 100
  36. //float DefaultPrices; //unit = 0.01 dollar, value / 100
  37. uint8_t Reserved[4];
  38. } PricesInfo;
  39. //typedef struct StOperativeInfo {
  40. // uint8_t ChangeReq;
  41. // uint8_t ConnectorID;
  42. // uint8_t AvailabilityReq;
  43. // uint8_t Reserved;
  44. //} OperativeInfo;
  45. //typedef struct StStartCharge {
  46. // uint8_t ConnectorID;
  47. // uint8_t Status;
  48. // uint8_t Reserved[2];
  49. //} StartCharge;
  50. typedef struct StRemoteSetup {
  51. //uint8_t Execution;
  52. uint16_t ConnectionTimeout;
  53. //float DefaultPrices;
  54. //OperativeInfo Operative;
  55. //StartCharge StartCharge;
  56. uint8_t Reserved[2];
  57. } RemoteSetup;
  58. typedef struct StAudiCustInfo {
  59. SelGunInfo SelGunInfo;
  60. PricesInfo PricesInfo[2];
  61. RemoteSetup RemoteSetup;
  62. } AudiCustInfo;
  63. #endif /* _AUDI_CUSTOM_H_ */