This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added SimCommand backdoor to the gen plugin
- Loading branch information
Showing
12 changed files
with
825 additions
and
8 deletions.
There are no files selected for viewing
756 changes: 756 additions & 0 deletions
756
build/plugins/cansimplugin/CMakeFiles/cansimplugin.dir/CXX.includecache
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+15.7 KB
(100%)
build/plugins/cansimplugin/CMakeFiles/cansimplugin.dir/cansimplugin.cpp.o
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
set(amb_tests amb-get amb-set amb-get-history amb-listen) | ||
set(amb_tests amb-get amb-set amb-get-history amb-listen gen-set) | ||
install (PROGRAMS ${amb_tests} DESTINATION bin) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/python | ||
|
||
import dbus | ||
import sys | ||
import argparse | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("property", help="{propertyToSet}") | ||
parser.add_argument("value", help="{value}") | ||
parser.add_argument("zone", help="{zone}") | ||
|
||
args = parser.parse_args() | ||
|
||
# "{'type' : 'method', 'name' : 'set', 'transactionid' : 'meh', | ||
# 'data' : [{'interface' : 'vcan0', 'property' : 'VehicleSpeed', 'value' : '33', 'zone' : '0' }]}" | ||
|
||
realValue = "{'type' : 'method', 'name' : 'set', 'transactionid' : 'meh', 'data' : [{'interface' : 'vcan0', 'property' : '" + args.property + "', 'value' : '" + args.value + "', 'zone' : " + args.zone + " }]}" | ||
|
||
bus = dbus.SystemBus() | ||
managerObject = bus.get_object("org.automotive.message.broker", "/"); | ||
managerInterface = dbus.Interface(managerObject, "org.automotive.Manager") | ||
|
||
object = managerInterface.FindObjectForZone("SimCommand", 0) | ||
|
||
propertiesInterface = dbus.Interface(bus.get_object("org.automotive.message.broker", object),"org.freedesktop.DBus.Properties") | ||
propertiesInterface.Set("org.automotive.SimCommand", "SimCommand", realValue) | ||
print "Success!" |