41 lines
786 B
C
41 lines
786 B
C
#ifndef FACILITIES_CAM_H
|
|
#define FACILITIES_CAM_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <pthread.h>
|
|
#include <stdbool.h>
|
|
|
|
#include <camv2/CAM.h>
|
|
#include <itss-transport/BTPDataIndication.h>
|
|
|
|
|
|
typedef struct lightship {
|
|
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);
|
|
void* ca_service(void* fc);
|
|
|
|
#endif
|