diff --git a/testing/SYS-DVT/data.json b/testing/SYS-DVT/data.json new file mode 100644 index 0000000000..f3bfe438b8 --- /dev/null +++ b/testing/SYS-DVT/data.json @@ -0,0 +1,55 @@ +{ + "modules": { + "bb_sensor": { + "sys_path": "/sys/bb_sensor", + "get_vars": { + "bb_shunt_voltage": { + "unit": "mV" + }, + + "bb_bus_voltage": { + "unit": "mV" + }, + "bb_current": { + "unit": "mA" + }, + "bb_power": { + "unit": "mW" + } + }, + "set_vars": "NULL" + + }, + "bb_temperature": { + "sys_path": "/sys/bb_temp", + "get_vars": { + "bb_input_temp": { + "unit": "Celcius" + }, + + "bb_max_temp": { + "unit": "Celcius" + }, + "bb_max_hyst": { + "unit": "Celcius" + } + + }, + "set_vars": { + "bb_max_temp": { + "max_val": "100", + "min_val": "-15", + "unit": "Celcius" + }, + "bb_max_hyst": { + "max_val": "100", + "min_val": "-15", + "unit": "Celcius" + } + } + }, + "Help": "./occmd.py ", + "version": "0.1" + } + +} diff --git a/testing/SYS-DVT/occmd.py b/testing/SYS-DVT/occmd.py new file mode 100644 index 0000000000..beff6275cf --- /dev/null +++ b/testing/SYS-DVT/occmd.py @@ -0,0 +1,25 @@ +import os +import sys +import json + +DB_FILE = "data.json" +db = ''; + +def parse_it(args): + for + return 0 + +def load_database(): + global db + with open(DB_FILE) as json_data: + db = json.load(json_data) + return 0 + +def main(): + load_database() + print db + parse_it(sys.argv) + sys.exit(0) + + +if __name__ == '__main__': main()