From fa7642d9cd05ccaf3f62e945776c9a16c6191a5f Mon Sep 17 00:00:00 2001 From: Amin Ben Ramdhane Date: Thu, 27 Feb 2020 17:13:39 +0100 Subject: [PATCH] Ticket refs #1845: bbf-tools: generate supported USP operate commands --- json/generate_excel.py | 16 +- json/tr181.json | 3690 ++++++++++++++++++++++++++++++++++++++++ tools/generate_json.py | 59 +- 3 files changed, 3754 insertions(+), 11 deletions(-) diff --git a/json/generate_excel.py b/json/generate_excel.py index 884c7a9f..9ff7e494 100755 --- a/json/generate_excel.py +++ b/json/generate_excel.py @@ -75,6 +75,17 @@ def check_param(param, res): else: return "false" +def check_commands(param): + cmd = 'awk \'/static struct op_cmd operate_helper/,/^};$/\' ../dmoperate.c' + res = os.popen(cmd).read() + param = param.replace(".{i}.", ".*.") + param = param.replace("()", "") + string = "\n\t{\"%s\"," % param + if string in res: + return "true" + else: + return "false" + def load_param(dmobject): if dmobject.count('.') == 1: cmd = 'awk \'/DMLEAF tRoot_181_Params/,/^{0}$/\' ../dmtree/tr181/device.c' @@ -141,7 +152,10 @@ def object_parse_childs( dmobject , value ): if isinstance(v,dict): for k1,v1 in v.items(): if k1 == "type" and v1 != "object": - if load == "0": + if "()" in k: + supported = check_commands(dmobject + k) + printOBJPARAM(dmobject + k, supported) + elif load == "0": printOBJPARAM(dmobject + k, "false") else: supported = check_param(k, res) diff --git a/json/tr181.json b/json/tr181.json index 79c9e61b..5c40bee4 100644 --- a/json/tr181.json +++ b/json/tr181.json @@ -42,6 +42,182 @@ ], "datatype": "unsignedInt" }, + "Reboot()": { + "type": "command", + "protocols": [ + "usp" + ] + }, + "FactoryReset()": { + "type": "command", + "protocols": [ + "usp" + ] + }, + "SelfTestDiagnostics()": { + "type": "command", + "protocols": [ + "usp" + ], + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Complete", + "Error_Internal", + "Error_Other" + ] + }, + "Results": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 1024 + } + } + } + }, + "PacketCaptureDiagnostics()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Format": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "libpcap", + "pcapng" + ] + }, + "Duration": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + }, + "unit": "seconds" + }, + "PacketCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "ByteCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "FileTarget": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 2048 + } + }, + "FilterExpression": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Username": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Password": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error", + "Error_Internal", + "Error_Other" + ] + } + } + }, "IoTCapabilityNumberOfEntries": { "type": "unsignedInt", "read": true, @@ -538,6 +714,140 @@ "usp" ], "datatype": "boolean" + }, + "Backup()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "URL": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Username": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Password": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + } + } + }, + "Restore()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "URL": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Username": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Password": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "FileSize": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "TargetFileName": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "CheckSumAlgorithm": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "SHA-1", + "SHA-224", + "SHA-256", + "SHA-384", + "SHA-512" + ] + }, + "CheckSum": { + "type": "hexBinary", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "hexBinary" + } + } } }, "Device.DeviceInfo.MemoryStatus.": { @@ -948,6 +1258,12 @@ "usp" ], "datatype": "dateTime" + }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] } } }, @@ -1087,6 +1403,50 @@ "usp" ], "datatype": "boolean" + }, + "Upload()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "URL": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Username": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Password": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + } + } } }, "Device.DeviceInfo.Location.{i}.": { @@ -1307,6 +1667,100 @@ "usp" ], "datatype": "string" + }, + "Download()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "URL": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "AutoActivate": { + "type": "boolean", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "boolean" + }, + "Username": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Password": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "FileSize": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "CheckSumAlgorithm": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "SHA-1", + "SHA-224", + "SHA-256", + "SHA-384", + "SHA-512" + ] + }, + "CheckSum": { + "type": "hexBinary", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "hexBinary" + } + } + }, + "Activate()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": {} } }, "Device.DeviceInfo.SupportedDataModel.{i}.": { @@ -3258,6 +3712,78 @@ ], "datatype": "unsignedInt" }, + "InstallDU()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "URL": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "UUID": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "UUID", + "range": { + "min": 36, + "max": 36 + }, + "pattern": [ + "[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}" + ] + }, + "Username": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Password": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "ExecutionEnvRef": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + } + } + }, "Device.SoftwareModules.ExecEnv.{i}.": { "type": "object", "protocols": [ @@ -3618,6 +4144,33 @@ "list": { "datatype": "string" } + }, + "SetRunLevel()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "RequestedRunLevel": { + "type": "int", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "int", + "range": { + "min": -1, + "max": 65535 + } + } + } + }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] } }, "Device.SoftwareModules.DeploymentUnit.{i}.": { @@ -3903,6 +4456,67 @@ } } ] + }, + "Update()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "URL": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + }, + "mapping": [ + { + "type": "ubus", + "ubus": { + "object": "softwaremanagement", + "method": "du_list", + "args": {}, + "key": "deployment_unit[i-1].url" + } + } + ] + }, + "Username": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Password": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + } + } + }, + "Uninstall()": { + "type": "command", + "protocols": [ + "usp" + ] } }, "Device.SoftwareModules.ExecutionUnit.{i}.": { @@ -4295,6 +4909,27 @@ } ] }, + "SetRequestedState()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "RequestedState": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Idle", + "Active" + ] + } + } + }, "Device.SoftwareModules.ExecutionUnit.{i}.Extensions.": { "type": "object", "protocols": [ @@ -5565,6 +6200,12 @@ "max": 16 } }, + "PasswordReset()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.UserInterface.RemoteAccess.": { "type": "object", "protocols": [ @@ -10617,6 +11258,747 @@ ], "access": false, "array": false, + "ADSLLineTest()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error", + "Error_Internal", + "Error_Other" + ] + }, + "ACTPSDds": { + "type": "int", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "int" + }, + "ACTPSDus": { + "type": "int", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "int" + }, + "ACTATPds": { + "type": "int", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "int" + }, + "ACTATPus": { + "type": "int", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "int" + }, + "HLINSCds": { + "type": "int", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "int" + }, + "HLINSCus": { + "type": "int", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "int" + }, + "HLINGds": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "HLINGus": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "HLOGGds": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "HLOGGus": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "HLOGpsds": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 2559 + } + }, + "HLOGpsus": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 2559 + } + }, + "HLOGMTds": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "HLOGMTus": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "LATNpbds": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 24 + } + }, + "LATNpbus": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 24 + } + }, + "SATNds": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 24 + } + }, + "SATNus": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 24 + } + }, + "HLINpsds": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "int", + "maxsize": 61430 + } + }, + "HLINpsus": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 61430 + } + }, + "QLNGds": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "QLNGus": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "QLNpsds": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "int", + "maxsize": 61430 + } + }, + "QLNpsus": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 61430 + } + }, + "QLNMTds": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "QLNMTus": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "SNRGds": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "SNRGus": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "SNRpsds": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "int", + "maxsize": 61430 + } + }, + "SNRpsus": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 61430 + } + }, + "SNRMTds": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "SNRMTus": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "BITSpsds": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "int", + "maxsize": 61430 + } + }, + "BITSpsus": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 61430 + } + } + } + }, + "SELTUER()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "UERMaxMeasurementDuration": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 5, + "max": 240 + }, + "unit": "seconds" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error" + ] + }, + "ExtendedBandwidthOperation": { + "type": "boolean", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "boolean" + }, + "UER": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "UERComplex", + "item": { + "min": 1, + "max": 4096 + } + } + }, + "UERScaleFactor": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "UERGroupSize": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 12, + "max": 12 + }, + "unit": "subcarriers" + }, + "UERVar": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "int", + "item": { + "min": 0, + "max": 4096 + } + } + } + } + }, + "SELTQLN()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "QLNMaxMeasurementDuration": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1, + "max": 240 + }, + "unit": "seconds" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error" + ] + }, + "ExtendedBandwidthOperation": { + "type": "boolean", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "boolean" + }, + "QLN": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "int", + "maxsize": 61430 + } + }, + "QLNGroupSize": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 12, + "max": 12 + }, + "unit": "subcarriers" + } + } + }, + "SELTP()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "CapacityEstimateEnabling": { + "type": "boolean", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "boolean" + }, + "CapacitySignalPSD": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "PSDBreakPointIndexAndLevel", + "item": { + "min": 1, + "max": 48 + } + } + }, + "CapacityNoisePSD": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "PSDBreakPointIndexAndLevel", + "item": { + "min": 1, + "max": 48 + } + } + }, + "CapacityTargetMargin": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 310 + }, + "unit": "0.1 dB" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error" + ] + }, + "LoopTermination": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 21 + } + }, + "LoopLength": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 16383 + }, + "unit": "meters" + }, + "LoopTopology": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 256 + } + }, + "AttenuationCharacteristics": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "maxsize": 61430 + } + }, + "MissingFilter": { + "type": "boolean", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "boolean" + }, + "CapacityEstimate": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "kbit/s" + } + } + }, "Device.DSL.Diagnostics.ADSLLineTest.": { "type": "object", "protocols": [ @@ -14471,6 +15853,117 @@ ], "access": false, "array": false, + "F5Loopback()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "NumberOfRepetitions": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + } + }, + "Timeout": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + }, + "unit": "milliseconds" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error", + "Error_Internal", + "Error_Other" + ] + }, + "SuccessCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "FailureCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "AverageResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "milliseconds" + }, + "MinimumResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "milliseconds" + }, + "MaximumResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "milliseconds" + } + } + }, "Device.ATM.Diagnostics.F5Loopback.": { "type": "object", "protocols": [ @@ -16568,6 +18061,38 @@ "cwmp" ], "datatype": "string" + }, + "SendMagicPacket()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "MACAddress": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "MACAddress", + "range": { + "max": 17 + }, + "pattern": [ + "([0-9A-Fa-f][0-9A-Fa-f]:){5}([0-9A-Fa-f][0-9A-Fa-f])" + ] + }, + "Password": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string" + } + } } }, "Device.Ethernet.LAG.{i}.": { @@ -17390,6 +18915,12 @@ ], "datatype": "unsignedInt" }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.USB.USBHosts.Host.{i}.Device.{i}.": { "type": "object", "protocols": [ @@ -18546,6 +20077,175 @@ ], "access": false, "array": false, + "PHYThroughput()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "NumPacketsInBurst": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "BurstInterval": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "milliseconds" + }, + "TestPacketPayloadLength": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 1480 + } + }, + "PayloadEncoding": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "PayloadDataGen": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "PayloadType": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Pattern", + "IncrementByte" + ] + }, + "PriorityLevel": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 7 + } + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error", + "Error_FailToEnableCert", + "Error_CertCmdTimeout", + "Error_UnknownErr", + "Error_UnsupportedOpcode", + "Error_InvalidParam", + "Error_UnsupportedCmdSegment", + "Error_UnsupportedDataGen", + "Error_InvalidSequence", + "Error_InvalidFrame", + "Eror_InvalidOpcode" + ] + } + } + }, + "PerformanceMonitoring()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "SampleInterval": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "seconds" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error", + "Error_SampleIntervalTooSmall" + ] + } + } + }, "Device.HPNA.Diagnostics.PHYThroughput.": { "type": "object", "protocols": [ @@ -21236,6 +22936,125 @@ ], "access": false, "array": false, + "PHYThroughput()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string" + }, + "DiagnoseMACAddress": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "MACAddress", + "range": { + "max": 17 + }, + "pattern": [ + "([0-9A-Fa-f][0-9A-Fa-f]:){5}([0-9A-Fa-f][0-9A-Fa-f])" + ] + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error" + ] + } + } + }, + "PerformanceMonitoring()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string" + }, + "DiagnoseMACAddress": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "MACAddress", + "range": { + "max": 17 + }, + "pattern": [ + "([0-9A-Fa-f][0-9A-Fa-f]:){5}([0-9A-Fa-f][0-9A-Fa-f])" + ] + }, + "SampleInterval": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "seconds" + }, + "SNRGroupLength": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 256, + "max": 256 + } + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error" + ] + } + } + }, "Device.Ghn.Diagnostics.PHYThroughput.": { "type": "object", "protocols": [ @@ -22920,6 +24739,94 @@ ], "access": false, "array": false, + "InterfaceMeasurement()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Type": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "SNR", + "CFR" + ] + }, + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Port": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 65535 + } + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error", + "Error_InvalidPort" + ] + }, + "Measurements": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "unsignedInt", + "item": { + "max": 1536 + }, + "unit": "0.1dB" + } + }, + "RxGain": { + "type": "int", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "int", + "unit": "dB" + } + } + }, "Device.UPA.Diagnostics.InterfaceMeasurement.": { "type": "object", "protocols": [ @@ -23120,6 +25027,34 @@ ], "datatype": "boolean" }, + "NeighboringWiFiDiagnostic()": { + "type": "command", + "protocols": [ + "usp" + ], + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error" + ] + } + } + }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.WiFi.MultiAP.": { "type": "object", "protocols": [ @@ -28328,6 +30263,12 @@ "cwmp" ], "datatype": "boolean" + }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] } }, "Device.WiFi.AccessPoint.{i}.WPS.": { @@ -33579,6 +35520,12 @@ ], "datatype": "boolean" }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.PPP.Interface.{i}.PPPoE.": { "type": "object", "protocols": [ @@ -34459,6 +36406,12 @@ ], "datatype": "unsignedInt" }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.IP.Interface.{i}.IPv4Address.{i}.": { "type": "object", "protocols": [ @@ -35439,6 +37392,367 @@ ], "datatype": "boolean" }, + "IPPing()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "ProtocolVersion": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Any", + "IPv4", + "IPv6" + ] + }, + "Host": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "NumberOfRepetitions": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + } + }, + "Timeout": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + }, + "unit": "milliseconds" + }, + "DataBlockSize": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1, + "max": 65535 + } + }, + "DSCP": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 63 + } + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error", + "Error_CannotResolveHostName", + "Error_NoRouteToHost", + "Error_Internal", + "Error_Other" + ] + }, + "IPAddressUsed": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "IPAddress", + "range": { + "max": 45 + } + }, + "SuccessCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "FailureCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "AverageResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "milliseconds" + }, + "MinimumResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "milliseconds" + }, + "MaximumResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "milliseconds" + }, + "AverageResponseTimeDetailed": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + }, + "MinimumResponseTimeDetailed": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + }, + "MaximumResponseTimeDetailed": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + } + } + }, + "TraceRoute()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "ProtocolVersion": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Any", + "IPv4", + "IPv6" + ] + }, + "Host": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "NumberOfTries": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1, + "max": 3 + } + }, + "Timeout": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + }, + "unit": "milliseconds" + }, + "DataBlockSize": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1, + "max": 65535 + } + }, + "DSCP": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 63 + } + }, + "MaxHopCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1, + "max": 64 + } + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Canceled", + "Complete", + "Error", + "Error_CannotResolveHostName", + "Error_NoRouteToHost", + "Error_MaxHopCountExceeded", + "Error_Internal", + "Error_Other" + ] + }, + "IPAddressUsed": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "IPAddress", + "range": { + "max": 45 + } + }, + "ResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "milliseconds" + } + } + }, "DownloadTransports": { "type": "string", "read": true, @@ -35478,6 +37792,295 @@ "min": 1 } }, + "DownloadDiagnostics()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "DownloadURL": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "DSCP": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 63 + } + }, + "EthernetPriority": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 7 + } + }, + "TimeBasedTestDuration": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 999 + }, + "unit": "seconds" + }, + "TimeBasedTestMeasurementInterval": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 999 + }, + "unit": "seconds" + }, + "TimeBasedTestMeasurementOffset": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 255 + }, + "unit": "seconds" + }, + "ProtocolVersion": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Any", + "IPv4", + "IPv6" + ] + }, + "NumberOfConnections": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + } + }, + "EnablePerConnectionResults": { + "type": "boolean", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "boolean" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Complete", + "Error_CannotResolveHostName", + "Error_NoRouteToHost", + "Error_InitConnectionFailed", + "Error_NoResponse", + "Error_TransferFailed", + "Error_PasswordRequestFailed", + "Error_LoginFailed", + "Error_NoTransferMode", + "Error_NoPASV", + "Error_IncorrectSize", + "Error_Timeout", + "Error_Internal", + "Error_Other" + ] + }, + "IPAddressUsed": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "IPAddress", + "range": { + "max": 45 + } + }, + "ROMTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + }, + "BOMTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + }, + "EOMTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + }, + "TestBytesReceived": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TotalBytesReceived": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TotalBytesSent": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TestBytesReceivedUnderFullLoading": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TotalBytesReceivedUnderFullLoading": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TotalBytesSentUnderFullLoading": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "PeriodOfFullLoading": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + }, + "TCPOpenRequestTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + }, + "TCPOpenResponseTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + } + } + }, "UploadTransports": { "type": "string", "read": true, @@ -35517,6 +38120,305 @@ "min": 1 } }, + "UploadDiagnostics()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "UploadURL": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "DSCP": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 63 + } + }, + "EthernetPriority": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 7 + } + }, + "TestFileLength": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "TimeBasedTestDuration": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 999 + }, + "unit": "seconds" + }, + "TimeBasedTestMeasurementInterval": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 999 + }, + "unit": "seconds" + }, + "TimeBasedTestMeasurementOffset": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 255 + }, + "unit": "seconds" + }, + "ProtocolVersion": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Any", + "IPv4", + "IPv6" + ] + }, + "NumberOfConnections": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + } + }, + "EnablePerConnectionResults": { + "type": "boolean", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "boolean" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Complete", + "Error_CannotResolveHostName", + "Error_NoRouteToHost", + "Error_InitConnectionFailed", + "Error_NoResponse", + "Error_PasswordRequestFailed", + "Error_LoginFailed", + "Error_NoTransferMode", + "Error_NoPASV", + "Error_NoCWD", + "Error_NoSTOR", + "Error_NoTransferComplete", + "Error_Timeout", + "Error_Internal", + "Error_Other" + ] + }, + "IPAddressUsed": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "IPAddress", + "range": { + "max": 45 + } + }, + "ROMTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + }, + "BOMTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + }, + "EOMTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + }, + "TestBytesSent": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TotalBytesReceived": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TotalBytesSent": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TestBytesSentUnderFullLoading": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TotalBytesReceivedUnderFullLoading": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "TotalBytesSentUnderFullLoading": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "bytes" + }, + "PeriodOfFullLoading": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + }, + "TCPOpenRequestTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + }, + "TCPOpenResponseTime": { + "type": "dateTime", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "dateTime" + } + } + }, "UDPEchoDiagnosticsMaxResults": { "type": "unsignedInt", "read": true, @@ -35529,6 +38431,374 @@ "min": 1 } }, + "UDPEchoDiagnostics()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Host": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Port": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1, + "max": 65535 + } + }, + "NumberOfRepetitions": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + } + }, + "Timeout": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + }, + "unit": "milliseconds" + }, + "DataBlockSize": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1, + "max": 65535 + }, + "unit": "bytes" + }, + "DSCP": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 0, + "max": 63 + } + }, + "InterTransmissionTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1, + "max": 65535 + }, + "unit": "milliseconds" + }, + "ProtocolVersion": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Any", + "IPv4", + "IPv6" + ] + }, + "EnableIndividualPacketResults": { + "type": "boolean", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "boolean" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Complete", + "Error_CannotResolveHostName", + "Error_Internal", + "Error_Other" + ] + }, + "IPAddressUsed": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "IPAddress", + "range": { + "max": 45 + } + }, + "SuccessCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "FailureCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + }, + "AverageResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + }, + "MinimumResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + }, + "MaximumResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + } + } + }, + "ServerSelectionDiagnostics()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "ProtocolVersion": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Any", + "IPv4", + "IPv6" + ] + }, + "Protocol": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "ICMP", + "UDP Echo" + ] + }, + "HostList": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "list": { + "datatype": "string", + "item": { + "max": 10 + }, + "range": { + "max": 256 + } + } + }, + "NumberOfRepetitions": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + } + }, + "Timeout": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + }, + "unit": "milliseconds" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Complete", + "Error_CannotResolveHostName", + "Error_Internal", + "Error_Other" + ] + }, + "FastestHost": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string" + }, + "MinimumResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + }, + "AverageResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + }, + "MaximumResponseTime": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "microseconds" + }, + "IPAddressUsed": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "IPAddress", + "range": { + "max": 45 + } + } + } + }, "Device.IP.Diagnostics.IPPing.": { "type": "object", "protocols": [ @@ -46834,6 +50104,95 @@ ], "access": false, "array": false, + "NSLookupDiagnostics()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Interface": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "HostName": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "DNSServer": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 256 + } + }, + "Timeout": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "unit": "milliseconds" + }, + "NumberOfRepetitions": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + } + }, + "output": { + "Status": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Complete", + "Error_DNSServerNotResolved", + "Error_Internal", + "Error_Other" + ] + }, + "SuccessCount": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt" + } + } + }, "Device.DNS.Diagnostics.NSLookupDiagnostics.": { "type": "object", "protocols": [ @@ -49177,6 +52536,12 @@ } ] }, + "Renew()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.DHCPv4.Client.{i}.SentOption.{i}.": { "type": "object", "protocols": [ @@ -50834,6 +54199,12 @@ ], "datatype": "unsignedInt" }, + "Renew()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.DHCPv6.Client.{i}.Server.{i}.": { "type": "object", "protocols": [ @@ -51875,6 +55246,18 @@ ], "datatype": "boolean" }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] + }, + "Disconnect()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.IEEE8021x.Supplicant.{i}.Stats.": { "type": "object", "protocols": [ @@ -52370,6 +55753,12 @@ ], "datatype": "unsignedInt" }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.SmartCardReaders.SmartCardReader.{i}.SmartCard.": { "type": "object", "protocols": [ @@ -55023,6 +58412,12 @@ ], "datatype": "unsignedInt" }, + "ForceSample()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.PeriodicStatistics.SampleSet.{i}.Parameter.{i}.": { "type": "object", "protocols": [ @@ -56197,6 +59592,12 @@ ], "datatype": "boolean" }, + "GPSReset()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.FAP.GPS.ContinuousGPSStatus.": { "type": "object", "protocols": [ @@ -62045,6 +65446,12 @@ ], "datatype": "unsignedInt" }, + "ForceReconnect()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.MQTT.Client.{i}.Subscription.{i}.": { "type": "object", "protocols": [ @@ -62686,6 +66093,12 @@ ], "datatype": "unsignedInt" }, + "ForceReconnect()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "Device.MQTT.Broker.{i}.Bridge.{i}.Server.{i}.": { "type": "object", "protocols": [ @@ -66188,6 +69601,38 @@ "datatype": "unsignedInt", "unit": "seconds" }, + "AddCertificate()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Alias": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "Alias", + "range": { + "max": 64 + } + }, + "Certificate": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 65535 + } + } + } + }, "SupportedProtocols": { "type": "string", "read": true, @@ -66791,6 +70236,65 @@ "max": 65535 } }, + "ScheduleTimer()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "DelaySeconds": { + "type": "unsignedInt", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": { + "min": 1 + }, + "unit": "seconds" + } + } + }, + "AddMyCertificate()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "Alias": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "Alias", + "range": { + "max": 64 + } + }, + "Certificate": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": { + "max": 65535 + } + } + } + }, + "SendOnBoardRequest()": { + "type": "command", + "protocols": [ + "usp" + ] + }, "BootParameterNumberOfEntries": { "type": "unsignedInt", "read": true, @@ -67021,6 +70525,12 @@ "min": 1000, "max": 65535 } + }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] } }, "Device.LocalAgent.Controller.{i}.MTP.{i}.MQTT.": { @@ -67233,6 +70743,12 @@ "Plaintext", "TLS" ] + }, + "Reset()": { + "type": "command", + "protocols": [ + "usp" + ] } } }, @@ -67425,6 +70941,12 @@ "Success", "Error" ] + }, + "Cancel()": { + "type": "command", + "protocols": [ + "usp" + ] } }, "Device.LocalAgent.Certificate.{i}.": { @@ -67478,6 +71000,50 @@ "range": { "max": 256 } + }, + "Delete()": { + "type": "command", + "protocols": [ + "usp" + ] + }, + "GetFingerprint()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "FingerprintAlgorithm": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "SHA-1", + "SHA-224", + "SHA-256", + "SHA-384", + "SHA-512" + ] + } + }, + "output": { + "Fingerprint": { + "type": "hexBinary", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "hexBinary", + "range": { + "max": 128 + } + } + } } }, "Device.LocalAgent.ControllerTrust.": { @@ -67529,6 +71095,100 @@ "datatype": "unsignedInt", "unit": "seconds" }, + "RequestChallenge()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "ChallengeRef": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string" + }, + "RequestExpiration": { + "type": "int", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "int", + "range": { + "min": 0 + }, + "unit": "seconds" + } + }, + "output": { + "Instruction": { + "type": "base64", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "base64" + }, + "InstructionType": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string" + }, + "ValueType": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string" + }, + "ChallengeID": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string" + } + } + }, + "ChallengeResponse()": { + "type": "command", + "protocols": [ + "usp" + ], + "input": { + "ChallengeID": { + "type": "string", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "string" + }, + "Value": { + "type": "base64", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "base64" + } + } + }, "RoleNumberOfEntries": { "type": "unsignedInt", "read": true, @@ -68369,6 +72029,12 @@ "usp" ], "datatype": "boolean" + }, + "Toggle()": { + "type": "command", + "protocols": [ + "usp" + ] } }, "Device.IoTCapability.{i}.LevelControl.": { @@ -68443,6 +72109,18 @@ "usp" ], "datatype": "decimal" + }, + "StepUp()": { + "type": "command", + "protocols": [ + "usp" + ] + }, + "StepDown()": { + "type": "command", + "protocols": [ + "usp" + ] } }, "Device.IoTCapability.{i}.EnumControl.": { @@ -68495,6 +72173,18 @@ "max": 64 } } + }, + "StepUp()": { + "type": "command", + "protocols": [ + "usp" + ] + }, + "StepDown()": { + "type": "command", + "protocols": [ + "usp" + ] } }, "Device.IoTCapability.{i}.BinarySensor.": { diff --git a/tools/generate_json.py b/tools/generate_json.py index 7f2f202c..a7b700fe 100755 --- a/tools/generate_json.py +++ b/tools/generate_json.py @@ -68,7 +68,7 @@ def getname( objname ): model_root_name = OBJSname OBJSname = "Services" + OBJSname return OBJSname - return OBJSname; + return OBJSname def getparamtype( dmparam ): ptype = None @@ -270,7 +270,7 @@ def objhaschild (parentname, level, check_obj): objname = c.get('name') if c.tag == "object" and parentname in objname and (objname.count('.') - objname.count('{i}')) == level: hasobj = 1 - break; + break return hasobj @@ -279,7 +279,7 @@ def objhasparam (dmobject): for c in dmobject: if c.tag == "parameter": hasparam = 1 - break; + break return hasparam @@ -512,6 +512,42 @@ def printPARAM( dmparam, dmobject, bbfdm_type ): print >> fp, "}" fp.close() +def printCOMMAND( dmparam, dmobject, bbfdm_type ): + fp = open('./.json_tmp', 'a') + print >> fp, "\"%s\" : {" % dmparam.get('name') + print >> fp, "\"type\" : \"command\"," + inputfound = 0 + outputfound = 0 + for c in dmparam: + if c.tag == "input": + inputfound = 1 + elif c.tag == "output": + outputfound = 1 + + print >> fp, ("\"protocols\" : [\"usp\"],") if (inputfound or outputfound) else ("\"protocols\" : [\"usp\"]") + + for c in dmparam: + if c.tag == "input": + print >> fp, "\"input\" : {" + for param in c: + if param.tag == "parameter": + fp.close() + printPARAM(param, dmobject, "\"usp\"") + fp = open('./.json_tmp', 'a') + print >> fp, "}" if outputfound else "}," + + if c.tag == "output": + print >> fp, "\"output\" : {" + for param in c: + if param.tag == "parameter": + fp.close() + printPARAM(param, dmobject, "\"usp\"") + fp = open('./.json_tmp', 'a') + print >> fp, "}" + + print >> fp, "}" + fp.close() + def printusage(): if "tr-181" in sys.argv[1]: print "Usage: " + sys.argv[0] + " [Object path]" @@ -544,7 +580,7 @@ def chech_each_obj_with_other_obj(model1, model2): for obj in model1: if obj.tag == "object" and (obj.get('name') == c.get('name')): found = 1 - break; + break if found == 0: if c.get('name').count(".") - (c.get('name')).count("{i}.") != 2: continue @@ -587,11 +623,13 @@ def chech_obj_with_other_obj(obj, dmobject): printPARAM(c, obj, "\"usp\"") elif exist == 0 and "usp" in sys.argv[1]: printPARAM(c, obj, "\"cwmp\"") + if c.tag == "command": + printCOMMAND(c, obj, "\"usp\"") def object_parse_childs(dmobject, level, generatelist, check_obj): if generatelist == 0 and (dmobject.get('name')).count(".") == 2: generatelistfromfile(dmobject) - if check_obj ==1 and "tr-181" in sys.argv[1]: + if check_obj == 1 and "tr-181" in sys.argv[1]: obj, exist = check_if_obj_exist_in_other_xml_file(dmobject) hasobj = objhaschild(dmobject.get('name'), level, check_obj) @@ -616,6 +654,8 @@ def object_parse_childs(dmobject, level, generatelist, check_obj): else: bbfdm_type = "\"cwmp\", \"usp\"" printPARAM(c, dmobject, bbfdm_type) + if c.tag == "command": + printCOMMAND(c, dmobject, "\"usp\"") if check_obj == 1 and "tr-181" in sys.argv[1] and exist == 1: chech_obj_with_other_obj(obj, dmobject) @@ -636,7 +676,7 @@ def object_parse_childs(dmobject, level, generatelist, check_obj): object_parse_childs(c, level+1, 0, 0) printclosefile () - return; + return def generatejsonfromobj(pobj, pdir): generatelist = 0 @@ -715,7 +755,7 @@ dmroot1 = None for c in model1: if c.tag == "object" and c.get("name").count(".") == 1: dmroot1 = c - break; + break #If it is service data model if dmroot1 == None: @@ -723,7 +763,7 @@ if dmroot1 == None: for c in model1: if c.tag == "object" and c.get("name").count(".") == 2: dmroot1 = c - break; + break if dmroot1 == None: print "Wrong %s XML Data model format!" % sys.argv[1] @@ -746,7 +786,7 @@ if "tr-181" in sys.argv[1]: for c in model2: if c.tag == "object" and c.get("name").count(".") == 1: dmroot2 = c - break; + break if dmroot2 == None: print "Wrong %s XML Data model format!" % sys.argv[2] @@ -778,4 +818,3 @@ if (os.path.isdir(gendir)): print "Json file generated under \"./%s\"" % gendir else: print "No json file generated!" -