51 lines
983 B
C
51 lines
983 B
C
#ifndef FACILITIES_H
|
|
#define FACILITIES_H
|
|
|
|
#include <pthread.h>
|
|
#include <stdbool.h>
|
|
|
|
#include "cam.h"
|
|
#include "denm.h"
|
|
#include "infrastructure.h"
|
|
#include "queue.h"
|
|
|
|
#define FACILITIES_ADDRESS "ipc:///tmp/itss/facilities"
|
|
#define FACILITIES_SECURED_ADDRESS "ipc:///tmp/itss/facilities-secured"
|
|
#define TRANSPORT_ADDRESS "ipc:///tmp/itss/transport"
|
|
#define APPLICATION_ADDRESS "ipc:///tmp/itss/application"
|
|
#define SECURITY_ADDRESS "ipc:///tmp/itss/security"
|
|
|
|
typedef struct facilities {
|
|
pthread_t ca_service;
|
|
pthread_t den_service;
|
|
pthread_t infrastructure_service;
|
|
pthread_t transmitting;
|
|
pthread_t securing;
|
|
|
|
// ZMQ
|
|
void* ctx;
|
|
|
|
// Transmitter
|
|
queue_t* tx_queue;
|
|
|
|
// CA
|
|
lightship_t* lightship;
|
|
|
|
// DEN
|
|
den_t *den;
|
|
|
|
// Infrastructure
|
|
infrastructure_t* infrastructure;
|
|
|
|
int station_type;
|
|
bool replay;
|
|
|
|
pthread_mutex_t lock;
|
|
uint64_t station_id;
|
|
bool id_random;
|
|
|
|
bool exit;
|
|
} facilities_t;
|
|
|
|
#endif
|