VCM: nonce 32bit & trj_id rand()
This commit is contained in:
parent
f7b8c48882
commit
fbe9c35b65
|
|
@ -396,7 +396,7 @@ static int intersection_detected(VCM_t* vcm, mc_neighbour_s* neighbour) {
|
||||||
mvc->negotiation->choice.request.desiredTrajectories.list.array[0] = calloc(1,sizeof(ProposedTrajectory_t));
|
mvc->negotiation->choice.request.desiredTrajectories.list.array[0] = calloc(1,sizeof(ProposedTrajectory_t));
|
||||||
ProposedTrajectory_t* pt = mvc->negotiation->choice.request.desiredTrajectories.list.array[0];
|
ProposedTrajectory_t* pt = mvc->negotiation->choice.request.desiredTrajectories.list.array[0];
|
||||||
mvc->negotiation->choice.request.requesterId = vcm->header.stationID;
|
mvc->negotiation->choice.request.requesterId = vcm->header.stationID;
|
||||||
mvc->negotiation->choice.request.nonce = rand() + 1;
|
mvc->negotiation->choice.request.nonce = rand();
|
||||||
neighbour->nonce = mvc->negotiation->choice.request.nonce;
|
neighbour->nonce = mvc->negotiation->choice.request.nonce;
|
||||||
|
|
||||||
pt->trajectory.list.count = trajectoryA_len - 1;
|
pt->trajectory.list.count = trajectoryA_len - 1;
|
||||||
|
|
@ -411,7 +411,7 @@ static int intersection_detected(VCM_t* vcm, mc_neighbour_s* neighbour) {
|
||||||
|
|
||||||
pt->offer = 5;
|
pt->offer = 5;
|
||||||
pt->priority = 1;
|
pt->priority = 1;
|
||||||
pt->id = 0;
|
pt->id = rand();
|
||||||
|
|
||||||
uint32_t intneigh[MC_MAX_NEIGHBOURS];
|
uint32_t intneigh[MC_MAX_NEIGHBOURS];
|
||||||
intneigh[0] = neighbour->station_id;
|
intneigh[0] = neighbour->station_id;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ typedef struct {
|
||||||
uint64_t t_iid; /* initial intersection detection */
|
uint64_t t_iid; /* initial intersection detection */
|
||||||
|
|
||||||
bool proposed;
|
bool proposed;
|
||||||
uint64_t nonce;
|
uint32_t nonce;
|
||||||
uint64_t t_proposal;
|
uint64_t t_proposal;
|
||||||
} mc_neighbour_s;
|
} mc_neighbour_s;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue