From 73a9e0a37a8f68c043c36ce963be599d4e65b687 Mon Sep 17 00:00:00 2001 From: emanuel Date: Tue, 22 Feb 2022 11:39:11 +0000 Subject: [PATCH] PCM efforts --- src/pcm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pcm.c b/src/pcm.c index 3510310..c68f916 100644 --- a/src/pcm.c +++ b/src/pcm.c @@ -120,7 +120,7 @@ static int pcm_check_handle_request(facilities_t* facilities, PCM_t* pcm) { asn_enc_rval_t enc = asn_encode_to_buffer(NULL, ATS_UNALIGNED_CANONICAL_PER, &asn_DEF_PCM, pcm_rep, buf, buf_len); if (enc.encoded == -1) { - syslog_err("[facilities] [pc] PCM request encode failure"); + syslog_err("[facilities] [pc] PCM.reply encode failure (%s)", enc.failed_type->name); rv = 1; goto cleanup; } @@ -151,7 +151,7 @@ static int pcm_check_handle_request(facilities_t* facilities, PCM_t* pcm) { buf[0] = 4; enc = asn_encode_to_buffer(NULL, ATS_CANONICAL_OER, &asn_DEF_TransportRequest, tr, buf+1, buf_len-1); if (enc.encoded == -1) { - syslog_err("[facilities] [pc] TR PCM request encode failure"); + syslog_err("[facilities] [pc] TR PCM.reply encode failure (%s)", enc.failed_type->name); rv = 1; goto cleanup; } @@ -169,7 +169,7 @@ static int pcm_check_handle_reply(facilities_t* facilities, PCM_t* pcm) { CoordinationReply_t* reply = &pcm->pcm.maneuverContainer.choice.vehicle.negotiation->choice.reply; - syslog_info("[facilities] [pc] received coordination reply with %d accepted trajectories", reply->acceptedTrajectoriesIds.list.count); + syslog_info("[facilities] [pc] received TPM.reply with %d accepted trajectories", reply->acceptedTrajectoriesIds.list.count); return rv; } @@ -295,7 +295,7 @@ static int pcm_check_intersection_detected(facilities_t* facilities, PCM_t* pcm) buf[0] = 4; enc = asn_encode_to_buffer(NULL, ATS_CANONICAL_OER, &asn_DEF_TransportRequest, tr, buf+1, buf_len-1); if (enc.encoded == -1) { - syslog_err("[facilities] [pc] TR PCM request encode failure"); + syslog_err("[facilities] [pc] TR PCM.request encode failure (%s)", enc.failed_type->name); rv = 1; goto cleanup; } @@ -395,8 +395,8 @@ int pcm_check(void* fc, PCM_t* pcm) { } if (intersecting) { - syslog_info("[facilities] [pc] intersection danger with %ld @ (%d, %d) in %ld ms", - pcm->header.stationID, trajectoryA[index].latitude, trajectoryA[index].longitude, trajectoryA[index].timestamp - now); + syslog_info("[facilities] [pc] intersection danger with %ld @ (%f, %f) in %ld ms", + pcm->header.stationID, trajectoryA[index].latitude/1.0e7, trajectoryA[index].longitude/1.0e7, trajectoryA[index].timestamp - now); coordination->neighbours[ni].intersecting = true; coordination->neighbours[ni].t_iid = now; pcm_check_intersection_detected(facilities, pcm);