EPV refactoring
This commit is contained in:
parent
7bf4d92379
commit
4156b733ce
|
|
@ -495,7 +495,6 @@ int facilities_config() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
itss_epv_init();
|
|
||||||
|
|
||||||
facilities.edm.enabled = itss_cfg->applications.extensions.enabled;
|
facilities.edm.enabled = itss_cfg->applications.extensions.enabled;
|
||||||
|
|
||||||
|
|
@ -503,7 +502,6 @@ int facilities_config() {
|
||||||
mreq->present = EIS_ManagementRequest_PR_attributes;
|
mreq->present = EIS_ManagementRequest_PR_attributes;
|
||||||
mreq->choice.attributes.present = EIS_ManagementRequestAttributes_PR_get;
|
mreq->choice.attributes.present = EIS_ManagementRequestAttributes_PR_get;
|
||||||
mreq->choice.attributes.choice.get.clockType = 1;
|
mreq->choice.attributes.choice.get.clockType = 1;
|
||||||
mreq->choice.attributes.choice.get.clock = 1;
|
|
||||||
mreq->choice.attributes.choice.get.clockOffset = 1;
|
mreq->choice.attributes.choice.get.clockOffset = 1;
|
||||||
void* management_socket = itss_0connect(facilities.zmq.management_address, ZMQ_REQ);
|
void* management_socket = itss_0connect(facilities.zmq.management_address, ZMQ_REQ);
|
||||||
uint8_t b_tx[256], b_rx[256];
|
uint8_t b_tx[256], b_rx[256];
|
||||||
|
|
@ -523,11 +521,10 @@ int facilities_config() {
|
||||||
if (mrep->returnCode == EIS_ManagementReplyReturnCode_accepted &&
|
if (mrep->returnCode == EIS_ManagementReplyReturnCode_accepted &&
|
||||||
mrep->data &&
|
mrep->data &&
|
||||||
mrep->data->choice.attributes.clockType &&
|
mrep->data->choice.attributes.clockType &&
|
||||||
mrep->data->choice.attributes.clock &&
|
|
||||||
mrep->data->choice.attributes.clockOffset) {
|
mrep->data->choice.attributes.clockOffset) {
|
||||||
epv.time.type = *mrep->data->choice.attributes.clockType;
|
|
||||||
|
|
||||||
asn_INTEGER2uint64(mrep->data->choice.attributes.clock, &epv.time.clock);
|
itss_epv_init(*mrep->data->choice.attributes.clockType, TIME_MILLISECONDS);
|
||||||
|
|
||||||
asn_INTEGER2uint64(mrep->data->choice.attributes.clockOffset, &epv.time.offset);
|
asn_INTEGER2uint64(mrep->data->choice.attributes.clockOffset, &epv.time.offset);
|
||||||
} else {
|
} else {
|
||||||
log_error("rejected MR attribute request");
|
log_error("rejected MR attribute request");
|
||||||
|
|
@ -537,6 +534,7 @@ int facilities_config() {
|
||||||
ASN_STRUCT_FREE(asn_DEF_EIS_ManagementRequest, mreq);
|
ASN_STRUCT_FREE(asn_DEF_EIS_ManagementRequest, mreq);
|
||||||
ASN_STRUCT_FREE(asn_DEF_EIS_ManagementReply, mrep);
|
ASN_STRUCT_FREE(asn_DEF_EIS_ManagementReply, mrep);
|
||||||
|
|
||||||
|
|
||||||
if (etsi_its_cfg->facilities.saem.activate) { // TODO handle various services
|
if (etsi_its_cfg->facilities.saem.activate) { // TODO handle various services
|
||||||
facilities.bulletin.to_provide_len = 1;
|
facilities.bulletin.to_provide_len = 1;
|
||||||
facilities.bulletin.to_provide[0] = calloc(1, sizeof(announcement_t));
|
facilities.bulletin.to_provide[0] = calloc(1, sizeof(announcement_t));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue