7 parser = argparse.ArgumentParser()
8 parser.add_argument("property", help="{propertyToSet}")
9 parser.add_argument("value", help="{value}")
10 parser.add_argument("zone", help="{zone}")
12 args = parser.parse_args()
14 # "{'type' : 'method', 'name' : 'set', 'transactionid' : 'meh',
15 # 'data' : [{'interface' : 'vcan0', 'property' : 'VehicleSpeed', 'value' : '33', 'zone' : '0' }]}"
17 realValue = "{'type' : 'method', 'name' : 'set', 'transactionid' : 'meh', 'data' : [{'interface' : 'vcan0', 'property' : '" + args.property + "', 'value' : '" + args.value + "', 'zone' : " + args.zone + " }]}"
19 bus = dbus.SystemBus()
20 managerObject = bus.get_object("org.automotive.message.broker", "/");
21 managerInterface = dbus.Interface(managerObject, "org.automotive.Manager")
23 object = managerInterface.FindObjectForZone("SimCommand", 0)
25 propertiesInterface = dbus.Interface(bus.get_object("org.automotive.message.broker", object),"org.freedesktop.DBus.Properties")
26 propertiesInterface.Set("org.automotive.SimCommand", "SimCommand", realValue)