@@ -31,6 +31,9 @@ def sd_mount_status(interface):
3131def device_id (interface ):
3232 print (("Device ID is %s" % interface .device_id ()))
3333
34+ def get_vin (interface ):
35+ print (("Vehicle VIN is %s" % interface .get_vin ()))
36+
3437def passthrough (interface , bus , passthrough_enabled ):
3538 if interface .set_passthrough (bus , passthrough_enabled ):
3639 print (("Bus %u passthrough set to %s" % (bus , passthrough_enabled )))
@@ -93,7 +96,7 @@ def parse_options():
9396 parser = argparse .ArgumentParser (description = "Send control messages to an "
9497 "attached OpenXC vehicle interface" , parents = [device_options ()])
9598 parser .add_argument ("command" , type = str ,
96- choices = ['version' , 'platform' , 'write' , 'id' , 'set' , 'sd_mount_status' ])
99+ choices = ['version' , 'platform' , 'write' , 'id' , 'set' , 'sd_mount_status' , 'get_vin' ])
97100 write_group = parser .add_mutually_exclusive_group ()
98101 write_group .add_argument ("--name" , action = "store" , dest = "write_name" ,
99102 help = "name for message write request" )
@@ -184,6 +187,8 @@ def main():
184187 sd_mount_status (interface )
185188 elif arguments .command == "id" :
186189 device_id (interface )
190+ elif arguments .command == "get_vin" :
191+ get_vin (interface )
187192 elif arguments .command == "set" :
188193 handle_set_command (arguments , interface )
189194 elif arguments .command == "write" :
0 commit comments