#ifndef FACILITIES_H #define FACILITIES_H #include #include #include #include "cam.h" #include "denm.h" #include "infrastructure.h" #include "cpm.h" #include "saem.h" #include "tpm.h" #include "vcm.h" #include "evm.h" #include "edm.h" #include #include #include #include #include enum ID_CHANGE_STAGE { ID_CHANGE_INACTIVE, ID_CHANGE_BLOCKED, ID_CHANGE_PREPARE, ID_CHANGE_COMMIT }; typedef struct facilities { pthread_t ca_service; pthread_t den_service; pthread_t infrastructure_service; pthread_t transmitting; pthread_t cp_service; pthread_t sa_service; pthread_t vc_service; pthread_t evcsn_service; // ZMQ struct { zmq_pollitem_t* responders; uint16_t n_responders; char* applications_address; char* transport_address; char* security_address; char* management_address; } zmq; // Transmitter itss_queue_t* tx_queue; // CA lightship_t lightship; // DEN den_t den; // Infrastructure infrastructure_t infrastructure; // CPM dissemination_t dissemination; // SA bulletin_t bulletin; // TP tolling_t tolling; // PC coordination_t coordination; // EVCSN evm_args_t evm_args; // EDM edm_t edm; // Logging struct { bool recorder; itss_db_t* dbms; } logging; int station_type; bool use_security; bool replay; struct { uint16_t width; uint16_t length; uint8_t role; } vehicle; struct { pthread_mutex_t lock; uint32_t station_id; uint8_t ipv6_addr[16]; struct { pthread_mutex_t lock; bool random; int stage; } change; } id; bool exit; } facilities_t; extern facilities_t facilities; #endif