mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-26 01:37:24 +00:00
sys dvt sw initial commit
This commit is contained in:
55
testing/SYS-DVT/data.json
Normal file
55
testing/SYS-DVT/data.json
Normal 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
25
testing/SYS-DVT/occmd.py
Normal 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()
|
||||
Reference in New Issue
Block a user