From 38c7c804ca2241a6b037167bab58025ffae7cff3 Mon Sep 17 00:00:00 2001 From: Petro Krynytskyi Date: Wed, 28 Jan 2026 09:19:35 +0200 Subject: [PATCH] RDKB-62526: Implement JSON schema-based data model registration with WFA Data Elements support Reason for change: 1. Implement WFA Data Elements schema-based registration via JSON. Implementation of WFA DM parameters are stubbed. 2. Support both Native WiFi DM and WFA Data Elements with unified JSON parsing. 3. Memory footprint improvments. Test Procedure: 1. Verify WFA Data Elements schema parsing from JSON files 2. Verify Native DM schema registration 3. Confirm bus namespace registration for all elements 4. Verify TR-181 path conversion from YANG format Risks: Medium Priority: P1 Signed-off-by: Petro Krynytskyi --- config/Data_Elements_JSON_Schema_v3.0.json | 3336 +++++++++++++++++ config/bus_dml_config.json | 2995 +++++++-------- source/core/Makefile.am | 4 +- source/core/wifi_ctrl.h | 1 + .../common/data_model/wfa/wfa_data_model.c | 116 + .../common/data_model/wfa/wfa_data_model.h | 430 +++ .../common/data_model/wfa/wfa_dml_cb.c | 64 + .../common/data_model/wfa/wfa_dml_cb.h | 47 + .../common/data_model/wifi_data_model.c | 135 +- .../common/data_model/wifi_data_model.h | 28 + .../common/data_model/wifi_data_model_parse.c | 531 --- .../common/data_model/wifi_data_model_parse.h | 116 - .../platform/common/data_model/wifi_dml_api.c | 38 +- .../platform/common/data_model/wifi_dml_api.h | 10 + .../common/data_model/wifi_dml_json_parser.c | 794 ++++ .../common/data_model/wifi_dml_json_parser.h | 83 + 16 files changed, 6445 insertions(+), 2283 deletions(-) create mode 100644 config/Data_Elements_JSON_Schema_v3.0.json create mode 100644 source/platform/common/data_model/wfa/wfa_data_model.c create mode 100644 source/platform/common/data_model/wfa/wfa_data_model.h create mode 100644 source/platform/common/data_model/wfa/wfa_dml_cb.c create mode 100644 source/platform/common/data_model/wfa/wfa_dml_cb.h delete mode 100644 source/platform/common/data_model/wifi_data_model_parse.c delete mode 100644 source/platform/common/data_model/wifi_data_model_parse.h create mode 100644 source/platform/common/data_model/wifi_dml_json_parser.c create mode 100644 source/platform/common/data_model/wifi_dml_json_parser.h diff --git a/config/Data_Elements_JSON_Schema_v3.0.json b/config/Data_Elements_JSON_Schema_v3.0.json new file mode 100644 index 000000000..51b0b0c1d --- /dev/null +++ b/config/Data_Elements_JSON_Schema_v3.0.json @@ -0,0 +1,3336 @@ +{ + "$comment": "WI-FI ALLIANCE PROPRIETARY - SUBJECT TO CHANGE WITHOUT NOTICE This document may be used with the permission of Wi-Fi Alliance under the terms set forth herein. By your use of the document, you are agreeing to these terms. This document is a work in process and is not an approved Wi-Fi Alliance specification. This document is subject to revision or removal at any time without notice. Information contained in this document may be used at your sole risk. Wi-Fi Alliance assumes no responsibility for errors or omissions in this document. This copyright permission does not constitute an endorsement of the products or services. Wi-Fi Alliance trademarks and certification marks may not be used unless specifically allowed by Wi-Fi Alliance. Wi-Fi Alliance has not conducted an independent intellectual property rights (\"IPR\") review of this document and the information contained herein, and makes no representations or warranties regarding IPR, including without limitation patents, copyrights or trade secret rights. This document may contain inventions for which you must obtain licenses from third parties before making, using or selling the inventions. Wi-Fi Alliance owns the copyright in this document and reserves all rights therein. A user of this document may duplicate and distribute copies of the document in connection with the authorized uses described herein, provided any duplication in whole or in part includes the copyright notice and the disclaimer text set forth herein. Wi-Fi Alliance hereby grants a user of the schema file(s) of this document a royalty-free, perpetual, irrevocable copyright license to use and distribute solely the schema file(s) found within this document. Unless prior written permission has been received from Wi-Fi Alliance, any other use of this document and all other duplication and distribution of this document are prohibited. Unauthorized use, duplication, or distribution is an infringement of Wi-Fi Alliance's copyright. NO REPRESENTATIONS OR WARRANTIES (WHETHER EXPRESS OR IMPLIED) ARE MADE BY WI-FI ALLIANCE AND WI-FI ALLIANCE IS NOT LIABLE FOR AND HEREBY DISCLAIMS ANY DIRECT, INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF THIS DOCUMENT AND ANY INFORMATION CONTAINED IN THIS DOCUMENT. (C) 2021 Wi-Fi Alliance. All Rights Reserved. Version 2.0, July 15, 2021.", + "$schema": "http://json-schema.org/schema#", + "$id": "http://www.wi-fi.org/dataelements", + "type": "object", + "description": "The schema for entities implementing Wi-Fi Alliance DataElements Certification", + "definitions": { + "uint32_t": { + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "uint16_t": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "uint8_t": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "timestamp_t": { + "title": "Timestamp", + "type": "string", + "format": "date-time" + }, + "macaddr_t": { + "title": "MAC Address", + "type": "string", + "minLength": 17, + "maxLength": 17, + "pattern": "^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$" + }, + "rssi_t": { + "title": "RSSI", + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "noisepower_t": { + "title": "Noise", + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "channel_t": { + "title": "Channel", + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "operatingclass_t": { + "title": "OperatingClass", + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "packetcounter_t": { + "title": "PacketCounter", + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "bytecounter_t": { + "title": "ByteCounter", + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "utilization_t": { + "title": "Utilization", + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "txpower_t": { + "title": "TransmitPower", + "type": "integer", + "minimum": -127, + "maximum": 127 + }, + "phyrate_t": { + "title": "PhysicalDataRate", + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "macrate_t": { + "title": "MACDataRate", + "type": "integer", + "minimum": 0, + "maximum": 4294967295 + }, + "statuscode_t": { + "title": "StatusCode", + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "reasoncode_t": { + "title": "ReasonCode", + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "vlanid_t": { + "title": "VID", + "type": "integer", + "minimum": 0, + "maximum": 4095 + }, + "pcp_t": { + "title": "PrimaryCodePoint", + "type": "integer", + "minimum": 0, + "maximum": 7 + }, + "tid_t": { + "title": "TrafficID", + "type": "integer", + "minimum": 0, + "maximum": 7 + }, + "band_t": { + "title": "Band", + "type": "string", + "enum": [ + "All", + "2.4", + "5", + "6", + "5_UNII_1", + "5_UNII_2", + "5_UNII_3", + "5_UNII_4", + "6_UNII_5", + "6_UNII_6", + "6_UNII_7", + "6_UNII_8" + ] + }, + "akm_t": { + "title": "AKM", + "type": "string", + "enum": [ + "psk", + "dpp", + "sae", + "psk+sae", + "dpp+sae", + "dpp+psk+sae", + "SuiteSelector" + ] + }, + "channelusage_t": { + "title": "Channel Usage Reason type", + "type": "string", + "enum": [ + "0", + "1", + "2", + "3", + "4", + "255" + ] + }, + "direction_t": { + "title": "The direction of traffic for the TID to link mapping", + "type": "string", + "enum": [ + "Up", + "Down" + ] + }, + "linkid_t": { + "title": "The LinkId", + "type": "integer", + "minimum": 0, + "maximum": 15 + }, + "controlleroperationmode_t": { + "title": "The EasyMesh controller support", + "type": "string", + "enum": [ + "NotSupported", + "SupportedNotEnabled", + "Running" + ] + }, + "mediatype_t": { + "title": "The media type of a physical link", + "type": "string", + "enum": [ + "IEEE 802.3ab", + "IEEE 802.11b", + "IEEE 802.11g", + "IEEE 802.11a", + "IEEE 802.11n 2.4", + "IEEE 802.11n 5.0", + "IEEE 802.11ac", + "IEEE 802.11ad", + "IEEE 802.11af", + "IEEE 802.11ax", + "IEEE 802.11be", + "IEEE 1901 Wavelet", + "IEEE 1901 FFT", + "MoCAv1.1", + "Generic PHY" + ] + }, + "suiteselector_t": { + "title": "AKM suite selector encoded as a 4-octet hex encoded value without internal separator", + "type": "string", + "pattern": "([0-9a-fA-F]{8})" + }, + "SSIDtoVIDMapping_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "SSID", + "VID" + ], + "properties": { + "SSID": { + "type": "string" + }, + "VID": { + "$ref": "#/definitions/vlanid_t" + } + } + }, + "Default8021Q_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "PrimaryVID", + "DefaultPCP" + ], + "properties": { + "PrimaryVID": { + "$ref": "#/definitions/vlanid_t" + }, + "DefaultPCP": { + "$ref": "#/definitions/pcp_t" + }, + "Enable": { + "type": "boolean" + } + } + }, + "OpClassChannels_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "OpClass", + "ChannelList" + ], + "properties": { + "OpClass": { + "$ref": "#/definitions/operatingclass_t" + }, + "ChannelList": { + "type": "array", + "items": { + "$ref": "#/definitions/channel_t" + } + } + } + }, + "CACMethod_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "Method", + "NumberOfSeconds", + "OpClassList" + ], + "properties": { + "Method": { + "type": "integer", + "minimum": 0, + "maximum": 3 + }, + "NumberOfSeconds": { + "type": "integer", + "minimum": 0, + "maximum": 2e32 + }, + "OpClassList": { + "type": "array", + "items": { + "$ref": "#/definitions/OpClassChannels_g" + } + } + } + }, + "SPRule_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "ID", + "Precedence", + "Output", + "AlwaysMatch" + ], + "properties": { + "ID": { + "type": "integer", + "minimum": 0, + "maximum": 2e32 + }, + "Precedence": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "Output": { + "type": "integer", + "minimum": 0, + "maximum": 9 + }, + "AlwaysMatch": { + "type": "boolean" + } + } + }, + "WiFi6_g": { + "type": "object", + "additionalProperties": false, + "properties": { + "HE160": { + "type": "boolean" + }, + "HE8080": { + "type": "boolean" + }, + "MCSNSS": { + "type": "string" + }, + "SUBeamformer": { + "type": "boolean" + }, + "SUBeamformee": { + "type": "boolean" + }, + "MUBeamformer": { + "type": "boolean" + }, + "Beamformee80orLess": { + "type": "boolean" + }, + "BeamformeeAbove80": { + "type": "boolean" + }, + "ULMUMIMO": { + "type": "boolean" + }, + "ULOFDMA": { + "type": "boolean" + }, + "DLOFDMA": { + "type": "boolean" + }, + "MaxDLMUMIMO": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "MaxULMUMIMO": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "MaxDLOFDMA": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "MaxULOFDMA": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "RTS": { + "type": "boolean" + }, + "MURTS": { + "type": "boolean" + }, + "MultiBSSID": { + "type": "boolean" + }, + "MUEDCA": { + "type": "boolean" + }, + "TWTRequestor": { + "type": "boolean" + }, + "TWTResponder": { + "type": "boolean" + }, + "SpatialReuse": { + "type": "boolean" + }, + "AnticipatedChannelUsage": { + "type": "boolean" + } + } + }, + "IEEE1905Security_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "OnboardingProtocol", + "IntegrityAlgorithm", + "EncryptionAlgorithm" + ], + "properties": { + "OnboardingProtocol": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "IntegrityAlgorithm": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "EncryptionAlgorithm": { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + } + }, + "AKMSuite_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "OUI", + "Type" + ], + "properties": { + "OUI": { + "type": "string" + }, + "Type": { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + } + }, + "TIDQueue_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "TID", + "Size" + ], + "properties": { + "TID": { + "$ref": "#/definitions/tid_t" + }, + "Size": { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + } + }, + "QMDescriptor_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "BSSID", + "ClientMac", + "DescriptorElement" + ], + "properties": { + "BSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "ClientMac": { + "$ref": "#/definitions/macaddr_t" + }, + "DescriptorElement": { + "type": "string" + } + } + }, + "AnticipatedChannelUsageEntry_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "BurstStartTime", + "BurstLength", + "Repetitions", + "BurstInterval", + "RUBitmask", + "TransmitterIdentifier", + "PowerLevel", + "ChannelUsageReason" + ], + "properties": { + "BurstStartTime": { + "type": "string" + }, + "BurstLength": { + "type": "integer", + "minimum": 0, + "maximum": 2e32 + }, + "Repetitions": { + "type": "integer", + "minimum": 0, + "maximum": 2e32 + }, + "BurstInterval": { + "type": "integer", + "minimum": 0, + "maximum": 2e32 + }, + "RUBitmask": { + "type": "string" + }, + "TransmitterIdentifier": { + "type": "string" + }, + "PowerLevel": { + "type": "integer", + "minimum": -127, + "maximum": 127 + }, + "ChannelUsageReason": { + "$ref": "#/definitions/channelusage_t" + } + } + }, + "AnticipatedChannelUsage_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "OpClass", + "Channel", + "ReferenceBSSID", + "Entry" + ], + "properties": { + "OpClass": { + "$ref": "#/definitions/operatingclass_t" + }, + "Channel": { + "$ref": "#/definitions/channel_t" + }, + "ReferenceBSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "Entry": { + "type": "array", + "items": { + "$ref": "#/definitions/AnticipatedChannelUsageEntry_g" + } + } + } + }, + "SpatialReuse_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "PartialBSSColor", + "BSSColor", + "HESIGASpatialReuseValue15Allowed", + "SRGInformationValid", + "NonSRGOffsetValid", + "PSRDisallowed", + "NonSRGOBSSPDMaxOffset", + "SRGOBSSPDMinOffset", + "SRGOBSSPDMaxOffset", + "SRGBSSColorBitmap", + "SRGPartialBSSIDBitmap", + "NeighborBSSColorInUseBitmap" + ], + "properties": { + "PartialBSSColor": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "BSSColor": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "HESIGASpatialReuseValue15Allowed": { + "type": "boolean" + }, + "SRGInformationValid": { + "type": "boolean" + }, + "NonSRGOffsetValid": { + "type": "boolean" + }, + "PSRDisallowed": { + "type": "boolean" + }, + "NonSRGOBSSPDMaxOffset": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "SRGOBSSPDMinOffset": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "SRGOBSSPDMaxOffset": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "SRGBSSColorBitmap": { + "type": "string" + }, + "SRGPartialBSSIDBitmap": { + "type": "string" + }, + "NeighborBSSColorInUseBitmap": { + "type": "string" + } + } + }, + "NetworkSSID_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "SSID", + "Band" + ], + "properties": { + "SSID": { + "type": "string" + }, + "Band": { + "type": "array", + "items": { + "$ref": "#/definitions/band_t" + } + }, + "Enable": { + "type": "boolean" + }, + "AKMsAllowed": { + "type": "array", + "items": { + "$ref": "#/definitions/akm_t" + } + }, + "SuiteSelector": { + "$ref": "#/definitions/suiteselector_t" + }, + "AdvertisementEnabled": { + "type": "boolean" + }, + "MFPConfig": { + "type": "string" + }, + "MobilityDomain": { + "$ref": "#/definitions/macaddr_t" + }, + "HaulType": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Fronthaul", + "Backhaul" + ] + } + } + } + }, + "DisAllowedOpClassChannels_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "OpClass", + "ChannelList" + ], + "properties": { + "Enable": { + "type": "boolean" + }, + "OpClass": { + "$ref": "#/definitions/operatingclass_t" + }, + "ChannelList": { + "type": "array", + "items": { + "$ref": "#/definitions/channel_t" + } + } + } + }, + "PreferredBackhaul_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "BackhaulMACAddress", + "BackhaulStaMACAddress" + ], + "properties": { + "BackhaulMACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "BackhaulStaMACAddress": { + "$ref": "#/definitions/macaddr_t" + } + } + }, + "STABlock_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "BlockedSTA", + "BSSID" + ], + "properties": { + "BlockedSTA": { + "$ref": "#/definitions/macaddr_t" + }, + "BSSID": { + "type": "array", + "items": { + "$ref": "#/definitions/macaddr_t" + } + }, + "Schedule": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "Alias", + "Day", + "StartTime", + "Duration" + ], + "properties": { + "Alias": { + "type": "string" + }, + "Day": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ] + } + }, + "StartTime": { + "type": "string" + }, + "Duration": { + "type": "integer" + } + } + } + } + } + }, + "WiFi7Config_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "EMLMREnabled", + "EMLSREnabled", + "STREnabled", + "NSTREnabled", + "TIDLinkMapNegotiation" + ], + "properties": { + "EMLMREnabled": { + "type": "boolean" + }, + "EMLSREnabled": { + "type": "boolean" + }, + "STREnabled": { + "type": "boolean" + }, + "NSTREnabled": { + "type": "boolean" + }, + "TIDLinkMapNegotiation": { + "type": "boolean" + } + } + }, + "WiFi7Capabilities_g": { + "type": "object", + "required": [ + "EMLMRSupport", + "EMLSRSupport", + "STRSupport", + "NSTRSupport", + "TIDLinkMapNegotiation" + ], + "properties": { + "EMLMRSupport": { + "type": "boolean" + }, + "EMLSRSupport": { + "type": "boolean" + }, + "STRSupport": { + "type": "boolean" + }, + "NSTRSupport": { + "type": "boolean" + }, + "TIDLinkMapNegotiation": { + "type": "boolean" + } + } + }, + "TIDLinkMapEntry_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "TID", + "LinkID", + "BSSID", + "Direction" + ], + "properties": { + "TID": { + "$ref": "#/definitions/tid_t" + }, + "LinkID": { + "$ref": "#/definitions/linkid_t" + }, + "BSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "Direction": { + "$ref": "#/definitions/direction_t" + } + } + }, + "AffiliatedAP_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "BSSID", + "LinkID", + "RUID" + ], + "properties": { + "BSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "LinkID": { + "$ref": "#/definitions/linkid_t" + }, + "RUID": { + "type": "string" + }, + "DisabledSubChannels": { + "$ref": "#/definitions/uint16_t" + }, + "UnicastBytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "UnicastBytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "MulticastBytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "MulticastBytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "BroadcastBytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "BroadcastBytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "ErrorsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "PacketsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "PacketsReceived": { + "$ref": "#/definitions/packetcounter_t" + }, + "EstServiceParametersBE": { + "type": "string" + }, + "EstServiceParametersBK": { + "type": "string" + }, + "EstServiceParametersVI": { + "type": "string" + }, + "EstServiceParametersVO": { + "type": "string" + } + } + }, + "AffiliatedSTA_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "MACAddress", + "BSSID" + ], + "properties": { + "MACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "BSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "BytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "BytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "ErrorsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "PacketsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "PacketsReceived": { + "$ref": "#/definitions/packetcounter_t" + }, + "SignalStrength": { + "$ref": "#/definitions/rssi_t" + }, + "EstMACDataRateDownlink": { + "$ref": "#/definitions/macrate_t" + }, + "EstMACDataRateUplink": { + "$ref": "#/definitions/macrate_t" + }, + "LastDataDownlinkRate": { + "$ref": "#/definitions/phyrate_t" + }, + "LastDataUplinkRate": { + "$ref": "#/definitions/phyrate_t" + }, + "UtilizationReceive": { + "$ref": "#/definitions/uint32_t" + }, + "UtilizationTransmit": { + "$ref": "#/definitions/uint32_t" + } + } + }, + "STAMLD_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "MLDMACAddress", + "AffiliatedSTA", + "STAMLDConfig", + "WiFi7Capabilities", + "IsbSTA" + ], + "properties": { + "MLDMACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "IPV4Address": { + "type": [ + "string", + "null" + ] + }, + "IPV6Address": { + "type": [ + "string", + "null" + ] + }, + "Hostname": { + "type": [ + "string", + "null" + ] + }, + "LastConnectTime": { + "$ref": "#/definitions/uint32_t" + }, + "BytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "BytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "PacketsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "PacketsReceived": { + "$ref": "#/definitions/packetcounter_t" + }, + "ErrorsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "ErrorsReceived": { + "$ref": "#/definitions/packetcounter_t" + }, + "RetransCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "STAMLDConfig": { + "$ref": "#/definitions/WiFi7Config_g" + }, + "STATIDLinkMap": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/TIDLinkMapEntry_g" + } + } + ] + }, + "AffiliatedSTA": { + "type": "array", + "items": { + "$ref": "#/definitions/AffiliatedSTA_g" + } + }, + "WiFi7Capabilities": { + "$ref": "#/definitions/WiFi7Capabilities_g" + }, + "IsbSTA": { + "type": "boolean" + } + } + }, + "APMLD_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "MLDMACAddress", + "TIDLinkMap", + "AffiliatedAP", + "STAMLD", + "APMLDConfig" + ], + "properties": { + "MLDMACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "TIDLinkMap": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/TIDLinkMapEntry_g" + } + } + ] + }, + "AffiliatedAP": { + "type": "array", + "items": { + "$ref": "#/definitions/AffiliatedAP_g" + } + }, + "STAMLD": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/STAMLD_g" + } + } + ] + }, + "APMLDConfig": { + "$ref": "#/definitions/WiFi7Config_g" + } + } + }, + "FreqSeparationEntry_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "RUID", + "FreqSeparation" + ], + "properties": { + "RUID": { + "type": "string" + }, + "FreqSeparation": { + "$ref": "#/definitions/uint32_t" + } + } + }, + "FreqSeparation_g": { + "type": "object", + "required": [ + "EMLMRFreqSeparation", + "EMLSRFreqSeparation", + "STRFreqSeparation", + "NSTRFreqSeparation" + ], + "properties": { + "EMLMRFreqSeparation": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/FreqSeparationEntry_g" + } + } + ] + }, + "EMLSRFreqSeparation": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/FreqSeparationEntry_g" + } + } + ] + }, + "STRFreqSeparation": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/FreqSeparationEntry_g" + } + } + ] + }, + "NSTRFreqSeparation": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/FreqSeparationEntry_g" + } + } + ] + } + } + }, + "MUStats_g": { + "type": "object", + "additionalProperties": false, + "properties": { + "DLHEPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLMUMIMOPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLMUPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLOFDMAMUMIMOPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLOFDMAPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLTotalPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULHEPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULMUMIMOPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULMUPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULOFDMAMUMIMOPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULOFDMAPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULTotalPPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLRU26PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLRU52PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLRU106PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLRU242PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLRU484PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLRU996PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "DLRU1992PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULRU26PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULRU52PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULRU106PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULRU242PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULRU484PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULRU996PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "ULRU1992PPDUCount": { + "$ref": "#/definitions/packetcounter_t" + } + } + }, + "ThroughputTestResult_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "ClientMac", + "DownlinkSpeed", + "UplinkSpeed", + "TestDuration", + "TestLayer", + "TimeStamp", + "TestAlgorithm", + "VID", + "WMMUP" + ], + "properties": { + "ClientMac": { + "$ref": "#/definitions/macaddr_t" + }, + "DownlinkSpeed": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/uint32_t" + } + ] + }, + "TestAlgorithm": { + "type": [ + "string", + "null" + ] + }, + "TestDuration": { + "$ref": "#/definitions/uint32_t" + }, + "TestLayer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 7 + } + ] + }, + "TimeStamp": { + "$ref": "#/definitions/timestamp_t" + }, + "UplinkSpeed": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/uint32_t" + } + ] + }, + "VID": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/vlanid_t" + } + ] + }, + "WMMUP": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/uint32_t" + } + ] + } + } + }, + "LatencyTestResult_g": { + "type": "object", + "additionalProperties": false, + "required": [ + "ClientMac", + "AverageResponseTime", + "MinimumResponseTime", + "MaximumResponseTime", + "LostCount", + "SuccessCount", + "DataBlockSize", + "TestLayer", + "TimeStamp", + "TestAlgorithm", + "VID", + "WMMUP" + ], + "properties": { + "ClientMac": { + "$ref": "#/definitions/macaddr_t" + }, + "AverageResponseTime": { + "$ref": "#/definitions/uint32_t" + }, + "MinimumResponseTime": { + "$ref": "#/definitions/uint32_t" + }, + "MaximumResponseTime": { + "$ref": "#/definitions/uint32_t" + }, + "LostCount": { + "$ref": "#/definitions/uint32_t" + }, + "SuccessCount": { + "$ref": "#/definitions/uint32_t" + }, + "DataBlockSize": { + "$ref": "#/definitions/uint32_t" + }, + "TestAlgorithm": { + "type": [ + "string", + "null" + ] + }, + "TestLayer": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "minimum": 1, + "maximum": 7 + } + ] + }, + "TimeStamp": { + "$ref": "#/definitions/timestamp_t" + }, + "VID": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/vlanid_t" + } + ] + }, + "WMMUP": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/uint32_t" + } + ] + } + } + } + }, + "properties": { + "wfa-dataelements:Network": { + "type": "object", + "additionalProperties": false, + "required": [ + "ID", + "NumberOfDevices", + "TimeStamp", + "DeviceList" + ], + "properties": { + "ID": { + "type": "string" + }, + "ControllerID": { + "type": [ + "string", + "null" + ] + }, + "NumberOfDevices": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "TimeStamp": { + "$ref": "#/definitions/timestamp_t" + }, + "PreferredBackhauls": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/PreferredBackhaul_g" + } + } + ] + }, + "STABlock": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/STABlock_g" + } + } + ] + }, + "ColocatedAgentID": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/macaddr_t" + } + ] + }, + "DeviceList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "ID", + "NumberOfRadios", + "RadioList" + ], + "properties": { + "ID": { + "type": "string" + }, + "MultiAPCapabilities": { + "type": [ + "string", + "null" + ] + }, + "NumberOfRadios": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "CollectionInterval": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "minimum": 0 + } + ] + }, + "ReportUnsuccessfulAssociations": { + "type": "boolean" + }, + "MaxReportingRate": { + "type": "integer", + "minimum": 0, + "maximum": 2e32 + }, + "MultiAPProfile": { + "deprecated": true, + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "APMetricsReportingInterval": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "Manufacturer": { + "type": [ + "string", + "null" + ] + }, + "SerialNumber": { + "type": [ + "string", + "null" + ] + }, + "ManufacturerModel": { + "type": [ + "string", + "null" + ] + }, + "SoftwareVersion": { + "type": [ + "string", + "null" + ] + }, + "ExecutionEnv": { + "type": [ + "string", + "null" + ] + }, + "LocalSteeringDisallowedSTAList": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/macaddr_t" + } + } + ] + }, + "BTMSteeringDisallowedSTAList": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/macaddr_t" + } + } + ] + }, + "MaxVIDs": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "BasicPrioritization": { + "deprecated": true, + "type": [ + "boolean", + "null" + ] + }, + "EnhancedPrioritization": { + "deprecated": true, + "type": [ + "boolean", + "null" + ] + }, + "Default8021Q": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Default8021Q_g" + } + ] + }, + "TrafficSeparationPolicy": { + "deprecated": true, + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/SSIDtoVIDMapping_g" + } + } + ] + }, + "SSIDtoVIDMapping": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/SSIDtoVIDMapping_g" + } + } + ] + }, + "CACStatus": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "TimeStamp", + "AvailableChannelList", + "NonOccupancyChannelList", + "ActiveChannelList" + ], + "properties": { + "TimeStamp": { + "$ref": "#/definitions/timestamp_t" + }, + "AvailableChannelList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "OpClass", + "Channel", + "Minutes" + ], + "properties": { + "OpClass": { + "$ref": "#/definitions/operatingclass_t" + }, + "Channel": { + "$ref": "#/definitions/channel_t" + }, + "Minutes": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + } + } + } + }, + "NonOccupancyChannelList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "OpClass", + "Channel", + "Seconds" + ], + "properties": { + "OpClass": { + "$ref": "#/definitions/operatingclass_t" + }, + "Channel": { + "$ref": "#/definitions/channel_t" + }, + "Seconds": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + } + } + } + }, + "ActiveChannelList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "OpClass", + "Channel", + "Countdown" + ], + "properties": { + "OpClass": { + "$ref": "#/definitions/operatingclass_t" + }, + "Channel": { + "$ref": "#/definitions/channel_t" + }, + "Countdown": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + } + } + } + } + } + } + ] + }, + "Prioritization": { + "deprecated": true, + "type": "array", + "items": { + "$ref": "#/definitions/SPRule_g" + } + }, + "SPRule": { + "type": "array", + "items": { + "$ref": "#/definitions/SPRule_g" + } + }, + "DSCPMap": { + "type": [ + "string", + "null" + ] + }, + "MaxPrioritizationRules": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "IEEE1905Security": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/IEEE1905Security_g" + } + ] + }, + "CountryCode": { + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "PrioritizationSupport": { + "type": "boolean" + }, + "ReportIndependentScans": { + "type": "boolean" + }, + "AnticipatedChannels": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/OpClassChannels_g" + } + } + ] + }, + "AnticipatedChannelUsage": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/AnticipatedChannelUsage_g" + } + } + ] + }, + "TrafficSeparationAllowed": { + "type": "boolean" + }, + "ServicePrioritizationAllowed": { + "type": "boolean" + }, + "STASteeringDisallowed": { + "deprecated": true, + "type": "boolean" + }, + "DFSEnable": { + "type": "boolean" + }, + "MaxUnsuccessfulAssociationReportingRate": { + "type": "integer", + "minimum": 0, + "maximum": 2e32 + }, + "STASteeringState": { + "type": "boolean" + }, + "CoordinatedCACAllowed": { + "type": "boolean" + }, + "ControllerOperationMode": { + "$ref": "#/definitions/controlleroperationmode_t" + }, + "BackhaulMACAddress": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/macaddr_t" + } + ] + }, + "BackhaulDownMACAddress": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref" : "#/definitions/macaddr_t" + } + } + ] + }, + "BackhaulMediaType": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/mediatype_t" + } + ] + }, + "BackhaulPHYRate": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/phyrate_t" + } + ] + }, + "TrafficSeparationCapability": { + "type": "boolean" + }, + "EasyConnectCapability": { + "type": "boolean" + }, + "TestCapabilities": { + "type": "integer", + "minimum": 0, + "maximum": 3 + }, + "bSTAMLD": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "MLDMACAddress", + "BSSID", + "AffiliatedbSTAList" + ], + "properties": { + "MLDMACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "BSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "AffiliatedbSTAList": { + "type": "array", + "items": { + "$ref": "#/definitions/macaddr_t" + } + } + } + } + ] + }, + "bSTAMLDConfig": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/WiFi7Config_g" + } + ] + }, + "bSTAMLDMaxLinks": { + "type": "integer", + "minimum": 0, + "maximum": 15 + }, + "MaxNumMLDs": { + "$ref": "#/definitions/uint32_t" + }, + "APMLD": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/APMLD_g" + } + } + ] + }, + "APMLDMaxLinks": { + "type": "integer", + "minimum": 0, + "maximum": 15 + }, + "BackhaulALID": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref" : "#/definitions/macaddr_t" + } + ] + }, + "TIDLinkMapping": { + "type": "string", + "enum": [ + "0", + "1", + "2" + ] + }, + "WPS": { + "type": "object", + "additionalProperties": false, + "required": [ + "Enable", + "Status" + ], + "properties": { + "Enable": { + "type": "boolean" + }, + "Status": { + "type": "string", + "enum": [ + "Disabled", + "Error", + "Unconfigured", + "Configured", + "InProgress" + ] + } + } + }, + "AssociatedSTAReportingInterval": { + "$ref": "#/definitions/uint8_t" + }, + "RadioList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "ID", + "Enabled", + "NumberOfCurrOpClass", + "CurrentOperatingClasses", + "Noise", + "Utilization", + "Capabilities", + "NumberOfBSS", + "BSSList" + ], + "properties": { + "ID": { + "type": "string" + }, + "Enabled": { + "type": "boolean" + }, + "NumberOfCurrOpClass": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "CurrentOperatingClasses": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "TimeStamp", + "Class", + "Channel", + "TxPower" + ], + "properties": { + "TimeStamp": { + "$ref": "#/definitions/timestamp_t" + }, + "Class": { + "$ref": "#/definitions/operatingclass_t" + }, + "Channel": { + "$ref": "#/definitions/channel_t" + }, + "TxPower": { + "$ref": "#/definitions/txpower_t" + } + } + } + }, + "Noise": { + "$ref": "#/definitions/noisepower_t" + }, + "Utilization": { + "$ref": "#/definitions/utilization_t" + }, + "Transmit": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + ] + }, + "ReceiveSelf": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + ] + }, + "ReceiveOther": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + ] + }, + "Capabilities": { + "type": "object", + "additionalProperties": false, + "required": [ + "OperatingClasses", + "NumberOfOpClass" + ], + "properties": { + "HTCapabilities": { + "type": [ + "string", + "null" + ] + }, + "VHTCapabilities": { + "type": [ + "string", + "null" + ] + }, + "HECapabilities": { + "type": [ + "string", + "null" + ] + }, + "WiFi6APRole": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/WiFi6_g" + } + ] + }, + "WiFi6bSTARole": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/WiFi6_g" + } + ] + }, + "AKMFrontHaul": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/AKMSuite_g" + } + } + ] + }, + "AKMBackHaul": { + "deprecated": true, + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/AKMSuite_g" + } + } + ] + }, + "AKMBackhaul": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/AKMSuite_g" + } + } + ] + }, + "OperatingClasses": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "Class", + "MaxTxPower", + "NonOperable", + "NumberOfNonOperChan" + ], + "properties": { + "Class": { + "$ref": "#/definitions/operatingclass_t" + }, + "MaxTxPower": { + "$ref": "#/definitions/txpower_t" + }, + "NonOperable": { + "type": "array", + "items": { + "$ref": "#/definitions/channel_t" + } + }, + "NumberOfNonOperChan": { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + } + } + }, + "NumberOfOpClass": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "DSCPPolicyCapability": { + "type": "boolean" + }, + "SCSTrafficDescriptionCapability": { + "type": "boolean" + }, + "MSCSCapability": { + "type": "boolean" + }, + "SCSCapability": { + "type": "boolean" + }, + "QoSMapCapability": { + "type": "boolean" + }, + "WiFi7APRole": { + "anyOf": [ + { + "$ref": "#/definitions/WiFi7Capabilities_g" + }, + { + "$ref": "#/definitions/FreqSeparation_g" + } + ] + }, + "WiFi7bSTARole": { + "anyOf": [ + { + "$ref": "#/definitions/WiFi7Capabilities_g" + }, + { + "$ref": "#/definitions/FreqSeparation_g" + } + ] + } + } + }, + "NumberOfBSS": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "BSSList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "BSSID", + "SSID", + "Enabled", + "LastChange", + "TimeStamp", + "UnicastBytesSent", + "UnicastBytesReceived", + "STAList", + "NumberOfSTA" + ], + "properties": { + "BSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "SSID": { + "type": "string" + }, + "Enabled": { + "type": "boolean" + }, + "LastChange": { + "type": "integer", + "minimum": 0 + }, + "TimeStamp": { + "$ref": "#/definitions/timestamp_t" + }, + "UnicastBytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "UnicastBytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "MulticastBytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "MulticastBytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "BroadcastBytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "BroadcastBytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "EstServiceParametersBE": { + "type": [ + "string", + "null" + ] + }, + "EstServiceParametersBK": { + "type": [ + "string", + "null" + ] + }, + "EstServiceParametersVI": { + "type": [ + "string", + "null" + ] + }, + "EstServiceParametersVO": { + "type": [ + "string", + "null" + ] + }, + "ByteCounterUnits": { + "type": "integer", + "minimum": 0, + "maximum": 3 + }, + "Profile1bSTAsDisallowed": { + "type": "boolean" + }, + "Profile2bSTAsDisallowed": { + "type": "boolean" + }, + "AssociationAllowanceStatus": { + "type": "integer", + "minimum": 0, + "maximum": 1 + }, + "BackhaulUse": { + "type": "boolean" + }, + "FronthaulUse": { + "type": "boolean" + }, + "R1disallowed": { + "type": "boolean" + }, + "R2disallowed": { + "type": "boolean" + }, + "MultiBSSID": { + "type": "boolean" + }, + "TransmittedBSSID": { + "type": "boolean" + }, + "FronthaulAKMsAllowed": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/akm_t" + } + } + ] + }, + "BackhaulAKMsAllowed": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/akm_t" + } + } + ] + }, + "QMDescriptor": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/QMDescriptor_g" + } + } + ] + }, + "NumberOfSTA": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "BasicDataTransmitRates": { + "type": "array", + "items": { + "$ref": "#/definitions/phyrate_t" + } + }, + "MUConfig": { + "type": "object", + "additionalProperties": false, + "required": [ + "DLMUMIMOEnable", + "DLOFDMAEnable", + "ULMUMIMOEnable", + "ULOFDMAEnable" + ], + "properties": { + "DLMUMIMOEnable": { + "type": "boolean" + }, + "DLOFDMAEnable": { + "type": "boolean" + }, + "ULMUMIMOEnable": { + "type": "boolean" + }, + "ULOFDMAEnable": { + "type": "boolean" + } + } + }, + "MUStats": { + "$ref": "#/definitions/MUStats_g" + }, + "ThroughputTestResult": { + "$ref": "#/definitions/ThroughputTestResult_g" + }, + "LatencyTestResult": { + "$ref": "#/definitions/LatencyTestResult_g" + }, + "LinkRemovalImminent": { + "type": "boolean" + }, + "FronthaulSuiteSelector": { + "$ref": "#/definitions/suiteselector_t" + }, + "BackhaulSuiteSelector": { + "$ref": "#/definitions/suiteselector_t" + }, + "STAList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "MACAddress", + "TimeStamp", + "LastDataDownlinkRate", + "LastDataUplinkRate", + "SignalStrength", + "LastConnectTime", + "BytesSent", + "BytesReceived", + "PacketsSent", + "PacketsReceived", + "ErrorsSent", + "RetransCount" + ], + "properties": { + "MACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "TimeStamp": { + "$ref": "#/definitions/timestamp_t" + }, + "HTCapabilities": { + "type": [ + "string", + "null" + ] + }, + "VHTCapabilities": { + "type": [ + "string", + "null" + ] + }, + "HECapabilities": { + "type": [ + "string", + "null" + ] + }, + "WiFi6Capabilities": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/WiFi6_g" + } + ] + }, + "ClientCapabilities": { + "type": [ + "string", + "null" + ] + }, + "LastDataDownlinkRate": { + "$ref": "#/definitions/phyrate_t" + }, + "LastDataUplinkRate": { + "$ref": "#/definitions/phyrate_t" + }, + "UtilizationReceive": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "minimum": 0 + } + ] + }, + "UtilizationTransmit": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "minimum": 0 + } + ] + }, + "EstMACDataRateDownlink": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/macrate_t" + } + ] + }, + "EstMACDataRateUplink": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/macrate_t" + } + ] + }, + "SignalStrength": { + "$ref": "#/definitions/rssi_t" + }, + "LastConnectTime": { + "type": "integer", + "minimum": 0 + }, + "BytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "BytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "PacketsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "PacketsReceived": { + "$ref": "#/definitions/packetcounter_t" + }, + "ErrorsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "ErrorsReceived": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/packetcounter_t" + } + ] + }, + "RetransCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "MeasurementReport": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "NumberOfMeasureReports": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + ] + }, + "IPV4Address": { + "type": [ + "string", + "null" + ] + }, + "IPV6Address": { + "type": [ + "string", + "null" + ] + }, + "Hostname": { + "type": [ + "string", + "null" + ] + }, + "TIDQueueSizes": { + "type": "array", + "items": { + "$ref": "#/definitions/TIDQueue_g" + } + }, + "CellularDataPreference": { + "type": "string", + "enum": [ + "Excluded", + "Should not use", + "Should use" + ] + }, + "ReAssociationDelay": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "SecurityAssociation": { + "type": "string", + "enum": [ + "PMKSA", + "PMK-R0", + "PMK-R1", + "Mesh_PMKSA", + "Mesh_TKSA", + "PTKSA", + "GTKSA", + "IGTKSA" + ] + }, + "SleepMode": { + "type": "string", + "enum": [ + "Not_Asleep", + "WNM_Sleep_Mode", + "TPU_Sleep", + "TDLS_Peer_Power_Save_Mode", + "AP_PS-Poll", + "TWT_Sleep", + "Light_Sleep", + "Deep_Sleep" + ] + } + } + } + } + } + } + }, + "BackhaulSta": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "MACAddress" + ], + "properties": { + "MACAddress": { + "$ref": "#/definitions/macaddr_t" + } + } + } + ] + }, + "UnassociatedStaList": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "MACAddress", + "SignalStrength" + ], + "properties": { + "MACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "SignalStrength": { + "$ref": "#/definitions/rssi_t" + }, + "Channel": { + "$ref": "#/definitions/channel_t" + }, + "OperatingClass": { + "$ref": "#/definitions/operatingclass_t" + } + } + } + } + ] + }, + "NumberOfUnassocSta": { + "oneOf": [ + { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + { + "type": "null" + } + ] + }, + "ScanResultList": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "NumberOfOpClassScans", + "TimeStamp", + "OpClassScanList" + ], + "properties": { + "NumberOfOpClassScans": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "TimeStamp": { + "$ref": "#/definitions/timestamp_t" + }, + "OpClassScanList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "OperatingClass", + "NumberOfChannelScans", + "ChannelScanList" + ], + "properties": { + "OperatingClass": { + "$ref": "#/definitions/operatingclass_t" + }, + "NumberOfChannelScans": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "ChannelScanList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "Channel", + "TimeStamp", + "Utilization", + "Noise", + "NumberOfNeighbors", + "NeighborList" + ], + "properties": { + "ScanStatus": { + "type": "integer", + "minimum": 0, + "maximum": 6 + }, + "Channel": { + "$ref": "#/definitions/channel_t" + }, + "TimeStamp": { + "$ref": "#/definitions/timestamp_t" + }, + "Utilization": { + "$ref": "#/definitions/utilization_t" + }, + "Noise": { + "$ref": "#/definitions/noisepower_t" + }, + "NumberOfNeighbors": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "AggregateScanDuration": { + "$ref": "#/definitions/uint32_t" + }, + "ScanType": { + "type": "boolean" + }, + "NeighborList": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "BSSID", + "SSID", + "ChannelBandwidth", + "SignalStrength" + ], + "properties": { + "BSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "SSID": { + "type": "string" + }, + "ChannelBandwidth": { + "type": "string" + }, + "StationCount": { + "oneOf": [ + { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + { + "type": "null" + } + ] + }, + "SignalStrength": { + "$ref": "#/definitions/rssi_t" + }, + "ChannelUtilization": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/utilization_t" + } + ] + }, + "MLDMACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "ReportingBSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "MultiBSSID": { + "type": "boolean" + }, + "BSSLoadElementPresent": { + "type": "boolean" + }, + "BSSColor": { + "type": "integer", + "minimum": 0, + "maximum": 63 + } + } + } + } + } + } + } + } + } + } + } + } + ] + }, + "TrafficSeparationCombinedFronthaul": { + "type": "boolean" + }, + "TrafficSeparationCombinedBackhaul": { + "type": "boolean" + }, + "SteeringPolicy": { + "type": "integer", + "minimum": 0, + "maximum": 3 + }, + "ChannelUtilizationThreshold": { + "$ref": "#/definitions/utilization_t" + }, + "RCPISteeringThreshold": { + "$ref": "#/definitions/rssi_t" + }, + "CountryCode": { + "deprecated": true, + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "STAReportingRCPIThreshold": { + "$ref": "#/definitions/rssi_t" + }, + "STAReportingRCPIHysteresisMarginOverride": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "ChannelUtilizationReportingThreshold": { + "$ref": "#/definitions/utilization_t" + }, + "AssociatedSTATrafficStatsInclusionPolicy": { + "type": "boolean" + }, + "AssociatedSTALinkMetricsInclusionPolicy": { + "type": "boolean" + }, + "ChipsetVendor": { + "type": "string" + }, + "ScanCapability": { + "type": "object", + "additionalProperties": false, + "required": [ + "OnBootOnly", + "Impact", + "MinimumInterval", + "OpClassList" + ], + "properties": { + "OnBootOnly": { + "type": "boolean" + }, + "Impact": { + "type": "integer", + "minimum": 0, + "maximum": 3 + }, + "MinimumInterval": { + "type": "integer", + "minimum": 0, + "maximum": 2e32 + }, + "OpClassList": { + "type": "array", + "items": { + "$ref": "#/definitions/OpClassChannels_g" + } + } + } + }, + "CACCapability": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/CACMethod_g" + } + } + ] + }, + "APMetricsWiFi6": { + "type": "boolean" + }, + "DisAllowedOpClassChannels": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/DisAllowedOpClassChannels_g" + } + } + ] + }, + "SpatialReuse": { + "$ref": "#/definitions/SpatialReuse_g" + }, + "TransmitPowerLimit": { + "type": "integer", + "minimum": -127, + "maximum": 127 + } + } + } + } + } + } + }, + "MSCSDisallowedStaList": { + "type": "array", + "items": { + "$ref": "#/definitions/macaddr_t" + } + }, + "SCSDisallowedStaList": { + "type": "array", + "items": { + "$ref": "#/definitions/macaddr_t" + } + }, + "NetworkSSIDList": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkSSID_g" + } + } + } + }, + "notification": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "required": [ + "eventTime", + "wfa-dataelements:AssociationEvent" + ], + "properties": { + "eventTime": { + "$ref": "#/definitions/timestamp_t" + }, + "wfa-dataelements:AssociationEvent": { + "type": "object", + "additionalProperties": false, + "required": [ + "AssocData" + ], + "properties": { + "AssocData": { + "type": "object", + "additionalProperties": false, + "required": [ + "BSSID", + "MACAddress" + ], + "properties": { + "BSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "MACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "StatusCode": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/statuscode_t" + } + ] + }, + "HTCapabilities": { + "type": [ + "string", + "null" + ] + }, + "VHTCapabilities": { + "type": [ + "string", + "null" + ] + }, + "HECapabilities": { + "type": [ + "string", + "null" + ] + }, + "WiFi6Capabilities": { + "$ref": "#/definitions/WiFi6_g" + }, + "ClientCapabilities": { + "type": [ + "string", + "null" + ] + } + } + } + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "eventTime", + "wfa-dataelements:DisassociationEvent" + ], + "properties": { + "eventTime": { + "$ref": "#/definitions/timestamp_t" + }, + "wfa-dataelements:DisassociationEvent": { + "type": "object", + "additionalProperties": false, + "required": [ + "DisassocData" + ], + "properties": { + "DisassocData": { + "type": "object", + "additionalProperties": false, + "required": [ + "BSSID", + "MACAddress", + "BytesSent", + "BytesReceived", + "PacketsSent", + "PacketsReceived", + "ErrorsSent", + "RetransCount" + ], + "properties": { + "BSSID": { + "$ref": "#/definitions/macaddr_t" + }, + "MACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "ReasonCode": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/reasoncode_t" + } + ] + }, + "BytesSent": { + "$ref": "#/definitions/bytecounter_t" + }, + "BytesReceived": { + "$ref": "#/definitions/bytecounter_t" + }, + "PacketsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "PacketsReceived": { + "$ref": "#/definitions/packetcounter_t" + }, + "ErrorsSent": { + "$ref": "#/definitions/packetcounter_t" + }, + "ErrorsReceived": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/packetcounter_t" + } + ] + }, + "RetransCount": { + "$ref": "#/definitions/packetcounter_t" + }, + "LastDataDownlinkRate": { + "$ref": "#/definitions/phyrate_t" + }, + "LastDataUplinkRate": { + "$ref": "#/definitions/phyrate_t" + }, + "UtilizationReceive": { + "$ref": "#/definitions/uint32_t" + }, + "UtilizationTransmit": { + "$ref": "#/definitions/uint32_t" + }, + "EstMACDataRateDownlink": { + "$ref": "#/definitions/macrate_t" + }, + "EstMACDataRateUplink": { + "$ref": "#/definitions/macrate_t" + }, + "SignalStrength": { + "$ref": "#/definitions/rssi_t" + }, + "LastConnectTime": { + "$ref": "#/definitions/uint32_t" + }, + "Noise": { + "$ref": "#/definitions/noisepower_t" + }, + "InitiatedBy": { + "type": "string", + "enum": [ + "STA", + "EasyMesh_Agent", + "EasyMesh_Controller", + "DE_Collector", + "Unknown" + ] + } + } + } + } + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "eventTime", + "wfa-dataelements:FailedConnectionEvent" + ], + "properties": { + "eventTime": { + "$ref": "#/definitions/timestamp_t" + }, + "wfa-dataelements:FailedConnectionEvent": { + "type": "object", + "additionalProperties": false, + "required": [ + "FailedConnectionEventData" + ], + "properties": { + "FailedConnectionEventData": { + "type": "object", + "additionalProperties": false, + "required": [ + "MACAddress", + "StatusCode" + ], + "properties": { + "MACAddress": { + "$ref": "#/definitions/macaddr_t" + }, + "StatusCode": { + "$ref": "#/definitions/statuscode_t" + }, + "ReasonCode": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/reasoncode_t" + } + ] + } + } + } + } + } + } + } + ] + } + } +} diff --git a/config/bus_dml_config.json b/config/bus_dml_config.json index 5274489df..89a66a7e0 100644 --- a/config/bus_dml_config.json +++ b/config/bus_dml_config.json @@ -1,15 +1,13 @@ { + "type": "object", + "description": "The schema for RDK-B OneWiFi Data Model", + "$schema": "http://json-schema.org/schema#", "definitions": { "uint32_t": { "type": "integer", "minimum": 0, "maximum": 4294967295 }, - "int32_t": { - "type": "integer", - "minimum": -2147483648, - "maximum": 2147483647 - }, "uint16_t": { "type": "integer", "minimum": 0, @@ -20,149 +18,93 @@ "minimum": 0, "maximum": 255 }, - "boolean": { - "type": "bool", - "minimum": 0, - "maximum": 1 - }, - "string": { - "type": "string", - "minimum": 1, - "maximum": 64 - }, - "timestamp_t": { - "title": "Timestamp", - "type": "string", - "format": "date-time" - }, - "macaddr_t": { - "title": "MAC Address", - "type": "string", - "minLength": 17, - "maxLength": 17, - "pattern": "^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$" - }, - "rssi_t": { - "title": "RSSI", + "int32_t": { "type": "integer", - "minimum": 0, - "maximum": 255 + "maximum": 2147483647, + "minimum": -2147483648 }, - "txpower_t": { - "title": "Tx Power", + "ap_retry_limit_t": { + "title": "ap retry limit", "type": "integer", - "minimum": -1, - "maximum": 100 + "maximum": 255, + "minimum": 0 }, - "whix_log_interval_t": { - "title": "WHIX Log Interval", + "bandwidth_t": { + "title": "Radio Bandwidth", + "type": "string", + "enum": [ + "Auto", + "20MHz", + "40MHz", + "80MHz", + "160MHz", + "80_80MHz", + "320MHz" + ] + }, + "basic_rate_t": { + "title": "basic rate", "type": "integer", - "minimum": 300, - "maximum": 3600 + "maximum": 3, + "minimum": 1 }, - "whix_ch_utility_log_interval_t": { - "title": "whix ch utility log interval", + "beacon_interval_t": { + "title": "beacon interval", "type": "integer", - "minimum": 5, - "maximum": 3600 + "maximum": 3500, + "minimum": 100 }, "channel_t": { "title": "Channel", - "type": "unsigned_int", - "minimum": 0, - "maximum": 255 - }, - "rssi_threshold_t": { - "title": "rssi threshold", "type": "integer", - "minimum": -100, - "maximum": -30 - }, - "rts_threshold_t": { - "title": "rts threshold", - "type": "unsigned_int", - "minimum": 0, - "maximum": 2347 - }, - "frag_threshold_t": { - "title": "frag threshold", - "type": "unsigned_int", - "minimum": 256, - "maximum": 2346 - }, - "dtim_interval_t": { - "title": "dtim interval", - "type": "unsigned_int", - "minimum": 0, - "maximum": 255 - }, - "beacon_interval_t": { - "title": "beacon interval", - "type": "unsigned_int", - "minimum": 100, - "maximum": 3500 + "maximum": 255, + "minimum": 0 }, "cts_protection_t": { "title": "cts protection", - "type": "unsigned_int", - "minimum": 0, - "maximum": 1 - }, - "tx_rate_t": { - "title": "tx rate", - "type": "unsigned_int", - "minimum": 1, - "maximum": 9 - }, - "basic_rate_t": { - "title": "basic rate", - "type": "unsigned_int", - "minimum": 1, - "maximum": 3 - }, - "ap_retry_limit_t": { - "title": "ap retry limit", - "type": "unsigned_int", - "minimum": 0, - "maximum": 255 - }, - "rapid_reconnect_max_time_t": { - "title": "rapid reconnect max time", "type": "integer", - "minimum": 15, - "maximum": 1200 + "maximum": 1, + "minimum": 0 }, - "eapol_key_timeout_t": { - "title": "eapol key timeout", - "type": "unsigned_int", - "minimum": 100, - "maximum": 5000 + "dtim_interval_t": { + "title": "dtim interval", + "type": "integer", + "maximum": 255, + "minimum": 0 }, "eap_identity_req_timeout_t": { "title": "eap identity req timeout", - "type": "unsigned_int", - "minimum": 0, - "maximum": 5000 + "type": "integer", + "maximum": 5000, + "minimum": 0 }, "eap_req_timeout_t": { "title": "eap_req_timeout_t", - "type": "unsigned_int", - "minimum": 10, - "maximum": 5000 + "type": "integer", + "maximum": 5000, + "minimum": 10 }, - "bandwidth_t": { - "title": "Radio Bandwidth", + "eapol_key_timeout_t": { + "title": "eapol key timeout", + "type": "integer", + "maximum": 5000, + "minimum": 100 + }, + "encryption_method_t": { + "title": "encryption method", "type": "string", "enum": [ - "Auto", - "20MHz", - "40MHz", - "80MHz", - "160MHz", - "80_80MHz", - "320MHz" + "TKIP", + "AES", + "AES+TKIP" ] }, + "frag_threshold_t": { + "title": "frag threshold", + "type": "integer", + "maximum": 2346, + "minimum": 256 + }, "guard_interval_t": { "title": "guard interval", "type": "string", @@ -174,14 +116,70 @@ "3200nsec" ] }, - "encryption_method_t": { - "title": "encryption method", + "macaddr_t": { + "title": "MAC Address", "type": "string", - "enum": [ - "TKIP", - "AES", - "AES+TKIP" - ] + "maxLength": 17, + "minLength": 17, + "pattern": "^([0-9a-fA-F][0-9a-fA-F]:){5}[0-9a-fA-F][0-9a-fA-F]$" + }, + "rapid_reconnect_max_time_t": { + "title": "rapid reconnect max time", + "type": "integer", + "maximum": 1200, + "minimum": 15 + }, + "rssi_t": { + "title": "RSSI", + "type": "integer", + "maximum": 255, + "minimum": 0 + }, + "rssi_threshold_t": { + "title": "rssi threshold", + "type": "integer", + "maximum": -30, + "minimum": -100 + }, + "rts_threshold_t": { + "title": "rts threshold", + "type": "integer", + "maximum": 2347, + "minimum": 0 + }, + "string": { + "type": "string", + "maximum": 64, + "minimum": 1 + }, + "timestamp_t": { + "title": "Timestamp", + "type": "string", + "format": "date-time" + }, + "tx_rate_t": { + "title": "tx rate", + "type": "integer", + "maximum": 9, + "minimum": 1 + }, + "txpower_t": { + "title": "Tx Power", + "type": "integer", + "maximum": 100, + "minimum": -1 + }, + "whix_ch_utility_log_interval_t": { + "title": "whix ch utility log interval", + "type": "integer", + "maximum": 3600, + "minimum": 5 + }, + "whix_log_interval_t": { + "title": "WHIX Log Interval", + "type": "integer", + "maximum": 3600, + "minimum": 300 }, "wifi_status_t": { "title": "WiFi radio/Vap status information", @@ -198,1582 +196,1317 @@ ] } }, - "Device": { - "WiFi": { - "List_Of_Def": { - "ApplyRadioSettings": { - "type": "boolean", - "writable": true - }, - "ApplyAccessPointSettings": { - "type": "boolean", - "writable": true - }, - "X_CISCO_COM_FactoryReset": { - "type": "boolean", - "writable": true - }, - "X_CISCO_COM_EnableTelnet": { - "type": "boolean", - "writable": true - }, - "X_CISCO_COM_ResetRadios": { - "type": "boolean", - "writable": true - }, - "WiFiStuckDetect": { - "type": "boolean", - "writable": true - }, - "X_RDKCENTRAL-COM_WiFiHost_Sync": { - "type": "boolean", - "writable": true - }, - "2G80211axEnable": { - "type": "boolean", - "writable": true - }, - "X_RDKCENTRAL-COM_PreferPrivate": { - "type": "boolean", - "writable": true - }, - "X_RDKCENTRAL-COM_RapidReconnectIndicationEnable": { - "type": "boolean", - "writable": true - }, - "X_RDKCENTRAL-COM_vAPStatsEnable": { - "type": "boolean", - "writable": true - }, - "FeatureMFPConfig": { - "type": "boolean", - "writable": true - }, - "TxOverflowSelfheal": { - "type": "boolean", - "writable": true - }, - "X_RDK-CENTRAL_COM_ForceDisable": { - "type": "boolean", - "writable": true - }, - "Managed_WiFi_Enabled": { - "type": "boolean", - "writable": true - }, - "X_RDKCENTRAL-COM_EnableRadiusGreyList": { - "type": "boolean", - "writable": true - }, - "X_RDKCENTRAL-COM_EnableHostapdAuthenticator": { - "type": "boolean", - "writable": true - }, - "DFS": { - "type": "boolean", - "writable": true - }, - "Levl": { - "type": "boolean", - "writable": true - }, - "DFSatBootUp": { - "type": "boolean", - "writable": true - }, - "WiFi-Interworking": { - "type": "boolean", - "writable": true - }, - "WiFi-Passpoint": { - "type": "boolean", - "writable": true - }, - "WiFi-OffChannelScan-APP": { - "type": "boolean", - "writable": true - }, - "WiFi-OffChannelScan": { - "type": "boolean", - "writable": true - }, - "WPA3_Personal_Transition": { - "type": "boolean", - "writable": true - }, - "Log_Upload": { - "type": "boolean", - "writable": true - }, - "X_RDKCENTRAL-COM_AssocCountThreshold": { - "type": "int32_t", - "writable": true - }, - "X_RDKCENTRAL-COM_AssocMonitorDuration": { - "type": "int32_t", - "writable": true - }, - "X_RDKCENTRAL-COM_AssocGateTime": { - "type": "int32_t", - "writable": true - }, - "WHIX_LogInterval": { - "type": "whix_log_interval_t", - "writable": true - }, - "WHIX_ChUtility_LogInterval": { - "type": "whix_ch_utility_log_interval_t", - "writable": true - }, - "X_RDKCENTRAL-COM_GoodRssiThreshold": { - "type": "rssi_threshold_t", - "writable": true - }, - "RadioNumberOfEntries": { - "type": "uint32_t", - "writable": false - }, - "SSIDNumberOfEntries": { - "type": "uint32_t", - "writable": false - }, - "AccessPointNumberOfEntries": { - "type": "uint32_t", - "writable": false - }, - "X_CISCO_COM_RadioPower": { - "type": "string", - "writable": true - }, - "X_CISCO_COM_FactoryResetRadioAndAp": { - "type": "string", - "writable": true - }, - "X_RDK_VapData": { - "type": "string", - "writable": true - }, - "X_RDK_RadioData": { - "type": "string", - "writable": true - }, - "X_RDKCENTRAL-COM_WiFi_Notification": { - "type": "string", - "writable": true - }, - "X_RDKCENTRAL-COM_Connected-Client": { - "type": "string", - "writable": true - }, - "X_RDKCENTRAL-COM_Br0_Sync": { - "type": "string", - "writable": true - }, - "Status": { - "type": "wifi_status_t", - "writable": true - }, - "X_RDKCENTRAL-COM_GASConfiguration": { - "type": "string", - "writable": true - }, - "Log_Enable": { - "type": "string", - "writable": true - } - }, - "X_RDKCENTRAL-COM_Report":{ - "List_Of_Def": { - "WifiClient": { - "List_Of_Def": { - "Enabled": { - "type": "boolean", - "writable": true - }, - "ReportingPeriod": { - "type": "uint32_t", - "writable": true - }, - "MacAddress": { - "type": "string", - "writable": true - }, - "Schema": { - "type": "string", - "writable": false - }, - "SchemaID": { - "type": "string", - "writable": false - }, - "Default": { - "List_Of_Def": { - "ReportingPeriod": { - "type": "uint32_t", + "properties": { + "Device": { + "type": "object", + "properties": { + "WiFi": { + "type": "object", + "properties": { + "2G80211axEnable": { + "type": "boolean", + "writable": true + }, + "AccessPoint": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Alias": { + "type": "string", + "writable": false + }, + "AssociatedDevice": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Active": { + "type": "boolean", + "writable": false + }, + "AuthenticationState": { + "type": "boolean", + "writable": false + }, + "LastDataDownlinkRate": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "LastDataUplinkRate": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "MACAddress": { + "$ref": "#/definitions/macaddr_t", + "writable": false + }, + "Retransmissions": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "SignalStrength": { + "$ref": "#/definitions/rssi_t", + "writable": false + }, + "X_COMCAST-COM_AuthenticationFailures": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_BytesReceived": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_BytesSent": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_DataFramesSentAck": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_DataFramesSentNoAck": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_Disassociations": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_InterferenceSources": { + "type": "string", + "writable": false + }, + "X_COMCAST-COM_MaxRSSI": { + "$ref": "#/definitions/int32_t", + "writable": false + }, + "X_COMCAST-COM_MinRSSI": { + "$ref": "#/definitions/int32_t", + "writable": false + }, + "X_COMCAST-COM_OperatingChannelBandwidth": { + "type": "string", + "writable": false + }, + "X_COMCAST-COM_OperatingStandard": { + "type": "string", + "writable": false + }, + "X_COMCAST-COM_RSSI": { + "$ref": "#/definitions/int32_t", + "writable": false + }, + "X_COMCAST-COM_SNR": { + "$ref": "#/definitions/int32_t", + "writable": false + }, + "X_RDK_CapSpaStr": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_RDKCENTRAL-COM_SNR": { + "$ref": "#/definitions/int32_t", + "writable": false + } + } + } + }, + "AssociatedDeviceNumberOfEntries": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "Connected_Building_Enabled": { + "type": "boolean", "writable": true }, - "OverrideTTL": { - "type": "uint32_t", + "ConnectionControl": { + "type": "object", + "properties": { + "ClientDenyAssociation": { + "type": "string", + "writable": true + }, + "ClientForceDisassociation": { + "type": "string", + "writable": true + }, + "PostAssocDisc": { + "type": "object", + "properties": { + "CuThreshold": { + "type": "string", + "writable": true + }, + "CuThresholdSupported": { + "type": "string", + "writable": false + }, + "RssiUpThreshold": { + "type": "string", + "writable": true + }, + "RssiUpThresholdSupported": { + "type": "string", + "writable": false + }, + "SamplingCount": { + "type": "string", + "writable": true + }, + "SamplingCountSupported": { + "type": "string", + "writable": false + }, + "SamplingInterval": { + "type": "string", + "writable": true + }, + "SamplingIntervalSupported": { + "type": "string", + "writable": false + }, + "SnrThreshold": { + "type": "string", + "writable": true + }, + "SnrThresholdSupported": { + "type": "string", + "writable": false + } + } + }, + "PreAssocDeny": { + "type": "object", + "properties": { + "6GOpInfoMinRate": { + "type": "string", + "writable": true + }, + "BasicDataTransmitRates": { + "type": "string", + "writable": true + }, + "CuThreshold": { + "type": "string", + "writable": true + }, + "CuThresholdSupported": { + "type": "string", + "writable": false + }, + "MinimumAdvertisedMCS": { + "type": "string", + "writable": true + }, + "OperationalDataTransmitRates": { + "type": "string", + "writable": true + }, + "RssiUpThreshold": { + "type": "string", + "writable": true + }, + "RssiUpThresholdSupported": { + "type": "string", + "writable": false + }, + "SnrThreshold": { + "type": "string", + "writable": true + }, + "SnrThresholdSupported": { + "type": "string", + "writable": false + }, + "SupportedDataTransmitRates": { + "type": "string", + "writable": true + } + } + } + } + }, + "Enable": { + "type": "boolean", "writable": true - } - } - } - } - } - } - }, - "X_RDKCENTRAL-COM_Syndication":{ - "List_Of_Def": { - "WiFiRegion": { - "List_Of_Def": { - "Code": { - "type": "string", - "writable": true - } - } - } - } - }, - "Radio": { - "Num_Of_Objects": 3, - "List_Of_Def": [ - { - "Enable": { - "type": "boolean", - "writable": true - } - }, - { - "AutoChannelSupported": { - "type": "boolean", - "writable": false - } - }, - { - "AutoChannelEnable": { - "type": "boolean", - "writable": true - } - }, - { - "IEEE80211hSupported": { - "type": "boolean", - "writable": false - } - }, - { - "IEEE80211hEnabled": { - "type": "boolean", - "writable": true - } - }, - { - "X_CISCO_COM_FrameBurst": { - "type": "boolean", - "writable": true - } - }, - { - "X_CISCO_COM_APIsolation": { - "type": "boolean", - "writable": true - } - }, - { - "X_CISCO_COM_ApplySetting": { - "type": "boolean", - "writable": true - } - }, - { - "X_COMCAST_COM_DFSSupport": { - "type": "boolean", - "writable": false - } - }, - { - "X_COMCAST_COM_DFSEnable": { - "type": "boolean", - "writable": true - } - }, - { - "X_COMCAST-COM_DCSEnable": { - "type": "boolean", - "writable": true - } - }, - { - "X_COMCAST-COM_RtsThresholdSupported": { - "type": "boolean", - "writable": false - } - }, - { - "X_RDK_EcoPowerDown": { - "type": "boolean", - "writable": true - } - }, - { - "MCS": { - "type": "int32_t", - "writable": true - } - }, - { - "X_RDKCENTRAL-COM_clientInactivityTimeout": { - "type": "int32_t", - "writable": false - } - }, - { - "TransmitPower": { - "type": "txpower_t", - "writable": true - } - }, - { - "AutoChannelRefreshPeriod": { - "type": "uint32_t", - "writable": true - } - }, - { - "Channel": { - "type": "channel_t", - "writable": true - } - }, - { - "X_CISCO_COM_RTSThreshold": { - "type": "rts_threshold_t", - "writable": true - } - }, - { - "X_CISCO_COM_FragmentationThreshold": { - "type": "frag_threshold_t", - "writable": true - } - }, - { - "X_CISCO_COM_DTIMInterval": { - "type": "dtim_interval_t", - "writable": true - } - }, - { - "X_COMCAST-COM_BeaconInterval": { - "type": "beacon_interval_t", - "writable": true - } - }, - { - "BeaconPeriod": { - "type": "beacon_interval_t", - "writable": true - } - }, - { - "X_CISCO_COM_CTSProtectionMode": { - "type": "cts_protection_t", - "writable": true - } - }, - { - "X_CISCO_COM_TxRate": { - "type": "tx_rate_t", - "writable": false - } - }, - { - "X_CISCO_COM_BasicRate": { - "type": "basic_rate_t", - "writable": false - } - }, - { - "X_RDKCENTRAL-COM_ChannelUtilThreshold": { - "type": "uint32_t", - "writable": false - } - }, - { - "X_RDKCENTRAL-COM_ChanUtilSelfHealEnable": { - "type": "uint32_t", - "writable": false - } - }, - { - "RadioResetCount": { - "type": "uint32_t", - "writable": false - } - }, - { - "ExtensionChannel": { - "type": "uint32_t", - "writable": true - } - }, - { - "Alias": { - "type": "string", - "writable": true - } - }, - { - "Status": { - "type": "wifi_status_t", - "writable": false - } - }, - { - "Name": { - "type": "string", - "writable": false - } - }, - { - "SupportedFrequencyBands": { - "type": "string", - "writable": false - } - }, - { - "OperatingFrequencyBand": { - "type": "string", - "writable": false - } - }, - { - "SupportedStandards": { - "type": "string", - "writable": false - } - }, - { - "OperatingStandards": { - "type": "string", - "writable": true - } - }, - { - "PossibleChannels": { - "type": "string", - "writable": false - } - }, - { - "OperatingChannelBandwidth": { - "type": "bandwidth_t", - "writable": true - } - }, - { - "GuardInterval": { - "type": "guard_interval_t", - "writable": true - } - }, - { - "TransmitPowerSupported": { - "type": "string", - "writable": false - } - }, - { - "RegulatoryDomain": { - "type": "string", - "writable": true - } - }, - { - "BasicDataTransmitRates": { - "type": "string", - "writable": true - } - }, - { - "SupportedDataTransmitRates": { - "type": "string", - "writable": false - } - }, - { - "OperationalDataTransmitRates": { - "type": "string", - "writable": true - } - }, - { - "X_CISCO_COM_ApChannelScan": { - "type": "string", - "writable": false - } - }, - { - "ChannelsInUse": { - "type": "string", - "writable": false - } - } - ] - }, - "AccessPoint": { - "Num_Of_Objects": 24, - "List_Of_Def": [ - { - "Enable": { - "type": "boolean", - "writable": true - } - }, - { - "WMMCapability": { - "type": "boolean", - "writable": false - } - }, - { - "UAPSDCapability": { - "type": "boolean", - "writable": false - } - }, - { - "WMMEnable": { - "type": "boolean", - "writable": true - } - }, - { - "UAPSDEnable": { - "type": "boolean", - "writable": true - } - }, - { - "IsolationEnable": { - "type": "boolean", - "writable": true - } - }, - { - "X_CISCO_COM_BssCountStaAsCpe": { - "type": "boolean", - "writable": true - } - }, - { - "X_CISCO_COM_BssHotSpot": { - "type": "boolean", - "writable": true - } - }, - { - "SSIDAdvertisementEnabled": { - "type": "boolean", - "writable": true - } - }, - { - "X_CISCO_COM_KickAssocDevices": { - "type": "boolean", - "writable": true - } - }, - { - "X_RDKCENTRAL-COM_InterworkingServiceCapability": { - "type": "boolean", - "writable": false - } - }, - { - "X_RDKCENTRAL-COM_InterworkingServiceEnable": { - "type": "boolean", - "writable": true - } - }, - { - "X_RDKCENTRAL-COM_InterworkingApplySettings": { - "type": "boolean", - "writable": true - } - }, - { - "X_RDKCENTRAL-COM_rapidReconnectCountEnable": { - "type": "boolean", - "writable": true - } - }, - { - "X_RDKCENTRAL-COM_StatsEnable": { - "type": "boolean", - "writable": true - } - }, - { - "X_RDKCENTRAL-COM_WirelessManagementImplemented": { - "type": "boolean", - "writable": false - } - }, - { - "X_RDKCENTRAL-COM_BSSTransitionImplemented": { - "type": "boolean", - "writable": false - } - }, - { - "X_RDKCENTRAL-COM_BSSTransitionActivated": { - "type": "boolean", - "writable": true - } - }, - { - "X_RDKCENTRAL-COM_NeighborReportActivated": { - "type": "boolean", - "writable": true - } - }, - { - "Connected_Building_Enabled": { - "type": "boolean", - "writable": true - } - }, - { - "X_RDKCENTRAL-COM_HostapMgtFrameCtrl": { - "type": "boolean", - "writable": true - } - }, - { - "X_CISCO_COM_WmmNoAck": { - "type": "int32_t", - "writable": true - } - }, - { - "X_CISCO_COM_MulticastRate": { - "type": "int32_t", - "writable": true - } - }, - { - "X_CISCO_COM_BssMaxNumSta": { - "type": "int32_t", - "writable": true - } - }, - { - "X_CISCO_COM_BssUserStatus": { - "type": "int32_t", - "writable": false - } - }, - { - "X_RDKCENTRAL-COM_ManagementFramePowerControl": { - "type": "int32_t", - "writable": true - } - }, - { - "X_RDKCENTRAL-COM_rapidReconnectMaxTime": { - "type": "rapid_reconnect_max_time_t", - "writable": true - } - }, - { - "AssociatedDeviceNumberOfEntries": { - "type": "uint32_t", - "writable": false - } - }, - { - "MaxAssociatedDevices": { - "type": "uint32_t", - "writable": true - } - }, - { - "X_COMCAST-COM_AssociatedDevicesHighWatermarkThreshold": { - "type": "uint32_t", - "writable": true - } - }, - { - "X_COMCAST-COM_AssociatedDevicesHighWatermarkThresholdReached": { - "type": "uint32_t", - "writable": false - } - }, - { - "X_COMCAST-COM_AssociatedDevicesHighWatermark": { - "type": "uint32_t", - "writable": false - } - }, - { - "X_COMCAST-COM_AssociatedDevicesHighWatermarkDate": { - "type": "uint32_t", - "writable": false - } - }, - { - "X_COMCAST-COM_TXOverflow": { - "type": "uint32_t", - "writable": false - } - }, - { - "RetryLimit": { - "type": "ap_retry_limit_t", - "writable": true - } - }, - { - "X_CISCO_COM_LongRetryLimit": { - "type": "ap_retry_limit_t", - "writable": true - } - }, - { - "X_CISCO_COM_MacFilterTableNumberOfEntries": { - "type": "uint32_t", - "writable": false - } - }, - { - "Status": { - "type": "wifi_status_t", - "writable": false - } - }, - { - "Alias": { - "type": "string", - "writable": false - } - }, - { - "SSIDReference": { - "type": "string", - "writable": false - } - }, - { - "X_RDKCENTRAL-COM_BeaconRate": { - "type": "string", - "writable": true - } - }, - { - "X_COMCAST-COM_MAC_FilteringMode": { - "type": "string", - "writable": false - } - }, - { - "X_RDKCENTRAL-COM_InterworkingElement": { - "List_Of_Def": { - "Internet": { - "type": "boolean", - "writable": true - }, - "ASRA": { - "type": "boolean", - "writable": true - }, - "ESR": { - "type": "boolean", - "writable": true - }, - "UESA": { - "type": "boolean", - "writable": true - }, - "HESSOptionPresent": { - "type": "boolean", - "writable": true - }, - "AccessNetworkType": { - "type": "uint32_t", - "writable": true - }, - "VenueInfo.Group": { - "type": "uint32_t", - "writable": true - }, - "VenueInfo.Type": { - "type": "uint32_t", - "writable": true - }, - "HESSID": { - "type": "string", - "writable": true - } - } - } - }, - { - "X_CISCO_COM_MACFilter": { - "List_Of_Def": { - "Enable": { - "type": "boolean", - "writable": true - }, - "FilterAsBlackList": { - "type": "boolean", - "writable": true - } - } - } - }, - { - "Security": { - "List_Of_Def": { - "X_RDKCENTRAL-COM_TransitionDisable": { - "type": "boolean", - "writable": true - }, - "Reset": { - "type": "boolean", - "writable": true - }, - "X_CISCO_COM_RadiusReAuthInterval": { - "type": "int32_t", - "writable": true - }, - "X_CISCO_COM_DefaultKey": { - "type": "int32_t", - "writable": true - }, - "RekeyingInterval": { - "type": "uint32_t", - "writable": true - }, - "RadiusServerPort": { - "type": "uint32_t", - "writable": true - }, - "SecondaryRadiusServerPort": { - "type": "uint32_t", - "writable": true - }, - "RadiusDASPort": { - "type": "uint32_t", - "writable": true - }, - "X_CISCO_COM_WEPKey64BitNumberOfEntries": { - "type": "uint32_t", - "writable": false - }, - "X_CISCO_COM_WEPKey128BitNumberOfEntries": { - "type": "uint32_t", - "writable": false - }, - "ModesSupported": { - "type": "string", - "writable": false - }, - "ModeEnabled": { - "type": "string", - "writable": true - }, - "WEPKey": { - "type": "string", - "writable": true - }, - "X_CISCO_COM_WEPKey": { - "type": "string", - "writable": true - }, - "X_COMCAST-COM_WEPKey": { - "type": "string", - "writable": true - }, - "PreSharedKey": { - "type": "string", - "writable": true - }, - "KeyPassphrase":{ - "type": "string", - "writable": true - }, - "SAEPassphrase":{ - "type": "string", - "writable": true - }, - "X_COMCAST-COM_DefaultKeyPassphrase":{ - "type": "string", - "writable": false - }, - "X_COMCAST-COM_KeyPassphrase":{ - "type": "string", - "writable": true - }, - "X_CISCO_COM_EncryptionMethod":{ - "type": "encryption_method_t", - "writable": true - }, - "RadiusServerIPAddr":{ - "type": "string", - "writable": true - }, - "RadiusSecret":{ - "type": "string", - "writable": true - }, - "SecondaryRadiusServerIPAddr":{ - "type": "string", - "writable": true - }, - "SecondaryRadiusSecret":{ - "type": "string", - "writable": true - }, - "RadiusDASIPAddr":{ - "type": "string", - "writable": true - }, - "RadiusDASSecret":{ - "type": "string", - "writable": true - }, - "MFPConfig":{ - "type": "string", - "writable": true - }, - "X_COMCAST-COM_RadiusSettings": { - "List_Of_Def": { - "PMKCaching": { - "type": "boolean", - "writable": true - }, - "RadiusServerRetries": { - "type": "int32_t", - "writable": true - }, - "RadiusServerRequestTimeout": { - "type": "int32_t", - "writable": true - }, - "PMKLifetime": { - "type": "int32_t", - "writable": true - }, - "PMKCacheInterval": { - "type": "int32_t", - "writable": true - }, - "MaxAuthenticationAttempts": { - "type": "int32_t", - "writable": true - }, - "BlacklistTableTimeout": { - "type": "int32_t", - "writable": true - }, - "IdentityRequestRetryInterval": { - "type": "int32_t", - "writable": true - }, - "QuietPeriodAfterFailedAuthentication": { - "type": "int32_t", - "writable": true + }, + "IsolationEnable": { + "type": "boolean", + "writable": true + }, + "MaxAssociatedDevices": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "RetryLimit": { + "$ref": "#/definitions/ap_retry_limit_t", + "writable": true + }, + "Security": { + "type": "object", + "properties": { + "KeyPassphrase": { + "type": "string", + "writable": true + }, + "MFPConfig": { + "type": "string", + "writable": true + }, + "ModeEnabled": { + "type": "string", + "writable": true + }, + "ModesSupported": { + "type": "string", + "writable": false + }, + "PreSharedKey": { + "type": "string", + "writable": true + }, + "RadiusDASIPAddr": { + "type": "string", + "writable": true + }, + "RadiusDASPort": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "RadiusDASSecret": { + "type": "string", + "writable": true + }, + "RadiusSecret": { + "type": "string", + "writable": true + }, + "RadiusServerIPAddr": { + "type": "string", + "writable": true + }, + "RadiusServerPort": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "RekeyingInterval": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "Reset": { + "type": "boolean", + "writable": true + }, + "SAEPassphrase": { + "type": "string", + "writable": true + }, + "SecondaryRadiusSecret": { + "type": "string", + "writable": true + }, + "SecondaryRadiusServerIPAddr": { + "type": "string", + "writable": true + }, + "SecondaryRadiusServerPort": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "WEPKey": { + "type": "string", + "writable": true + }, + "X_CISCO_COM_DefaultKey": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_CISCO_COM_EncryptionMethod": { + "$ref": "#/definitions/encryption_method_t", + "writable": true + }, + "X_CISCO_COM_RadiusReAuthInterval": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_CISCO_COM_WEPKey": { + "type": "string", + "writable": true + }, + "X_CISCO_COM_WEPKey128BitNumberOfEntries": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_CISCO_COM_WEPKey64BitNumberOfEntries": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_DefaultKeyPassphrase": { + "type": "string", + "writable": false + }, + "X_COMCAST-COM_KeyPassphrase": { + "type": "string", + "writable": true + }, + "X_COMCAST-COM_RadiusSettings": { + "type": "object", + "properties": { + "BlacklistTableTimeout": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "IdentityRequestRetryInterval": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "MaxAuthenticationAttempts": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "PMKCacheInterval": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "PMKCaching": { + "type": "boolean", + "writable": true + }, + "PMKLifetime": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "QuietPeriodAfterFailedAuthentication": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "RadiusServerRequestTimeout": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "RadiusServerRetries": { + "$ref": "#/definitions/int32_t", + "writable": true + } + } + }, + "X_COMCAST-COM_WEPKey": { + "type": "string", + "writable": true + }, + "X_RDKCENTRAL-COM_Authenticator": { + "type": "object", + "properties": { + "EAPIdentityRequestRetries": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "EAPIdentityRequestTimeout": { + "$ref": "#/definitions/eap_identity_req_timeout_t", + "writable": true + }, + "EAPOLKeyRetries": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "EAPOLKeyTimeout": { + "$ref": "#/definitions/eapol_key_timeout_t", + "writable": true + }, + "EAPRequestRetries": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "EAPRequestTimeout": { + "$ref": "#/definitions/eap_req_timeout_t", + "writable": true + } + } + }, + "X_RDKCENTRAL-COM_TransitionDisable": { + "type": "boolean", + "writable": true + } } - } - }, - "X_RDKCENTRAL-COM_Authenticator": { - "List_Of_Def": { - "EAPOLKeyTimeout": { - "type": "eapol_key_timeout_t", - "writable": true - }, - "EAPOLKeyRetries": { - "type": "uint32_t", - "writable": true - }, - "EAPIdentityRequestTimeout": { - "type": "eap_identity_req_timeout_t", - "writable": true - }, - "EAPIdentityRequestRetries": { - "type": "uint32_t", - "writable": true - }, - "EAPRequestTimeout": { - "type": "eap_req_timeout_t", - "writable": true - }, - "EAPRequestRetries": { - "type": "uint32_t", - "writable": true + }, + "SSIDAdvertisementEnabled": { + "type": "boolean", + "writable": true + }, + "SSIDReference": { + "type": "string", + "writable": false + }, + "Status": { + "$ref": "#/definitions/wifi_status_t", + "writable": false + }, + "UAPSDCapability": { + "type": "boolean", + "writable": false + }, + "UAPSDEnable": { + "type": "boolean", + "writable": true + }, + "WMMCapability": { + "type": "boolean", + "writable": false + }, + "WMMEnable": { + "type": "boolean", + "writable": true + }, + "WPS": { + "type": "object", + "properties": { + "ConfigMethodsEnabled": { + "type": "string", + "writable": true + }, + "ConfigMethodsSupported": { + "type": "string", + "writable": false + }, + "Enable": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_ActivatePushButton": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_CancelSession": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_ClientPin": { + "type": "string", + "writable": true + }, + "X_CISCO_COM_Pin": { + "type": "string", + "writable": false + }, + "X_CISCO_COM_WpsPushButton": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_Comcast_com_Configured": { + "type": "boolean", + "writable": false + } + } + }, + "X_CISCO_COM_BssCountStaAsCpe": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_BssHotSpot": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_BssMaxNumSta": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_CISCO_COM_BssUserStatus": { + "$ref": "#/definitions/int32_t", + "writable": false + }, + "X_CISCO_COM_KickAssocDevices": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_LongRetryLimit": { + "$ref": "#/definitions/ap_retry_limit_t", + "writable": true + }, + "X_CISCO_COM_MACFilter": { + "type": "object", + "properties": { + "Enable": { + "type": "boolean", + "writable": true + }, + "FilterAsBlackList": { + "type": "boolean", + "writable": true + } + } + }, + "X_CISCO_COM_MacFilterTable": { + "type": "array", + "items": { + "type": "object", + "properties": { + "DeviceName": { + "type": "string", + "writable": true + }, + "MACAddress": { + "$ref": "#/definitions/macaddr_t", + "writable": true + } + } + } + }, + "X_CISCO_COM_MacFilterTableNumberOfEntries": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_CISCO_COM_MulticastRate": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_CISCO_COM_WmmNoAck": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_COMCAST-COM_AssociatedDevicesHighWatermark": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_AssociatedDevicesHighWatermarkDate": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_AssociatedDevicesHighWatermarkThreshold": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "X_COMCAST-COM_AssociatedDevicesHighWatermarkThresholdReached": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_COMCAST-COM_MAC_FilteringMode": { + "type": "string", + "writable": false + }, + "X_COMCAST-COM_TXOverflow": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "X_RDKCENTRAL-COM_BeaconRate": { + "type": "string", + "writable": true + }, + "X_RDKCENTRAL-COM_BSSTransitionActivated": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_BSSTransitionImplemented": { + "type": "boolean", + "writable": false + }, + "X_RDKCENTRAL-COM_HostapMgtFrameCtrl": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_InterworkingApplySettings": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_InterworkingElement": { + "type": "object", + "properties": { + "AccessNetworkType": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "ASRA": { + "type": "boolean", + "writable": true + }, + "ESR": { + "type": "boolean", + "writable": true + }, + "HESSID": { + "type": "string", + "writable": true + }, + "HESSOptionPresent": { + "type": "boolean", + "writable": true + }, + "Internet": { + "type": "boolean", + "writable": true + }, + "UESA": { + "type": "boolean", + "writable": true + }, + "VenueInfo.Group": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "VenueInfo.Type": { + "$ref": "#/definitions/uint32_t", + "writable": true + } } - } - } - } - } - }, - { - "ConnectionControl": { - "List_Of_Def": { - "ClientForceDisassociation": { - "type": "string", - "writable": true - }, - "ClientDenyAssociation": { - "type": "string", - "writable": true - }, - "PreAssocDeny":{ - "List_Of_Def": { - "RssiUpThresholdSupported": { - "type": "string", - "writable": false - }, - "RssiUpThreshold": { - "type": "string", - "writable": true - }, - "SnrThresholdSupported": { - "type": "string", - "writable": false - }, - "SnrThreshold": { - "type": "string", - "writable": true - }, - "CuThresholdSupported": { - "type": "string", - "writable": false - }, - "CuThreshold": { - "type": "string", - "writable": true - }, - "BasicDataTransmitRates": { - "type": "string", - "writable": true - }, - "OperationalDataTransmitRates": { - "type": "string", - "writable": true - }, - "SupportedDataTransmitRates": { - "type": "string", - "writable": true - }, - "MinimumAdvertisedMCS": { - "type": "string", - "writable": true - }, - "6GOpInfoMinRate": { - "type": "string", - "writable": true + }, + "X_RDKCENTRAL-COM_InterworkingService": { + "type": "object", + "properties": { + "Parameters": { + "type": "string", + "writable": true + } } - } - }, - "PostAssocDisc": { - "List_Of_Def": { - "RssiUpThresholdSupported": { - "type": "string", - "writable": false - }, - "RssiUpThreshold": { - "type": "string", - "writable": true - }, - "SamplingIntervalSupported": { - "type": "string", + }, + "X_RDKCENTRAL-COM_InterworkingServiceCapability": { + "type": "boolean", + "writable": false + }, + "X_RDKCENTRAL-COM_InterworkingServiceEnable": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_ManagementFramePowerControl": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_RDKCENTRAL-COM_NeighborReportActivated": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_Passpoint": { + "type": "object", + "properties": { + "Capability": { + "type": "boolean", "writable": false - }, - "SamplingInterval": { - "type": "string", - "writable": true - }, - "SnrThresholdSupported": { - "type": "string", - "writable": false - }, - "SnrThreshold": { - "type": "string", - "writable": true - }, - "SamplingCountSupported": { - "type": "string", - "writable": false - }, - "SamplingCount": { - "type": "string", - "writable": true - }, - "CuThresholdSupported": { - "type": "string", - "writable": false - }, - "CuThreshold": { - "type": "string", - "writable": true + }, + "Enable": { + "type": "boolean", + "writable": true + }, + "Parameters": { + "type": "string", + "writable": true + }, + "Stats": { + "type": "string", + "writable": false + }, + "WANMetrics": { + "type": "string", + "writable": false + } } + }, + "X_RDKCENTRAL-COM_rapidReconnectCountEnable": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_rapidReconnectMaxTime": { + "$ref": "#/definitions/rapid_reconnect_max_time_t", + "writable": true + }, + "X_RDKCENTRAL-COM_StatsEnable": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_WirelessManagementImplemented": { + "type": "boolean", + "writable": false } } } - } - }, - { - "WPS": { - "List_Of_Def": { - "Enable": { - "type": "boolean", - "writable": true - }, - "X_CISCO_COM_ActivatePushButton": { - "type": "boolean", - "writable": true - }, - "X_Comcast_com_Configured": { - "type": "boolean", - "writable": false - }, - "X_CISCO_COM_CancelSession": { - "type": "boolean", - "writable": true - }, - "X_CISCO_COM_WpsPushButton": { - "type": "int32_t", - "writable": true - }, - "ConfigMethodsSupported": { - "type": "string", - "writable": false - }, - "ConfigMethodsEnabled": { - "type": "string", - "writable": true - }, - "X_CISCO_COM_Pin": { - "type": "string", - "writable": false - }, - "X_CISCO_COM_ClientPin": { - "type": "string", - "writable": true - } - } - } - }, - { - "X_RDKCENTRAL-COM_InterworkingService": { - "List_Of_Def": { - "Parameters": { + }, + "AccessPointNumberOfEntries": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "ApplyAccessPointSettings": { + "type": "boolean", + "writable": true + }, + "ApplyRadioSettings": { + "type": "boolean", + "writable": true + }, + "DFS": { + "type": "boolean", + "writable": true + }, + "DFSatBootUp": { + "type": "boolean", + "writable": true + }, + "FeatureMFPConfig": { + "type": "boolean", + "writable": true + }, + "Levl": { + "type": "boolean", + "writable": true + }, + "Log_Enable": { + "type": "string", + "writable": true + }, + "Log_Upload": { + "type": "boolean", + "writable": true + }, + "Managed_WiFi_Enabled": { + "type": "boolean", + "writable": true + }, + "NeighboringWiFiDiagnostic": { + "type": "object", + "properties": { + "DiagnosticsState": { "type": "string", "writable": true - } - } - } - }, - { - "X_RDKCENTRAL-COM_Passpoint": { - "List_Of_Def": { - "Capability": { - "type": "boolean", - "writable": false }, "Enable": { "type": "boolean", "writable": true }, - "Parameters": { - "type": "string", - "writable": true - }, - "WANMetrics": { - "type": "string", - "writable": false + "Result": { + "type": "array", + "items": { + "type": "object", + "properties": { + "BasicDataTransferRates": { + "type": "string", + "writable": false + }, + "BeaconPeriod": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "BSSID": { + "type": "string", + "writable": false + }, + "Channel": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "DTIMPeriod": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "EncryptionMode": { + "type": "string", + "writable": false + }, + "Mode": { + "type": "string", + "writable": false + }, + "Noise": { + "$ref": "#/definitions/int32_t", + "writable": false + }, + "OperatingChannelBandwidth": { + "type": "string", + "writable": false + }, + "OperatingFrequencyBand": { + "type": "string", + "writable": false + }, + "OperatingStandards": { + "type": "string", + "writable": false + }, + "Radio": { + "type": "string", + "writable": false + }, + "SecurityModeEnabled": { + "type": "string", + "writable": false + }, + "SignalStrength": { + "$ref": "#/definitions/rssi_t", + "writable": false + }, + "SSID": { + "type": "string", + "writable": false + }, + "SupportedDataTransferRates": { + "type": "string", + "writable": false + }, + "SupportedStandards": { + "type": "string", + "writable": false + }, + "X_COMCAST-COM_ChannelUtilization": { + "$ref": "#/definitions/uint32_t", + "writable": false + } + } + } }, - "Stats": { - "type": "string", + "ResultNumberOfEntries": { + "$ref": "#/definitions/uint32_t", "writable": false } } - } - }, - { - "AssociatedDevice": { - "Num_Of_Objects": 0, - "List_Of_Def": [ - { - "AuthenticationState": { + }, + "Radio": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Alias": { + "type": "string", + "writable": true + }, + "AutoChannelEnable": { + "type": "boolean", + "writable": true + }, + "AutoChannelRefreshPeriod": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "AutoChannelSupported": { "type": "boolean", "writable": false - } - }, - { - "Active": { + }, + "BasicDataTransmitRates": { + "type": "string", + "writable": true + }, + "BeaconPeriod": { + "$ref": "#/definitions/beacon_interval_t", + "writable": true + }, + "Channel": { + "$ref": "#/definitions/channel_t", + "writable": true + }, + "ChannelsInUse": { + "type": "string", + "writable": false + }, + "Enable": { + "type": "boolean", + "writable": true + }, + "ExtensionChannel": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "GuardInterval": { + "$ref": "#/definitions/guard_interval_t", + "writable": true + }, + "IEEE80211hEnabled": { + "type": "boolean", + "writable": true + }, + "IEEE80211hSupported": { "type": "boolean", "writable": false - } - }, - { - "SignalStrength": { - "type": "int32_t", + }, + "MCS": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "Name": { + "type": "string", "writable": false - } - }, - { - "X_COMCAST-COM_SNR": { - "type": "int32_t", + }, + "OperatingChannelBandwidth": { + "$ref": "#/definitions/bandwidth_t", + "writable": true + }, + "OperatingFrequencyBand": { + "type": "string", + "writable": false + }, + "OperatingStandards": { + "type": "string", + "writable": true + }, + "OperationalDataTransmitRates": { + "type": "string", + "writable": true + }, + "PossibleChannels": { + "type": "string", + "writable": false + }, + "RadioResetCount": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "RegulatoryDomain": { + "type": "string", + "writable": true + }, + "Status": { + "$ref": "#/definitions/wifi_status_t", + "writable": false + }, + "SupportedDataTransmitRates": { + "type": "string", "writable": false - } - }, - { - "X_RDKCENTRAL-COM_SNR": { - "type": "int32_t", + }, + "SupportedFrequencyBands": { + "type": "string", "writable": false - } - }, - { - "X_COMCAST-COM_RSSI": { - "type": "int32_t", + }, + "SupportedStandards": { + "type": "string", "writable": false - } - }, - { - "X_COMCAST-COM_MinRSSI": { - "type": "int32_t", + }, + "TransmitPower": { + "$ref": "#/definitions/txpower_t", + "writable": true + }, + "TransmitPowerSupported": { + "type": "string", "writable": false - } - }, - { - "X_COMCAST-COM_MaxRSSI": { - "type": "int32_t", + }, + "X_CISCO_COM_ApChannelScan": { + "type": "string", "writable": false - } - }, - { - "LastDataDownlinkRate": { - "type": "uint32_t", + }, + "X_CISCO_COM_APIsolation": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_ApplySetting": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_BasicRate": { + "$ref": "#/definitions/basic_rate_t", "writable": false - } - }, - { - "LastDataUplinkRate": { - "type": "uint32_t", + }, + "X_CISCO_COM_CTSProtectionMode": { + "$ref": "#/definitions/cts_protection_t", + "writable": true + }, + "X_CISCO_COM_DTIMInterval": { + "$ref": "#/definitions/dtim_interval_t", + "writable": true + }, + "X_CISCO_COM_FragmentationThreshold": { + "$ref": "#/definitions/frag_threshold_t", + "writable": true + }, + "X_CISCO_COM_FrameBurst": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_RTSThreshold": { + "$ref": "#/definitions/rts_threshold_t", + "writable": true + }, + "X_CISCO_COM_TxRate": { + "$ref": "#/definitions/tx_rate_t", "writable": false - } - }, - { - "Retransmissions": { - "type": "uint32_t", + }, + "X_COMCAST_COM_DFSEnable": { + "type": "boolean", + "writable": true + }, + "X_COMCAST_COM_DFSSupport": { + "type": "boolean", "writable": false - } - }, - { - "X_COMCAST-COM_DataFramesSentAck": { - "type": "uint32_t", + }, + "X_COMCAST-COM_BeaconInterval": { + "$ref": "#/definitions/beacon_interval_t", + "writable": true + }, + "X_COMCAST-COM_DCSEnable": { + "type": "boolean", + "writable": true + }, + "X_COMCAST-COM_RtsThresholdSupported": { + "type": "boolean", "writable": false - } - }, - { - "X_COMCAST-COM_DataFramesSentNoAck": { - "type": "uint32_t", + }, + "X_RDK_EcoPowerDown": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_ChannelUtilThreshold": { + "$ref": "#/definitions/uint32_t", "writable": false - } - }, - { - "X_COMCAST-COM_BytesSent": { - "type": "uint32_t", + }, + "X_RDKCENTRAL-COM_ChanUtilSelfHealEnable": { + "$ref": "#/definitions/uint32_t", "writable": false - } - }, - { - "X_COMCAST-COM_BytesReceived": { - "type": "uint32_t", + }, + "X_RDKCENTRAL-COM_clientInactivityTimeout": { + "$ref": "#/definitions/int32_t", "writable": false } - }, - { - "X_COMCAST-COM_Disassociations": { - "type": "uint32_t", + } + } + }, + "RadioNumberOfEntries": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "SSID": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Alias": { + "type": "string", "writable": false - } - }, - { - "X_COMCAST-COM_AuthenticationFailures": { - "type": "uint32_t", + }, + "BSSID": { + "$ref": "#/definitions/macaddr_t", "writable": false - } - }, - { - "X_RDK_CapSpaStr": { - "type": "uint32_t", + }, + "Enable": { + "type": "boolean", + "writable": true + }, + "LastChange": { + "$ref": "#/definitions/uint32_t", "writable": false - } - }, - { + }, + "LowerLayers": { + "type": "string", + "writable": false + }, "MACAddress": { - "type": "macaddr_t", + "$ref": "#/definitions/macaddr_t", "writable": false - } - }, - { - "X_COMCAST-COM_OperatingStandard": { + }, + "Name": { "type": "string", "writable": false - } - }, - { - "X_COMCAST-COM_OperatingChannelBandwidth": { + }, + "Repurposed_VapName": { "type": "string", "writable": false - } - }, - { - "X_COMCAST-COM_InterferenceSources": { + }, + "SSID": { "type": "string", + "writable": true + }, + "Status": { + "$ref": "#/definitions/wifi_status_t", "writable": false - } - } - ] - } - }, - { - "X_CISCO_COM_MacFilterTable":{ - "Num_Of_Objects": 0, - "List_Of_Def": [ - { - "MACAddress": { - "type": "macaddr_t", + }, + "X_CISCO_COM_EnableOnline": { + "type": "boolean", "writable": true - } - }, - { - "DeviceName": { - "type": "string", + }, + "X_CISCO_COM_RouterEnabled": { + "type": "boolean", "writable": true + }, + "X_COMCAST-COM_DefaultSSID": { + "type": "string", + "writable": false } } - ] - } - } - ] - }, - "SSID": { - "Num_Of_Objects": 24, - "List_Of_Def": [ - { - "Enable": { + } + }, + "SSIDNumberOfEntries": { + "$ref": "#/definitions/uint32_t", + "writable": false + }, + "Status": { + "$ref": "#/definitions/wifi_status_t", + "writable": true + }, + "TxOverflowSelfheal": { "type": "boolean", "writable": true - } - }, - { - "X_CISCO_COM_EnableOnline": { + }, + "WHIX_ChUtility_LogInterval": { + "$ref": "#/definitions/whix_ch_utility_log_interval_t", + "writable": true + }, + "WHIX_LogInterval": { + "$ref": "#/definitions/whix_log_interval_t", + "writable": true + }, + "WiFi-Interworking": { "type": "boolean", "writable": true - } - }, - { - "X_CISCO_COM_RouterEnabled": { + }, + "WiFi-OffChannelScan": { "type": "boolean", "writable": true - } - }, - { - "LastChange": { - "type": "uint32_t", - "writable": false - } - }, - { - "Status": { - "type": "wifi_status_t", - "writable": false - } - }, - { - "Alias": { + }, + "WiFi-OffChannelScan-APP": { + "type": "boolean", + "writable": true + }, + "WiFi-Passpoint": { + "type": "boolean", + "writable": true + }, + "WiFiStuckDetect": { + "type": "boolean", + "writable": true + }, + "WPA3_Personal_Transition": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_EnableTelnet": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_FactoryReset": { + "type": "boolean", + "writable": true + }, + "X_CISCO_COM_FactoryResetRadioAndAp": { "type": "string", - "writable": false - } - }, - { - "Name": { + "writable": true + }, + "X_CISCO_COM_RadioPower": { "type": "string", - "writable": false - } - }, - { - "LowerLayers": { + "writable": true + }, + "X_CISCO_COM_ResetRadios": { + "type": "boolean", + "writable": true + }, + "X_RDK_RadioData": { "type": "string", - "writable": false - } - }, - { - "BSSID": { - "type": "macaddr_t", - "writable": false - } - }, - { - "MACAddress": { - "type": "macaddr_t", - "writable": false - } - }, - { - "SSID": { + "writable": true + }, + "X_RDK_VapData": { "type": "string", "writable": true - } - }, - { - "X_COMCAST-COM_DefaultSSID": { + }, + "X_RDK-CENTRAL_COM_ForceDisable": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_AssocCountThreshold": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_RDKCENTRAL-COM_AssocGateTime": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_RDKCENTRAL-COM_AssocMonitorDuration": { + "$ref": "#/definitions/int32_t", + "writable": true + }, + "X_RDKCENTRAL-COM_Br0_Sync": { "type": "string", - "writable": false - } - }, - { - "Repurposed_VapName": { + "writable": true + }, + "X_RDKCENTRAL-COM_Connected-Client": { "type": "string", - "writable": false - } - } - ] - }, - "NeighboringWiFiDiagnostic": { - "List_Of_Def": { - "Enable": { - "type": "boolean", - "writable": true - }, - "DiagnosticsState": { - "type": "string", - "writable": true - }, - "ResultNumberOfEntries": { - "type": "uint32_t", - "writable": false - }, - "Result": { - "Num_Of_Objects": 0, - "List_Of_Def": [ - { - "SignalStrength": { - "type": "int32_t", - "writable": false - } - }, - { - "Noise": { - "type": "int32_t", - "writable": false - } - }, - { - "Channel": { - "type": "uint32_t", - "writable": false - } - }, - { - "BeaconPeriod": { - "type": "uint32_t", - "writable": false - } - }, - { - "DTIMPeriod": { - "type": "uint32_t", - "writable": false - } - }, - { - "X_COMCAST-COM_ChannelUtilization": { - "type": "uint32_t", - "writable": false - } - }, - { - "Radio": { - "type": "string", - "writable": false - } - }, - { - "SSID": { - "type": "string", - "writable": false - } - }, - { - "BSSID": { - "type": "string", - "writable": false - } - }, - { - "Mode": { - "type": "string", - "writable": false - } - }, - { - "SecurityModeEnabled": { - "type": "string", - "writable": false - } - }, - { - "EncryptionMode": { - "type": "string", - "writable": false - } - }, - { - "OperatingFrequencyBand": { - "type": "string", - "writable": false - } - }, - { - "SupportedStandards": { - "type": "string", - "writable": false - } - }, - { - "OperatingStandards": { - "type": "string", - "writable": false - } - }, - { - "OperatingChannelBandwidth": { - "type": "string", - "writable": false - } - }, - { - "BasicDataTransferRates": { - "type": "string", - "writable": false + "writable": true + }, + "X_RDKCENTRAL-COM_EnableHostapdAuthenticator": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_EnableRadiusGreyList": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_GASConfiguration": { + "type": "string", + "writable": true + }, + "X_RDKCENTRAL-COM_GoodRssiThreshold": { + "$ref": "#/definitions/rssi_threshold_t", + "writable": true + }, + "X_RDKCENTRAL-COM_PreferPrivate": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_RapidReconnectIndicationEnable": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_Report": { + "type": "object", + "properties": { + "WifiClient": { + "type": "object", + "properties": { + "Default": { + "type": "object", + "properties": { + "OverrideTTL": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "ReportingPeriod": { + "$ref": "#/definitions/uint32_t", + "writable": true + } + } + }, + "Enabled": { + "type": "boolean", + "writable": true + }, + "MacAddress": { + "type": "string", + "writable": true + }, + "ReportingPeriod": { + "$ref": "#/definitions/uint32_t", + "writable": true + }, + "Schema": { + "type": "string", + "writable": false + }, + "SchemaID": { + "type": "string", + "writable": false + } + } } - }, - { - "SupportedDataTransferRates": { - "type": "string", - "writable": false + } + }, + "X_RDKCENTRAL-COM_Syndication": { + "type": "object", + "properties": { + "WiFiRegion": { + "type": "object", + "properties": { + "Code": { + "type": "string", + "writable": true + } + } } } - ] + }, + "X_RDKCENTRAL-COM_vAPStatsEnable": { + "type": "boolean", + "writable": true + }, + "X_RDKCENTRAL-COM_WiFi_Notification": { + "type": "string", + "writable": true + }, + "X_RDKCENTRAL-COM_WiFiHost_Sync": { + "type": "boolean", + "writable": true + } } } } } } -} +} \ No newline at end of file diff --git a/source/core/Makefile.am b/source/core/Makefile.am index 09088fc81..a3067abad 100644 --- a/source/core/Makefile.am +++ b/source/core/Makefile.am @@ -170,7 +170,9 @@ if USE_DML_SOURCES if ONEWIFI_DML_SUPPORT OneWifi_SOURCES += $(top_srcdir)/source/dml/wifi_ssp/ssp_main.c $(top_srcdir)/source/dml/wifi_ssp/ssp_loop.c $(top_srcdir)/source/dml/wifi_ssp/ssp_messagebus_interface.c $(top_srcdir)/source/dml/wifi_ssp/ssp_action.c $(top_srcdir)/source/dml/wifi_ssp/dm_pack_datamodel.c $(top_srcdir)/source/dml/tr_181/sbapi/webpa_interface.c $(top_srcdir)/source/dml/tr_181/sbapi/webpa_interface_without_seshat.c $(top_srcdir)/source/dml/tr_181/sbapi/webpa_interface_with_seshat.c $(top_srcdir)/source/dml/tr_181/sbapi/cosa_dbus_api.c else -OneWifi_SOURCES += $(top_srcdir)/source/platform/common/data_model/wifi_data_model.c $(top_srcdir)/source/platform/common/data_model/wifi_data_model_parse.c $(top_srcdir)/source/platform/common/data_model/wifi_dml_cb.c $(top_srcdir)/source/platform/common/data_model/wifi_dml_api.c +OneWifi_SOURCES += $(top_srcdir)/source/platform/common/data_model/wifi_data_model.c $(top_srcdir)/source/platform/common/data_model/wifi_dml_json_parser.c \ + $(top_srcdir)/source/platform/common/data_model/wifi_dml_cb.c $(top_srcdir)/source/platform/common/data_model/wifi_dml_api.c \ + $(top_srcdir)/source/platform/common/data_model/wfa/wfa_data_model.c $(top_srcdir)/source/platform/common/data_model/wfa/wfa_dml_cb.c #we need this file for new dml implementation OneWifi_SOURCES += $(top_srcdir)/source/dml/dml_webconfig/dml_onewifi_api.c endif diff --git a/source/core/wifi_ctrl.h b/source/core/wifi_ctrl.h index 3ed7309ac..4c13c755d 100644 --- a/source/core/wifi_ctrl.h +++ b/source/core/wifi_ctrl.h @@ -115,6 +115,7 @@ extern "C" { #define LNF 0b1000000 #define BUS_DML_CONFIG_FILE "bus_dml_config.json" +#define BUS_WFA_DML_CONFIG_FILE "Data_Elements_JSON_Schema_v3.0.json" #define CTRL_QUEUE_SIZE_MAX (700 * getNumberRadios()) diff --git a/source/platform/common/data_model/wfa/wfa_data_model.c b/source/platform/common/data_model/wfa/wfa_data_model.c new file mode 100644 index 000000000..1b7b8db17 --- /dev/null +++ b/source/platform/common/data_model/wfa/wfa_data_model.c @@ -0,0 +1,116 @@ +/************************************************************************************ + If not stated otherwise in this file or this component's LICENSE file the + following copyright and licenses apply: + + Copyright 2025 RDK Management + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + **************************************************************************/ + +#include +#include +#include +#include "bus.h" +#include "wifi_data_model.h" +#include "wifi_dml_api.h" +#include "wfa_data_model.h" +#include "wfa_dml_cb.h" +#include "wifi_ctrl.h" + +wfa_dml_data_model_t g_wfa_dml_data_model; + +wfa_dml_data_model_t *get_wfa_dml_data_model_param(void) +{ + return &g_wfa_dml_data_model; +} + +bus_error_t wfa_elem_num_of_table_row(char *event_name, uint32_t *table_row_size) +{ + if (!strncmp(event_name, DE_DEVICE_TABLE, strlen(DE_DEVICE_TABLE) + 1)) { + wifi_util_dbg_print(WIFI_DMCLI,"%s:%d: WFA DataElements table [%s], using default size\n", __func__, __LINE__, event_name); + *table_row_size = 1; + } else { + wifi_util_error_print(WIFI_DMCLI,"%s:%d Table is not found for [%s]\n", __func__, __LINE__, event_name); + return bus_error_invalid_input; + } + return bus_error_success; +} + +static bus_error_t wfa_network_get(char *event_name, raw_data_t *p_data,struct bus_user_data * user_data ) +{ + char extension[64] = {0}; + wifi_global_param_t *pcfg = get_wifidb_wifi_global_param(); + dml_callback_table_t dml_data_cb = { + NULL, NULL, wfa_network_get_param_uint_value, wfa_network_get_param_string_value, + NULL, NULL, NULL, NULL + }; + + sscanf(event_name, DATAELEMS_NETWORK_OBJ ".%s", extension); + + wifi_util_info_print(WIFI_DMCLI,"%s:%d get event:[%s][%s]\n", __func__, __LINE__, event_name, extension); + + bus_error_t status = dml_get_set_param_value(&dml_data_cb, DML_GET_CB, (void *)pcfg, extension, p_data); + if (status != bus_error_success) { + wifi_util_error_print(WIFI_DMCLI,"%s:%d wifi param get failed for:[%s][%s]\r\n", __func__, __LINE__, event_name, extension); + } + + return status; +} + +bus_error_t de_device_table_add_row_handler(char const* tableName, char const* aliasName, uint32_t* instNum) +{ + (void)instNum; + (void)aliasName; + wfa_dml_data_model_t *p_dml_param = get_wfa_dml_data_model_param(); + wifi_util_dbg_print(WIFI_DMCLI,"%s:%d enter\r\n", __func__, __LINE__); + p_dml_param->table_de_device_index++; + *instNum = p_dml_param->table_de_device_index; + wifi_util_dbg_print(WIFI_DMCLI,"%s:%d Added table:%s table_de_device_index:%d-%d\r\n", __func__, + __LINE__, tableName, p_dml_param->table_de_device_index, *instNum); + return bus_error_success; +} + +bus_error_t de_device_table_remove_row_handler(char const* rowName) +{ + wfa_dml_data_model_t *p_dml_param = get_wfa_dml_data_model_param(); + wifi_util_dbg_print(WIFI_DMCLI,"%s:%d enter:%s\r\n", __func__, __LINE__, rowName); + p_dml_param->table_de_device_index--; + return bus_error_success; +} + +/* WFA DataElements callback function pointer mapping */ +int wfa_set_bus_callbackfunc_pointers(const char *full_namespace, bus_callback_table_t *cb_table) +{ + static const bus_data_cb_func_t bus_wfa_data_cb[] = { + /* TR-181 Path + get set + add_row rm_row + event_sub method / sync for tables */ + + /* Device.WiFi.DataElements.Network */ + { DATAELEMS_NETWORK_OBJ, { + wfa_network_get, NULL, + NULL, NULL, + NULL, NULL } + }, + + /* Device.WiFi.DataElements.Network.Device.{i} */ + { DE_DEVICE_TABLE, { + default_get_param_value, default_set_param_value, + de_device_table_add_row_handler, de_device_table_remove_row_handler, + default_event_sub_handler, NULL } + }, + }; + + return set_bus_callbackfunc_pointers(full_namespace, cb_table, bus_wfa_data_cb, ARRAY_SZ(bus_wfa_data_cb)); +} diff --git a/source/platform/common/data_model/wfa/wfa_data_model.h b/source/platform/common/data_model/wfa/wfa_data_model.h new file mode 100644 index 000000000..0ca58ad5e --- /dev/null +++ b/source/platform/common/data_model/wfa/wfa_data_model.h @@ -0,0 +1,430 @@ +/************************************************************************************ + If not stated otherwise in this file or this component's LICENSE file the + following copyright and licenses apply: + + Copyright 2025 RDK Management + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + **************************************************************************/ + +#ifndef WFA_DATA_MODEL_H +#define WFA_DATA_MODEL_H + +#include + +struct yang_to_tr181_map { + const char* yang; + const char* tr181; +}; + +static const struct yang_to_tr181_map g_yang_map[] = { + { "DeviceList", "Device" }, + { "RadioList", "Radio" }, + { "BSSList", "BSS" }, + { "STAList", "STA" }, + { "NetworkSSIDList", "SSID" }, + + { NULL, NULL } // Default case +}; + +#define DATAELEMS_NETWORK_OBJ "Device.WiFi.DataElements.Network" +#define DATAELEMS_NETWORK DATAELEMS_NETWORK_OBJ "." + +#define MAX_INSTANCE_LEN 32 +#define MAX_CAPS_STR_LEN 32 +#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + +/* Device.WiFi.DataElements.Network */ +#define DE_NETWORK_ID DATAELEMS_NETWORK "ID" +#define DE_NETWORK_CTRLID DATAELEMS_NETWORK "ControllerID" +#define DE_NETWORK_COLAGTID DATAELEMS_NETWORK "ColocatedAgentID" +// #define DE_NETWORK_DEVNOE DATAELEMS_NETWORK "DeviceNumberOfEntries"NumberOfDevices +#define DE_NETWORK_DEVNOE DATAELEMS_NETWORK "NumberOfDevices" +#define DE_NETWORK_SETSSID DATAELEMS_NETWORK "SetSSID()" +/* Device.WiFi.DataElements.Network.SSID */ +#define DE_NETWORK_SSID DATAELEMS_NETWORK "SSID.{i}." +#define DE_SSID_TABLE DATAELEMS_NETWORK "SSID.{i}" +#define DE_SSID_SSID DE_NETWORK_SSID "SSID" +#define DE_SSID_BAND DE_NETWORK_SSID "Band" +#define DE_SSID_ENABLE DE_NETWORK_SSID "Enable" +#define DE_SSID_AKMALLOWE DE_NETWORK_SSID "AKMsAllowed" +#define DE_SSID_SUITESEL DE_NETWORK_SSID "SuiteSelector" +#define DE_SSID_ADVENABLED DE_NETWORK_SSID "AdvertisementEnabled" +#define DE_SSID_MFPCONFIG DE_NETWORK_SSID "MFPConfig" +#define DE_SSID_MOBDOMAIN DE_NETWORK_SSID "MobilityDomain" +#define DE_SSID_HAULTYPE DE_NETWORK_SSID "HaulType" +/* Device.WiFi.DataElements.Network.Device */ +#define DE_NETWORK_DEVICE DATAELEMS_NETWORK "Device.{i}." +#define DE_DEVICE_TABLE DATAELEMS_NETWORK "Device.{i}" +#define DE_DEVICE_ID DE_NETWORK_DEVICE "ID" +#define DE_DEVICE_MAPCAP DE_NETWORK_DEVICE "MultiAPCapabilities" +#define DE_DEVICE_NUMRADIO DE_NETWORK_DEVICE "NumberOfRadios" +#define DE_DEVICE_COLLINT DE_NETWORK_DEVICE "CollectionInterval" +#define DE_DEVICE_RUASSOC DE_NETWORK_DEVICE "ReportUnsuccessfulAssociations" +#define DE_DEVICE_MAXRRATE DE_NETWORK_DEVICE "MaxReportingRate" +#define DE_DEVICE_MAPPROF DE_NETWORK_DEVICE "MultiAPProfile" +#define DE_DEVICE_APMERINT DE_NETWORK_DEVICE "APMetricsReportingInterval" +#define DE_DEVICE_MANUFACT DE_NETWORK_DEVICE "Manufacturer" +#define DE_DEVICE_SERIALNO DE_NETWORK_DEVICE "SerialNumber" +#define DE_DEVICE_MFCMODEL DE_NETWORK_DEVICE "ManufacturerModel" +#define DE_DEVICE_SWVERSION DE_NETWORK_DEVICE "SoftwareVersion" +#define DE_DEVICE_EXECENV DE_NETWORK_DEVICE "ExecutionEnv" +#define DE_DEVICE_LSDSTALIST DE_NETWORK_DEVICE "LocalSteeringDisallowedSTAList" +#define DE_DEVICE_BTMSDSTALIST DE_NETWORK_DEVICE "BTMSteeringDisallowedSTAList" +#define DE_DEVICE_MAXVIDS DE_NETWORK_DEVICE "MaxVIDs" +#define DE_DEVICE_BPRIO DE_NETWORK_DEVICE "BasicPrioritization" +#define DE_DEVICE_EPRIO DE_NETWORK_DEVICE "EnhancedPrioritization" +#define DE_DEVICE_DE8021QPVID DE_NETWORK_DEVICE "Default8021Q.PrimaryVID" +#define DE_DEVICE_DE8021QDPCP DE_NETWORK_DEVICE "Default8021Q.DefaultPCP" +#define DE_DEVICE_TSEPPOLI DE_NETWORK_DEVICE "TrafficSeparationPolicy" +#define DE_DEVICE_STVMAP DE_NETWORK_DEVICE "SSIDtoVIDMapping" +#define DE_DEVICE_DSCPM DE_NETWORK_DEVICE "DSCPMap" +#define DE_DEVICE_MAXPRIRULE DE_NETWORK_DEVICE "MaxPrioritizationRules" +#define DE_DEVICE_COUNTRCODE DE_NETWORK_DEVICE "CountryCode" +#define DE_DEVICE_PRIOSUPP DE_NETWORK_DEVICE "PrioritizationSupport" +#define DE_DEVICE_REPINDSCAN DE_NETWORK_DEVICE "ReportIndependentScans" +#define DE_DEVICE_TRASEPALW DE_NETWORK_DEVICE "TrafficSeparationAllowed" +#define DE_DEVICE_SERPRIOALW DE_NETWORK_DEVICE "ServicePrioritizationAllowed" +#define DE_DEVICE_STASDISALW DE_NETWORK_DEVICE "STASteeringDisallowed" +#define DE_DEVICE_DFSENABLE DE_NETWORK_DEVICE "DFSEnable" +#define DE_DEVICE_MAXUSASSOCREPRATE DE_NETWORK_DEVICE "MaxUnsuccessfulAssociationReportingRate" +#define DE_DEVICE_STASSTATE DE_NETWORK_DEVICE "STASteeringState" +#define DE_DEVICE_COORCACALW DE_NETWORK_DEVICE "CoordinatedCACAllowed" +#define DE_DEVICE_CONOPMODE DE_NETWORK_DEVICE "ControllerOperationMode" +#define DE_DEVICE_BHMACADDR DE_NETWORK_DEVICE "BackhaulMACAddress" +#define DE_DEVICE_BHDMACADDR DE_NETWORK_DEVICE "BackhaulDownMACAddress" +#define DE_DEVICE_BHPHYRATE DE_NETWORK_DEVICE "BackhaulPHYRate" +#define DE_DEVICE_TRSEPCAP DE_NETWORK_DEVICE "TrafficSeparationCapability" +#define DE_DEVICE_EASYCCAP DE_NETWORK_DEVICE "EasyConnectCapability" +#define DE_DEVICE_TESTCAP DE_NETWORK_DEVICE "TestCapabilities" +#define DE_DEVICE_BSTAMLDMACLINK DE_NETWORK_DEVICE "bSTAMLDMaxLinks" +#define DE_DEVICE_MACNUMMLDS DE_NETWORK_DEVICE "MaxNumMLDs" +#define DE_DEVICE_BHALID DE_NETWORK_DEVICE "BackhaulALID" +#define DE_DEVICE_TIDLMAP DE_NETWORK_DEVICE "TIDLinkMapping" +#define DE_DEVICE_ASSOCSTAREPINT DE_NETWORK_DEVICE "AssociatedSTAReportingInterval" +#define DE_DEVICE_BHMEDIATYPE DE_NETWORK_DEVICE "BackhaulMediaType" +#define DE_DEVICE_RADIONOE DE_NETWORK_DEVICE "RadioNumberOfEntries" +#define DE_DEVICE_CACSTATNOE DE_NETWORK_DEVICE "CACStatusNumberOfEntries" +#define DE_DEVICE_BHDOWNNOE DE_NETWORK_DEVICE "BackhaulDownNumberOfEntries" +/* Device.WiFi.DataElements.Network.Device.CACStatus */ +#define DE_DEVICE_CACSTAT DE_NETWORK_DEVICE "CACStatus.{i}." +#define DE_CACSTAT_TABLE DE_NETWORK_DEVICE "CACStatus.{i}" +#define DE_CACSTAT_NONOCCNOE DE_DEVICE_CACSTAT "CACNonOccupancyChannelNumberOfEntries" +/* Device.WiFi.DataElements.Network.Device.CACStatus.CACNonOccupancyChannel */ +#define DE_CACSTAT_CACNON DE_DEVICE_CACSTAT "CACNonOccupancyChannel.{i}." +#define DE_CACNON_TABLE DE_DEVICE_CACSTAT "CACNonOccupancyChannel.{i}" +#define DE_CACNON_OPCLASS DE_CACSTAT_CACNON "OpClass" +#define DE_CACNON_CHANNEL DE_CACSTAT_CACNON "Channel" +#define DE_CACNON_SECONDS DE_CACSTAT_CACNON "Seconds" +/* Device.WiFi.DataElements.Network.Device.BackhaulDown */ +#define DE_DEVICE_BHDOWN DE_NETWORK_DEVICE "BackhaulDown.{i}." +#define DE_BHDOWN_TABLE DE_NETWORK_DEVICE "BackhaulDown.{i}" +#define DE_BHDOWN_ALID DE_DEVICE_BHDOWN "BackhaulDownALID" +#define DE_BHDOWN_MACADDR DE_DEVICE_BHDOWN "BackhaulDownMACAddress" +/* Device.WiFi.DataElements.Network.Device.MultiAPDevice */ +#define DE_DEVICE_MAPDEV DE_NETWORK_DEVICE "MultiAPDevice." +/* Device.WiFi.DataElements.Network.Device.MultiAPDevice.Backhaul */ +#define DE_MAPDEV_BACKHAUL DE_DEVICE_MAPDEV "Backhaul." +/* Device.WiFi.DataElements.Network.Device.MultiAPDevice.Backhaul.Stats */ +#define DE_MAPDEVBH_STATS DE_MAPDEV_BACKHAUL "Stats." +#define DE_MDBHSTATS_BYTESSNT DE_MAPDEVBH_STATS "BytesSent" +#define DE_MDBHSTATS_BYTESRCV DE_MAPDEVBH_STATS "BytesReceived" +#define DE_MDBHSTATS_PCKTSSNT DE_MAPDEVBH_STATS "PacketsSent" +#define DE_MDBHSTATS_PCKTSRCV DE_MAPDEVBH_STATS "PacketsReceived" +#define DE_MDBHSTATS_ERRSSNT DE_MAPDEVBH_STATS "ErrorsSent" +#define DE_MDBHSTATS_ERRSRCV DE_MAPDEVBH_STATS "ErrorsReceived" +#define DE_MDBHSTATS_LINKUTIL DE_MAPDEVBH_STATS "LinkUtilization" +#define DE_MDBHSTATS_SIGNALSTR DE_MAPDEVBH_STATS "SignalStrength" +#define DE_MDBHSTATS_LSTDTADLR DE_MAPDEVBH_STATS "LastDataDownlinkRate" +#define DE_MDBHSTATS_LSTDTAULR DE_MAPDEVBH_STATS "LastDataUplinkRate" +/* Device.WiFi.DataElements.Network.Device.Radio */ +#define DE_DEVICE_RADIO DE_NETWORK_DEVICE "Radio.{i}." +#define DE_RADIO_TABLE DE_NETWORK_DEVICE "Radio.{i}" +#define DE_RADIO_ID DE_DEVICE_RADIO "ID" +#define DE_RADIO_ENABLED DE_DEVICE_RADIO "Enabled" +#define DE_RADIO_NUMCUROPCLASS DE_DEVICE_RADIO "NumberOfCurrOpClass" +#define DE_RADIO_NOISE DE_DEVICE_RADIO "Noise" +#define DE_RADIO_UTILIZATION DE_DEVICE_RADIO "Utilization" +#define DE_RADIO_TRANSMIT DE_DEVICE_RADIO "Transmit" +#define DE_RADIO_RECEIVESELF DE_DEVICE_RADIO "ReceiveSelf" +#define DE_RADIO_RECEIVEOTHER DE_DEVICE_RADIO "ReceiveOther" +#define DE_RADIO_CHIPVENDOR DE_DEVICE_RADIO "ChipsetVendor" +#define DE_RADIO_CURROPNOE DE_DEVICE_RADIO "CurrentOperatingClassProfileNumberOfEntries" +#define DE_RADIO_BSSNOE DE_DEVICE_RADIO "NumberOfBSS" +#define DE_RADIO_UNASSCSTALIST DE_DEVICE_RADIO "UnassociatedStaList" +#define DE_RADIO_NOUNASSCSTA DE_DEVICE_RADIO "NumberOfUnassocSta" +/* Device.WiFi.DataElements.Network.Device.Radio.BackhaulSta */ +#define DE_RADIO_BHSTA DE_DEVICE_RADIO "BackhaulSta." +#define DE_BHSTA_MACADDR DE_RADIO_BHSTA "MACAddress" +/* Device.WiFi.DataElements.Network.Device.Radio.Capabilities */ +#define DE_RADIO_CAPS DE_DEVICE_RADIO "Capabilities." +#define DE_RCAPS_HTCAPS DE_RADIO_CAPS "HTCapabilities" +#define DE_RCAPS_VHTCAPS DE_RADIO_CAPS "VHTCapabilities" +#define DE_RCAPS_MSCS_CAP DE_RADIO_CAPS "MSCSCapability" +#define DE_RCAPS_SCS_CAP DE_RADIO_CAPS "SCSCapability" +#define DE_RCAPS_QOSMAP_CAP DE_RADIO_CAPS "QoSMapCapability" +#define DE_RCAPS_DSCP_POLICY DE_RADIO_CAPS "DSCPPolicyCapability" +#define DE_RCAPS_SCSTRAFDESC DE_RADIO_CAPS "SCSTrafficDescriptionCapability" +#define DE_RCAPS_CAPOPNOE DE_RADIO_CAPS "CapableOperatingClassProfileNumberOfEntries" +#define DE_RCAPS_AKMFHNOE DE_RADIO_CAPS "AKMFrontHaulNumberOfEntries" +#define DE_RCAPS_AKMBHNOE DE_RADIO_CAPS "AKMBackHaulNumberOfEntries" +/* Device.WiFi.DataElements.Network.Device.Radio.Capabilities.WiFi6APRole */ +#define DE_CAPS_WF6AP DE_RADIO_CAPS "WiFi6APRole." +#define DE_WF6AP_HE160 DE_CAPS_WF6AP "HE160" +#define DE_WF6AP_HE8080 DE_CAPS_WF6AP "HE8080" +#define DE_WF6AP_MCSNSS DE_CAPS_WF6AP "MCSNSS" +#define DE_WF6AP_SU_BFER DE_CAPS_WF6AP "SUBeamformer" +#define DE_WF6AP_SU_BFEE DE_CAPS_WF6AP "SUBeamformee" +#define DE_WF6AP_MU_BFER DE_CAPS_WF6AP "MUBeamformer" +#define DE_WF6AP_BFEE_80L DE_CAPS_WF6AP "Beamformee80orLess" +#define DE_WF6AP_BFEE_80A DE_CAPS_WF6AP "BeamformeeAbove80" +#define DE_WF6AP_UL_MUMIMO DE_CAPS_WF6AP "ULMUMIMO" +#define DE_WF6AP_UL_OFDMA DE_CAPS_WF6AP "ULOFDMA" +#define DE_WF6AP_DL_OFDMA DE_CAPS_WF6AP "DLOFDMA" +#define DE_WF6AP_MAX_DL_MUMIMO DE_CAPS_WF6AP "MaxDLMUMIMO" +#define DE_WF6AP_MAX_UL_MUMIMO DE_CAPS_WF6AP "MaxULMUMIMO" +#define DE_WF6AP_MAX_DL_OF DE_CAPS_WF6AP "MaxDLOFDMA" +#define DE_WF6AP_MAX_UL_OF DE_CAPS_WF6AP "MaxULOFDMA" +#define DE_WF6AP_RTS DE_CAPS_WF6AP "RTS" +#define DE_WF6AP_MU_RTS DE_CAPS_WF6AP "MURTS" +#define DE_WF6AP_MULTI_BSS DE_CAPS_WF6AP "MultiBSSID" +#define DE_WF6AP_MU_EDCA DE_CAPS_WF6AP "MUEDCA" +#define DE_WF6AP_TWT_REQ DE_CAPS_WF6AP "TWTRequestor" +#define DE_WF6AP_TWT_RSP DE_CAPS_WF6AP "TWTResponder" +#define DE_WF6AP_SPAT_REUSE DE_CAPS_WF6AP "SpatialReuse" +#define DE_WF6AP_ANT_CH_USE DE_CAPS_WF6AP "AnticipatedChannelUsage" +/* Device.WiFi.DataElements.Network.Device.Radio.Capabilities.WiFi6bSTARole */ +#define DE_CAPS_WF6BSTA DE_RADIO_CAPS "WiFi6bSTARole." +#define DE_WF6BSTA_HE160 DE_CAPS_WF6BSTA "HE160" +#define DE_WF6BSTA_MCSNSS DE_CAPS_WF6BSTA "MCSNSS" +#define DE_WF6BSTA_SU_BFER DE_CAPS_WF6BSTA "SUBeamformer" +#define DE_WF6BSTA_SU_BFEE DE_CAPS_WF6BSTA "SUBeamformee" +#define DE_WF6BSTA_MU_BFER DE_CAPS_WF6BSTA "MUBeamformer" +#define DE_WF6BSTA_BFEE_80_LESS DE_CAPS_WF6BSTA "Beamformee80orLess" +#define DE_WF6BSTA_BFEE_ABV_80 DE_CAPS_WF6BSTA "BeamformeeAbove80" +#define DE_WF6BSTA_UL_MUMIMO DE_CAPS_WF6BSTA "ULMUMIMO" +#define DE_WF6BSTA_UL_OFDMA DE_CAPS_WF6BSTA "ULOFDMA" +#define DE_WF6BSTA_DL_OFDMA DE_CAPS_WF6BSTA "DLOFDMA" +#define DE_WF6BSTA_MAX_DL_MUMIMO DE_CAPS_WF6BSTA "MaxDLMUMIMO" +#define DE_WF6BSTA_MAX_UL_MUMIMO DE_CAPS_WF6BSTA "MaxULMUMIMO" +#define DE_WF6BSTA_MAX_DL_OFDMA DE_CAPS_WF6BSTA "MaxDLOFDMA" +#define DE_WF6BSTA_MAX_UL_OFDMA DE_CAPS_WF6BSTA "MaxULOFDMA" +#define DE_WF6BSTA_RTS DE_CAPS_WF6BSTA "RTS" +#define DE_WF6BSTA_MU_RTS DE_CAPS_WF6BSTA "MURTS" +#define DE_WF6BSTA_MULTI_BSSID DE_CAPS_WF6BSTA "MultiBSSID" +#define DE_WF6BSTA_MUEDCA DE_CAPS_WF6BSTA "MUEDCA" +#define DE_WF6BSTA_TWT_REQ DE_CAPS_WF6BSTA "TWTRequestor" +#define DE_WF6BSTA_TWT_RSP DE_CAPS_WF6BSTA "TWTResponder" +#define DE_WF6BSTA_SPATIAL_REUSE DE_CAPS_WF6BSTA "SpatialReuse" +#define DE_WF6BSTA_ANT_CH_USAGE DE_CAPS_WF6BSTA "AnticipatedChannelUsage" +/* Device.WiFi.DataElements.Network.Device.Radio.Capabilities.CapableOperatingClassProfile */ +#define DE_CAPS_CAPOP DE_DEVICE_RADIO "CapableOperatingClassProfile.{i}." +#define DE_CAPOP_TABLE DE_DEVICE_RADIO "CapableOperatingClassProfile.{i}" +#define DE_CAPOP_CLASS DE_CAPS_CAPOP "Class" +#define DE_CAPOP_MAXTXPOWER DE_CAPS_CAPOP "MaxTxPower" +#define DE_CAPOP_NONOPERABLE DE_CAPS_CAPOP "NonOperable" +#define DE_CAPOP_NONOPCNT DE_CAPS_CAPOP "NumberOfNonOperChan" +/* Device.WiFi.DataElements.Network.Device.Radio.CurrentOperatingClassProfile */ +#define DE_RADIO_CUROP DE_DEVICE_RADIO "CurrentOperatingClassProfile.{i}." +#define DE_CUROP_TABLE DE_DEVICE_RADIO "CurrentOperatingClassProfile.{i}" +#define DE_CUROP_CLASS DE_RADIO_CUROP "Class" +#define DE_CUROP_CHANNEL DE_RADIO_CUROP "Channel" +#define DE_CUROP_TXPOWER DE_RADIO_CUROP "TxPower" +/* Device.WiFi.DataElements.Network.Device.Radio.Capabilities.WiFi7APRole */ +#define DE_CAPS_WF7AP DE_RADIO_CAPS "WiFi7APRole." +#define DE_WF7AP_EMLMR DE_CAPS_WF7AP "EMLMRSupport" +#define DE_WF7AP_EMLSR DE_CAPS_WF7AP "EMLSRSupport" +#define DE_WF7AP_STR DE_CAPS_WF7AP "STRSupport" +#define DE_WF7AP_NSTR DE_CAPS_WF7AP "NSTRSupport" +#define DE_WF7AP_TID_MAP DE_CAPS_WF7AP "TIDLinkMapNegotiation" +/* Device.WiFi.DataElements.Network.Device.Radio.Capabilities.WiFi7bSTARole */ +#define DE_CAPS_WF7BSTA DE_DEVICE_RADIO "WiFi7bSTARole." +#define DE_WF7BSTA_EMLMR DE_CAPS_WF7BSTA "EMLMRSupport" +#define DE_WF7BSTA_EMLSR DE_CAPS_WF7BSTA "EMLSRSupport" +#define DE_WF7BSTA_STR DE_CAPS_WF7BSTA "STRSupport" +#define DE_WF7BSTA_NSTR DE_CAPS_WF7BSTA "NSTRSupport" +#define DE_WF7BSTA_TID_MAP DE_CAPS_WF7BSTA "TIDLinkMapNegotiation" +/* Device.WiFi.DataElements.Network.Device.Radio.Capabilities.ScanCapability */ +#define DE_CAPS_SCANCAP DE_DEVICE_RADIO "ScanCapability." +#define DE_SCANCAP_TIMESTAMP DE_CAPS_SCANCAP "TimeStamp" +#define DE_SCANCAP_OPCLSCANSNOE DE_CAPS_SCANCAP "NumberOfOpClassScans" +/* Device.WiFi.DataElements.Network.Device.Radio.BSS */ +#define DE_RADIO_BSS DE_DEVICE_RADIO "BSS.{i}." +#define DE_BSS_TABLE DE_DEVICE_RADIO "BSS.{i}" +#define DE_BSS_BSSID DE_RADIO_BSS "BSSID" +#define DE_BSS_SSID DE_RADIO_BSS "SSID" +#define DE_BSS_ENABLED DE_RADIO_BSS "Enabled" +#define DE_BSS_LASTCHG DE_RADIO_BSS "LastChange" +#define DE_BSS_TS DE_RADIO_BSS "TimeStamp" +#define DE_BSS_UCAST_TX DE_RADIO_BSS "UnicastBytesSent" +#define DE_BSS_UCAST_RX DE_RADIO_BSS "UnicastBytesReceived" +#define DE_BSS_MCAST_TX DE_RADIO_BSS "MulticastBytesSent" +#define DE_BSS_MCAST_RX DE_RADIO_BSS "MulticastBytesReceived" +#define DE_BSS_BCAST_TX DE_RADIO_BSS "BroadcastBytesSent" +#define DE_BSS_BCAST_RX DE_RADIO_BSS "BroadcastBytesReceived" +#define DE_BSS_EST_BE DE_RADIO_BSS "EstServiceParametersBE" +#define DE_BSS_EST_BK DE_RADIO_BSS "EstServiceParametersBK" +#define DE_BSS_EST_VI DE_RADIO_BSS "EstServiceParametersVI" +#define DE_BSS_EST_VO DE_RADIO_BSS "EstServiceParametersVO" +#define DE_BSS_BYTCNTUNITS DE_RADIO_BSS "ByteCounterUnits" +#define DE_BSS_PROF1_DIS DE_RADIO_BSS "Profile1bSTAsDisallowed" +#define DE_BSS_PROF2_DIS DE_RADIO_BSS "Profile2bSTAsDisallowed" +#define DE_BSS_ASSOC_STAT DE_RADIO_BSS "AssociationAllowanceStatus" +#define DE_BSS_BHAULUSE DE_RADIO_BSS "BackhaulUse" +#define DE_BSS_FHAULUSE DE_RADIO_BSS "FronthaulUse" +#define DE_BSS_R1_DIS DE_RADIO_BSS "R1disallowed" +#define DE_BSS_R2_DIS DE_RADIO_BSS "R2disallowed" +#define DE_BSS_MULTI_BSSID DE_RADIO_BSS "MultiBSSID" +#define DE_BSS_TX_BSSID DE_RADIO_BSS "TransmittedBSSID" +#define DE_BSS_FHAULAKMS DE_RADIO_BSS "FronthaulAKMsAllowed" +#define DE_BSS_BHAULAKMS DE_RADIO_BSS "BackhaulAKMsAllowed" +#define DE_BSS_QM_DESC DE_RADIO_BSS "QMDescriptor" +#define DE_BSS_NUM_STA DE_RADIO_BSS "NumberOfSTA" +#define DE_BSS_LINK_IMM DE_RADIO_BSS "LinkRemovalImminent" +#define DE_BSS_FH_SUITE DE_RADIO_BSS "FronthaulSuiteSelector" +#define DE_BSS_BH_SUITE DE_RADIO_BSS "BackhaulSuiteSelector" +/* Device.WiFi.DataElements.Network.Device.Radio.BSS.STA */ +#define DE_BSS_STA DE_RADIO_BSS "STA.{i}." +#define DE_STA_TABLE DE_RADIO_BSS "STA.{i}" +#define DE_STA_MACADDR DE_BSS_STA "MACAddress" +#define DE_STA_HTCAPS DE_BSS_STA "HTCapabilities" +#define DE_STA_VHTCAPS DE_BSS_STA "VHTCapabilities" +#define DE_STA_CLIENTCAPS DE_BSS_STA "ClientCapabilities" +#define DE_STA_LSTDTADLR DE_BSS_STA "LastDataDownlinkRate" +#define DE_STA_LSTDTAULR DE_BSS_STA "LastDataUplinkRate" +#define DE_STA_UTILRECV DE_BSS_STA "UtilizationReceive" +#define DE_STA_UTILTRMT DE_BSS_STA "UtilizationTransmit" +#define DE_STA_ESTMACDTARDL DE_BSS_STA "EstMACDataRateDownlink" +#define DE_STA_ESTMACDTARUL DE_BSS_STA "EstMACDataRateUplink" +#define DE_STA_SIGNALSTR DE_BSS_STA "SignalStrength" +#define DE_STA_LASTCONNTIME DE_BSS_STA "LastConnectTime" +#define DE_STA_BYTESSNT DE_BSS_STA "BytesSent" +#define DE_STA_BYTESRCV DE_BSS_STA "BytesReceived" +#define DE_STA_PCKTSSNT DE_BSS_STA "PacketsSent" +#define DE_STA_PCKTSRCV DE_BSS_STA "PacketsReceived" +#define DE_STA_ERRSSNT DE_BSS_STA "ErrorsSent" +#define DE_STA_ERRSRCV DE_BSS_STA "ErrorsReceived" +#define DE_STA_RETRANSCNT DE_BSS_STA "RetransCount" +#define DE_STA_IPV4ADDR DE_BSS_STA "IPV4Address" +#define DE_STA_IPV6ADDR DE_BSS_STA "IPV6Address" +#define DE_STA_HOSTNAME DE_BSS_STA "Hostname" +#define DE_STA_PAIRWSAKM DE_BSS_STA "PairwiseAKM" +#define DE_STA_PAIRWSCIPHER DE_BSS_STA "PairwiseCipher" +#define DE_STA_RSNCAPS DE_BSS_STA "RSNCapabilities" +/* Device.WiFi.DataElements.Network.Device.Radio.BSS.STA.WiFi6Capabilities */ +#define DE_STA_WIFI6CAPS DE_BSS_STA "WiFi6Capabilities." +#define DE_STAWF6CAPS_HE160 DE_STA_WIFI6CAPS "HE160" +#define DE_STAWF6CAPS_MCSNSS DE_STA_WIFI6CAPS "MCSNSS" +/* Device.WiFi.DataElements.Network.Device.APMLD */ +#define DE_DEVICE_APMLD DE_NETWORK_DEVICE "APMLD.{i}." +#define DE_APMLD_TABLE DE_NETWORK_DEVICE "APMLD.{i}" +#define DE_APMLD_MACADDRESS DE_DEVICE_APMLD "MLDMACAddress" +#define DE_APMLD_AFFAPNOE DE_DEVICE_APMLD "AffiliatedAPNumberOfEntries" +#define DE_APMLD_STAMLDNOE DE_DEVICE_APMLD "STAMLDNumberOfEntries" +/* Device.WiFi.DataElements.Network.Device.APMLD.APMLDConfig */ +#define DE_APMLD_CONFIG DE_DEVICE_APMLD "APMLDConfig." +#define DE_APMLDCFG_EMLMR DE_APMLD_CONFIG "EMLMREnabled" +#define DE_APMLDCFG_EMLSR DE_APMLD_CONFIG "EMLSREnabled" +#define DE_APMLDCFG_STR DE_APMLD_CONFIG "STREnabled" +#define DE_APMLDCFG_NSTR DE_APMLD_CONFIG "NSTREnabled" +/* Device.WiFi.DataElements.Network.Device.APMLD.AffiliatedAP */ +#define DE_APMLD_AFFAP DE_DEVICE_APMLD "AffiliatedAP.{i}." +#define DE_AFFAP_TABLE DE_DEVICE_APMLD "AffiliatedAP.{i}" +#define DE_AFFAP_BSSID DE_APMLD_AFFAP "BSSID" +#define DE_AFFAP_LINKID DE_APMLD_AFFAP "LinkID" +#define DE_AFFAP_RUID DE_APMLD_AFFAP "RUID" +#define DE_AFFAP_PCKTSSNT DE_APMLD_AFFAP "PacketsSent" +#define DE_AFFAP_PCKTSRCV DE_APMLD_AFFAP "PacketsReceived" +#define DE_AFFAP_ERRSSNT DE_APMLD_AFFAP "ErrorsSent" +#define DE_AFFAP_UCBYTESSNT DE_APMLD_AFFAP "UnicastBytesSent" +#define DE_AFFAP_UCBYTESRCV DE_APMLD_AFFAP "UnicastBytesReceived" +#define DE_AFFAP_MCBYTESSNT DE_APMLD_AFFAP "MulticastBytesSent" +#define DE_AFFAP_MCBYTESRCV DE_APMLD_AFFAP "MulticastBytesReceived" +#define DE_AFFAP_BCBYTESSNT DE_APMLD_AFFAP "BroadcastBytesSent" +#define DE_AFFAP_BCBYTESRCV DE_APMLD_AFFAP "BroadcastBytesReceived" +/* Device.WiFi.DataElements.Network.Device.APMLD.STAMLD */ +#define DE_APMLD_STAMLD DE_DEVICE_APMLD "STAMLD.{i}." +#define DE_STAMLD_TABLE DE_DEVICE_APMLD "STAMLD.{i}" +#define DE_STAMLD_MLDMACADDR DE_APMLD_STAMLD "MLDMACAddress" +#define DE_STAMLD_ISBSTA DE_APMLD_STAMLD "IsbSTA" +#define DE_STAMLD_LASTCONTME DE_APMLD_STAMLD "LastConnectTime" +#define DE_STAMLD_BYTESSNT DE_APMLD_STAMLD "BytesReceived" +#define DE_STAMLD_BYTESRCV DE_APMLD_STAMLD "BytesSent" +#define DE_STAMLD_PCKTSSNT DE_APMLD_STAMLD "PacketsReceived" +#define DE_STAMLD_PCKTSRCV DE_APMLD_STAMLD "PacketsSent" +#define DE_STAMLD_ERRSSNT DE_APMLD_STAMLD "ErrorsReceived" +#define DE_STAMLD_ERRSRCVD DE_APMLD_STAMLD "ErrorsSent" +#define DE_STAMLD_RETRANSCNT DE_APMLD_STAMLD "RetransCount" +#define DE_STAMLD_AFFSTANOE DE_APMLD_STAMLD "AffiliatedSTANumberOfEntries" +/* Device.WiFi.DataElements.Network.Device.APMLD.STAMLD.WiFi7Capabilities */ +#define DE_STAMLD_WIFI7CAPS DE_APMLD_STAMLD "WiFi7Capabilities." +#define DE_WIFI7CAPS_EMLMR DE_STAMLD_WIFI7CAPS "EMLMRSupport" +#define DE_WIFI7CAPS_EMLSR DE_STAMLD_WIFI7CAPS "EMLSRSupport" +#define DE_WIFI7CAPS_STR DE_STAMLD_WIFI7CAPS "STRSupport" +#define DE_WIFI7CAPS_NSTR DE_STAMLD_WIFI7CAPS "NSTRSupport" +/* Device.WiFi.DataElements.Network.Device.APMLD.STAMLD.STAMLDConfig */ +#define DE_STAMLD_CONFIG DE_APMLD_STAMLD "STAMLDConfig." +#define DE_STAMLDCFG_EMLMR DE_STAMLD_CONFIG "EMLMREnabled" +#define DE_STAMLDCFG_EMLSR DE_STAMLD_CONFIG "EMLSREnabled" +#define DE_STAMLDCFG_STR DE_STAMLD_CONFIG "STREnabled" +#define DE_STAMLDCFG_NSTR DE_STAMLD_CONFIG "NSTREnabled" +/* Device.WiFi.DataElements.Network.Device.APMLD.STAMLD.AffiliatedSTA */ +#define DE_STAMLD_AFFSTA DE_APMLD_STAMLD "AffiliatedSTA.{i}." +#define DE_AFFSTA_TABLE DE_APMLD_STAMLD "AffiliatedSTA.{i}" +#define DE_AFFSTA_MACADDR DE_STAMLD_AFFSTA "MACAddress" +#define DE_AFFSTA_BSSID DE_STAMLD_AFFSTA "BSSID" +#define DE_AFFSTA_BYTESSNT DE_STAMLD_AFFSTA "BytesSent" +#define DE_AFFSTA_BYTESRCV DE_STAMLD_AFFSTA "BytesReceived" +#define DE_AFFSTA_PCKTSSNT DE_STAMLD_AFFSTA "PacketsSent" +#define DE_AFFSTA_PCKTSRCV DE_STAMLD_AFFSTA "PacketsReceived" +#define DE_AFFSTA_ERRSSNT DE_STAMLD_AFFSTA "ErrorsSent" +#define DE_AFFSTA_SIGNALSTR DE_STAMLD_AFFSTA "SignalStrength" +#define DE_AFFSTA_ESTMACDRDL DE_STAMLD_AFFSTA "EstMACDataRateDownlink" +#define DE_AFFSTA_ESTMACDRUL DE_STAMLD_AFFSTA "EstMACDataRateUplink" +/* Device.WiFi.DataElements.Network.Device.bSTAMLD */ +#define DE_DEVICE_BSTAMLD DE_NETWORK_DEVICE "bSTAMLD." +#define DE_BSTAMLD_MACADDR DE_DEVICE_BSTAMLD "MLDMACAddress" +#define DE_BSTAMLD_BSSID DE_DEVICE_BSTAMLD "BSSID" +#define DE_BSTAMLD_AFFBSTAS DE_DEVICE_BSTAMLD "AffiliatedbSTAList" +/* Device.WiFi.DataElements.Network.Device.bSTAMLD.bSTAMLDConfig */ +#define DE_BSTAMLD_CONFIG DE_DEVICE_BSTAMLD "bSTAMLDConfig." +#define DE_BSTACFG_EMLMR DE_BSTAMLD_CONFIG "EMLMREnabled" +#define DE_BSTACFG_EMLSR DE_BSTAMLD_CONFIG "EMLSREnabled" +#define DE_BSTACFG_STR DE_BSTAMLD_CONFIG "STREnabled" +#define DE_BSTACFG_NSTR DE_BSTAMLD_CONFIG "NSTREnabled" + +typedef struct wfa_dml_data_model { + uint32_t table_de_device_index; + uint32_t table_de_radio_index; + uint32_t table_de_bss_index; + uint32_t table_de_sta_index; + uint32_t table_de_ssid_index; + uint32_t table_de_apmld_index; + uint32_t table_de_stamld_index; +} wfa_dml_data_model_t; + +/** + * @brief Set bus callback function pointers for WFA Data Elements + * + * This function assigns appropriate callback functions for WFA Data Elements + * namespaces. It maps WFA-specific paths to their corresponding handler functions. + * + * @param full_namespace The complete WFA namespace path (e.g., "Device.WiFi.DataElements.Network.Radio.{i}") + * @param cb_table Pointer to the callback table to populate + * @return RETURN_OK on success, RETURN_ERR on failure + */ +int wfa_set_bus_callbackfunc_pointers(const char *full_namespace, bus_callback_table_t *cb_table); + +bus_error_t wfa_elem_num_of_table_row(char *event_name, uint32_t *table_row_size); + +#endif // WFA_DATA_MODEL_H \ No newline at end of file diff --git a/source/platform/common/data_model/wfa/wfa_dml_cb.c b/source/platform/common/data_model/wfa/wfa_dml_cb.c new file mode 100644 index 000000000..afaaf834c --- /dev/null +++ b/source/platform/common/data_model/wfa/wfa_dml_cb.c @@ -0,0 +1,64 @@ +/************************************************************************************ + If not stated otherwise in this file or this component's LICENSE file the + following copyright and licenses apply: + + Copyright 2025 RDK Management + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + **************************************************************************/ + +#include +#include +#include +#include +#include "bus.h" +#include "wifi_data_model.h" +#include "wifi_dml_api.h" +#include "wfa_data_model.h" + +bool wfa_network_get_param_uint_value(void *obj_ins_context, char *param_name, uint32_t *output_value) +{ + wifi_util_info_print(WIFI_DMCLI,"%s:%d: param name:%s\n",__func__, __LINE__, param_name); + + if (STR_CMP(param_name, "DeviceNumberOfEntries")) { + *output_value = 1; + } else { + wifi_util_info_print(WIFI_DMCLI,"%s:%d: unsupported param name:%s\n",__func__, __LINE__, param_name); + return false; + } + return true; +} + +bool wfa_network_get_param_string_value(void *obj_ins_context, char *param_name, scratch_data_buff_t *output_value) +{ + wifi_util_info_print(WIFI_DMCLI,"%s:%d: param name:%s\n",__func__, __LINE__, param_name); + + if (STR_CMP(param_name, "ID")) { + set_output_string(output_value, " "); + } else if (STR_CMP(param_name, "TimeStamp")) { + set_output_string(output_value, " "); + } else if (STR_CMP(param_name, "ControllerID")) { + set_output_string(output_value, " "); + } else if (STR_CMP(param_name, "MSCSDisallowedStaList")) { + set_output_string(output_value, " "); + } else if (STR_CMP(param_name, "SCSDisallowedStaList")) { + set_output_string(output_value, " "); + } else if (STR_CMP(param_name, "ColocatedAgentID")) { + set_output_string(output_value, " "); + } else { + wifi_util_info_print(WIFI_DMCLI,"%s:%d: unsupported param name:%s\n",__func__, __LINE__, param_name); + return false; + } + + return true; +} \ No newline at end of file diff --git a/source/platform/common/data_model/wfa/wfa_dml_cb.h b/source/platform/common/data_model/wfa/wfa_dml_cb.h new file mode 100644 index 000000000..e1b7c517b --- /dev/null +++ b/source/platform/common/data_model/wfa/wfa_dml_cb.h @@ -0,0 +1,47 @@ +/************************************************************************************ + If not stated otherwise in this file or this component's LICENSE file the + following copyright and licenses apply: + + Copyright 2025 RDK Management + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + **************************************************************************/ + +#ifndef WFA_DML_CB_H +#define WFA_DML_CB_H + +#include +#include +#include "bus.h" + +/** + * @brief Get unsigned integer parameter value for WFA Network + * + * @param obj_ins_context Object instance context + * @param param_name Parameter name to retrieve + * @param output_value Pointer to store the retrieved value + * @return true on success, false on failure + */ +bool wfa_network_get_param_uint_value(void *obj_ins_context, char *param_name, uint32_t *output_value); + +/** + * @brief Get string parameter value for WFA Network + * + * @param obj_ins_context Object instance context + * @param param_name Parameter name to retrieve + * @param output_value Pointer to scratch buffer for storing the retrieved string + * @return true on success, false on failure + */ +bool wfa_network_get_param_string_value(void *obj_ins_context, char *param_name, scratch_data_buff_t *output_value); + +#endif // WFA_DML_CB_H diff --git a/source/platform/common/data_model/wifi_data_model.c b/source/platform/common/data_model/wifi_data_model.c index ffbe9cc9d..ad6cba405 100644 --- a/source/platform/common/data_model/wifi_data_model.c +++ b/source/platform/common/data_model/wifi_data_model.c @@ -21,7 +21,6 @@ #include #include #include "bus.h" -#include "wifi_data_model_parse.h" #include "wifi_data_model.h" #include "wifi_dml_cb.h" #include "wifi_dml_api.h" @@ -1673,8 +1672,20 @@ bus_error_t wifi_region_code_set_param_value(char *event_name, raw_data_t *p_dat bus_error_t default_get_param_value(char *event_name, raw_data_t *p_data, struct bus_user_data * user_data ) { - (void)p_data; - wifi_util_dbg_print(WIFI_DMCLI,"%s:%d enter:%s\r\n", __func__, __LINE__, event_name); + wifi_util_dbg_print(WIFI_DMCLI,"%s:%d enter:%s, data type:%d\r\n", __func__, __LINE__, event_name, p_data->data_type); + + switch(p_data->data_type) { + case bus_data_type_string: + scratch_data_buff_t temp_buff = { 0 }; + set_output_string(&temp_buff, " "); + + p_data->raw_data.bytes = temp_buff.buff; + p_data->raw_data_len = temp_buff.buff_len; + break; + default: + break; + } + return bus_error_success; } @@ -1706,3 +1717,121 @@ bus_error_t default_event_sub_handler(char *eventName, bus_event_sub_action_t ac wifi_util_dbg_print(WIFI_DMCLI,"%s:%d enter:%s: action:%d interval:%d\r\n", __func__, __LINE__, eventName, action, interval); return bus_error_success; } + +int wifi_set_bus_callbackfunc_pointers(const char *full_namespace, bus_callback_table_t *cb_table) +{ + bus_data_cb_func_t bus_data_cb[] = { + //wifi event cb func + { WIFI_OBJ_TREE_NAME, + { wifi_get_param_value, wifi_set_param_value, NULL, + NULL, wifi_event_sub_handler, NULL }}, + + //wifi radio event cb func + { RADIO_OBJ_TREE_NAME, + { radio_get_param_value, radio_set_param_value, radio_table_add_row_handler, + radio_table_remove_row_handler, radio_event_sub_handler, NULL }}, + + //wifi accesspoint event cb func + { ACCESSPOINT_OBJ_TREE_NAME, + { accesspoint_get_param_value, accesspoint_set_param_value, accesspoint_table_add_row_handler, + accesspoint_table_remove_row_handler, accesspoint_event_sub_handler, NULL }}, + + //wifi ssid event cb func + { SSID_OBJ_TREE_NAME, + { ssid_get_param_value, ssid_set_param_value, ssid_table_add_row_handler, + ssid_table_remove_row_handler, ssid_event_sub_handler, NULL }}, + + //wifi security event cb func + { SECURITY_OBJ_TREE_NAME, + { security_get_param_value, security_set_param_value, NULL, + NULL, security_event_sub_handler, NULL }}, + + //wifi radius security event cb func + { RADIUS_SEC_OBJ_TREE_NAME, + { radius_sec_get_param_value, radius_sec_set_param_value, NULL, + NULL, radius_sec_event_sub_handler, NULL }}, + + //wifi radius security event cb func + { AUTH_SEC_OBJ_TREE_NAME, + { auth_sec_get_param_value, auth_sec_set_param_value, NULL, + NULL, auth_sec_event_sub_handler, NULL }}, + + //wifi macfilter event cb func + { MACFILTER_OBJ_TREE_NAME, + { macfilter_get_param_value, macfilter_set_param_value, macfilter_table_add_row_handler, + macfilter_table_remove_row_handler, macfilter_event_sub_handler, NULL }}, + + //wifi associated_sta event cb func + { ASSOCIATED_STA_OBJ_TREE_NAME, + { associated_sta_get_param_value, NULL, associated_sta_table_add_row_handler, + associated_sta_table_remove_row_handler, associated_sta_event_sub_handler, NULL }}, + + //wifi interworking event cb func + { INTERWORKING_OBJ_TREE_NAME, + { interworking_get_param_value, interworking_set_param_value, NULL, + NULL, interworking_event_sub_handler, NULL }}, + + //wifi connection control event cb func + { CONN_CTRL_OBJ_TREE_NAME, + { conn_ctrl_get_param_value, conn_ctrl_set_param_value, NULL, + NULL, conn_ctrl_event_sub_handler, NULL }}, + + //wifi pre connection control event cb func + { PRE_CONN_CTRL_OBJ_TREE_NAME, + { pre_conn_ctrl_get_param_value, pre_conn_ctrl_set_param_value, NULL, + NULL, pre_conn_ctrl_event_sub_handler, NULL }}, + + //wifi post connection control event cb func + { POST_CONN_CTRL_OBJ_TREE_NAME, + { post_conn_ctrl_get_param_value, post_conn_ctrl_set_param_value, NULL, + NULL, post_conn_ctrl_event_sub_handler, NULL }}, + + //wifi wps event cb func + { WPS_OBJ_TREE_NAME, + { wps_get_param_value, wps_set_param_value, NULL, + NULL, wps_event_sub_handler, NULL }}, + + //wifi interworking serv event cb func + { INTERWORKING_SERV_OBJ_NAME, + { interworking_serv_get_param_value, interworking_serv_set_param_value, NULL, + NULL, interworking_serv_event_sub_handler, NULL }}, + + //wifi passpoint event cb func + { PASSPOINT_OBJ_TREE_NAME, + { passpoint_get_param_value, passpoint_set_param_value, NULL, + NULL, passpoint_event_sub_handler, NULL }}, + + //wifi client report event cb func + { WIFI_CLIENT_REPORT_OBJ_NAME, + { wifi_client_report_get_param_value, wifi_client_report_set_param_value, NULL, + NULL, wifi_client_report_event_sub_handler, NULL }}, + + //wifi client default report event cb func + { WIFI_CLIENT_DEF_REPORT_OBJ_NAME, + { wifi_client_def_report_get_param_value, wifi_client_def_report_set_param_value, NULL, + NULL, wifi_client_def_report_event_sub_handler, NULL }}, + + //wifi event cb func + { NEIG_WIFI_DIAG_OBJ_NAME, + { neig_wifi_diag_get_param_value, neig_wifi_diag_set_param_value, NULL, + NULL, neig_wifi_diag_event_sub_handler, NULL }}, + + //wifi event cb func + { NEIG_DIAG_RESULT_OBJ_NAME, + { neig_diag_result_get_param_value, NULL, + neig_diag_result_table_add_row_cb, neig_diag_result_table_remove_row_cb, + neig_diag_result_event_sub_cb, NULL }}, + + //wifi ap macfilter event cb func + { AP_MACFILTER_TREE_NAME, + { ap_macfilter_get_param_value, ap_macfilter_set_param_value, NULL, + NULL, ap_macfilter_event_sub_handler, NULL }}, + + //wifi region code event cb func + { WIFI_REGION_OBJ_NAME, + { wifi_region_code_get_param_value, wifi_region_code_set_param_value, NULL, + NULL, NULL, NULL }} + }; + + return set_bus_callbackfunc_pointers(full_namespace, cb_table, bus_data_cb, ARRAY_SZ(bus_data_cb)); +} diff --git a/source/platform/common/data_model/wifi_data_model.h b/source/platform/common/data_model/wifi_data_model.h index 0c566746e..423f20580 100644 --- a/source/platform/common/data_model/wifi_data_model.h +++ b/source/platform/common/data_model/wifi_data_model.h @@ -35,6 +35,32 @@ } \ } while (0) +#define WIFI_OBJ_TREE_NAME "Device.WiFi" +#define NEIG_WIFI_DIAG_OBJ_NAME "Device.WiFi.NeighboringWiFiDiagnostic" +#define NEIG_DIAG_RESULT_OBJ_NAME "Device.WiFi.NeighboringWiFiDiagnostic.Result" +#define WIFI_REGION_OBJ_NAME "Device.WiFi.X_RDKCENTRAL-COM_Syndication.WiFiRegion" +#define WIFI_CLIENT_REPORT_OBJ_NAME "Device.WiFi.X_RDKCENTRAL-COM_Report.WifiClient" +#define WIFI_CLIENT_DEF_REPORT_OBJ_NAME "Device.WiFi.X_RDKCENTRAL-COM_Report.WifiClient.Default" +#define RADIO_OBJ_TREE_NAME "Device.WiFi.Radio.{i}" +#define ACCESSPOINT_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}" +#define SECURITY_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.Security" +#define RADIUS_SEC_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings" +#define AUTH_SEC_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.Security.X_RDKCENTRAL-COM_Authenticator" +#define AP_MACFILTER_TREE_NAME "Device.WiFi.AccessPoint.{i}.X_CISCO_COM_MACFilter" +#define MACFILTER_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.X_CISCO_COM_MacFilterTable.{i}" +#define ASSOCIATED_STA_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}" +#define INTERWORKING_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_InterworkingElement" +#define CONN_CTRL_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.ConnectionControl" +#define PRE_CONN_CTRL_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.ConnectionControl.PreAssocDeny" +#define POST_CONN_CTRL_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.ConnectionControl.PostAssocDisc" +#define WPS_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.WPS" +#define INTERWORKING_SERV_OBJ_NAME "Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_InterworkingService" +#define PASSPOINT_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_Passpoint" +#define SSID_OBJ_TREE_NAME "Device.WiFi.SSID.{i}" + +#define DML_GET_CB 1 +#define DML_SET_CB 2 + typedef struct scratch_data_buff { void *buff; uint32_t buff_len; @@ -70,6 +96,8 @@ typedef struct dml_callback_table { dml_set_string_cb_t set_string_value; } dml_callback_table_t; +int wifi_set_bus_callbackfunc_pointers(const char *full_namespace, bus_callback_table_t *cb_table); + bus_error_t wifi_elem_num_of_table_row(char *event_name, uint32_t *table_row_size); bus_error_t wifi_get_param_value(char *event_name, raw_data_t *p_data, struct bus_user_data * user_data); diff --git a/source/platform/common/data_model/wifi_data_model_parse.c b/source/platform/common/data_model/wifi_data_model_parse.c deleted file mode 100644 index be442ab97..000000000 --- a/source/platform/common/data_model/wifi_data_model_parse.c +++ /dev/null @@ -1,531 +0,0 @@ -/************************************************************************************ - If not stated otherwise in this file or this component's LICENSE file the - following copyright and licenses apply: - - Copyright 2025 RDK Management - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - **************************************************************************/ - -#include -#include -#include -#include -#include "bus.h" -#include "wifi_data_model_parse.h" -#include "wifi_data_model.h" -#include "wifi_dml_api.h" - -int set_bus_callbackfunc_pointers(char *full_namespace, bus_callback_table_t *cb_table) -{ - bus_data_cb_func_t bus_data_cb[] = { - //wifi event cb func - { WIFI_OBJ_TREE_NAME, - { wifi_get_param_value, wifi_set_param_value, NULL, - NULL, wifi_event_sub_handler, NULL }}, - - //wifi radio event cb func - { RADIO_OBJ_TREE_NAME, - { radio_get_param_value, radio_set_param_value, radio_table_add_row_handler, - radio_table_remove_row_handler, radio_event_sub_handler, NULL }}, - - //wifi accesspoint event cb func - { ACCESSPOINT_OBJ_TREE_NAME, - { accesspoint_get_param_value, accesspoint_set_param_value, accesspoint_table_add_row_handler, - accesspoint_table_remove_row_handler, accesspoint_event_sub_handler, NULL }}, - - //wifi ssid event cb func - { SSID_OBJ_TREE_NAME, - { ssid_get_param_value, ssid_set_param_value, ssid_table_add_row_handler, - ssid_table_remove_row_handler, ssid_event_sub_handler, NULL }}, - - //wifi security event cb func - { SECURITY_OBJ_TREE_NAME, - { security_get_param_value, security_set_param_value, NULL, - NULL, security_event_sub_handler, NULL }}, - - //wifi radius security event cb func - { RADIUS_SEC_OBJ_TREE_NAME, - { radius_sec_get_param_value, radius_sec_set_param_value, NULL, - NULL, radius_sec_event_sub_handler, NULL }}, - - //wifi radius security event cb func - { AUTH_SEC_OBJ_TREE_NAME, - { auth_sec_get_param_value, auth_sec_set_param_value, NULL, - NULL, auth_sec_event_sub_handler, NULL }}, - - //wifi macfilter event cb func - { MACFILTER_OBJ_TREE_NAME, - { macfilter_get_param_value, macfilter_set_param_value, macfilter_table_add_row_handler, - macfilter_table_remove_row_handler, macfilter_event_sub_handler, NULL }}, - - //wifi associated_sta event cb func - { ASSOCIATED_STA_OBJ_TREE_NAME, - { associated_sta_get_param_value, NULL, associated_sta_table_add_row_handler, - associated_sta_table_remove_row_handler, associated_sta_event_sub_handler, NULL }}, - - //wifi interworking event cb func - { INTERWORKING_OBJ_TREE_NAME, - { interworking_get_param_value, interworking_set_param_value, NULL, - NULL, interworking_event_sub_handler, NULL }}, - - //wifi connection control event cb func - { CONN_CTRL_OBJ_TREE_NAME, - { conn_ctrl_get_param_value, conn_ctrl_set_param_value, NULL, - NULL, conn_ctrl_event_sub_handler, NULL }}, - - //wifi pre connection control event cb func - { PRE_CONN_CTRL_OBJ_TREE_NAME, - { pre_conn_ctrl_get_param_value, pre_conn_ctrl_set_param_value, NULL, - NULL, pre_conn_ctrl_event_sub_handler, NULL }}, - - //wifi post connection control event cb func - { POST_CONN_CTRL_OBJ_TREE_NAME, - { post_conn_ctrl_get_param_value, post_conn_ctrl_set_param_value, NULL, - NULL, post_conn_ctrl_event_sub_handler, NULL }}, - - //wifi wps event cb func - { WPS_OBJ_TREE_NAME, - { wps_get_param_value, wps_set_param_value, NULL, - NULL, wps_event_sub_handler, NULL }}, - - //wifi interworking serv event cb func - { INTERWORKING_SERV_OBJ_NAME, - { interworking_serv_get_param_value, interworking_serv_set_param_value, NULL, - NULL, interworking_serv_event_sub_handler, NULL }}, - - //wifi passpoint event cb func - { PASSPOINT_OBJ_TREE_NAME, - { passpoint_get_param_value, passpoint_set_param_value, NULL, - NULL, passpoint_event_sub_handler, NULL }}, - - //wifi client report event cb func - { WIFI_CLIENT_REPORT_OBJ_NAME, - { wifi_client_report_get_param_value, wifi_client_report_set_param_value, NULL, - NULL, wifi_client_report_event_sub_handler, NULL }}, - - //wifi client default report event cb func - { WIFI_CLIENT_DEF_REPORT_OBJ_NAME, - { wifi_client_def_report_get_param_value, wifi_client_def_report_set_param_value, NULL, - NULL, wifi_client_def_report_event_sub_handler, NULL }}, - - //wifi event cb func - { NEIG_WIFI_DIAG_OBJ_NAME, - { neig_wifi_diag_get_param_value, neig_wifi_diag_set_param_value, NULL, - NULL, neig_wifi_diag_event_sub_handler, NULL }}, - - //wifi event cb func - { NEIG_DIAG_RESULT_OBJ_NAME, - { neig_diag_result_get_param_value, NULL, - neig_diag_result_table_add_row_cb, neig_diag_result_table_remove_row_cb, - neig_diag_result_event_sub_cb, NULL }}, - - //wifi ap macfilter event cb func - { AP_MACFILTER_TREE_NAME, - { ap_macfilter_get_param_value, ap_macfilter_set_param_value, NULL, - NULL, ap_macfilter_event_sub_handler, NULL }}, - - //wifi region code event cb func - { WIFI_REGION_OBJ_NAME, - { wifi_region_code_get_param_value, wifi_region_code_set_param_value, NULL, - NULL, NULL, NULL }} - }; - - bus_data_cb_func_t bus_default_data_cb = { " ", - { default_get_param_value, default_set_param_value, default_table_add_row_handler, - default_table_remove_row_handler, default_event_sub_handler, NULL } - }; - - uint32_t index = 0; - bool table_found = false; - - for (index = 0; index < (uint32_t)ARRAY_SZ(bus_data_cb); index++) { - if (STR_CMP(full_namespace, bus_data_cb[index].cb_table_name)) { - memcpy(cb_table, &bus_data_cb[index].cb_func, sizeof(bus_callback_table_t)); - table_found = true; - break; - } - } - - if (table_found == false) { - wifi_util_info_print(WIFI_DMCLI,"%s:%d:default cb set for namespace:[%s]\n", __func__, __LINE__, full_namespace); - memcpy(cb_table, &bus_default_data_cb.cb_func, sizeof(bus_callback_table_t)); - } - - return RETURN_OK; -} - -int bus_register_namespace(bus_handle_t *handle, char *full_namespace, bus_element_type_t element_type, - bus_callback_table_t cb_table, data_model_properties_t data_model_value, int num_of_rows) -{ - wifi_util_info_print(WIFI_DMCLI,"%s:%d: register_namespace:[%s] element_type:%d\n", __func__, __LINE__, full_namespace, element_type); - - bus_data_element_t dataElements = { 0 }; - - dataElements.full_name = full_namespace; - //snprintf(dataElements.full_name, BUS_MAX_NAME_LENGTH,"%s", full_namespace); - dataElements.type = element_type; - dataElements.cb_table = cb_table; - dataElements.bus_speed = slow_speed; - dataElements.data_model_prop = data_model_value; - - if (element_type == bus_element_type_table) { - //@TODO Add get handler to get table size. - uint32_t num_of_table_rows; - if (wifi_elem_num_of_table_row(full_namespace, &num_of_table_rows) == bus_error_success) { - dataElements.num_of_table_row = num_of_table_rows; - } else { - dataElements.num_of_table_row = num_of_rows; - } - wifi_util_info_print(WIFI_DMCLI,"%s:%d: Add number of row:%d input value:%d\n", __func__, __LINE__, dataElements.num_of_table_row, num_of_rows); - - //Tomporary added this @TODO TBD - if (strcmp(full_namespace, ACCESSPOINT_OBJ_TREE_NAME) == 0) { - wifi_util_info_print(WIFI_DMCLI,"%s:%d: register_namespace avoid for this:[%s]\n", __func__, __LINE__, full_namespace); - return 0; - } - } - -#if 0 - element_node_t *node = bus_insert_element(handle, handle->root_element, &dataElements); - if (node != NULL) { - node->data_model_value = data_model_value; - } -#else - uint32_t num_elements = 1; - - bus_error_t rc = get_bus_descriptor()->bus_reg_data_element_fn(handle, &dataElements, num_elements); - if (rc != bus_error_success) { - wifi_util_error_print(WIFI_DMCLI,"%s:%d bus: bus_regDataElements failed:%s\n", __func__, __LINE__, full_namespace); - } -#endif - - return RETURN_OK; -} - -int get_int_type_from_str(char *int_str_type, bus_data_type_t *data_format) -{ - if (!strncmp(int_str_type, "uint32_t", strlen("uint32_t"))) { - *data_format = bus_data_type_uint32; - } else if (!strncmp(int_str_type, "uint16_t", strlen("uint16_t"))) { - *data_format = bus_data_type_uint16; - } else if (!strncmp(int_str_type, "uint8_t", strlen("uint8_t"))) { - *data_format = bus_data_type_uint8; - } else if (!strncmp(int_str_type, "int32_t", strlen("int32_t"))) { - *data_format = bus_data_type_int32; - } else if (!strncmp(int_str_type, "int16_t", strlen("int16_t"))) { - *data_format = bus_data_type_int16; - } else if (!strncmp(int_str_type, "int8_t", strlen("int8_t"))) { - *data_format = bus_data_type_int8; - } else { - *data_format = bus_data_type_int32; - } - return RETURN_OK; -} - -int decode_definition_str_type(char *str_value, char *data_str_type, bus_data_type_t *data_format) -{ - if (!strncmp(str_value, "integer", strlen("integer"))) { - get_int_type_from_str(data_str_type, data_format); - } else if (!strncmp(str_value, "bool", strlen("bool"))) { - *data_format = bus_data_type_boolean; - } else if (!strncmp(str_value, "string", strlen("string"))) { - *data_format = bus_data_type_string; - } else if (!strncmp(str_value, "unsigned_int", strlen("unsigned_int"))) { - *data_format = bus_data_type_uint32; - } - - return RETURN_OK; -} - -int get_data_model_properties(cJSON *wifi_def_obj, char *data_str_type, data_model_properties_t *data_model_value) -{ - cJSON *param; - decode_json_param_object(wifi_def_obj, data_str_type, param); - - param = param->child; - while(param != NULL) { - if (!strncmp(param->string, "type", strlen("type"))) { - decode_definition_str_type(param->valuestring, data_str_type, &data_model_value->data_format); - } else if (!strncmp(param->string, "minimum", strlen("minimum"))) { - data_model_value->min_data_range = param->valuedouble; - } else if (!strncmp(param->string, "maximum", strlen("maximum"))) { - data_model_value->max_data_range = param->valuedouble; - } else if (!strncmp(param->string, "enum", strlen("enum"))) { - data_model_value->num_of_str_validation = cJSON_GetArraySize(param); - data_model_value->str_validation = malloc(sizeof(char *) * data_model_value->num_of_str_validation); - VERIFY_NULL_WITH_RETURN_INT(data_model_value->str_validation); - for (uint32_t i = 0; i < data_model_value->num_of_str_validation; i++) { - cJSON *item = cJSON_GetArrayItem(param, i); - if (item != NULL && cJSON_IsString(item)) { - data_model_value->str_validation[i] = malloc(strlen(item->valuestring) + 1); - strncpy(data_model_value->str_validation[i], item->valuestring, strlen(item->valuestring) + 1); - } - } - } - param = param->next; - } - - return RETURN_OK; -} - -static int add_array_node_elem(cJSON *main_array_obj, uint32_t num_of_elements, char *name_prefix, - cJSON *wifi_def_obj, bus_handle_t *handle, bus_callback_table_t cb_table) -{ - cJSON *current_element; - cJSON *param; - char full_namespace[128]; - bus_element_type_t element_type = bus_element_type_property; - data_model_properties_t data_model_value = { 0 }; - - for (uint32_t index = 0; index < num_of_elements; index++) { - current_element = cJSON_GetArrayItem(main_array_obj, index); - current_element = current_element->child; - VERIFY_NULL_WITH_RETURN_INT(current_element); - if (current_element->child != NULL) { - param = current_element->child; - if (strncmp(param->string, LIST_OF_DEFINITION_NAME, strlen(LIST_OF_DEFINITION_NAME)) == 0) { - uint32_t sub_num_of_elem = cJSON_GetArraySize(param); - bus_callback_table_t sub_elem_cb_table; - snprintf(full_namespace, sizeof(full_namespace), "%s.%s", name_prefix, current_element->string); - set_bus_callbackfunc_pointers(full_namespace, &sub_elem_cb_table); - add_array_node_elem(param, sub_num_of_elem, full_namespace, wifi_def_obj, handle, sub_elem_cb_table); - continue; - } else if (strncmp(param->string, MAX_NUM_OF_OBJECTS_NAME, strlen(MAX_NUM_OF_OBJECTS_NAME) + 1) == 0) { - uint32_t sub_num_of_elem = cJSON_GetArraySize(param->next); - uint32_t l_num_of_tables = param->valuedouble; - bus_element_type_t temp_element_type = bus_element_type_table; - bus_callback_table_t temp_cb_table, fetch_cb_table; - - //main table register - snprintf(full_namespace, sizeof(full_namespace), "%s.%s", name_prefix, current_element->string); - set_bus_callbackfunc_pointers(full_namespace, &fetch_cb_table); - - temp_cb_table = fetch_cb_table; - temp_cb_table.get_handler = NULL; - temp_cb_table.set_handler = NULL; - - strcat(full_namespace, ".{i}"); - memset(&data_model_value, 0, sizeof(data_model_value)); - bus_register_namespace(handle, full_namespace, temp_element_type, temp_cb_table, data_model_value, l_num_of_tables); - - //We don't need table handlers callback for table paramters. - fetch_cb_table.table_remove_row_handler = NULL; - fetch_cb_table.table_add_row_handler = NULL; - add_array_node_elem(param->next, sub_num_of_elem, full_namespace, wifi_def_obj, handle, fetch_cb_table); - continue; - } - } - snprintf(full_namespace, sizeof(full_namespace), "%s.%s", name_prefix, current_element->string); - decode_json_param_string(current_element, "type", param); - memset(&data_model_value, 0, sizeof(data_model_value)); - get_data_model_properties(wifi_def_obj, param->valuestring, &data_model_value); - decode_json_param_bool(current_element, "writable", param); - data_model_value.data_permission = (param->type & cJSON_True) ? true : false; - bus_register_namespace(handle, full_namespace, element_type, cb_table, data_model_value, 0); - } - return RETURN_OK; -} - -static int construct_namespace_and_register(bus_handle_t *handle, cJSON* cfg_param, cJSON *wifi_def_obj, char *l_name_prefix) -{ - bus_name_string_t name_prefix; - bus_element_type_t element_type = bus_element_type_property; - bus_callback_table_t cb_table = { 0 }; - data_model_properties_t data_model_value = { 0 }; - - strcpy(name_prefix, l_name_prefix); - wifi_util_info_print(WIFI_DMCLI,"%s:%d: namespace:%s\n", __func__, __LINE__, name_prefix); - - if (cJSON_IsObject(cfg_param) == true) { - //decode individual param and set it to bus. - cJSON *current_element = cfg_param->child; - cJSON *param; - cJSON *tmp; - char full_namespace[128]; - element_type = bus_element_type_method; - - set_bus_callbackfunc_pointers(name_prefix, &cb_table); - while(current_element != NULL) { - validate_current_json_obj_param_name(current_element); - snprintf(full_namespace, sizeof(full_namespace), "%s.%s", name_prefix, current_element->string); - tmp = current_element->child; - if (tmp->string != NULL && strncmp(tmp->string, LIST_OF_DEFINITION_NAME, strlen(LIST_OF_DEFINITION_NAME)) == 0) { - construct_namespace_and_register(handle, tmp, wifi_def_obj, full_namespace); - } else if (tmp->string != NULL && strncmp(tmp->string, MAX_NUM_OF_OBJECTS_NAME, strlen(MAX_NUM_OF_OBJECTS_NAME)) == 0) { - construct_namespace_and_register(handle, tmp->prev, wifi_def_obj, full_namespace); - } else { - decode_json_param_string(current_element, "type", param); - memset(&data_model_value, 0, sizeof(data_model_value)); - get_data_model_properties(wifi_def_obj, param->valuestring, &data_model_value); - decode_json_param_bool(current_element, "writable", param); - data_model_value.data_permission = (param->type & cJSON_True) ? true : false; - bus_register_namespace(handle, full_namespace, element_type, cb_table, data_model_value, 0); - } - current_element = current_element->next; - } - } else if (cJSON_IsArray(cfg_param) == true) { - int num_of_tables = 0; - - if (cfg_param->prev != NULL && cfg_param->prev->string != NULL) { - if ((strncmp(cfg_param->prev->string, MAX_NUM_OF_OBJECTS_NAME, strlen(MAX_NUM_OF_OBJECTS_NAME) + 1) == 0) - && (cJSON_IsNumber(cfg_param->prev) == true)) { - num_of_tables = cfg_param->prev->valuedouble; - } - } - - //snprintf(name_prefix, BUS_MAX_NAME_LENGTH, "%s.%s", name_prefix, "{i}"); - strcat(name_prefix, "."); - strcat(name_prefix, "{i}"); - element_type = bus_element_type_table; - set_bus_callbackfunc_pointers(name_prefix, &cb_table); - - bus_callback_table_t temp_cb_table = cb_table; - temp_cb_table.get_handler = NULL; - temp_cb_table.set_handler = NULL; - memset(&data_model_value, 0, sizeof(data_model_value)); - //main table register - bus_register_namespace(handle, name_prefix, element_type, temp_cb_table, data_model_value, num_of_tables); - - //We don't need table handlers callback for table paramters. - cb_table.table_remove_row_handler = NULL; - cb_table.table_add_row_handler = NULL; - - int num_of_elements = cJSON_GetArraySize(cfg_param); - cJSON *current_element; - - for (int index = 0; index < num_of_elements; index++) { - current_element = cJSON_GetArrayItem(cfg_param, index); - if (current_element == NULL) { - wifi_util_error_print(WIFI_DMCLI,"%s Item at index %d not found.\n", __func__, index); - continue; - } - - if(cJSON_IsObject(current_element) == true) { - construct_namespace_and_register(handle, current_element, wifi_def_obj, name_prefix); - } else { - uint32_t temp_num_of_elements = cJSON_GetArraySize(cfg_param); - add_array_node_elem(cfg_param, temp_num_of_elements, name_prefix, wifi_def_obj, handle, cb_table); - } - } - } else { - wifi_util_error_print(WIFI_DMCLI,"%s:%d: wrong wifi config object type\n", __func__, __LINE__); - return RETURN_ERR; - } - - return RETURN_OK; -} - -static void decode_wifi_object_recurse(bus_handle_t *handle, cJSON* node, cJSON *wifi_def_obj, char *l_name_prefix) -{ - VERIFY_NULL(node); - cJSON* child = node->child; - bus_name_string_t name_prefix; - char new_name_prefix[128]; - - snprintf(name_prefix, BUS_MAX_NAME_LENGTH, "%s", l_name_prefix); - - while(child) - { - cJSON* tmp = child; - if (tmp->string != NULL && strncmp(tmp->string, LIST_OF_DEFINITION_NAME, strlen(LIST_OF_DEFINITION_NAME)) == 0) { - construct_namespace_and_register(handle, tmp, wifi_def_obj, name_prefix); - child = child->next; - continue; - } - snprintf(new_name_prefix, sizeof(new_name_prefix), "%s.%s", name_prefix, tmp->string); - child = child->next; - decode_wifi_object_recurse(handle, tmp, wifi_def_obj, new_name_prefix); - } -} - -static int decode_wifi_objects(bus_handle_t *handle, cJSON *root_obj) -{ - if (root_obj == NULL) { - return RETURN_ERR; - } - cJSON *wifi_def_obj; - - decode_json_param_object(root_obj, WIFI_OBJ_DEFINITIONS_NAME, wifi_def_obj); - - cJSON* temp_obj = wifi_def_obj->next; - bus_name_string_t name_prefix; - - while(temp_obj) - { - cJSON* tmp = temp_obj; - snprintf(name_prefix, BUS_MAX_NAME_LENGTH, "%s", tmp->string); - temp_obj = temp_obj->next; - decode_wifi_object_recurse(handle, tmp, wifi_def_obj, name_prefix); - } - return RETURN_OK; -} - -int decode_json_obj(bus_handle_t *handle, const char *json_name) -{ - char *raw_buffer; - FILE *file = fopen(json_name, "r"); - if (file == NULL) { - wifi_util_error_print(WIFI_DMCLI,"Error: opening JSON file:%s\n", json_name); - perror("Error opening file"); - return RETURN_ERR; - } - - // Seek to the end of the file - fseek(file, 0, SEEK_END); - - // Get the current position (which is the size of the file) - size_t fileSize = ftell(file); - if ((long int)fileSize == RETURN_ERR) { - wifi_util_error_print(WIFI_DMCLI,"Error getting file:%s size\n", json_name); - fclose(file); - return RETURN_ERR; - } - - raw_buffer = calloc(1, (fileSize + 1)); - - // Seek to the start of the file - fseek(file, 0, SEEK_SET); - size_t bytesRead = fread(raw_buffer, 1, fileSize, file); - fclose(file); - - if (fileSize != bytesRead) { - wifi_util_error_print(WIFI_DMCLI,"Error reading file:%s\n", json_name); - free(raw_buffer); - return RETURN_ERR; - } - - raw_buffer[fileSize] = '\0'; // Null terminate the string - - cJSON *root_json = cJSON_Parse(raw_buffer); - if (root_json == NULL) { - const char *error_ptr = cJSON_GetErrorPtr(); - if (error_ptr != NULL) { - wifi_util_error_print(WIFI_DMCLI,"Error before:%s\n", error_ptr); - } - wifi_util_error_print(WIFI_DMCLI,"JSON parse failure for file:%s\n", json_name); - free(raw_buffer); - cJSON_Delete(root_json); - return RETURN_ERR; - } - wifi_util_info_print(WIFI_DMCLI,"[%s]JSON parse success for file:%s\njson content:\n%s\n", __func__, - json_name, raw_buffer); - - decode_wifi_objects(handle, root_json); - - free(raw_buffer); - //cJSON_free(root_json); - cJSON_Delete(root_json); - - return RETURN_OK; -} diff --git a/source/platform/common/data_model/wifi_data_model_parse.h b/source/platform/common/data_model/wifi_data_model_parse.h deleted file mode 100644 index 22e96080e..000000000 --- a/source/platform/common/data_model/wifi_data_model_parse.h +++ /dev/null @@ -1,116 +0,0 @@ -/************************************************************************************ - If not stated otherwise in this file or this component's LICENSE file the - following copyright and licenses apply: - - Copyright 2025 RDK Management - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - **************************************************************************/ - -#ifndef WIFI_DATA_MODEL_PARSE_H -#define WIFI_DATA_MODEL_PARSE_H - -#include -#include -#include -#include "cJSON.h" -#include "bus_common.h" - -#define WIFI_OBJ_DEFINITIONS_NAME "definitions" -#define RADIO_OBJ_NAME "Radio" -#define ACCESSPOINT_OBJ_NAME "AccessPoint" - -#define LIST_OF_DEFINITION_NAME "List_Of_Def" -#define MAX_NUM_OF_OBJECTS_NAME "Num_Of_Objects" - -#define WIFI_OBJ_TREE_NAME "Device.WiFi" -#define NEIG_WIFI_DIAG_OBJ_NAME "Device.WiFi.NeighboringWiFiDiagnostic" -#define NEIG_DIAG_RESULT_OBJ_NAME "Device.WiFi.NeighboringWiFiDiagnostic.Result" -#define WIFI_REGION_OBJ_NAME "Device.WiFi.X_RDKCENTRAL-COM_Syndication.WiFiRegion" -#define WIFI_CLIENT_REPORT_OBJ_NAME "Device.WiFi.X_RDKCENTRAL-COM_Report.WifiClient" -#define WIFI_CLIENT_DEF_REPORT_OBJ_NAME "Device.WiFi.X_RDKCENTRAL-COM_Report.WifiClient.Default" -#define RADIO_OBJ_TREE_NAME "Device.WiFi.Radio.{i}" -#define ACCESSPOINT_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}" -#define SECURITY_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.Security" -#define RADIUS_SEC_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.Security.X_COMCAST-COM_RadiusSettings" -#define AUTH_SEC_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.Security.X_RDKCENTRAL-COM_Authenticator" -#define AP_MACFILTER_TREE_NAME "Device.WiFi.AccessPoint.{i}.X_CISCO_COM_MACFilter" -#define MACFILTER_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.X_CISCO_COM_MacFilterTable.{i}" -#define ASSOCIATED_STA_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.AssociatedDevice.{i}" -#define INTERWORKING_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_InterworkingElement" -#define CONN_CTRL_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.ConnectionControl" -#define PRE_CONN_CTRL_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.ConnectionControl.PreAssocDeny" -#define POST_CONN_CTRL_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.ConnectionControl.PostAssocDisc" -#define WPS_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.WPS" -#define INTERWORKING_SERV_OBJ_NAME "Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_InterworkingService" -#define PASSPOINT_OBJ_TREE_NAME "Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_Passpoint" -#define SSID_OBJ_TREE_NAME "Device.WiFi.SSID.{i}" - -#define DML_GET_CB 1 -#define DML_SET_CB 2 - -#define decode_json_param_object(json, key, value) \ -{ \ - value = cJSON_GetObjectItem(json, key); \ - if ((value == NULL) || (cJSON_IsObject(value) == false)) { \ - wifi_util_error_print(WIFI_DMCLI,"%s:%d: Validation failed for key:%s\n", __func__, __LINE__, key); \ - return RETURN_ERR; \ - } \ -} \ - -#define decode_json_param_string(json, key, value) \ -{ \ - value = cJSON_GetObjectItem(json, key); \ - if ((value == NULL) || (cJSON_IsString(value) == false) || \ - (value->valuestring == NULL) || (strcmp(value->valuestring, "") == 0)) { \ - wifi_util_error_print(WIFI_DMCLI,"%s:%d: Validation failed for key:%s\n", __func__, __LINE__, key); \ - return RETURN_ERR; \ - } \ -} \ - -#define decode_json_param_integer(json, key, value) \ -{ \ - value = cJSON_GetObjectItem(json, key); \ - if ((value == NULL) || (cJSON_IsNumber(value) == false)) { \ - wifi_util_error_print(WIFI_DMCLI,"%s:%d: Validation failed for key:%s\n", __func__, __LINE__, key); \ - return RETURN_ERR; \ - } \ -} \ - -#define validate_current_json_obj_param_name(json) \ -{ \ - if (json == NULL || json->string == NULL) { \ - wifi_util_error_print(WIFI_DMCLI,"%s:%d: current json obj param name not found\n", __func__, __LINE__); \ - return RETURN_ERR; \ - } \ -} \ - -#define decode_json_param_bool(json, key, value) \ -{ \ - value = cJSON_GetObjectItem(json, key); \ - if ((value == NULL) || (cJSON_IsBool(value) == false)) { \ - wifi_util_error_print(WIFI_DMCLI,"%s:%d: Validation failed for key:%s\n", __func__, __LINE__, key); \ - return RETURN_ERR; \ - } \ -} \ - -#define get_func_address dlsym - -typedef struct bus_data_cb_func { - char *cb_table_name; - bus_callback_table_t cb_func; -} bus_data_cb_func_t; - -int decode_json_obj(bus_handle_t *handle, const char *json_name); - -#endif //WIFI_DATA_MODEL_PARSE_H diff --git a/source/platform/common/data_model/wifi_dml_api.c b/source/platform/common/data_model/wifi_dml_api.c index 8ed01a870..829492a3b 100644 --- a/source/platform/common/data_model/wifi_dml_api.c +++ b/source/platform/common/data_model/wifi_dml_api.c @@ -22,6 +22,7 @@ #include "wifi_stubs.h" #include "wifi_util.h" #include "dml_onewifi_api.h" +#include "wifi_dml_api.h" #include "wifi_events.h" #include "wifi_ctrl.h" #include "wifi_mgr.h" @@ -1181,7 +1182,15 @@ int start_dml_main(void *arg) ctrl = (wifi_ctrl_t *)get_wifictrl_obj(); - decode_json_obj(&ctrl->handle, BUS_DML_CONFIG_FILE); + /* Parse and register Native DM */ + wifi_util_info_print(WIFI_DMCLI, "%s:%d: Parsing Native DM schema: %s\n", + __func__, __LINE__, BUS_DML_CONFIG_FILE); + parse_and_register_native_dml_schema(&ctrl->handle, BUS_DML_CONFIG_FILE); + + wifi_util_info_print(WIFI_DMCLI, "%s:%d: Parsing WFA Data Elements schema: %s\n", + __func__, __LINE__, BUS_WFA_DML_CONFIG_FILE); + parse_and_register_wfa_schema(&ctrl->handle, BUS_WFA_DML_CONFIG_FILE); + print_registered_elems(get_bus_mux_reg_cb_map(), 0); get_wifidb_obj()->desc.init_data_fn(); @@ -1961,3 +1970,30 @@ int push_data_to_ssp_queue(const void *msg, unsigned int len, uint32_t type, uin { return RETURN_OK; } + + +int set_bus_callbackfunc_pointers(const char *full_namespace, bus_callback_table_t *cb_table, + const bus_data_cb_func_t *bus_data_cb, uint32_t bus_data_cb_size) +{ + /* For now, use default handlers */ + bus_callback_table_t bus_default_cb = { + default_get_param_value, default_set_param_value, default_table_add_row_handler, + default_table_remove_row_handler, default_event_sub_handler, NULL + }; + + uint32_t index = 0; + + for (index = 0; index < bus_data_cb_size; index++) { + if (STR_CMP(full_namespace, bus_data_cb[index].cb_table_name)) { + memcpy(cb_table, &bus_data_cb[index].cb_func, sizeof(bus_callback_table_t)); + return RETURN_OK; + } + } + + /* No match found, use default handlers */ + wifi_util_info_print(WIFI_DMCLI,"%s:%d:default cb set for namespace:[%s]\n", __func__, __LINE__, full_namespace); + memcpy(cb_table, &bus_default_cb, sizeof(bus_callback_table_t)); + + return RETURN_OK; +} + diff --git a/source/platform/common/data_model/wifi_dml_api.h b/source/platform/common/data_model/wifi_dml_api.h index b7f32a08c..2d7a0e5db 100644 --- a/source/platform/common/data_model/wifi_dml_api.h +++ b/source/platform/common/data_model/wifi_dml_api.h @@ -26,6 +26,8 @@ #include #include "wifi_data_model.h" #include "wifi_hal.h" +#include "wifi_dml_json_parser.h" +#include "bus.h" #define REG_DOMAIN_SZ 3 #define ENV_SZ 1 @@ -96,6 +98,11 @@ typedef struct table_index_timer_arg { char table_row[64]; } table_index_timer_arg_t; +typedef struct bus_data_cb_func { + char *cb_table_name; + bus_callback_table_t cb_func; +} bus_data_cb_func_t; + int set_output_string(scratch_data_buff_t *output_value, char *str); uint32_t get_sec_mode_string_from_int(wifi_security_modes_t security_mode, char *security_name); int get_sec_mode_int_from_string(const char *p_sec_name, wifi_security_modes_t *p_sec_mode); @@ -151,4 +158,7 @@ int set_wifi_region_update_source(char *str_input); int update_json_param(char *p_key, char *partner_id, char *p_value, char *p_source, char *p_current_time); int push_data_to_ssp_queue(const void *msg, unsigned int len, uint32_t type, uint32_t sub_type); +int set_bus_callbackfunc_pointers(const char *full_namespace, bus_callback_table_t *cb_table, + const bus_data_cb_func_t *bus_data_cb, uint32_t bus_data_cb_size); + #endif//WIFI_DML_API_H diff --git a/source/platform/common/data_model/wifi_dml_json_parser.c b/source/platform/common/data_model/wifi_dml_json_parser.c new file mode 100644 index 000000000..1cb4c5dc0 --- /dev/null +++ b/source/platform/common/data_model/wifi_dml_json_parser.c @@ -0,0 +1,794 @@ +/************************************************************************************ + If not stated otherwise in this file or this component's LICENSE file the + following copyright and licenses apply: + + Copyright 2025 RDK Management + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + **************************************************************************/ + +#include +#include +#include +#include +#include +#include "bus.h" +#include "wifi_dml_api.h" +#include "wifi_dml_json_parser.h" +#include "wfa/wfa_data_model.h" + +/* Forward declarations for JSON schema parsing functions */ +static void traverse_schema(cJSON* root, cJSON* schema_node, const char* base_path, bus_handle_t *handle, bus_cb_setter_fn cb_setter); + +static int bus_register_namespace(bus_handle_t *handle, char *full_namespace, bus_element_type_t element_type, + bus_callback_table_t cb_table, data_model_properties_t data_model_value, int num_of_rows) +{ + wifi_util_info_print(WIFI_DMCLI,"%s:%d: register_namespace:[%s] element_type:%d\n", __func__, __LINE__, full_namespace, element_type); + + bus_data_element_t dataElements = { 0 }; + + dataElements.full_name = full_namespace; + dataElements.type = element_type; + dataElements.cb_table = cb_table; + dataElements.bus_speed = slow_speed; + dataElements.data_model_prop = data_model_value; + + if (element_type == bus_element_type_table) { + uint32_t num_of_table_rows = 0; + if (wifi_elem_num_of_table_row(full_namespace, &num_of_table_rows) == bus_error_success) { + dataElements.num_of_table_row = num_of_table_rows; + } else if (wfa_elem_num_of_table_row(full_namespace, &num_of_table_rows) == bus_error_success) { + dataElements.num_of_table_row = num_of_table_rows; + } else { + dataElements.num_of_table_row = num_of_rows; + } + wifi_util_info_print(WIFI_DMCLI,"%s:%d: Add number of row:%d input value:%d\n", __func__, __LINE__, dataElements.num_of_table_row, num_of_rows); + + //Temporary added this @TODO TBD + /* "Device.WiFi.AccessPoint.{i}" is already registered by core */ + if (strcmp(full_namespace, ACCESSPOINT_OBJ_TREE_NAME) == 0) { + wifi_util_info_print(WIFI_DMCLI,"%s:%d: register_namespace avoid for this:[%s]\n", __func__, __LINE__, full_namespace); + return 0; + } + } + + uint32_t num_elements = 1; + + bus_error_t rc = get_bus_descriptor()->bus_reg_data_element_fn(handle, &dataElements, num_elements); + if (rc != bus_error_success) { + wifi_util_error_print(WIFI_DMCLI,"%s:%d bus: bus_regDataElements failed:%s\n", __func__, __LINE__, full_namespace); + } + + return RETURN_OK; +} + +/* Convert YANG path to TR-181 path format */ +static const char* yang_to_tr181(const char* yang_path) +{ + if (!yang_path) { + wifi_util_error_print(WIFI_DMCLI, "%s:%d: Invalid input to yang_to_tr181\n", __func__, __LINE__); + return NULL; + } + + /* Mapping table for YANG to TR-181 conversions */ + struct yang_map { + const char* yang; + const char* tr181; + }; + + struct yang_map mappings[] = { + { "DeviceList", "Device" }, + { "RadioList", "Radio" }, + { "BSSList", "BSS" }, + { "STAList", "STA" }, + { "NetworkSSIDList", "SSID" }, + { "OpClassScanList", "OpClassScan" }, + { "ChannelScanList", "ChannelScan" }, + { "NeighborList", "Neighbor" }, + { "ActiveChannelList", "CACActiveChannel" }, + { "AvailableChannelList", "CACAvailableChannel" }, + { "NonOccupancyChannelList", "CACNonOccupancyChannel" }, + { NULL, NULL } + }; + + /* Check for exact whole string match */ + for (int i = 0; mappings[i].yang != NULL; i++) { + if (strcmp(yang_path, mappings[i].yang) == 0) { + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Path conversion: %s -> %s\n", __func__, __LINE__, mappings[i].yang, mappings[i].tr181); + return mappings[i].tr181; + } + } + + /* It is tr181 path */ + return yang_path; +} + +/* Resolve $ref like "#/definitions/Default8021Q_g" */ +static cJSON* resolve_ref(cJSON* root, const char* ref_str) +{ + const char* path = NULL; + char* path_copy = NULL; + cJSON* node = NULL; + char* token = NULL; + + if (!root || !ref_str || ref_str[0] != '#') { + return NULL; + } + + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Resolving $ref: %s\n", __func__, __LINE__, ref_str); + /* Skip "#/" prefix */ + path = ref_str; + if (strncmp(path, "#/", 2) == 0) { + path += 2; + } + + /* Make a mutable copy of the path */ + path_copy = strdup(path); + if (!path_copy) { + return NULL; + } + + node = root; + token = strtok(path_copy, "/"); + + while (token != NULL && node != NULL) { + node = cJSON_GetObjectItem(node, token); + token = strtok(NULL, "/"); + } + + free(path_copy); + return node; +} + +/* Merge ref_node properties into base object using references */ +static cJSON* merge_with_references(cJSON* base, cJSON* ref_node) +{ + cJSON* child = NULL; + + if (!ref_node) { + return base; + } + + if (!base) { + return ref_node; + } + + /* Add references from ref_node to base */ + child = ref_node->child; + while (child) { + cJSON* existing = cJSON_GetObjectItem(base, child->string); + + if (!existing) { + /* Key doesn't exist - add reference */ + cJSON_AddItemReferenceToObject(base, child->string, child); + } else if (strcmp(child->string, "properties") == 0 && + cJSON_IsObject(existing) && cJSON_IsObject(child)) { + /* Both have "properties" object - recursively merge them */ + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Recursively merging 'properties' objects\n", + __func__, __LINE__); + merge_with_references(existing, child); + } + + child = child->next; + } + + return base; +} + +/* Check if a variant is null-only */ +static bool is_null_only_variant(cJSON* variant) +{ + cJSON* type = cJSON_GetObjectItem(variant, "type"); + + if (!type) { + return false; + } + + if (cJSON_IsString(type)) { + return strcmp(type->valuestring, "null") == 0; + } + + if (cJSON_IsArray(type)) { + cJSON* t = type->child; + while (t) { + if (cJSON_IsString(t) && strcmp(t->valuestring, "null") != 0) { + return false; + } + t = t->next; + } + return true; + } + + return false; +} + +/* Resolve $ref if present on the node; otherwise return the node itself */ +static cJSON* follow_ref_if_any(cJSON* root, cJSON* node) +{ + cJSON* ref = NULL; + cJSON* resolved = NULL; + cJSON* comb = NULL; + cJSON* it = NULL; + + if (!node) { + return NULL; + } + + /* Resolve $ref and merge with current node */ + ref = cJSON_GetObjectItem(node, "$ref"); + if (ref && cJSON_IsString(ref)) { + resolved = resolve_ref(root, ref->valuestring); + if (resolved) { + /* Recursively follow refs in the resolved object */ + resolved = follow_ref_if_any(root, resolved); + if (resolved) { + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Merging $ref %s into parent node\n", + __func__, __LINE__, ref->valuestring); + cJSON_DeleteItemFromObject(node, "$ref"); + merge_with_references(node, resolved); + return node; + } + } else { + wifi_util_info_print(WIFI_DMCLI, "%s:%d: Failed to resolve $ref: %s\n", + __func__, __LINE__, ref->valuestring); + } + } + + /* Process oneOf/anyOf: merge all non-null variants */ + comb = cJSON_GetObjectItem(node, "oneOf"); + if (!comb) { + comb = cJSON_GetObjectItem(node, "anyOf"); + } + + if (comb && cJSON_IsArray(comb)) { + /* Check if already processed to avoid duplicate processing */ + if (cJSON_GetObjectItem(node, "_anyof_processed")) { + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Skipping already processed oneOf/anyOf\n", + __func__, __LINE__); + return node; + } + + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Processing oneOf/anyOf with %d variants\n", + __func__, __LINE__, cJSON_GetArraySize(comb)); + + /* Process each variant - must complete iteration before deleting comb */ + it = comb->child; + while (it) { + cJSON* next_it = it->next; /* Save next pointer before any modifications */ + + /* Skip null-only variants */ + if (!is_null_only_variant(it)) { + /* Resolve $ref if present in variant */ + cJSON* variant_ref = cJSON_GetObjectItem(it, "$ref"); + + if (variant_ref && cJSON_IsString(variant_ref)) { + cJSON* ref_target = resolve_ref(root, variant_ref->valuestring); + if (ref_target) { + cJSON* variant_resolved = follow_ref_if_any(root, ref_target); + if (variant_resolved) { + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Merging variant $ref %s\n", + __func__, __LINE__, variant_ref->valuestring); + merge_with_references(node, variant_resolved); + } + } + } else { + /* Inline variant - merge directly */ + merge_with_references(node, it); + } + } + it = next_it; /* Use saved pointer for next iteration */ + } + + /* Mark as processed to prevent reprocessing on subsequent calls */ + cJSON_AddBoolToObject(node, "_anyof_processed", true); + } + + return node; +} + +/* Type string values MUST be one of the six primitive types +("null", "boolean", "object", "array", "number", or "string"), +or "integer" which matches any number with a zero fractional part. +https://json-schema.org/draft/2020-12/json-schema-validation */ +static void parse_property_type(cJSON* schema_node, data_model_properties_t* props) +{ + if (!schema_node || !props) { + return; + } + + cJSON* type = cJSON_GetObjectItem(schema_node, "type"); + + if (type && cJSON_IsArray(type)) { + cJSON* it = type->child; + while (it) { + /* Find first non-null type */ + if (cJSON_IsString(it) && strcmp(it->valuestring, "null") != 0) { + break; + } + it = it->next; + } + type = it; + } + + if (type && cJSON_IsString(type)) { + if (strcmp(type->valuestring, "string") == 0) { + props->data_format = bus_data_type_string; + } else if (strcmp(type->valuestring, "boolean") == 0) { + props->data_format = bus_data_type_boolean; + } else if (strcmp(type->valuestring, "integer") == 0) { + /* Integer types with minimum greater than or equal to 0 are unsigned */ + cJSON* minimum = cJSON_GetObjectItem(schema_node, "minimum"); + + if (minimum && cJSON_IsNumber(minimum) && minimum->valuedouble >= 0) { + props->data_format = bus_data_type_uint32; + } else { + props->data_format = bus_data_type_int32; + } + } else if (strcmp(type->valuestring, "number") == 0) { + props->data_format = bus_data_type_double; + } else if (strcmp(type->valuestring, "object") == 0) { + props->data_format = bus_data_type_object; + } else if (strcmp(type->valuestring, "array") == 0) { + props->data_format = bus_data_type_none; + } else { + wifi_util_info_print(WIFI_DMCLI, "%s:%d: Unknown type: %s\n", __func__, __LINE__, type->valuestring); + } + } +} + +/* Extract min/max range, type, enum, read/write from leaf node */ +/* Expecting to enter after following all $ref / combiners */ +static void parse_property_constraints(cJSON* schema_node, data_model_properties_t* props) +{ + if (!schema_node || !props) { + return; + } + cJSON* writable = NULL; + cJSON* minimum = NULL; + cJSON* maximum = NULL; + cJSON* str_enum = NULL; + + parse_property_type(schema_node, props); + + writable = cJSON_GetObjectItem(schema_node, "writable"); + /* Default is read-only unless explicitly marked as writable */ + if (writable && cJSON_IsTrue(writable)) { + props->data_permission = 1; + } else { + props->data_permission = 0; + /* Skip validation parameters for read-only properties */ + return; + } + + /* min / max from JSON schema */ + minimum = cJSON_GetObjectItem(schema_node, "minimum"); + maximum = cJSON_GetObjectItem(schema_node, "maximum"); + + if (minimum && cJSON_IsNumber(minimum)) { + props->min_data_range = minimum->valuedouble; + } + + if (maximum && cJSON_IsNumber(maximum)) { + props->max_data_range = maximum->valuedouble; + } + + str_enum = cJSON_GetObjectItem(schema_node, "enum"); + + if (str_enum && cJSON_IsArray(str_enum)) { + props->num_of_str_validation = cJSON_GetArraySize(str_enum); + props->str_validation = malloc(sizeof(char *) * props->num_of_str_validation); + if (props->str_validation == NULL) { + props->num_of_str_validation = 0; + return; + } + + for (uint32_t i = 0; i < props->num_of_str_validation; i++) { + cJSON *item = cJSON_GetArrayItem(str_enum, i); + if (item != NULL && cJSON_IsString(item)) { + props->str_validation[i] = malloc(strlen(item->valuestring) + 1); + strncpy(props->str_validation[i], item->valuestring, strlen(item->valuestring) + 1); + } + } + } +} + +static bool schema_has_type(cJSON* schema, const char* want) +{ + if (!schema || !want) { + return false; + } + + cJSON* type = cJSON_GetObjectItem(schema, "type"); + if (!type) { + return false; + } + + if (cJSON_IsString(type)) { + return strcmp(type->valuestring, want) == 0; + } + + if (cJSON_IsArray(type)) { + cJSON* it = type->child; + while (it) { + if (cJSON_IsString(it) && strcmp(it->valuestring, want) == 0) { + return true; + } + it = it->next; + } + } + return false; +} + +/* Helper: get callbacks from parent object and clear table-specific handlers */ +static void get_parent_callbacks(const char* tr181_path, bus_cb_setter_fn cb_setter, + bus_callback_table_t* cb_table) +{ + bus_name_string_t parent_path = { 0 }; + const char* last_dot = strrchr(tr181_path, '.'); + + if (!last_dot) { + return; /* No parent */ + } + + size_t parent_len = last_dot - tr181_path; + snprintf(parent_path, sizeof(parent_path), "%.*s", (int)parent_len, tr181_path); + + cb_setter(parent_path, cb_table); + + /* Properties should not have table row handlers */ + cb_table->table_remove_row_handler = NULL; + cb_table->table_add_row_handler = NULL; +} + +/* Helper: register a property with callbacks and constraints */ +static void register_property(const char* tr181_path, bus_handle_t *handle, + bus_cb_setter_fn cb_setter, + const data_model_properties_t* props) +{ + bus_callback_table_t cb_table = { 0 }; + + get_parent_callbacks(tr181_path, cb_setter, &cb_table); + + /* Clear set_handler for read-only properties */ + if (props->data_permission == 0) { + cb_table.set_handler = NULL; + } + + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Registering property: %s (format=%d, permission=%d)\n", + __func__, __LINE__, tr181_path, props->data_format, props->data_permission); + bus_register_namespace(handle, (char*)tr181_path, bus_element_type_property, + cb_table, *props, 0); +} + +/* Helper: register a leaf property with proper read/write permissions */ +static void register_leaf_property(cJSON* schema_node, char* tr181_path, + bus_handle_t *handle, + bus_cb_setter_fn cb_setter) +{ + data_model_properties_t data_model_value = { 0 }; + + parse_property_constraints(schema_node, &data_model_value); + register_property(tr181_path, handle, cb_setter, &data_model_value); +} + +/* Helper: register NumberOfEntries property for a table */ +static void register_table_number_of_entries(const char* tr181_path, bus_handle_t *handle, + bus_cb_setter_fn cb_setter) +{ + bus_name_string_t num_entries_path = { 0 }; + data_model_properties_t num_entries_props = { + .data_format = bus_data_type_uint32, + .data_permission = 0 /* Read-only */ + }; + + snprintf(num_entries_path, sizeof(num_entries_path), "%sNumberOfEntries", tr181_path); + + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Registering NumberOfEntries: %s\n", + __func__, __LINE__, num_entries_path); + register_property(num_entries_path, handle, cb_setter, &num_entries_props); +} + +/* Handle ANY property under an object: decide if TABLE or PROPERTY */ +static void handle_property_node(cJSON* root, char* tr181_path, cJSON* property_schema, bus_handle_t *handle, bus_cb_setter_fn cb_setter) +{ + bus_callback_table_t cb_table = { 0 }; + data_model_properties_t data_model_value = { 0 }; + cJSON* effective = NULL; + cJSON* props_obj = NULL; + cJSON* items = NULL; + cJSON* items_eff = NULL; + cJSON* item_props = NULL; + bus_name_string_t table_name = { 0 }; + + if (!property_schema || !tr181_path || !handle || !cb_setter) { + return; + } + + /* 1) follow top-level $ref / combiners if present */ + effective = follow_ref_if_any(root, property_schema); + if (!effective) { + return; + } + + /* 2) If effective has properties -> expand (this handles $ref -> object with properties) */ + props_obj = cJSON_GetObjectItem(effective, "properties"); + if (props_obj && cJSON_IsObject(props_obj)) { + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Found object with properties at: %s\n", __func__, __LINE__, tr181_path); + traverse_schema(root, effective, tr181_path, handle, cb_setter); + return; + } + + /* 3) If type is array -> register TABLE, and examine items, only if array type is object */ + if (schema_has_type(effective, "array")) { + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Found array type at: %s\n", __func__, __LINE__, tr181_path); + items = cJSON_GetObjectItem(effective, "items"); + if (!items) { + return; + } + + items_eff = follow_ref_if_any(root, items); + if (!items_eff) { + return; + } + + item_props = cJSON_GetObjectItem(items_eff, "properties"); + if (item_props && cJSON_IsObject(item_props)) { + /* Object array - register as table */ + + /* Register NumberOfEntries property for this table */ + register_table_number_of_entries(tr181_path, handle, cb_setter); + + snprintf(table_name, sizeof(table_name), "%s.{i}", tr181_path); + parse_property_constraints(effective, &data_model_value); + + wifi_util_info_print(WIFI_DMCLI, "%s:%d: Registering table: %s\n", __func__, __LINE__, table_name); + cb_setter(table_name, &cb_table); + cb_table.get_handler = NULL; + cb_table.set_handler = NULL; + bus_register_namespace(handle, table_name, bus_element_type_table, cb_table, data_model_value, 0); + + traverse_schema(root, items_eff, table_name, handle, cb_setter); + } else { + /* Primitive array - register as property */ + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Found primitive array at: %s\n", __func__, __LINE__, tr181_path); + register_leaf_property(items_eff, tr181_path, handle, cb_setter); + } + return; + } + + /* 4) If type is object (but had no direct properties above) - treat as leaf object */ + if (schema_has_type(effective, "object")) { + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Found leaf object at: %s\n", __func__, __LINE__, tr181_path); + register_leaf_property(effective, tr181_path, handle, cb_setter); + return; + } + + /* 5) Fallback: primitive (string/number/boolean/enum) */ + register_leaf_property(effective, tr181_path, handle, cb_setter); +} + +/* Helper: check if property is auto-generated NumberOfEntries */ +static bool is_number_of_entries_property(const char* property_name) +{ + if (!property_name) { + return false; + } + + size_t len = strlen(property_name); + + /* Check for *NumberOfEntries suffix (15 chars) */ + if (len > 15) { + const char* suffix = property_name + len - 15; + if (strcmp(suffix, "NumberOfEntries") == 0) { + return true; + } + } + + /* Check for NumberOf* prefix (8 chars) */ + if (strncmp(property_name, "NumberOf", 8) == 0) { + return true; + } + + return false; +} + +/* Traverse object schema and process all "properties" */ +static void traverse_schema(cJSON* root, cJSON* schema_node, const char* base_path, bus_handle_t *handle, bus_cb_setter_fn cb_setter) +{ + cJSON* effective = NULL; + cJSON* props = NULL; + cJSON* child = NULL; + bus_name_string_t tr181_path = { 0 }; + + if (!schema_node || !handle || !cb_setter) { + return; + } + + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Traversing schema with base_path: %s\n", __func__, __LINE__, base_path ? base_path : "(null)"); + + /* ensure we operate on resolved node (if schema_node is a wrapper with $ref) */ + effective = follow_ref_if_any(root, schema_node); + if (!effective) { + return; + } + + props = cJSON_GetObjectItem(effective, "properties"); + if (!props || !cJSON_IsObject(props)) { + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: No properties found at: %s\n", __func__, __LINE__, base_path ? base_path : "(null)"); + return; + } + + child = props->child; + while (child) { + if (child->string) { + const char* child_tr181 = NULL; + + /* Skip xxxxNumberOfEntries and NumberOfxxxx properties - they're auto-generated for tables */ + if (is_number_of_entries_property(child->string)) { + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Skipping auto-generated property: %s\n", + __func__, __LINE__, child->string); + child = child->next; + continue; + } + + /* Convert child property name to TR-181 format first */ + child_tr181 = yang_to_tr181(child->string); + + /* Build TR-181 path */ + if (base_path == NULL || strlen(base_path) == 0) { + snprintf(tr181_path, sizeof(tr181_path), "%s", child_tr181); + } else if (base_path[strlen(base_path) - 1] != '.') { + snprintf(tr181_path, sizeof(tr181_path), "%s.%s", base_path, child_tr181); + } else { + snprintf(tr181_path, sizeof(tr181_path), "%s%s", base_path, child_tr181); + } + + wifi_util_dbg_print(WIFI_DMCLI, "%s:%d: Processing property: %s\n", __func__, __LINE__, tr181_path); + handle_property_node(root, tr181_path, child, handle, cb_setter); + } + child = child->next; + } +} + +/* Internal function to process parsed JSON schema */ +static int parse_and_register_schema_internal(bus_handle_t *handle, cJSON* root, const char* base_path, + const char* search_key, bus_cb_setter_fn cb_setter) +{ + cJSON* props = NULL; + cJSON* child = NULL; + + if (!handle || !root || !cb_setter) { + return RETURN_ERR; + } + + /* Find element matching search key */ + props = cJSON_GetObjectItem(root, "properties"); + if (!props) { + wifi_util_error_print(WIFI_DMCLI, "%s:%d: No properties found in schema root\n", __func__, __LINE__); + return RETURN_ERR; + } + + wifi_util_info_print(WIFI_DMCLI, "%s:%d: Starting schema registration with base_path: %s, search_key: %s\n", + __func__, __LINE__, base_path ? base_path : "(null)", search_key ? search_key : "(null)"); + + child = props->child; + while (child) { + if (base_path == NULL) { + base_path = child->string; + } + /* If search_key is NULL, process all children, otherwise find matching child */ + if (search_key == NULL || (child->string && strstr(child->string, search_key) != NULL)) { + traverse_schema(root, child, base_path, handle, cb_setter); + if (search_key) { + break; + } + } + child = child->next; + } + + return RETURN_OK; +} + +/* Entry function to parse and register JSON schema from file */ +static int parse_json_schema_file(bus_handle_t *handle, const char *filename, const char *base_path, const char *search_key, bus_cb_setter_fn cb_setter) +{ + FILE* f = NULL; + long size = 0; + char* buf = NULL; + size_t read_bytes = 0; + cJSON* root = NULL; + int result = RETURN_ERR; + + /* Load file */ + f = fopen(filename, "rb"); + if (!f) { + wifi_util_error_print(WIFI_DMCLI, "%s:%d: Failed to open file: %s\n", __func__, __LINE__, filename); + return RETURN_ERR; + } + + fseek(f, 0, SEEK_END); + size = ftell(f); + fseek(f, 0, SEEK_SET); + + if (size < 0) { + fclose(f); + return RETURN_ERR; + } + + buf = malloc(size + 1); + if (!buf) { + fclose(f); + return RETURN_ERR; + } + + read_bytes = fread(buf, 1, size, f); + fclose(f); + buf[read_bytes] = '\0'; + + wifi_util_info_print(WIFI_DMCLI, "%s:%d: Loaded %zu bytes from %s\n", __func__, __LINE__, read_bytes, filename); + + root = cJSON_Parse(buf); + free(buf); + + if (!root) { + wifi_util_error_print(WIFI_DMCLI, "%s:%d: Failed to parse JSON file: %s\n", __func__, __LINE__, filename); + return RETURN_ERR; + } + + /* Parse schema with provided parameters */ + result = parse_and_register_schema_internal(handle, root, base_path, search_key, cb_setter); + + cJSON_Delete(root); + return result; +} + +int parse_json_schema_and_register(bus_handle_t *handle, const char *json_schema_filename, + const char *base_path, const char *search_key, + bus_cb_setter_fn cb_setter) +{ + int rc = RETURN_ERR; + + if (!handle || !json_schema_filename || !cb_setter) { + wifi_util_error_print(WIFI_DMCLI, "%s:%d: Invalid parameters\n", __func__, __LINE__); + return RETURN_ERR; + } + + wifi_util_info_print(WIFI_DMCLI, "%s:%d: Parsing JSON schema: %s with base path: %s\n", + __func__, __LINE__, json_schema_filename, base_path ? base_path : "(null)"); + + rc = parse_json_schema_file(handle, json_schema_filename, base_path, search_key, cb_setter); + + if (rc == RETURN_OK) { + wifi_util_info_print(WIFI_DMCLI, "%s:%d: Successfully parsed and registered schema\n", + __func__, __LINE__); + } else { + wifi_util_error_print(WIFI_DMCLI, "%s:%d: Failed to parse schema: %s\n", + __func__, __LINE__, json_schema_filename); + } + + return rc; +} + +int parse_and_register_wfa_schema(bus_handle_t *handle, const char *json_schema_filename) +{ + return parse_json_schema_and_register(handle, json_schema_filename, + "Device.WiFi.DataElements.Network", "wfa-dataelements:Network", + wfa_set_bus_callbackfunc_pointers); +} + +int parse_and_register_native_dml_schema(bus_handle_t *handle, const char *json_schema_filename) +{ + return parse_json_schema_and_register(handle, json_schema_filename, + NULL, NULL, + wifi_set_bus_callbackfunc_pointers); +} diff --git a/source/platform/common/data_model/wifi_dml_json_parser.h b/source/platform/common/data_model/wifi_dml_json_parser.h new file mode 100644 index 000000000..067975deb --- /dev/null +++ b/source/platform/common/data_model/wifi_dml_json_parser.h @@ -0,0 +1,83 @@ +/************************************************************************************ + If not stated otherwise in this file or this component's LICENSE file the + following copyright and licenses apply: + + Copyright 2025 RDK Management + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + **************************************************************************/ + +#ifndef WIFI_DML_JSON_PARSER_H +#define WIFI_DML_JSON_PARSER_H + +#include "bus.h" +#include "cJSON.h" + +/* Callback function pointer type for setting bus callbacks */ +typedef int (*bus_cb_setter_fn)(const char *full_namespace, bus_callback_table_t *cb_table); + +/** + * @brief Parse JSON Schema and register data model elements with bus system + * + * This function parses JSON Schema files (draft 2020-12 format) and automatically registers + * all data model elements with the bus system. It handles complex schema features including: + * - $ref resolution (recursive references to definitions) + * - oneOf/anyOf variant merging (combines properties from all non-null variants) + * - YANG to TR-181 path conversions (e.g., "DeviceList" -> "Device") + * - Automatic NumberOfEntries property generation for tables + * - Type inference (string, integer, boolean, array, object) + * - Read/write permission handling via "writable" attribute + * - Validation constraints (min/max ranges, enums) + * + * Supports both WFA Data Elements schemas and Native WiFi data models. + * + * @param handle Pointer to the bus handle + * @param json_schema_filename Path to the JSON schema file to parse + * @param base_path Base TR-181 path for registration (e.g., "Device.WiFi.DataElements.Network") + * or NULL to use root property names from schema + * @param search_key Optional property name to search for (e.g., "wfa-dataelements:Network") + * or NULL to process all root properties + * @param callback_setter Function pointer to retrieve bus callbacks for each namespace + * (e.g., wifi_set_bus_callbackfunc_pointers or wfa_set_bus_callbackfunc_pointers) + * @return RETURN_OK on success, RETURN_ERR on failure + */ +int parse_json_schema_and_register(bus_handle_t *handle, const char *json_schema_filename, + const char *base_path, const char *search_key, + bus_cb_setter_fn callback_setter); + +/** + * @brief Parse and register WFA Data Elements JSON schema + * + * Wrapper that parses WFA Data Elements schema and registers all elements + * under Device.WiFi.DataElements.Network namespace. Automatically handles WFA-specific + * YANG naming conventions and converts them to TR-181 format. + * + * @param handle Pointer to the bus handle + * @param json_schema_filename Path to the WFA Data Elements JSON schema file + * @return RETURN_OK on success, RETURN_ERR on failure + */ +int parse_and_register_wfa_schema(bus_handle_t *handle, const char *json_schema_filename); + +/** + * @brief Parse and register native WiFi data model JSON schema + * + * Wrapper that parses native WiFi data model schema and registers all elements. + * Processes all root properties in the schema without filtering by search key. + * + * @param handle Pointer to the bus handle + * @param json_schema_filename Path to the native DML JSON schema file + * @return RETURN_OK on success, RETURN_ERR on failure + */ +int parse_and_register_native_dml_schema(bus_handle_t *handle, const char *json_schema_filename); + +#endif // WIFI_DML_JSON_PARSER_H