PCM efforts
This commit is contained in:
parent
5b066efcc5
commit
73a9e0a37a
12
src/pcm.c
12
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue