Init tolling OBU starting type
This commit is contained in:
parent
0e0117288f
commit
431d834e5c
|
|
@ -795,7 +795,7 @@ int main() {
|
|||
pthread_create(&facilities.sa_service, NULL, sa_service, (void*) &facilities);
|
||||
|
||||
// Tolling
|
||||
tolling_init(&facilities.tolling, facilities.zmq.ctx, facilities.zmq.security_address);
|
||||
tolling_init(&facilities.tolling, facilities.zmq.ctx, facilities.zmq.security_address, facilities.station_type);
|
||||
|
||||
// PC
|
||||
if (facilities.coordination.active)
|
||||
|
|
|
|||
|
|
@ -1093,7 +1093,14 @@ int tpm_recv(void* fc, TPM_t* tpm_rx, void* security_socket, uint8_t* neighbour,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int tolling_init(tolling_t* tolling, void* zmq_ctx, char* security_address) {
|
||||
int tolling_init(tolling_t* tolling, void* zmq_ctx, char* security_address, uint8_t station_type) {
|
||||
switch (station_type) {
|
||||
case 15:
|
||||
break;
|
||||
default:
|
||||
tolling->station.obu.toll_type = -1;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ typedef struct tolling {
|
|||
* @param security_address The security service ZMQ address
|
||||
* @return Always successful
|
||||
*/
|
||||
int tolling_init(tolling_t* tolling, void* zmq_ctx, char* security_address);
|
||||
int tolling_init(tolling_t* tolling, void* zmq_ctx, char* security_address, uint8_t station_type);
|
||||
|
||||
int tpm_pay(void* fc, tolling_info_t* info, void* security_socket, uint8_t* neighbour, uint8_t* dst_addr);
|
||||
int tpm_recv(void* fc, TPM_t* tpm_rx, void* security_socket, uint8_t* neighbour, uint8_t* src_addr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue