ravkav_i.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. } RavKavCardContract;
  23. typedef struct {
  24. int event_version;
  25. int service_provider;
  26. int contract_id;
  27. int area_id;
  28. int type;
  29. DateTime time;
  30. int interchange_flag;
  31. int location_id;
  32. bool location_id_available;
  33. int route_number;
  34. bool route_number_available;
  35. int stop_en_route;
  36. bool stop_en_route_available;
  37. int vehicle_id;
  38. bool vehicle_id_available;
  39. int fare_code;
  40. bool fare_code_available;
  41. float debit_amount;
  42. bool debit_amount_available;
  43. } RavKavCardEvent;
  44. typedef struct {
  45. int app_version;
  46. int network_num;
  47. int app_num;
  48. int pay_method;
  49. DateTime end_dt;
  50. DateTime issue_dt;
  51. } RavKavCardEnv;
  52. typedef struct {
  53. RavKavCardEnv environment;
  54. RavKavCardContract contracts[4];
  55. RavKavCardEvent events[3];
  56. } RavKavCardData;
  57. #endif // RAVKAV_I_H