Skip to content

Commit

Permalink
Add monitor endpoint and remove wireless quality as an additional end…
Browse files Browse the repository at this point in the history
…point
  • Loading branch information
roesekoSICKAG committed Jul 12, 2024
1 parent d15b72a commit 66e366f
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 65 deletions.
59 changes: 27 additions & 32 deletions JSON_for_IO-Link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,27 @@ paths:
$ref: "#/components/responses/HTTP_403"
"500":
$ref: "#/components/responses/HTTP_500"
"/gateway/monitor":
get:
operationId: GetGatewayMonitor
tags:
- gateway
summary: Read current and voltage values of the Gateway.
description: Read current and voltage values of the primary and secondary rail of the Gateway.
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "./schemas.yaml#/schemas/gatewayMonitor"

"401":
$ref: "#/components/responses/HTTP_401"
"403":
$ref: "#/components/responses/HTTP_403"
"500":
$ref: "#/components/responses/HTTP_500"

################################################################################
# mqtt
Expand Down Expand Up @@ -1431,31 +1452,6 @@ paths:
"500":
$ref: "#/components/responses/HTTP_500"

"/masters/{masterNumber}/ports/qualityall":
get:
operationId: GetMastersMasterNumberPortsQuality
tags:
- ports
parameters:
- $ref: "#/components/parameters/masterNumber"
summary: Read the link quality and the RSSI of all used Wireless-Ports (Wireless-Device and Wireless-Master).
description: Read the link quality and the RSSI of all used Wireless-Ports (Wireless-Device and Wireless-Master).
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "./schemas.yaml#/schemas/mastersPortsQualityallGet"
"401":
$ref: "#/components/responses/HTTP_401"
"403":
$ref: "#/components/responses/HTTP_403"
"404":
$ref: "#/components/responses/HTTP_404"
"500":
$ref: "#/components/responses/HTTP_500"

"/masters/{masterNumber}/ports/{portNumber}/capabilities":
get:
operationId: GetMastersMasterNumberPortsPortNumberCapabilities
Expand Down Expand Up @@ -1818,23 +1814,23 @@ paths:
"500":
$ref: "#/components/responses/HTTP_500"

"/masters/{masterNumber}/ports/{portNumber}/quality":
"/masters/{masterNumber}/ports/{portNumber}/monitor":
get:
operationId: GetMastersMasterNumberPortsPortNumberQuality
operationId: GetMastersMasterNumberPortsPortNumberMonitor
tags:
- ports
summary: Read the actual current, voltage and wireless information from a port.
description: Read the actual current, voltage and wireless information from a port.
parameters:
- $ref: "#/components/parameters/masterNumber"
- $ref: "#/components/parameters/portNumber"
summary: Read the link quality and the RSSI of the specified Wireless-Port (Wireless-Device and Wireless-Master).
description: Read the link quality and the RSSI of the specified Wireless-Port (Wireless-Device and Wireless-Master).
responses:
"200":
description: Successful operation
content:
application/json:
schema:
$ref: "./schemas.yaml#/schemas/mastersPortsQualityGet"
$ref: "./schemas.yaml#/schemas/portMonitor"
"401":
$ref: "#/components/responses/HTTP_401"
"403":
Expand All @@ -1843,7 +1839,6 @@ paths:
$ref: "#/components/responses/HTTP_404"
"500":
$ref: "#/components/responses/HTTP_500"

################################################################################
# devices
################################################################################
Expand Down Expand Up @@ -2833,7 +2828,7 @@ components:
minimum: 0
maximum: 255
required: true

responses:
HTTP_400:
description: Bad request
Expand Down
126 changes: 93 additions & 33 deletions schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,76 @@ schemas:
ipAddress: 192.168.1.13
subnetMask: 255.255.255.0
standardGateway: 192.168.1.1

voltageObject:
type: object
properties:
value:
type: number
minimum: 0
example: 24
unit:
type: string
minLength: 1
maxLength: 32
example: "V"
currentObject:
type: object
properties:
value:
type: number
minimum: 0
example: 0.5
unit:
type: string
minLength: 1
maxLength: 32
example: "A"
gatewayMonitor:
type: object
properties:
voltage:
type: object
properties:
primaryVoltage:
$ref: "#/schemas/voltageObject"
secondaryVoltage:
$ref: "#/schemas/voltageObject"
current:
type: object
properties:
primaryCurrent:
$ref: "#/schemas/currentObject"
secondaryCurrent:
$ref: "#/schemas/currentObject"
portMonitor:
type: object
properties:
voltage:
type: object
properties:
primaryVoltage:
$ref: "#/schemas/voltageObject"
secondaryVoltage:
$ref: "#/schemas/voltageObject"
cqVoltage:
$ref: "#/schemas/voltageObject"
iqVoltage:
$ref: "#/schemas/voltageObject"
current:
type: object
properties:
primaryCurrent:
$ref: "#/schemas/currentObject"
secondaryCurrent:
$ref: "#/schemas/currentObject"
cqCurrent:
$ref: "#/schemas/currentObject"
iqCurrent:
$ref: "#/schemas/currentObject"
wirelessQuality:
$ref: "#/schemas/wirelessPortQuality"

mqttConfigurationGetPost:
type: object
required:
Expand Down Expand Up @@ -1461,40 +1531,30 @@ schemas:
Mode: ROAMING
txPower: 31

mastersPortsQualityallGet: # TODO: IOLW
type: array
items:
type: object
properties:
portNumber:
$ref: "#/schemas/portNumber"
lqiMaster:
type: integer
minimum: 0
maximum: 100
rssiMaster:
type: integer
minimum: -128
maximum: 20
lqiDevice:
type: integer
minimum: 0
maximum: 100
rssiDevice:
type: integer
minimum: -128
maximum: 20
wirelessPortQuality:
type: object
properties:
lqiMaster:
type: integer
minimum: 0
maximum: 100
rssiMaster:
type: integer
minimum: -128
maximum: 20
lqiDevice:
type: integer
minimum: 0
maximum: 100
rssiDevice:
type: integer
minimum: -128
maximum: 20
example:
- portNumber: 1
lqiMaster: 100
rssiMaster: -40
lqiDevice: 100
rssiDevice: -39
- portNumber: 2
lqiMaster: 100
rssiMaster: -60
lqiDevice: 100
rssiDevice: -61
lqiMaster: 100
rssiMaster: -40
lqiDevice: 100
rssiDevice: -39

mastersPortsQualityGet: # TODO: IOLW
properties:
Expand Down

0 comments on commit 66e366f

Please sign in to comment.