Skip to content

Commit

Permalink
Merge pull request #29 from DocSystem/dev
Browse files Browse the repository at this point in the history
Update some parser functions + Add Villejuif IGR station and ORA provider
  • Loading branch information
luu176 authored Jan 25, 2025
2 parents 0abd86d + ca57e15 commit a1d973e
Show file tree
Hide file tree
Showing 11 changed files with 947 additions and 445 deletions.
2 changes: 2 additions & 0 deletions api/calypso/calypso_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ typedef struct {
unsigned int card_number;

int contracts_count;
int events_count;
int special_events_count;
} CalypsoCardData;

typedef struct {
Expand Down
3 changes: 2 additions & 1 deletion api/calypso/calypso_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
#define CALYPSO_UTIL_H

typedef enum {
CALYPSO_APP_ENV_HOLDER,
CALYPSO_APP_CONTRACT,
CALYPSO_APP_EVENT,
CALYPSO_APP_ENV_HOLDER,
CALYPSO_APP_COUNTER,
} CalypsoAppType;

typedef enum {
Expand Down
407 changes: 248 additions & 159 deletions api/calypso/cards/intercode.c

Large diffs are not rendered by default.

51 changes: 48 additions & 3 deletions api/calypso/cards/intercode.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,55 @@
#ifndef INTERCODE_STRUCTURES_H
#define INTERCODE_STRUCTURES_H

CalypsoApp* get_intercode_contract_structure();
CalypsoApp* get_intercode_structure_env_holder();

CalypsoApp* get_intercode_event_structure();
CalypsoApp* get_intercode_structure_contract();

CalypsoApp* get_intercode_env_holder_structure();
CalypsoApp* get_intercode_structure_event();

CalypsoApp* get_intercode_structure_counter();

const char* get_intercode_string_transition_type(int transition);

const char* get_intercode_string_event_result(int result);

typedef enum {
URBAN_BUS = 1,
INTERURBAN_BUS = 2,
METRO = 3,
TRAM = 4,
COMMUTER_TRAIN = 5,
WATERBORNE_VEHICLE = 6,
TOLL = 7,
PARKING = 8,
TAXI = 9,
HIGH_SPEED_TRAIN = 10,
RURAL_BUS = 11,
EXPRESS_COMMUTER_TRAIN = 12,
PARA_TRANSIT = 13,
SELF_DRIVE_VEHICLE = 14,
COACH = 15,
LOCOMOTIVE = 16,
POWERED_MOTOR_VEHICLE = 17,
TRAILER = 18,
REGIONAL_TRAIN = 19,
INTER_CITY = 20,
FUNICULAR = 21,
CABLE_CAR = 22,
SELF_SERVICE_BICYCLE = 23,
CAR_SHARING = 24,
CAR_POOLING = 25,
} INTERCODE_TRANSPORT_TYPE;

typedef enum {
ENTRY = 1,
EXIT = 2,
PASSAGE = 3,
CHECKPOINT_INSPECTION = 4,
AUTONOMOUS = 5,
INTERCHANGE = 6,
VALIDATION = 7,
PRESENCE_DETECTED = 8,
} INTERCODE_USER_ACTION;

#endif // INTERCODE_STRUCTURES_H
4 changes: 2 additions & 2 deletions api/calypso/cards/opus.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ CalypsoApp* get_opus_event_structure() {
OpusEventStructure->container->size = app_elements_count;

OpusEventStructure->container->elements[0] =
make_calypso_final_element("EventDate", 14, "Event date", CALYPSO_FINAL_TYPE_DATE);
make_calypso_final_element("EventDateStamp", 14, "Event date", CALYPSO_FINAL_TYPE_DATE);
OpusEventStructure->container->elements[1] =
make_calypso_final_element("EventTime", 11, "Event time", CALYPSO_FINAL_TYPE_TIME);
make_calypso_final_element("EventTimeStamp", 11, "Event time", CALYPSO_FINAL_TYPE_TIME);
OpusEventStructure->container->elements[2] =
make_calypso_final_element("EventUnknownX", 19, "Unknown X", CALYPSO_FINAL_TYPE_NUMBER);
OpusEventStructure->container->elements[3] = make_calypso_bitmap_element(
Expand Down
Loading

0 comments on commit a1d973e

Please sign in to comment.