Disable CAMs option
This commit is contained in:
parent
60b061e5b3
commit
74b514eff3
|
|
@ -499,12 +499,12 @@ void *ca_service(void *fc) {
|
||||||
*bdr->gnSecurityProfile = 1;
|
*bdr->gnSecurityProfile = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t bdr_oer[512];
|
uint8_t bdr_oer[1024];
|
||||||
bdr_oer[0] = 4; // Facilities
|
bdr_oer[0] = 4; // Facilities
|
||||||
while (!facilities->exit) {
|
while (!facilities->exit) {
|
||||||
usleep(1000*50);
|
usleep(1000*50);
|
||||||
|
|
||||||
if (lightship_check(facilities->lightship)) {
|
if (lightship_check(facilities->lightship) && facilities->lightship->active) {
|
||||||
rv = mk_cam(facilities, bdr->data.buf, (uint32_t *) &bdr->data.size);
|
rv = mk_cam(facilities, bdr->data.buf, (uint32_t *) &bdr->data.size);
|
||||||
if (rv) {
|
if (rv) {
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -514,7 +514,7 @@ void *ca_service(void *fc) {
|
||||||
bdr->gnCommunicationProfile = 0;
|
bdr->gnCommunicationProfile = 0;
|
||||||
if (facilities->station_type != 15 && check_pz(facilities->lightship)) bdr->gnCommunicationProfile = 1;
|
if (facilities->station_type != 15 && check_pz(facilities->lightship)) bdr->gnCommunicationProfile = 1;
|
||||||
|
|
||||||
asn_enc_rval_t enc = oer_encode_to_buffer(&asn_DEF_BTPDataRequest, NULL, bdr, bdr_oer+1, 511);
|
asn_enc_rval_t enc = oer_encode_to_buffer(&asn_DEF_BTPDataRequest, NULL, bdr, bdr_oer+1, 1023);
|
||||||
if (enc.encoded == -1) {
|
if (enc.encoded == -1) {
|
||||||
syslog_err("[facilities] encoding BTPDataRequest for cam failed");
|
syslog_err("[facilities] encoding BTPDataRequest for cam failed");
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ typedef struct cid_ssp_bm {
|
||||||
} cid_ssp_bm_t;
|
} cid_ssp_bm_t;
|
||||||
|
|
||||||
typedef struct lightship {
|
typedef struct lightship {
|
||||||
|
bool active;
|
||||||
|
|
||||||
pthread_mutex_t lock;
|
pthread_mutex_t lock;
|
||||||
|
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,10 @@ int itss_config(void* facilities_s, char* config_file) {
|
||||||
facilities->den->n_max_events = denm_nmax_active_events;
|
facilities->den->n_max_events = denm_nmax_active_events;
|
||||||
|
|
||||||
// CAM
|
// CAM
|
||||||
|
int cam_activate = 1;
|
||||||
|
rv += extract_val_bool(&cam_activate, cam, "activate");
|
||||||
|
facilities->lightship->active = cam_activate;
|
||||||
|
|
||||||
int64_t obu_cam_period_min;
|
int64_t obu_cam_period_min;
|
||||||
rv += extract_val_int(&obu_cam_period_min, cam, "obu-period-min");
|
rv += extract_val_int(&obu_cam_period_min, cam, "obu-period-min");
|
||||||
facilities->lightship->vehicle_gen_min = obu_cam_period_min;
|
facilities->lightship->vehicle_gen_min = obu_cam_period_min;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue