utils
utils for converting str to internal data structure in data_io/config/vehicle, driver, truck, db_config
str_to_truck
str_to_truck (truck_str:str)
*convert string to TruckInCloud or TruckInField object
Parameter:
truck_str: string of truch such as 'HMZABAAH7MF011058' or "VB7",
Return:
truck: TruckInCloud or TruckInField*
Type | Details | |
---|---|---|
truck_str | str | string of truch such as ‘HMZABAAH7MF011058’ or “VB7”, |
Returns | Union | TruckInCloud or TruckInField object |
str_to_driver
str_to_driver (driver_str:str)
*convert string to Driver object
Parameter:
driver_str: string of driver such as 'zheng-longfei'
Return:
driver: Driver object*
Type | Details | |
---|---|---|
driver_str | str | string of driver such as ‘zheng-longfei’ |
Returns | Driver | Driver object |
str_to_can_server
str_to_can_server (can_server_str:str)
*convert string to CANMessenger object
Parameter:
can_server_str: string of can_server such as 'can_intra'
Return:
can_server: CANMessenger object*
Type | Details | |
---|---|---|
can_server_str | str | string of can_server such as ‘can_intra’ |
Returns | CANMessenger | CANMessenger object |
str_to_trip_server
str_to_trip_server (trip_server_str:str)
*convert string to TripMessenger object
Parameter:
trip_server_str: string of trip_server such as 'rocket_intra'
Return:
trip_server: TripMessenger object*
Type | Details | |
---|---|---|
trip_server_str | str | string of trip_server such as ‘rocket_intra’ |
Returns | TripMessenger | TripMessenger object |