{
	"$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": "iqrfSensor_Frc-response",
		"format": "jsonschema",
		"version": "1-0-0"
	},
	"type": "object",
	"required": [
		"mType",
		"data"
	],
	"additionalProperties": false,
	"properties": {
		"mType": {
			"type": "string",
			"description": "Standard peripheral Sensor - FRC response.",
			"enum": ["iqrfSensor_Frc"]
		},
		"data": {
			"type": "object",
			"required": [
				"msgId",
				"rsp",
				"status"
			],
			"additionalProperties": false,
			"properties": {
				"msgId": {
					"type": "string",
					"description": "Message identification for binding request with response."
				},
				"timeout": {
					"type": "integer",
					"description": "Timeout to wait for IQRF DPA response."
				},
				"rsp": {
					"type": "object",
					"properties": {
						"nAdr": {
							"type": "integer",
							"description": "Network device address."
						},
						"pnum": {
							"type": "integer",
							"description": "Peripheral number."
						},
						"pcmd": {
							"type": "integer",
							"description": "Peripheral response command."
						},
						"hwpId": {
							"type": "integer",
							"description": "Hardware profile identification."
						},
						"rCode": {
							"type": "integer",
							"description": "DPA error code."
						},
						"dpaVal": {
							"type": "integer",
							"description": "DPA value."
						},
						"result": {
							"type": "object",
							"required": [
								"sensors"
							],
							"properties": {
								"sensors": {
									"type": "array",
									"description": "Returns array of objects for every sensor, see its description.",
									"items": {
										"oneOf": [
											{
												"type": "null"
											},
											{
												"type": "object",
												"title": "Regular format",
												"required": [
													"id",
													"type",
													"name",
													"shortName",
													"unit"
												],
												"additionalProperties": false,
												"properties": {
													"id": {
														"type": "string",
														"description": "Value type as text id."
													},
													"type": {
														"type": "integer",
														"description": "Value type of the sensor (quantity)."
													},
													"name": {
														"type": "string",
														"description": "Name of the sensor (quantity)."
													},
													"shortName": {
														"type": "string",
														"description": " Short name of the sensor (quantity). Typically it is a symbol used at physics."
													},
													"value": {
														"oneOf": [
															{
																"type": "number"
															},
															{
																"type": "null"
															}
														],
														"description": "Value of the sensor."
													},
													"decimalPlaces": {
														"type": "integer",
														"description": "Precision."
													},
													"unit": {
														"type": "string",
														"description": "Unit of the quantity. Dimensionless quantities has \"\"."
													},
													"breakdown": {
														"type": "array",
														"description": "Parsed generic types if present in device response.",
														"items": {
															"type": "object",
															"properties": {
																"type": {
																	"type": "integer",
																	"description": "Value type of the sensor (quantity)."
																},
																"name": {
																	"type": "string",
																	"description": "Name of the sensor (quantity)."
																},
																"shortName": {
																	"type": "string",
																	"description": " Short name of the sensor (quantity). Typically it is a symbol used at physics."
																},
																"value": {
																	"oneOf": [
																		{
																			"type": "number"
																		},
																		{
																			"type": "null"
																		}
																	],
																	"description": "Value of the sensor."
																},
																"unit": {
																	"type": "string",
																	"description": "Unit of the quantity. Dimensionless quantities has \"\"."
																}
															}
														}
													}
												}
											},
											{
												"type": "object",
												"title": "Extended format",
												"additionalProperties": false,
												"properties": {
													"nAdr": {
														"type": "integer",
														"description": "Node address."
													},
													"mid": {
														"description": "Node module ID.",
														"oneOf": [
															{ "type": "integer" },
															{ "type": "null" }
														]
													},
													"hwpid": {
														"description": "Node hardware profile ID.",
														"oneOf": [
															{ "type": "integer" },
															{ "type": "null" }
														]
													},
													"metaData": {
														"oneOf": [
															{
																"type": "object",
																"description": "Arbitrary user defined meta data."
															},
															{
																"type": "null"
															}
														]
													},
													"sensor": {
														"oneOf": [
															{
																"type": "null"
															},
															{
																"type": "object",
																"properties": {
																	"id": {
																		"type": "string",
																		"description": "Value type as text id."
																	},
																	"type": {
																		"type": "integer",
																		"description": "Value type of the sensor (quantity)."
																	},
																	"name": {
																		"type": "string",
																		"description": "Name of the sensor (quantity)."
																	},
																	"shortName": {
																		"type": "string",
																		"description": " Short name of the sensor (quantity). Typically it is a symbol used at physics."
																	},
																	"value": {
																		"oneOf": [
																			{
																				"type": "number"
																			},
																			{
																				"type": "null"
																			}
																		],
																		"description": "Value of the sensor."
																	},
																	"unit": {
																		"type": "string",
																		"description": "Unit of the quantity. Dimensionless quantities has \"\"."
																	},
																	"decimalPlaces": {
																		"type": "integer",
																		"description": "Precision."
																	},
																	"breakdown": {
																		"type": "array",
																		"description": "Parsed generic types if present in device response.",
																		"items": {
																			"type": "object",
																			"properties": {
																				"type": {
																					"type": "integer",
																					"description": "Value type of the sensor (quantity)."
																				},
																				"name": {
																					"type": "string",
																					"description": "Name of the sensor (quantity)."
																				},
																				"shortName": {
																					"type": "string",
																					"description": " Short name of the sensor (quantity). Typically it is a symbol used at physics."
																				},
																				"value": {
																					"oneOf": [
																						{
																							"type": "number"
																						},
																						{
																							"type": "null"
																						}
																					],
																					"description": "Value of the sensor."
																				},
																				"unit": {
																					"type": "string",
																					"description": "Unit of the quantity. Dimensionless quantities has \"\"."
																				}
																			}
																		}
																	}
																},
																"required": [
																	"id",
																	"type",
																	"name",
																	"shortName",
																	"unit"
																]
															}
														]
													}
												},
												"required": [
													"nAdr",
													"sensor"
												]
											}
										]
									}
								},
								"sensorIndex": {
									"description": "Index of sensor",
									"type": "integer",
									"minimum": 0
								},
								"selectedNodes": {
									"description": "Array of network device addresses requested to execute FRC command.",
									"type": "array",
									"additionalItems": false,
									"uniqueItems": true,
									"minItems": 1,
									"maxItems": 239,
									"items": {
										"type": "integer",
										"minimum": 1,
										"maximum": 239
									}
								}
							}
						},
						"errorStr": {
							"type": "string",
							"description": "Error description from JS drivers."
						}
					},
					"required": [
						"nAdr",
						"hwpId",
						"rCode",
						"dpaVal"
					]
				},
				"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."
				}
			}
		}
	}
}
