{
  "$schema": "https://apidocs.iqrf.org/iqrf-gateway-daemon/latest/com.iqrftech.self-desc/schema/jsonschema/1-0-0#",
  "self": {
    "vendor": "com.iqrftech.self-desc",
    "name": "iqmeshNetwork_EnumerateDevice-response",
    "format": "jsonschema",
    "version": "1-0-0"
  },
  "type": "object",
  "properties": {
    "mType": {
      "type": "string",
      "description": "IQMESH Network management - Enumerate Device response.",
      "enum": [
        "iqmeshNetwork_EnumerateDevice"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "msgId": {
          "type": "string",
          "description": "Message identification for binding request with response."
        },
        "rsp": {
          "type": "object",
          "description": "Returns following values, see its description.",
          "properties": {
            "deviceAddr": {
              "type": "integer",
              "description": "Device address to enumerate."
            },
            "manufacturer": {
              "type": "string",
              "description": "Manufacture name."
            },
            "product": {
              "type": "string",
              "description": "Product name."
            },
            "standards": {
              "type": "array",
              "description": "Supported standards by the device.",
              "items": {
                "type": "string"
              }
            },
            "discovery": {
              "type": "object",
              "description": "First response.",
              "properties": {
                "discovered": {
                  "type": "boolean",
                  "description": "Device is discovered."
                },
                "vrn": {
                  "type": "integer",
                  "description": "Device VRN integer."
                },
                "zone": {
                  "type": "integer",
                  "description": "Device zone."
                },
                "parent": {
                  "type": "integer",
                  "description": "Device parent."
                }
              },
              "required": [
                "discovered",
                "vrn",
                "zone",
                "parent"
              ]
            },
            "osRead": {
              "type": "object",
              "description": "Returns Embedded peripheral OS - Read response.",
              "properties": {
                "mid": {
                  "type": "string",
                  "description": "TR Module ID."
                },
                "osVersion": {
                  "type": "string",
                  "description": "IQRF OS version."
                },
                "trMcuType": {
                  "type": "object",
                  "description": "See DPA guide.",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "TR&McuType value."
                    },
                    "trType": {
                      "type": "string",
                      "description": "TR module type."
                    },
                    "fccCertified": {
                      "type": "boolean",
                      "description": "TR module is FCC certified."
                    },
                    "mcuType": {
                      "type": "string",
                      "description": "TR module MCU type."
                    }
                  }
                },
                "osBuild": {
                  "type": "string",
                  "description": "IQRF OS build."
                },
                "rssi": {
                  "type": "string",
                  "description": "See lastRSSI at IQRF OS Reference Guide."
                },
                "supplyVoltage": {
                  "type": "string",
                  "description": "Module supply voltage"
                },
                "flags": {
                  "type": "object",
                  "description": "See DPA guide.",
                  "additionalProperties": false,
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "Flags value."
                    },
                    "insufficientOsBuild": {
                      "type": "boolean",
                      "description": "Flags.0 - Insufficient OsBuild. (DPA < 4.17)"
                    },
                    "insufficientOsVersion": {
                      "type": "boolean",
                      "description": "Flags.0 - Insufficient OsVersion. (DPA >= 4.17)"
                    },
                    "interfaceType": {
                      "type": "string",
                      "description": "Flags.1 - Interface type."
                    },
                    "dpaHandlerDetected": {
                      "type": "boolean",
                      "description": "Flags.2 - Custom DPA handler was detected."
                    },
                    "dpaHandlerNotDetectedButEnabled": {
                      "type": "boolean",
                      "description": "Flags.3 - Custom DPA Handler is not detected but enabled."
                    },
                    "noInterfaceSupported": {
                      "type": "boolean",
                      "description": "Flags.4 - No interface supported."
                    },
                    "iqrfOsChanged": {
                      "type": "boolean",
                      "description": "Flags.5 - IQRF OS is changed from the originally manufactured version."
                    },
                    "frcAggregationEnabled": {
                      "type": "boolean",
                      "description": "Flags.6 - is 1 if the FRC Aggregation feature is enabled by the TR manufacturer."
                    }
                  }
                },
                "slotLimits": {
                  "type": "object",
                  "description": "See DPA guide.",
                  "properties": {
                    "value": {
                      "type": "integer",
                      "description": "Slot limits value."
                    },
                    "shortestTimeslot": {
                      "type": "string",
                      "description": "Shortest timeslot length in 10 ms units."
                    },
                    "longestTimeslot": {
                      "type": "string",
                      "description": "Longets timeslot length in 10 ms units."
                    }
                  }
                }
              },
              "required": [
                "mid",
                "osVersion",
                "osBuild"
              ]
            },
            "peripheralEnumeration": {
              "type": "object",
              "description": "Reduced or full eperExploreEnum.",
              "properties": {
                "dpaVer": {
                  "type": "string",
                  "description": "DPA version."
                },
                "perNr": {
                  "type": "integer",
                  "description": "Number of all non-embedded peripherals implemented by Custom DPA Handler."
                },
                "embPers": {
                  "type": "array",
                  "description": "Bits array (starting from LSb of the 1st byte) specifying which of 32 embedded peripherals are enabled in the HWP Configuration.",
                  "items": {
                    "type": "integer"
                  }
                },
                "hwpId": {
                  "type": "integer",
                  "description": "Hardware profile identification."
                },
                "hwpIdVer": {
                  "type": "integer",
                  "description": "Hardware profile version."
                },
                "flags": {
                  "type": "object",
                  "description": "Various flags.",
                  "properties": {
                    "value": {
                      "type": "integer"
                    },
                    "rfModeStd": {
                      "type": "boolean"
                    },
                    "rfModeLp": {
                      "type": "boolean"
                    },
                    "stdAndLpNetwork": {
                      "type": "boolean"
                    }
                  }
                },
                "userPers": {
                  "type": "array",
                  "description": "Bits array (starting from LSb of the 1st byte) specifying which of non-embedded peripherals are implemented.",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "dpaVer",
                "hwpId",
                "hwpIdVer"
              ]
            },
            "trConfiguration": {
              "type": "object",
              "description": "Reduced or full eperOsReadCfg.",
              "properties": {
                "embPeripherals": {
                  "type": "object",
                  "description": "Embedded peripherals enabled on the node.",
                  "properties": {
                    "values": {
                      "type": "array",
                      "description": "An array of 32 bits. Each bit enables/disables one of the embedded 32 predefined peripherals.",
                      "items": {
                        "type": "integer"
                      },
                      "maxItems": 4
                    },
                    "coordinator": {
                      "type": "boolean",
                      "description": "If coordinator is enabled."
                    },
                    "node": {
                      "type": "boolean",
                      "description": "If node is enabled."
                    },
                    "os": {
                      "type": "boolean",
                      "description": "If OS is enabled."
                    },
                    "eeprom": {
                      "type": "boolean",
                      "description": "If EEPROM is enabled."
                    },
                    "eeeprom": {
                      "type": "boolean",
                      "description": "If EEEPROM is enabled."
                    },
                    "ram": {
                      "type": "boolean",
                      "description": "If RAM is enabled."
                    },
                    "ledr": {
                      "type": "boolean",
                      "description": "If LEDR is enabled."
                    },
                    "ledg": {
                      "type": "boolean",
                      "description": "If LEDG is enabled."
                    },
                    "spi": {
                      "type": "boolean",
                      "description": "If SPI is enabled."
                    },
                    "io": {
                      "type": "boolean",
                      "description": "If IO is enabled."
                    },
                    "thermometer": {
                      "type": "boolean",
                      "description": "If thermometer is enabled."
                    },
                    "pwm": {
                      "type": "boolean",
                      "description": "If PWM is enabled."
                    },
                    "uart": {
                      "type": "boolean",
                      "description": "If UART is enabled."
                    },
                    "frc": {
                      "type": "boolean",
                      "description": "If FRC is enabled."
                    }
                  }
                },
                "rfBand": {
                  "type": "string",
                  "enum": ["868", "916", "433"],
                  "description": "Used RF band."
                },
                "rfChannelA": {
                  "type": "integer",
                  "description": "Main RF channel A of the main network. Valid numbers depend on used RF band."
                },
                "rfChannelB": {
                  "type": "integer",
                  "description": "Same as above but second B channel. Used at RFPGM only."
                },
                "rfSubChannelA": {
                  "type": "integer",
                  "description": "Main RF channel A of the optional subordinate network in case the node also plays a role of the coordinator of such network. Valid numbers depend on used RF band. Available for DPA<400."
                },
                "rfSubChannelB": {
                  "type": "integer",
                  "description": "Same as above but second B channel."
                },
                "txPower": {
                  "type": "integer",
                  "description": "RF output power. Valid numbers 0-7."
                },
                "rxFilter": {
                  "type": "integer",
                  "description": "RF signal filter. Valid numbers 0-64."
                },
                "lpRxTimeout": {
                  "type": "integer",
                  "description": "Timeout for receiving RF packets at LP mode at N device."
                },
                "rfAltDsmChannel": {
                  "type": "integer",
                  "description": "A nonzero value specifies an alternative DPA service mode channel."
                },
                "localFrcReception": {
                  "type": "boolean",
                  "description": "If set, then Local FRC reception is enabled at [N]."
                },
                "rfPgmEnableAfterReset": {
                  "type": "boolean",
                  "description": "If sets, then activates RFPGM invoking by TR module reset."
                },
                "rfPgmTerminateAfter1Min": {
                  "type": "boolean",
                  "description": "If sets, then terminates RFPGM automatically ~1 minute after reset."
                },
                "rfPgmTerminateMcuPin": {
                  "type": "boolean",
                  "description": "If sets, then terminates RFPGM by dedicated pin of the TR module."
                },
                "rfPgmDualChannel": {
                  "type": "boolean",
                  "description": "If sets, then enables single or dual channel function."
                },
                "rfPgmLpMode": {
                  "type": "boolean",
                  "description": "RFPGM receiving mode setting. If set, then LP (low power) Rx mode is used during RFPGM. Otherwise STD (standard) Rx mode is used."
                },
                "rfPgmIncorrectUpload": {
                  "type": "boolean",
                  "description": "Read only. Indicates that the last RFPGM has successfully been completed."
                },
                "customDpaHandler": {
                  "type": "boolean",
                  "description": "If set, then a Custom DPA handler is called in case of an event."
                },
                "dpaPeerToPeer": {
                  "type": "boolean",
                  "description": "If set, then DP2P is enabled at [N]."
                },
                "nodeDpaInterface": {
                  "type": "boolean",
                  "description": "If set, then Node device can be controlled by a SPI or UART interface. Valid only in DPA version < 4.00"
                },
                "uartBaudrate": {
                  "type": "integer",
                  "description": "Baud rate of the UART interface if one is used."
                },
                "dpaAutoexec": {
                  "type": "boolean",
                  "description": "If set, then DPA Autoexec is run at a later stage of the module boot time."
                },
                "routingOff": {
                  "type": "boolean",
                  "description": "If set, then the Node device does not route packets on the background."
                },
                "ioSetup": {
                  "type": "boolean",
                  "description": "If set, then DPA IO Setup is run at an early stage of the module boot time."
                },
                "peerToPeer": {
                  "type": "boolean",
                  "description": "If set, then device receives also peer-to-peer (non-networking) packets and raises PeerToPeer event."
                },
                "neverSleep": {
                  "type": "boolean",
                  "description": "If set, then unbonded Node using default IQRF buttons never sleeps during the button bonding. From DPA v3.03"
                },
                "stdAndLpNetwork": {
                  "type": "boolean",
                  "description": "If the bit is set, then the [C] controls the STD+LP network; otherwise, it controls the STD network. The bit can only be changed if the network is empty (no [Ns] are bonded) otherwise the network will stop working. From DPA v4.00"
                },
                "thermometerSensorPresent": {
                  "type": "boolean",
                  "description": "If set, on-board thermometer sensor chip is present."
                },
                "serialEepromPresent": {
                  "type": "boolean",
                  "description": "If set, serial EEPROM chip is present."
                },
                "transcieverILType": {
                  "type": "boolean",
                  "description": "This property is deprecated and will be removed in the future, use transceiverILType instead."
                },
                "transceiverILType": {
                  "type": "boolean",
                  "description": "If set, transciever is IL type for Israel region."
                }
              }
            },
            "morePeripheralsInfo": {
              "type": "array",
              "description": "Returns the same information as Get peripheral information but for up to 14 peripherals of consecutive indexes starting with the specified PCMD.",
              "items": {
                "type": "object",
                "properties": {
                  "perTe": {
                    "type": "integer",
                    "description": "Extended peripheral characteristic. See Extended Peripheral Characteristic constants."
                  },
                  "perT": {
                    "type": "integer",
                    "description": "Peripheral type. If the peripheral is not supported or enabled, then PerTx = PERIPHERAL_TYPE_DUMMY. See Peripheral Types constants."
                  },
                  "par1": {
                    "type": "integer",
                    "description": "Optional peripheral specific information."
                  },
                  "par2": {
                    "type": "integer",
                    "description": "Optional peripheral specific information."
                  }
                },
                "required": [
                  "perTe",
                  "perT",
                  "par1",
                  "par2"
                ]
              },
              "maxItems": 14
            }
          },
          "required": [
            "deviceAddr"
          ]
        },
        "raw": {
          "type": "array",
          "description": "Returns array of objects req-cnf-rsp, see its description.",
          "items": {
            "type": "object",
            "properties": {
              "request": {
                "type": "string",
                "description": "Binary buffer with DPA request."
              },
              "requestTs": {
                "type": "string",
                "description": "YYYY-MM-DDTHH:MM:SS.SSS±HH:MM"
              },
              "confirmation": {
                "type": "string",
                "description": "Binary buffer with DPA confirmation."
              },
              "confirmationTs": {
                "type": "string",
                "description": "YYYY-MM-DDTHH:MM:SS.SSS±HH:MM"
              },
              "response": {
                "type": "string",
                "description": "Binary buffer with DPA response."
              },
              "responseTs": {
                "type": "string",
                "description": "YYYY-MM-DDTHH:MM:SS.SSS±HH:MM"
              }
            },
            "required": [
              "request",
              "requestTs",
              "confirmation",
              "confirmationTs",
              "response",
              "responseTs"
            ]
          }
        },
        "insId": {
          "type": "string",
          "description": "IQRF GW daemon instance identification."
        },
        "status": {
          "type": "integer",
          "description": "IQRF GW daemon API (general or mType) status."
        },
        "statusStr": {
          "type": "string",
          "description": "IQRF GW daemon API (general or mType) status in string form."
        }
      },
      "required": [
        "msgId",
        "status"
      ]
    }
  },
  "required": [
    "mType",
    "data"
  ]
}
