ravkav_i.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #include <datetime.h>
  2. #include <stdbool.h>
  3. #ifndef RAVKAV_I_H
  4. #define RAVKAV_I_H
  5. typedef struct {
  6. int version;
  7. int provider;
  8. int tariff;
  9. int sale_device;
  10. int sale_number;
  11. DateTime start_date;
  12. DateTime sale_date;
  13. int interchange;
  14. //bitmap elements
  15. int restrict_code;
  16. int restrict_duration;
  17. DateTime end_date;
  18. bool restrict_code_available;
  19. bool restrict_duration_available;
  20. bool end_date_available;
  21. bool present;
  22. float balance;
  23. } RavKavCardContract;
  24. typedef struct {
  25. int event_version;
  26. int service_provider;
  27. int contract_id;
  28. int area_id;
  29. int type;
  30. DateTime time;
  31. int interchange_flag;
  32. int location_id;
  33. bool location_id_available;
  34. int route_number;
  35. bool route_number_available;
  36. int stop_en_route;
  37. bool stop_en_route_available;
  38. int vehicle_id;
  39. bool vehicle_id_available;
  40. int fare_code;
  41. bool fare_code_available;
  42. float debit_amount;
  43. bool debit_amount_available;
  44. } RavKavCardEvent;
  45. typedef struct {
  46. int app_version;
  47. int network_num;
  48. int app_num;
  49. int pay_method;
  50. DateTime end_dt;
  51. DateTime issue_dt;
  52. } RavKavCardEnv;
  53. typedef struct {
  54. RavKavCardEnv environment;
  55. RavKavCardContract contracts[4];
  56. RavKavCardEvent events[3];
  57. } RavKavCardData;
  58. #endif // RAVKAV_I_H