#ifndef FACILITIES_CAM_H #define FACILITIES_CAM_H #include #include #include #include #include #include typedef enum CID_CAM { CID_RESERVED, CID_PROTECTED_ZONES, CID_PUBLIC_TRANSPORT, CID_SPECIAL_TRANSPORT, CID_DANGEROUS_GOODS, CID_ROADWORK, CID_RESCUE, CID_EMERGENCY, CID_SAFETY_CAR, CID_CLOSED_LANES, CID_REQUEST_FOR_RIGHT_OF_WAY, CID_REQUEST_FOR_FREE_CROSSING_AT_A_TRAFFIC_LIGHT, CID_NO_PASSING, CID_NO_PASSING_FOR_TRUCKS, CID_SPEED_LIMIT } CID_CAM_e; typedef struct cid_ssp_bm { const char* container; const int cid; const uint32_t bitmap_val; } cid_ssp_bm_t; typedef struct lightship { bool active; pthread_mutex_t lock; uint8_t type; uint64_t next_cam; bool is_vehicle_near; uint64_t last_vehicle; uint32_t vehicle_gen_min; uint32_t vehicle_gen_max; uint32_t rsu_gen_min; uint32_t rsu_vehicle_permanence; ProtectedCommunicationZone_t ** pz; uint16_t pz_len; } lightship_t; lightship_t* lightship_init(); int lightship_check(lightship_t *lightship); void lightship_reset_timer(lightship_t *lightship); int check_cam(void* fc, BTPDataIndication_t* bdi, CAM_t* cam, ServiceSpecificPermissions_t* ssp); void* ca_service(void* fc); #endif