VCM: [coordination]->[vc] logs
This commit is contained in:
parent
d70ccf0c71
commit
64453527da
|
|
@ -18,7 +18,6 @@ static int do_paths_intersect(
|
||||||
int* index
|
int* index
|
||||||
) {
|
) {
|
||||||
|
|
||||||
// TODO check first time intersection, then the spacial trajectory
|
|
||||||
double A1[2], A2[2], B1[2], B2[2];
|
double A1[2], A2[2], B1[2], B2[2];
|
||||||
uint64_t tsA, tsB;
|
uint64_t tsA, tsB;
|
||||||
for (int a = 0; a < tA_len-1; ++a) {
|
for (int a = 0; a < tA_len-1; ++a) {
|
||||||
|
|
@ -278,7 +277,7 @@ static int vcm_check_handle_reply(VCM_t* vcm, mc_neighbour_s* neighbour) {
|
||||||
coordination_t* coordination = &facilities.coordination;
|
coordination_t* coordination = &facilities.coordination;
|
||||||
|
|
||||||
if (!coordination->session.req) {
|
if (!coordination->session.req) {
|
||||||
log_debug("[coordination] unknown reply context - session expired or another ITS-S rejected");
|
log_debug("[vc] unknown reply context - session expired or another ITS-S rejected");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -291,7 +290,7 @@ static int vcm_check_handle_reply(VCM_t* vcm, mc_neighbour_s* neighbour) {
|
||||||
if (neighbour->intersecting) {
|
if (neighbour->intersecting) {
|
||||||
|
|
||||||
if (reply->acceptedTrajectoriesIds.list.count == 0) {
|
if (reply->acceptedTrajectoriesIds.list.count == 0) {
|
||||||
log_debug("[coordination] maneuver %lld rejected by %d", reply->requesterId, vcm->header.stationID);
|
log_debug("[vc] maneuver %lld rejected by %d", reply->requesterId, vcm->header.stationID);
|
||||||
ASN_STRUCT_FREE(asn_DEF_VCM, coordination->session.req);
|
ASN_STRUCT_FREE(asn_DEF_VCM, coordination->session.req);
|
||||||
coordination->session.req = NULL;
|
coordination->session.req = NULL;
|
||||||
coordination->session.ts = itss_time_get();
|
coordination->session.ts = itss_time_get();
|
||||||
|
|
@ -828,7 +827,7 @@ int vcm_check(VCM_t* vcm) {
|
||||||
switch (mvc->negotiation->present) {
|
switch (mvc->negotiation->present) {
|
||||||
case CoordinationNegotiation_PR_request:
|
case CoordinationNegotiation_PR_request:
|
||||||
if (coordination->session.req && now < coordination->session.ts + MC_RESOLUTION_TIMEOUT) { /* in maneuver */
|
if (coordination->session.req && now < coordination->session.ts + MC_RESOLUTION_TIMEOUT) { /* in maneuver */
|
||||||
log_debug("[coordination] rejecting VCM from %d - currently in maneuver", vcm->header.stationID);
|
log_debug("[vc] rejecting VCM from %d - currently in maneuver", vcm->header.stationID);
|
||||||
vcm_reject(vcm, neighbour);
|
vcm_reject(vcm, neighbour);
|
||||||
} else {
|
} else {
|
||||||
vcm_check_handle_request(vcm, neighbour);
|
vcm_check_handle_request(vcm, neighbour);
|
||||||
|
|
@ -847,7 +846,7 @@ int vcm_check(VCM_t* vcm) {
|
||||||
(coordination->session.req && now < coordination->session.ts + MC_RESOLUTION_TIMEOUT) || /* issued request */
|
(coordination->session.req && now < coordination->session.ts + MC_RESOLUTION_TIMEOUT) || /* issued request */
|
||||||
now < neighbour->t_proposal + MC_RESOLUTION_TIMEOUT /* issued reply */
|
now < neighbour->t_proposal + MC_RESOLUTION_TIMEOUT /* issued reply */
|
||||||
) { /* in maneuver */
|
) { /* in maneuver */
|
||||||
log_debug("[coordination] ignoring VCM from %d - currently in maneuver", vcm->header.stationID);
|
log_debug("[vc] ignoring VCM from %d - currently in maneuver", vcm->header.stationID);
|
||||||
} else { /* not in maneuver OR timeout reached */
|
} else { /* not in maneuver OR timeout reached */
|
||||||
if (coordination->session.req) { /* clear previous request if exists */
|
if (coordination->session.req) { /* clear previous request if exists */
|
||||||
ASN_STRUCT_FREE(asn_DEF_VCM, coordination->session.req);
|
ASN_STRUCT_FREE(asn_DEF_VCM, coordination->session.req);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue