sys dvt sw initial commit

This commit is contained in:
swateeshrivastava
2019-01-11 16:27:45 +05:30
parent f971f516a4
commit 517b2fc602
2 changed files with 80 additions and 0 deletions

55
testing/SYS-DVT/data.json Normal file
View File

@@ -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 <module_name> <get/set> <param> <value>",
"version": "0.1"
}
}

25
testing/SYS-DVT/occmd.py Normal file
View File

@@ -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()