{
  "$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_WriteTrConf-request",
    "format": "jsonschema",
    "version": "1-0-0"
  },
  "type": "object",
  "properties": {
    "mType": {
      "type": "string",
      "description": "IQMESH Network management - Write TR configuration request.",
      "enum": [
        "iqmeshNetwork_WriteTrConf"
      ]
    },
    "data": {
      "type": "object",
      "properties": {
        "msgId": {
          "type": "string",
          "description": "Message identification for binding request with response."
        },
        "repeat": {
          "type": "integer",
          "description": "Number of repetitions of DPA messages.",
          "default": 1
        },
        "req": {
          "type": "object",
          "properties": {
            "deviceAddr": {
              "type": "integer",
              "description": "Device address to write the configuration to. Broadcast address is also allowed."
            },
            "hwpId": {
              "type": "integer",
              "description": "HWP Id."
            },
            "embPers": {
              "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."
                }
              },
              "additionalProperties": false
            },
            "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"
            },
            "accessPassword": {
              "type": "string",
              "description": "It sets access password. If the field is left completely empty (no characters filled), the default password (16x number 0x00) is used (the same as the default set from the factory.",
              "maxItems": 16
            },
            "securityUserKey": {
              "type": "string",
              "description": "It sets security user key. Enter a value up to 16 characters.",
              "maxItems": 16
            }
          },
          "additionalProperties": false,
          "required": [
            "deviceAddr"
          ]
        },
        "returnVerbose": {
          "type": "boolean",
          "description": "Flag that includes additional parameters in the response."
        }
      },
      "additionalProperties": false,
      "required": [
        "msgId",
        "req"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "mType",
    "data"
  ]
}
