#ifndef FACILITIES_H #define FACILITIES_H #include #include #include #include "cam.h" #include "denm.h" #include "infrastructure.h" #include "queue.h" #include "cpm.h" #include "saem.h" #include "tpm.h" #include "dcm.h" #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 dc_service; // ZMQ struct { void* ctx; zmq_pollitem_t* responders; uint16_t n_responders; char* applications_address; char* transport_address; char* security_address; char* management_address; } zmq; // Transmitter 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_s tolling; // DC coordination_s coordination; int station_type; bool use_security; bool replay; struct { uint16_t width; uint16_t length; uint8_t role; } vehicle; struct { pthread_mutex_t lock; uint64_t station_id; uint8_t ipv6_addr[16]; struct { pthread_mutex_t lock; bool random; int stage; } change; } id; it2s_tender_epv_t epv; bool exit; } facilities_t; #endif