From 512a49952af81ae7c3e078ad12d6ede59788f411 Mon Sep 17 00:00:00 2001 From: roeseko Date: Fri, 2 Feb 2024 17:02:50 +0100 Subject: [PATCH 01/22] First draft with discussed changes (in progress) --- MQTT_for_IO-Link.yaml | 163 +- examples.yaml | 75 + schemas.yaml | 3423 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 3564 insertions(+), 97 deletions(-) create mode 100644 examples.yaml create mode 100644 schemas.yaml diff --git a/MQTT_for_IO-Link.yaml b/MQTT_for_IO-Link.yaml index fa30f87..a2c0bb5 100644 --- a/MQTT_for_IO-Link.yaml +++ b/MQTT_for_IO-Link.yaml @@ -1,52 +1,51 @@ -asyncapi: 2.5.0 +asyncapi: 2.6.0 info: - title: MQTT for IO-Link Topics - version: 0.0.1 + title: MQTT for IO-Link Master + version: 0.0.3 description: > This is the _AsyncAPI_ specification of MQTT topics by the IO-Link consortium. termsOfService: "https://www.io-link.com" contact: - name: Markus Rentschler - email: markus.rentschler@murrelektronik.de + name: "IO-Link Community" + email: info@io-link.com + url: "http://www.io-link.com" + license: + name: Apache 2.0 + url: "http://www.apache.org/licenses/LICENSE-2.0.html" +defaultContentType: application/json servers: - broker: - url: "api.iolink.com:{port}" + iol-master: + url: "{iolm-ip}:{port}" protocol: mqtt - description: central mqtt Broker + protocolVersion: 3.1.1 + description: io-link master as MQTT client security: - user-password: [] variables: + iolm-ip: + default: "192.168.0.1" port: enum: - "1883" - "8883" default: "1883" channels: - "{originatorId}/connection": + "{originatorId}/gateway/identification": description: >- - Topic that publishes online/offline state of the gateway, send at - startup/"birth" and as "lastwill" + publishes asset (e.g. gateway) nameplate information, send at startup or + onChange parameters: originatorId: - description: >- - shall be the unique identifier of the originator and shall correspond - to the client id inside the MQTT message. It can be the ProductURI, - DNS name, IP address or MAC address of the device hosting the MQTT - publisher. By default the Hostname shall be used. schema: - type: string - example: iomaster_nr1 - subscribe: + $ref: "./schemas.yaml#/schemas/originatorId" + publish: message: - $ref: "#/components/messages/connection" - bindings: - mqtt: - qos: 1 - retain: true - "{originatorId}/asset": - description: >- - publishes asset (e.g. gateway) nameplate information, send at startup or - onChange + name: gatewayIdentification + payload: + $ref: "./schemas.yaml#/schemas/gatewayIdentificationGet" + + "{originatorId}/gateway/events": + description: publishes gateway events parameters: originatorId: description: >- @@ -57,33 +56,30 @@ channels: schema: type: string example: iomaster_nr1 - subscribe: + publish: message: - $ref: "#/components/messages/nameplate" - bindings: - mqtt: - qos: 1 - retain: true - "{originatorId}/health": - description: publishes gateway health state + name: gatewayEvents + payload: + $ref: "./schemas.yaml#/schemas/gatewayIdentificationGet" + + "{originatorId}/master/{masterNumber}/identification": + description: >- + publishes asset (e.g. gateway) nameplate information, send at startup or + onChange parameters: originatorId: - description: >- - shall be the unique identifier of the originator and shall correspond - to the client id inside the MQTT message. It can be the ProductURI, - DNS name, IP address or MAC address of the device hosting the MQTT - publisher. By default the Hostname shall be used. schema: - type: string - example: iomaster_nr1 - subscribe: + $ref: "./schemas.yaml#/schemas/originatorId" + masterNumber: + schema: + $ref: "./schemas.yaml#/schemas/eventMasterNumber" + publish: message: - $ref: "#/components/messages/gatewayhealth" - bindings: - mqtt: - qos: 1 - retain: true - "{originatorId}/{deviceId}(/event)/asset": + name: gatewayIdentification + payload: + $ref: "./schemas.yaml#/schemas/masterIdentificationGet" + + "{originatorId}/{deviceAlias}/identification": description: >- publishes asset (e.g. device) nameplate information, send at connection startup (new connection) @@ -97,19 +93,18 @@ channels: schema: type: string example: iomaster_nr1 - deviceId: + deviceAlias: description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" schema: type: string example: port1 - subscribe: + publish: message: - $ref: "#/components/messages/nameplate_iolink" - bindings: - mqtt: - qos: 1 - retain: true - "{originatorId}/{deviceId}(/event)/status": + name: deviceIdentification + payload: + $ref: "./schemas.yaml#/schemas/deviceIdentificationGet" + + "{originatorId}/{deviceAlias}/event": description: "publishes the port status, send at startup/onChange" parameters: originatorId: @@ -121,7 +116,7 @@ channels: schema: type: string example: iomaster_nr1 - deviceId: + deviceAlias: description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" schema: type: string @@ -133,31 +128,8 @@ channels: mqtt: qos: 1 retain: true - "{originatorId}/{deviceId}(/event)/health": - description: health data of the device - parameters: - originatorId: - description: >- - shall be the unique identifier of the originator and shall correspond - to the client id inside the MQTT message. It can be the ProductURI, - DNS name, IP address or MAC address of the device hosting the MQTT - publisher. By default the Hostname shall be used. - schema: - type: string - example: iomaster_nr1 - deviceId: - description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" - schema: - type: string - example: port1 - subscribe: - message: - $ref: "#/components/messages/devicehealth" - bindings: - mqtt: - qos: 1 - retain: true - "{originatorId}/{deviceId}/processData": + + "{originatorId}/{deviceAlias}/processData": parameters: originatorId: description: >- @@ -168,21 +140,18 @@ channels: schema: type: string example: iomaster_nr1 - deviceId: + deviceAlias: description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" schema: type: string example: port1 - subscribe: + publish: message: - oneOf: - - $ref: "#/components/messages/processdata_IOLink" - - $ref: "#/components/messages/processdata_Misc" - bindings: - mqtt: - qos: 1 - retain: true - "{originatorId}/{deviceId}/events": + name: processdata + payload: + $ref: "./schemas.yaml#/schemas/processDataValue" + + "{originatorId}/{deviceAlias}/events": description: >- eventlog of the io link device, see "iolink/v1/devices/{deviceAlias}/events" @@ -196,7 +165,7 @@ channels: schema: type: string example: iomaster_nr1 - deviceId: + deviceAlias: description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" schema: type: string @@ -491,7 +460,7 @@ components: type: boolean isWrongVendorId: type: boolean - isWrongDeviceId: + isWrongdeviceAlias: type: boolean isWrongSerialNumber: type: boolean @@ -924,7 +893,7 @@ components: schema: type: string example: iomaster_nr1 - deviceId: + deviceAlias: description: Id of the IO-Link device (e.g. port nr) schema: type: string diff --git a/examples.yaml b/examples.yaml new file mode 100644 index 0000000..e274b72 --- /dev/null +++ b/examples.yaml @@ -0,0 +1,75 @@ +examples: + processDataValue: + byteArray: + iolink: #"format=byteArray, pin4=IO-Link, pin2=sio" + valid: true + value: + - 15 + - 123 + - 126 + - 236 + iqValue: true + iodd: + iolink: #"format=iodd, pin4=IO-Link, pin2=deactivated/not available" + valid: true + value: + Valve_1: + value: true + Valve_2: + value: false + sio: + cqValue: false #"format=byteArray/iodd, pin4=sio, pin2=deactivated/not available" + + gatewayConfig: + Manual: + value: + ethIpv4: + - ipConfiguration: MANUAL + ipAddress: 192.168.1.13 + subnetMask: 255.255.255.0 + standardGateway: 192.168.1.1 + DHCP: + value: + ethIpv4: + - ipConfiguration: DHCP + Multiple_ethernet_interfaces: + value: + ethIpv4: + - ifName: eth0 + ipConfiguration: MANUAL + ipAddress: 192.168.1.13 + subnetMask: 255.255.255.0 + standardGateway: 192.168.1.1 + - ifName: eth1 + ipConfiguration: MANUAL + ipAddress: 192.168.2.10 + subnetMask: 255.255.255.0 + standardGateway: 192.168.2.1 + - ifName: eth2 + ipConfiguration: DHCP + mqttConfig: + activeClient: + value: + clientMode: "ACTIVE" + serverAddress: 192.168.2.1:1883/mqttbroker + username: iolink_json + password: "1234" + lastwill: + topic: process_data + message: Process data transfer stopped. + qos: 0_ONLY_ONCE + retain: true + keepAliveTime: 10 + inactiveClient: + value: + clientMode: "INACTIVE" + gatewayIdentification: + value: + macAddress: "00:02:72:CE:A6:49" + serialNumber: "C134A746" + productId: "TMP34Z" + vendorName: "SensorCompany" + productName: "FlowSensor34" + hardwareRevision: "V3.45" + firmwareRevision: "V1.30" + productInstanceUri: "sensor.tmp.23.com" diff --git a/schemas.yaml b/schemas.yaml new file mode 100644 index 0000000..b93937b --- /dev/null +++ b/schemas.yaml @@ -0,0 +1,3423 @@ +schemas: + deviceAlias: + type: string + description: Unique deviceAlias. + minLength: 1 + maxLength: 32 + pattern: "^[a-zA-Z0-9_]{1,32}$" + example: master1port1 + originatorId: + type: string + description: + Shall be the unique identifier of the originator and shall correspond to the client id inside the MQTT message. It can be the ProductURI, + DNS name, IP address or MAC address of the device hosting the MQTT publisher. + example: master1 + parameterName: + type: string + description: | + Parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ + Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ + Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ + Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "_". The following regex (/[^\w\n]/g) can be used.\ + Rule 3: Leading numbers shall be prefixed with “_“. \ + Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ + Rule 5: Naming according the scheme {name}_{index} or {name}_{subindex} is always allowed even if names are not duplicated. \ + Rule 6: The naming of ArrayT elements is “element_{subindex}”. \ + minLength: 1 + maxLength: 71 + subParameterName: + type: string + description: | + Sub-parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ + Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ + Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ + Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "_". The following regex (/[^\w\n]/g) can be used. \ + Rule 3: Leading numbers shall be prefixed with “_“. \ + Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ + Rule 5: Naming according the scheme {name}_{index} or {name}_{subindex} is always allowed even if names are not duplicated. \ + Rule 6: The naming of ArrayT elements is “element_{subindex}”. \ + minLength: 1 + maxLength: 71 + cycleTime: + type: object + required: + - value + - unit + properties: + value: + type: number + minimum: 0 + example: 10 + unit: + type: string + enum: + - ms + default: ms + event: + type: object + ipConfiguration: + type: string + enum: + - MANUAL + - DHCP + processData: + allOf: + - type: object + required: + - direction + - format + properties: + direction: + $ref: "#/schemas/content" + format: + $ref: "#/schemas/format" + oneOf: + - type: object + required: + - interval + properties: + interval: + $ref: "#/schemas/cycleTime" + - type: object + required: + - onChange + properties: + onChange: + type: boolean + format: + type: string + enum: + - byteArray + - iodd + default: byteArray + content: + type: string + enum: + - getData + - setData + - getSetData + default: getData + mqttParameter: + type: object + required: + - format + properties: + parameter: + $ref: "#/schemas/parameter" + format: + $ref: "#/schemas/format" + oneOf: + - type: object + required: + - interval + properties: + interval: + $ref: "#/schemas/cycleTime" + - type: object + required: + - onChange + properties: + onChange: + type: boolean + parameter: + oneOf: + - type: object + required: + - parameterName + properties: + parameterName: + $ref: "#/schemas/parameterName" + subParameterName: + $ref: "#/schemas/subParameterName" + - type: object + required: + - index + properties: + index: + type: integer + example: 233 + subindex: + type: integer + example: 2 + eventOrigin: + type: string + enum: + - ALL + - GATEWAY + - MASTERS + - PORTS + - DEVICES + default: ALL + eventMasterNumber: + type: integer + minimum: 1 + eventPortNumber: + type: integer + minimum: 1 + eventdeviceAlias: + type: string + minLength: 1 + maxLength: 32 + eventTop: + type: integer + minimum: 1 + eventBottom: + type: integer + minimum: 1 + identificationMasters: + type: array + items: + type: object + required: + - masterNumber + properties: + masterNumber: + type: integer + minimum: 1 + serialNumber: + type: string + minLength: 1 + maxLength: 16 + locationTag: + type: string + minLength: 1 + maxLength: 32 + example: + - masterNumber: 1 + serialNumber: A12345678B + locationTag: slotNumber 5 + - masterNumber: 2 + serialNumber: 123A45B783 + locationTag: slotNumber 6 + masterIdentificationPost: + type: object + properties: + applicationSpecificTag: + type: string + minLength: 1 + maxLength: 32 + locationTag: + type: string + minLength: 1 + maxLength: 32 + functionTag: + type: string + minLength: 1 + maxLength: 32 + gatewayCapabilitiesGet: + required: + - ioddSupported + - mqttSupported + type: object + properties: + ioddSupported: + type: boolean + mqttSupported: + type: boolean + example: + ioddSupported: true + mqttSupported: true + masterCapabilitiesGet: + required: + - numberOfPorts + type: object + properties: + numberOfPorts: + type: integer + minimum: 1 + maxPowerSupply: + type: object + required: + - value + - unit + properties: + value: + type: number + minimum: 0 + unit: + type: string + minLength: 1 + eventTime: + description: >- + Timestamp (format defined in DIN ISO 8601). This field can give an + absolute time or a relative time. Both formats are defined in DIN ISO + 8601. + type: string + eventSeverity: + description: >- + Indicates the severity of the message. The IO-Link EventType + NOTIFICATION maps to NOTICE, WARNING to WARNING and ERROR to ERROR. + type: string + enum: + - EMERGENCY + - ALERT + - CRITICAL + - ERROR + - WARNING + - NOTICE + - INFO + - DEBUG + eventOriginObject: + type: object + properties: + gateway: + type: string + masterNumber: + description: >- + This property is mandatory for IO-Link Master Events, IO-Link Port + Events and IO-Link Device Events. Should not be used for other log + entries. + type: integer + minimum: 1 + portNumber: + description: >- + This property is mandatory for IO-Link Port Events and IO-Link + Device Events. Should not be used for other log entries. + type: integer + minimum: 1 + deviceAlias: + $ref: "#/schemas/deviceAlias" + eventObject: + type: object + properties: + code: + description: >- + IO-Link Port EventCode or IO-Link Device EventCode. This property is + mandatory for IO-Link Port Events or IO-Link Device Events. + type: integer + minimum: 0 + maximum: 65535 + mode: + description: >- + IO-Link Port Event Mode or IO-Link Device EventMode. This property + is mandatory for IO-Link Port Events or IO-Link Device Events. + type: string + enum: + - SINGLESHOT + - APPEARS + - DISAPPEARS + text: + type: string + minLength: 1 + gatewayEventsGet: + type: array + items: + type: object + required: + - time + - severity + - origin + - message + properties: + time: + $ref: "#/schemas/eventTime" + severity: + $ref: "#/schemas/eventSeverity" + origin: + $ref: "#/schemas/eventOriginObject" + message: + $ref: "#/schemas/eventObject" + blockParameterizationPostParametersRequest: + type: array + minItems: 1 + items: + type: object + required: + - identifier + properties: + identifier: + oneOf: + - type: object + required: + - index + properties: + index: + type: integer + minimum: 0 + maximum: 65535 + subIndex: + type: integer + minimum: 0 + maximum: 255 + - type: object + required: + - parameterName + properties: + parameterName: + $ref: "#/schemas/parameterName" + subParameterName: + $ref: "#/schemas/subParameterName" + content: + $ref: "#/schemas/deviceParameterValueGetPost" + deviceBlockParameterizationPostParametersAnswer: + type: array + items: + type: object + required: + - identifier + - result + properties: + identifier: + oneOf: + - type: object + required: + - index + properties: + index: + type: integer + minimum: 0 + maximum: 65535 + subIndex: + type: integer + minimum: 0 + maximum: 255 + - type: object + required: + - parameterName + properties: + parameterName: + $ref: "#/schemas/parameterName" + subParameterName: + $ref: "#/schemas/subParameterName" + result: + type: object + required: + - parameterExchangeResult + properties: + parameterExchangeResult: + type: string + enum: + - WRITE_SUCCESS + - READ_SUCCESS + - ERROR + content: + $ref: "#/schemas/deviceParameterValueGetPost" + iolinkError: + $ref: "#/schemas/iolinkErrorObject" + deviceEventsGet: + type: array + items: + type: object + required: + - time + - severity + - origin + - message + properties: + time: + $ref: "#/schemas/eventTime" + severity: + $ref: "#/schemas/eventSeverity" + origin: + required: + - master + - port + - deviceAlias + allOf: + - $ref: "#/schemas/eventOriginObject" + message: + required: + - code + - mode + allOf: + - $ref: "#/schemas/eventObject" + example: + - time: "2018-05-18T07:31:54.123Z" + severity: WARNING + origin: + master: 1 + port: 1 + deviceAlias: Temperature_sensor_1 + message: + code: 16912 + mode: APPEARS + text: Device temperature over-run – Clear source of heat + gatewayIdentificationGet: + type: object + required: + - macAddress + - vendorName + properties: + macAddress: + type: string + pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" + serialNumber: + type: string + orderCode: + type: string + maxLength: 64 + productName: + type: string + productId: + type: string + hardwareRevision: + type: string + maxLength: 64 + firmwareRevision: + type: string + vendorName: + type: string + vendorUrl: + type: string + manualUrl: + type: string + productInstanceUri: + type: string + applicationSpecificTag: + type: string + locationTag: + type: string + functionTag: + type: string + example: + macAddress: "00:02:72:CE:A6:49" + serialNumber: "C134A746" + productId: "TMP34Z" + vendorName: "SensorCompany" + productName: "FlowSensor34" + hardwareRevision: "V3.45" + firmwareRevision: "V1.30" + productInstanceUri: "sensor.tmp.23.com" + gatewayConfigurationGetPost: + type: object + required: + - ethIpv4 + properties: + ethIpv4: + type: array + minItems: 1 + items: + type: object + required: + - ipConfiguration + properties: + ifName: + type: string + ipConfiguration: + $ref: "#/schemas/ipConfiguration" + ipAddress: + type: string + format: ipv4 + pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ + subnetMask: + type: string + format: ipv4 + pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ + standardGateway: + type: string + format: ipv4 + pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ + example: + ethIpv4: + - ifName: "eth0" + ipConfiguration: MANUAL + ipAddress: 192.168.1.13 + subnetMask: 255.255.255.0 + standardGateway: 192.168.1.1 + mqttConfigurationGetPost: + type: object + required: + - clientMode + properties: + clientMode: + type: string + serverAddress: + type: string + username: + type: string + password: + type: string + lastWill: + type: object + required: + - topic + - message + - qos + - retain + properties: + topic: + type: string + message: + type: string + qos: + type: string + enum: + - 0_ONLY_ONCE + - 1_AT_LEAST_ONCE + - 2_EXACTLY_ONCE + retain: + type: boolean + keepAliveTime: + type: integer + clientId: + type: string + description: + MQTT Client identifier to address and identify the iolink master as MQTT client. It needs to be unique within the MQTT network. + Since this parameter is optional, default value shall be set internally to a unique value (e.g. master name + MAC). + originatorId: + $ref: "#/schemas/originatorId" + mqttConfigurationTopic: + allOf: + - type: object + required: + - qos + - deviceAlias + properties: + qos: + type: string + enum: + - 0_ONLY_ONCE + - 1_AT_LEAST_ONCE + - 2_EXACTLY_ONCE + deviceAlias: + type: string + description: Unique deviceAlias. + - oneOf: + - type: object + properties: + event: + $ref: "#/schemas/event" + processData: + $ref: "#/schemas/processData" + parameter: + $ref: "#/schemas/mqttParameter" + mqttConfigurationTopicPost: + allOf: + - type: object + properties: + topicName: + type: string + - $ref: "#/schemas/mqttConfigurationTopic" + mqttConfigurationTopicGet: + allOf: + - type: object + required: + - topicId + properties: + topicId: + type: integer + - type: object + required: + - topicName + properties: + topicName: + type: string + - $ref: "#/schemas/mqttConfigurationTopic" + example: + topicId: 1 + topicName: PD input + qos: 1_AT_LEAST_ONCE + deviceAlias: DT35 + processData: + direction: getData + format: iodd + interval: + value: 10 + unit: ms + mqttConnectionStatusGet: + allOf: + - type: object + required: + - connectionStatus + - serverAddress + - upTime + properties: + connectionStatus: + type: string + enum: + - CLIENT_INACTIVE + - CONNECTION_ACCEPTED + - UNACCEPTABLE_PROTOCOL_VERSION + - IDENTIFIER_REJECTED + - SERVER_UNAVAILABLE + - BAD_USERNAME_OR_PASSWORD + - NOT_AUTHORIZED + serverAddress: + type: string + upTime: + type: integer + example: + connectionStatus: CONNECTION_ACCEPTED + serverAddress: "http://broker-address.com" + upTime: 1050 + deviceCapabilitiesGet: + required: + - minimumCycleTime + - supportedProfiles + type: object + properties: + minimumCycleTime: + $ref: "#/schemas/cycleTime" + supportedProfiles: + type: array + items: + type: integer + minimum: 1 + deviceIdentificationGet: + required: + - vendorId + - deviceId + - iolinkRevision + - vendorName + - productName + type: object + properties: + vendorId: + type: integer + minimum: 1 + maximum: 65535 + deviceId: + type: integer + minimum: 1 + maximum: 16777215 + iolinkRevision: + type: string + enum: + - "1.0" + - "1.1" + vendorName: + description: Mandatory if the Device suports the ISDU. + type: string + minLength: 1 + maxLength: 64 + vendorText: + type: string + vendorUrl: + type: string + productName: + description: Mandatory if the Device suports the ISDU. + type: string + minLength: 1 + maxLength: 64 + productId: + type: string + minLength: 1 + maxLength: 64 + productText: + type: string + minLength: 1 + maxLength: 64 + serialNumber: + type: string + minLength: 1 + maxLength: 16 + hardwareRevision: + type: string + minLength: 1 + maxLength: 64 + firmwareRevision: + type: string + productInstanceUri: + type: string + ioddUri: + type: string + applicationSpecificTag: + type: string + minLength: 1 + maxLength: 32 + locationTag: + type: string + minLength: 1 + maxLength: 32 + functionTag: + type: string + minLength: 1 + maxLength: 32 + example: + vendorId: 26 + deviceId: 8389226 + iolinkRevision: "1.1" + vendorName: SICK AG + vendorText: Sensor Intelligence. + productName: SLG-2 + productId: SLG-2 + productText: The SLG-2 IO-Link device is a smart lightgrid + serialNumber: Serial123456 + hardwareRevision: 3.2.1.444R + firmwareRevision: 3.2.1.888R + vendorUrl: "http://www.sick.com" + productInstanceUri: "http://www.sick.com/SLG-2/Serial123456" + ioddUri: "https://ioddfinder.io-link.com/26/42/SICK-SLG-2-20210428-IODD1.1" + # 'https://ioddfinder.io-link.com/api/vendors/26/iodds/11541/files/zip/rated' + # 'https://ioddfinder.io-link.com/productvariants/search/32872' + applicationSpecificTag: Fallback light switch + locationTag: Down under + functionTag: Check end of belt + portIdentificationPost: + type: object + properties: + applicationSpecificTag: + type: string + minLength: 1 + maxLength: 32 + example: Fallback light switch + locationTag: + type: string + minLength: 1 + maxLength: 32 + example: Down under + functionTag: + type: string + minLength: 1 + maxLength: 32 + example: Check start of belt + portCapabilitiesGet: + type: object + required: + - portType + properties: + portType: + type: string + enum: + - CLASS_A + - CLASS_B + - CLASS_A_WITH_PORT_POWER_OFF_ON + - FAILSAFE_PORT_A_WITHOUT_SAFETY_DIGITAL_INPUTS + - FAILSAFE_PORT_A_WITH_SAFETY_DIGITAL_INPUTS + - FAILSAFE_PORT_B + - WIRELESS_MASTER + slotType: + description: >- + slotType for Wireless Master only + type: string + enum: + - SSLOT + - DSLOT + maxPowerSupply: + description: >- + maxPowerSupply is not supported in IO-Link Wireless. + type: object + required: + - value + - unit + properties: + value: + type: number + unit: + type: string + + portConfigurationGet: + type: object + required: + - mode + - iqConfiguration + - deviceAlias + properties: + mode: + type: string + enum: + - DEACTIVATED + - IOLINK_MANUAL + - IOLINK_AUTOSTART + - DIGITAL_INPUT + - DIGITAL_OUTPUT + - WIOLINK_CYCLIC_AUTOPAIRING + - WIOLINK_CYCLIC + - WIOLINK_ROAMING_AUTOPAIRING + - WIOLINK_ROAMING + validationAndBackup: + description: required if portMode is IOLINK_MANUAL. + type: string + enum: + - NO_DEVICE_CHECK + - TYPE_COMPATIBLE_DEVICE_V1.0 + - TYPE_COMPATIBLE_DEVICE_V1.1 + - TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE + - TYPE_COMPATIBLE_DEVICE_V1.1_RESTORE + cycleTime: + description: >- + required if portMode is IOLINK_MANUAL or + IOLINK_AUTOSTART. Default value is 0 ms which means as fast as possible. + Note: If the applied value for cycle time cannot exactly be mapped, + the port shall use the next possible higher value. If the cycle time is greater + than 132.8 ms the error 702 shall be returned. + Note: This value is not used in IO-Link wireless use + wMasterCycleTimeOut and wMasterCycleTimeIn instead. + type: object + allOf: + - $ref: "#/schemas/cycleTime" + vendorId: + description: >- + required if portMode is IOLINK_MANUAL and + validationAndBackup is not NO_DEVICE_CHECK. + type: integer + minimum: 1 + maximum: 65535 + deviceId: + description: >- + required if portMode is IOLINK_MANUAL and + validationAndBackup is not NO_DEVICE_CHECK. + type: integer + minimum: 1 + maximum: 16777215 + iqConfiguration: + description: >- + iqConfiguration is not supported in IO-Link Wireless. + type: string + enum: + - NOT_SUPPORTED + - DIGITAL_INPUT + - DIGITAL_OUTPUT + deviceAlias: + type: string + slotNumber: + description: >- + slot number of the Wireless-Device (Wireless Master only). + type: integer + minimum: 0 + maximum: 7 + trackNumber: + description: >- + track number of the Wireless-Device, maximum depends on the number of + available tracks on the Wireless-Master (Wireless Master only). + type: integer + minimum: 1 + maximum: 5 + deviceTxPower: + description: >- + transmission power of the Wireless-Device (Wireless Master only). + type: integer + minimum: 1 + maximum: 31 + maxRetry: + description: >- + Number of Retries for process data (Wireless Master only). + type: integer + minimum: 2 + maximum: 31 + imaTime: + description: >- + I am alive time for the wireless connection (Wireless Master only). + type: object + required: + - base + - multiplier + properties: + base: + description: >- + IMA timeout base. + type: string + enum: + - "1664us" + - "5ms" + - "1s" + - "1min" + multiplier: + description: >- + IMA timeout multiplier. + type: integer + minimum: 1 + maximum: 255 + slotType: + description: >- + Single Slot or Double Slot (Wireless Master only). + type: string + enum: + - "SSLOT" + - "DSLOT" + lowEnergyDevice: + description: >- + to set low energy mode (Wireless Master only and Wireless-Device has to support low energy). + type: boolean + default: false + maxPDSegLength: + description: >- + maximum process data output segment length (Wireless Master only). + type: integer + minimum: 0 + maximum: 32 + wMasterCycleTimeOut: + description: >- + Wireless-Master cycle time output for PD data (Wireless Master only). + type: object + required: + - base + properties: + base: + type: string + enum: + - "FreeRunning" + - "5ms" + multiplier: + type: integer + minimum: 1 + maximum: 63 + wMasterCycleTimeIn: + description: >- + Wireless-Master cycle time input for PD data (Wireless Master only). + type: object + required: + - base + properties: + base: + type: string + enum: + - "FreeRunning" + - "5ms" + multiplier: + type: integer + minimum: 1 + maximum: 63 + uniqueId: + description: >- + unique identifier for each Wireless-Device (Wireless Master only). + type: string + minLength: 26 + maxLength: 26 + + mastersConfigurationGetPost: # TODO: IOLW + properties: + wMasterId: + description: >- + Master identifier for connection with Wireless-Devices. + type: integer + minimum: 1 + maximum: 29 + advancedConnectivity: + description: >- + To set advanced connectivity functions on the Wireless-Master. + type: object + properties: + "ahtEnable": + description: >- + To enable or disable the Adaptive Hopping Table. + type: boolean + default: false + pairingTimeout: + description: >- + Timeout for pairing by BUTTON / UNIQUE. + type: object + required: + - value + - unit + properties: + value: + type: integer + minimum: 5 + maximum: 255 + unit: + type: string + enum: + - s + serviceTrackNumber: + description: >- + W-Track number used for service requests (Scan/Pairing/Roaming). + type: integer + minimum: 1 + maximum: 5 + default: 1 + serviceTrackMode: + description: >- + Mode of the service track. + type: string + enum: + - CYCLIC + - ROAMING + trackTxPower: + description: >- + transmission power of the W-Track (0 = Disable) + type: object + properties: + "track_1": + type: integer + minimum: 0 + maximum: 31 + default: 0 + "track_2": + type: integer + minimum: 0 + maximum: 31 + default: 0 + "track_3": + type: integer + minimum: 0 + maximum: 31 + default: 0 + "track_4": + type: integer + minimum: 0 + maximum: 31 + default: 0 + "track_5": + type: integer + minimum: 0 + maximum: 31 + default: 0 + blockList: + type: object + properties: + "2403": + type: boolean + default: false + "2404": + type: boolean + default: false + "2405": + type: boolean + default: false + "2406": + type: boolean + default: false + "2407": + type: boolean + default: false + "2408": + type: boolean + default: false + "2409": + type: boolean + default: false + "2410": + type: boolean + default: false + "2411": + type: boolean + default: false + "2412": + type: boolean + default: false + "2413": + type: boolean + default: false + "2414": + type: boolean + default: false + "2415": + type: boolean + default: false + "2416": + type: boolean + default: false + "2417": + type: boolean + default: false + "2418": + type: boolean + default: false + "2419": + type: boolean + default: false + "2420": + type: boolean + default: false + "2421": + type: boolean + default: false + "2422": + type: boolean + default: false + "2423": + type: boolean + default: false + "2424": + type: boolean + default: false + "2425": + type: boolean + default: false + "2426": + type: boolean + default: false + "2427": + type: boolean + default: false + "2428": + type: boolean + default: false + "2429": + type: boolean + default: false + "2430": + type: boolean + default: false + "2431": + type: boolean + default: false + "2432": + type: boolean + default: false + "2433": + type: boolean + default: false + "2434": + type: boolean + default: false + "2435": + type: boolean + default: false + "2436": + type: boolean + default: false + "2437": + type: boolean + default: false + "2438": + type: boolean + default: false + "2439": + type: boolean + default: false + "2440": + type: boolean + default: false + "2441": + type: boolean + default: false + "2442": + type: boolean + default: false + "2443": + type: boolean + default: false + "2444": + type: boolean + default: false + "2445": + type: boolean + default: false + "2446": + type: boolean + default: false + "2447": + type: boolean + default: false + "2448": + type: boolean + default: false + "2449": + type: boolean + default: false + "2450": + type: boolean + default: false + "2451": + type: boolean + default: false + "2452": + type: boolean + default: false + "2453": + type: boolean + default: false + "2454": + type: boolean + default: false + "2455": + type: boolean + default: false + "2456": + type: boolean + default: false + "2457": + type: boolean + default: false + "2458": + type: boolean + default: false + "2459": + type: boolean + default: false + "2460": + type: boolean + default: false + "2461": + type: boolean + default: false + "2462": + type: boolean + default: false + "2463": + type: boolean + default: false + "2464": + type: boolean + default: false + "2465": + type: boolean + default: false + "2466": + type: boolean + default: false + "2467": + type: boolean + default: false + "2468": + type: boolean + default: false + "2469": + type: boolean + default: false + "2470": + type: boolean + default: false + "2471": + type: boolean + default: false + "2472": + type: boolean + default: false + "2473": + type: boolean + default: false + "2474": + type: boolean + default: false + "2475": + type: boolean + default: false + "2476": + type: boolean + default: false + "2477": + type: boolean + default: false + "2478": + type: boolean + default: false + mastersPortsPairingPost: # TODO: IOLW + properties: + portPairing: + type: string + enum: + - Unpairing + - PairingUnique + - PairingButton + example: + WPortPairing: PairingUnique + + mastersScanGet: # TODO: IOLW + properties: + scanStatus: + type: string + enum: + - NoScanWasPerformed + - ScanInProgress + - ScanEnded + scanResults: + type: array + properties: + slotType: + type: string + enum: + - "SSLOT" + - "DSLOT" + uniqueId: + type: string + minLength: 26 + maxLength: 26 + iolinkRevision: + type: string + enum: + - "1.1" + lastSeen: + $ref: "#/schemas/eventTime" + example: + scanStatus: ScanEnded + scanResults: + - slotType: SSLOT + uniqueId: 03:78:00:00:01:32:50:60:46 + iolinkRevision: "1.1" + lastSeen: "2022-12-01T08:42:23.314Z" + - slotType: DSLOT + uniqueId: 03:78:00:00:01:32:50:60:47 + iolinkRevision: "1.1" + lastSeen: "2022-12-01T09:42:23.314Z" + + mastersScanPost: # TODO: IOLW + properties: + txPower: + type: integer + minimum: 1 + maximum: 31 + example: + txPower: 31 + + mastersPortsGet: # TODO: IOLW + type: array + items: + type: object + required: + - portNumber + - statusInfo + - deviceAlias + properties: + portNumber: + type: number + deviceAlias: + type: string + statusInfo: + type: string + enum: # see Terminology in V.113, Table E.4 PortStatusList + - COMMUNICATION_LOST # NO_DEVICE + - DEACTIVATED # DEACTIVATED + - INCORRECT_DEVICE # PORT_DIAG + - DEVICE_STARTING # + - DEVICE_ONLINE # OPERATE + - DIGITAL_INPUT_C/Q # DI_CQ + - DIGITAL_OUTPUT_C/Q # DO_CQ + - NOT_AVAILABLE # NOT_AVAILABLE + - PORT_POWER_OFF # PORT_POWER_OFF + - PAIRING_FAULT # PAIRING_TIMEOUT, PAIRING_WRONG_SLOTTYPE + slotNumber: + description: >- + slot number of the Wireless-Device (Wireless Master only). + type: integer + minimum: 0 + maximum: 7 + trackNumber: + description: >- + track number of the Wireless-Device, maximum depends on the number of + available tracks on the Wireless-Master (Wireless Master only). + type: integer + minimum: 1 + maximum: 5 + slotType: + description: >- + Single Slot or Double Slot (Wireless Master only). + type: string + enum: + - "SSLOT" + - "DSLOT" + deviceInfo: + description: >- + Wireless Master only. + type: object + properties: + vendorId: + type: integer + minimum: 1 + maximum: 65535 + deviceId: + type: integer + minimum: 1 + maximum: 16777215 + productName: + type: string + minLength: 1 + maxLength: 64 + + mastersPortsStatusGet: # TODO: IOLW + properties: + statusInfo: + type: string + enum: # see Terminology in V.113, Table E.4 PortStatusList + - COMMUNICATION_LOST # NO_DEVICE + - DEACTIVATED # DEACTIVATED + - INCORRECT_DEVICE # PORT_DIAG + - DEVICE_STARTING # + - DEVICE_ONLINE # OPERATE + - DIGITAL_INPUT_C/Q # DI_CQ + - DIGITAL_OUTPUT_C/Q # DO_CQ + - NOT_AVAILABLE # NOT_AVAILABLE + - PORT_POWER_OFF # PORT_POWER_OFF + - PAIRING_FAULT # PAIRING_TIMEOUT, PAIRING_WRONG_SLOTTYPE + iolinkRevision: + description: >- + Mandatory if the portStatusInfo is INCORRECT_DEVICE, PREOPERATE or + OPERATE. + type: string + enum: + - "1.0" + - "1.1" + transmissionRate: + description: >- + Mandatory if the portStatusInfo is INCORRECT_DEVICE, PREOPERATE or + OPERATE. transmissionRate is not used in IO-Link Wireless. + type: string + enum: + - COM1 + - COM2 + - COM3 + masterCycleTime: + description: >- + Mandatory if the portStatusInfo is INCORRECT_DEVICE, PREOPERATE or + OPERATE. masterCycleTime is not used in IO-Link wireless use + wMasterCycleTimeOut and wMasterCycleTimeIn instead. + type: object + allOf: + - $ref: "#/schemas/cycleTime" + portQualityInfo: + description: >- + status information of the Process Data (Wireless Master only). + type: object + properties: + "pdInValid": + type: boolean + default: false + "pdOutValid": + type: boolean + default: false + inputDataLength: + description: >- + this element contains the input data length as number of octets of the Device provided by the PDIn service (Wireless Master only). + type: integer + minimum: 0 + maximum: 32 + outputDataLength: + description: >- + this element contains the output data length as number of octets of the Device provided by the PDOut service (Wireless Master only). + type: integer + minimum: 0 + maximum: 32 + vendorId: + description: >- + Wireless Master only. + type: integer + minimum: 1 + maximum: 65535 + deviceId: + description: >- + Wireless Master only. + type: integer + minimum: 1 + maximum: 16777215 + wMasterCycleTimeOut: + description: >- + Wireless-Master cycle time output for PD data (Wireless Master only). + type: object + required: + - base + properties: + base: + type: string + enum: + - "FreeRunning" + - "5ms" + multiplier: + type: integer + minimum: 1 + maximum: 63 + wMasterCycleTimeIn: + description: >- + Wireless-Master cycle time input for PD data (Wireless Master only). + type: object + required: + - base + properties: + base: + type: string + enum: + - "FreeRunning" + - "5ms" + multiplier: + type: integer + minimum: 1 + maximum: 63 + + mastersTrackstatusGet: # TODO: IOLW + type: array + items: + type: object + properties: + trackNumber: + type: number + Mode: + type: string + enum: + - DEACTIVATED + - CYCLIC + - ROAMING + - SCAN + - PAIRING + txPower: + type: integer + minimum: 1 + maximum: 31 + example: + - trackNumber: 1 + Mode: CYCLIC + txPower: 31 + - trackNumber: 2 + Mode: ROAMING + txPower: 31 + + mastersPortsQualityallGet: # TODO: IOLW + type: array + items: + type: object + properties: + portNumber: + type: number + 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 + + mastersPortsQualityGet: # TODO: IOLW + 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: + lqiMaster: 100 + rssiMaster: -40 + lqiDevice: 100 + rssiDevice: -39 + + portConfigurationPost: + description: "Note: At least one of the mode, iqConfiguration, + deviceAlias properties shall be included to the POST request" + type: object + properties: + mode: + type: string + enum: + - DEACTIVATED + - IOLINK_MANUAL + - IOLINK_AUTOSTART + - DIGITAL_INPUT + - DIGITAL_OUTPUT + - WIOLINK_CYCLIC_AUTOPAIRING + - WIOLINK_CYCLIC + - WIOLINK_ROAMING_AUTOPAIRING + - WIOLINK_ROAMING + validationAndBackup: + description: >- + required if the port's mode is IOLINK_MANUAL. + type: string + enum: + - NO_DEVICE_CHECK + - TYPE_COMPATIBLE_DEVICE_V1.0 + - TYPE_COMPATIBLE_DEVICE_V1.1 + - TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE + - TYPE_COMPATIBLE_DEVICE_V1.1_RESTORE + cycleTime: + description: >- + If no cycleTime configured with mode IOLINK_MANUAL or + IOLINK_AUTOSTART, the possible fastest cycle time is used by the + IO-Link Master. If the applied value for cycle time cannot exactly be + mapped, the port shall use the next possible higher value. + If the cycle time is greater than 132.8 ms the error 702 shall + be returned. This value is not used in IO-Link wireless use + wMasterCycleTimeOut and wMasterCycleTimeIn instead. + type: object + allOf: + - $ref: "#/schemas/cycleTime" + vendorId: + description: >- + required if the port's mode is IOLINK_MANUAL and validationAndBackup is + not NO_DEVICE_CHECK. + type: integer + minimum: 1 + maximum: 65535 + deviceId: + description: >- + required if the port's mode is IOLINK_MANUAL and validationAndBackup is + not NO_DEVICE_CHECK. + type: integer + minimum: 1 + maximum: 16777215 + iqConfiguration: + description: >- + iqConfiguration is not supported in IO-Link Wireless. + type: string + enum: + - NOT_SUPPORTED + - DIGITAL_INPUT + - DIGITAL_OUTPUT + - ANALOG_INPUT + - ANALOG_OUTPUT + - POWER_2 + deviceAlias: + type: string + minLength: 1 + maxLength: 32 + slotNumber: + description: >- + slot number of the Wireless-Device (Wireless Master only). + type: integer + minimum: 0 + maximum: 7 + trackNumber: + description: >- + track number of the Wireless-Device, maximum depends on the number of + available tracks on the Wireless-Master (Wireless Master only). + type: integer + minimum: 1 + maximum: 5 + deviceTxPower: + description: >- + transmission power of the Wireless-Device (Wireless Master only). + type: integer + minimum: 1 + maximum: 31 + maxRetry: + description: >- + Number of Retries for process data (Wireless Master only). + type: integer + minimum: 2 + maximum: 31 + imaTime: + description: >- + I am alive time for the wireless connection (Wireless Master only). + type: object + required: + - base + - multiplier + properties: + base: + description: >- + IMA timeout base. + type: string + enum: + - "1664us" + - "5ms" + - "1s" + - "1min" + multiplier: + description: >- + IMA timeout multiplier. + type: integer + minimum: 1 + maximum: 255 + slotType: + description: >- + Single Slot or Double Slot (Wireless Master only). + type: string + enum: + - "SSLOT" + - "DSLOT" + lowEnergyDevice: + description: >- + to set low energy mode (Wireless Master only and Wireless-Device has to support low energy). + type: boolean + default: false + maxPDSegLength: + description: >- + maximum process data output segment length (Wireless Master only). + type: integer + minimum: 0 + maximum: 32 + wMasterCycleTimeOut: + description: >- + Wireless-Master cycle time output for PD data (Wireless Master only). + type: object + required: + - base + properties: + base: + type: string + enum: + - "FreeRunning" + - "5ms" + multiplier: + type: integer + minimum: 1 + maximum: 63 + wMasterCycleTimeIn: + description: >- + Wireless-Master cycle time input for PD data (Wireless Master only). + type: object + required: + - base + properties: + base: + type: string + enum: + - "FreeRunning" + - "5ms" + multiplier: + type: integer + minimum: 1 + maximum: 63 + uniqueId: + description: >- + unique identifier for each Wireless-Device (Wireless Master only). + type: string + minLength: 26 + maxLength: 26 + + dataStorageGetPost: + description: >- + In case the Data Storage is empty, the header object is empty and the + content is an empty string. + type: object + required: + - header + - content + properties: + header: + oneOf: + - type: object + required: + - vendorId + - deviceId + - iolinkRevision + properties: + vendorId: + type: integer + minimum: 1 + maximum: 65535 + deviceId: + type: integer + minimum: 1 + maximum: 16777215 + iolinkRevision: + type: string + enum: + - "1.0" + - "1.1" + parameterChecksum: + type: integer + - type: object # empty object + additionalProperties: false + minProperties: 0 + maxProperties: 0 + content: + description: Base64 coded DS data Ojects. Max size = 2KB*1.33. + type: string + # format: byte + processDataValue: + type: object + properties: + iolink: + description: Process data in IO-Link mode + allOf: + - type: object + required: + - valid + properties: + valid: + type: boolean + description: > + Process data validity + - type: object + required: + - value + properties: + value: + oneOf: + - $ref: "#/schemas/deviceByteArrayTypeValue" + - $ref: "#/schemas/deviceSimpleTypeValue" + - $ref: "#/schemas/deviceComplexTypeValue" + unit: + $ref: "#/schemas/deviceSimpleTypeValueUnit" + description: > + Process data value + cqValue: + type: boolean + description: > + IO-Link cable CQ (pin4) level if it is used as digital input or + output (SIO mode). (false - 0 V, true - 24 V) + iqValue: + type: boolean + description: > + IO-Link cable IQ (pin2) level if it is used as digital input or output. + (false - 0 V, true - 24 V) + + deviceProcessDataValueGet: + type: object + description: > + The cqValue is present in the 'getData' object if the CQ (pin4) is configured as + digital input. The cqValue is present in the 'setData' object if the CQ (pin4) + is configured as digital output. The iolink is present either in the + 'getData' or 'setData' or both objects if the CQ (pin4) is configured to IO-Link mode. + The iqValue is present in the 'getData' object if the IQ (pin2) is configured as + digital input. The iqValue is present in the 'setData' object if the IQ (pin4) + is configured as digital output. + properties: + getData: + $ref: "#/schemas/processDataValue" + setData: + $ref: "#/schemas/processDataValue" + deviceProcessDataValuePost: + $ref: "#/schemas/processDataValue" + deviceByteArrayTypeValue: + type: array + description: The value in byteArray format. + items: + type: integer + minimum: 0 + maximum: 255 + deviceSimpleTypeValue: + oneOf: + - type: boolean + - type: string + - type: number + description: The value (with simple type) in iodd format. + deviceComplexTypeEntry: + type: object + description: The entry for a complex iodd type + required: + - value + properties: + value: + $ref: "#/schemas/deviceSimpleTypeValue" + unit: + $ref: "#/schemas/deviceSimpleTypeValueUnit" + deviceSimpleTypeValueUnit: + type: string + description: The unit for the simple type number value in SI format. + deviceComplexTypeValue: + type: object + minProperties: 1 + maxProperties: 255 + description: The value (with complex type) in iodd format. + additionalProperties: + $ref: "#/schemas/deviceComplexTypeEntry" + deviceParametersGet: + type: array + items: + type: object + required: + - index + - parameterName + properties: + index: + type: integer + minimum: 0 + maximum: 65535 + parameterName: + $ref: "#/schemas/parameterName" + subindexAccessSupported: + type: boolean + description: only for complex parameters (records or arrays) required. Not allowed for simple parameters + example: + - index: 16 + parameterName: "Vendor_Name" + - index: 18 + parameterName: "Product_Name" + - index: 19 + parameterName: "ProductID" + - index: 60 + parameterName: "SSC_1_Param" + subindexAccessSupported: true + deviceSubParametersGet: + type: array + items: + type: object + required: + - subIndex + - subParameterName + properties: + subIndex: + type: integer + minimum: 1 + maximum: 255 + subParameterName: + $ref: "#/schemas/subParameterName" + example: + - subIndex: 1 + subParameterName: Master_command + - subIndex: 2 + subParameterName: Master_cycle_time + - subIndex: 3 + subParameterName: Minimum_cycle_time + deviceParameterValueGetPost: + type: object + properties: + value: + oneOf: + - $ref: "#/schemas/deviceByteArrayTypeValue" + - $ref: "#/schemas/deviceSimpleTypeValue" + - $ref: "#/schemas/deviceComplexTypeValue" + unit: + $ref: "#/schemas/deviceSimpleTypeValueUnit" + deviceParameterSubindexValueGetPost: + type: object + properties: + value: + oneOf: + - $ref: "#/schemas/deviceByteArrayTypeValue" + - $ref: "#/schemas/deviceSimpleTypeValue" + - $ref: "#/schemas/deviceComplexTypeValue" + unit: + $ref: "#/schemas/deviceSimpleTypeValueUnit" + deviceBlockParameterizationPost: + type: object + required: + - direction + - parameters + properties: + direction: + type: string + enum: + - WRITE + - READ + parameters: + $ref: "#/schemas/blockParameterizationPostParametersRequest" + ioddIdentification: + type: object + required: + - vendorId + - deviceId + - version + - releaseDate + - iolinkRevision + properties: + vendorId: + type: number + deviceId: + type: number + version: + type: string + releaseDate: + type: string + iolinkRevision: + type: string + enum: + - "1.0" + - "1.1" + availableArtifacts: + type: array + items: + $ref: "#/schemas/artifact" + ioddFile: + description: The IODD XML file or other IODD artifacts. + type: string + format: binary + ioddArchive: + description: The IODD in archive format (e.g. IODD Finder) containing XML file and device images. + type: string + format: binary + ioddsGet: + type: array + items: + $ref: "#/schemas/ioddIdentification" + example: + - vendorId: 1234 + deviceId: 4567 + version: "4.3" + releaseDate: "2018-01-02" + iolinkRevision: "1.1" + - vendorId: 4321 + deviceId: 8765 + version: "2.1" + releaseDate: "2015-01-02" + iolinkRevision: "1.1" + availableArtifacts: [XML, DeviceIcon, DeviceSymbol, VendorLogo] + iolinkErrorObject: + type: object + required: + - code + - message + properties: + code: + type: integer + minimum: 0 + maximum: 65535 + message: + type: string + minLength: 1 + errorObject: + type: object + required: + - code + - message + properties: + code: + type: integer + minimum: 0 + message: + type: string + minLength: 1 + iolinkError: + $ref: "#/schemas/iolinkErrorObject" + ipAddress: + type: string + example: 192.168.1.13 + subnetMask: + type: string + example: 255.255.255.0 + standardGateway: + type: string + example: 192.168.1.1 + dnsServer: + type: object + required: + - server + - configuration + properties: + server: + type: array + items: + type: string + example: + - 1.1.1.1 + - 2.2.2.2 + configuration: + type: string + enum: + - automatic + - custom + macAddress: + type: string + example: "FE:AB:3A:55:33:11" + valueUnitObject: + type: object + properties: + value: + type: integer + unit: + type: string + identificationGet: + required: + - vendorName + - vendorId + - masterId + - masterType + type: object + properties: + vendorName: + type: string + minLength: 1 + maxLength: 64 + vendorId: + type: integer + minimum: 1 + maximum: 65535 + masterId: + type: integer + minimum: 1 + maximum: 4294967295 + masterType: + type: string + enum: + - Unspecific + - Master acc. V1.0 + - Master acc. V1.1 + - Failsafe_Master + - Wireless_Master + serialNumber: + type: string + minLength: 1 + maxLength: 16 + orderCode: + type: string + minLength: 1 + maxLength: 64 + productName: + type: string + minLength: 1 + maxLength: 64 + productId: + type: string + minLength: 1 + maxLength: 64 + hardwareRevision: + type: string + minLength: 1 + maxLength: 64 + firmwareRevision: + type: string + minLength: 1 + maxLength: 64 + vendorUrl: + type: string + format: uri + manualUrl: + type: string + format: uri + productInstanceUri: + type: string + gsdUri: + type: string + applicationSpecificTag: + type: string + minLength: 1 + maxLength: 32 + locationTag: + type: string + minLength: 1 + maxLength: 32 + functionTag: + type: string + minLength: 1 + maxLength: 32 + example: + vendorName: Vendor GmbH + vendorId: 26 + masterId: 42 + masterType: Wireless_Master + serialNumber: IOLWM123456 + orderCode: PROD123456 + productName: IO-Link Wireless Master + productId: PROD123456 + hardwareRevision: 3.2.1.444R + firmwareRevision: 3.2.1.888R + vendorUrl: "http://www.io-link.com" + productInstanceUri: "http://www.io-link.com/PROD123456/IOLWM123456" + gsdUri: "https://io-link.com/GSDML-V2.34-IO-Link-Wireless-Master-20190301.xml" + manualUrl: "http://www.io-link.com/io-link-master/documentation.pdf" + applicationSpecificTag: Fallback reader + locationTag: Down under + functionTag: Code reading + identificationPost: + type: object + properties: + applicationSpecificTag: + type: string + minLength: 1 + maxLength: 32 + locationTag: + type: string + minLength: 1 + maxLength: 32 + functionTag: + type: string + minLength: 1 + maxLength: 32 + + deviceEvents: + summary: events + tags: + - name: device + type: array + payload: + $ref: "#/schemas/deviceEvent" + deviceEvent: + type: object + required: + - time + - severity + - message + properties: + time: + $ref: "#/schemas/eventTime" + severity: + $ref: "#/schemas/eventSeverity" + message: + required: + - code + - mode + allOf: + - $ref: "#/schemas/eventObject" + devicehealth: + summary: contains the health information of the device. + tags: + - name: device + payload: + required: + - health + - healthState + type: object + properties: + health: + $ref: "#/schemas/namurHealth" + healthState: + $ref: "#/schemas/namurHealthState" + errors: + type: object + properties: + iolErrors: + type: object + properties: + isIolWirebreak: + type: boolean + isIolShortCircuit: + type: boolean + isProcessDataInvalid: + type: boolean + isDataStorageFaulty: + type: boolean + isValidationFailure: + type: boolean + validationError: + type: object + properties: + isWrongCycleTime: + type: boolean + isWrongIolinkRevision: + type: boolean + isWrongPdInLength: + type: boolean + isWrongPdOutLength: + type: boolean + isWrongVendorId: + type: boolean + isWrongDeviceId: + type: boolean + isWrongSerialNumber: + type: boolean + isShortCircuitPin4: + type: boolean + isShortCircuitPin2: + type: boolean + isOverloadStatusPin4: + type: boolean + isOverloadStatusPin2: + type: boolean + isActuatorWarningPin4: + type: boolean + isActuatorWarningPin2: + type: boolean + namurHealthState: + type: integer + maximum: 100 + minimum: 0 + description: >- + Reflects changing a meter for the health state as a result of + sub-optimal process and/or environmental conditions from 100 to 0 + namurHealth: + type: string + enum: + - NORMAL_0 + - FAILURE_1 + - CHECK_FUNCTION_2 + - OFF_SPEC_3 + - MAINTENANCE_REQUIRED_4 + - DIAGNOSIS_PASSIVE_5 + description: >- + health indicates the status as defined by NAMUR recommendation NE107 as + an DeviceHealthEnumeration value. + networkConfiguration: + type: array + items: + type: object + required: + - name + - ipConfiguration + - ipAddress + - subnetMask + - macAddress + properties: + name: + type: string + description: Name of the interface. + example: eth0 + ipConfiguration: + $ref: "#/schemas/ipConfiguration" + ipAddress: + $ref: "#/schemas/ipAddress" + subnetMask: + $ref: "#/schemas/subnetMask" + standardGateway: + $ref: "#/schemas/standardGateway" + dnsServer: + $ref: "#/schemas/dnsServer" + macAddress: + $ref: "#/schemas/macAddress" + ifSpeed: + type: array + items: + $ref: "#/schemas/valueUnitObject" + ifOperStatus: + type: array + items: + type: string + example: "linkUp" + masterConfiguration: + properties: + masterId: + type: integer + minimum: 1 + maximum: 29 + ahtEnable: + type: boolean + default: false + pairingTimeout: + type: object + required: + - value + - unit + properties: + value: + type: integer + minimum: 5 + maximum: 65535 + unit: + type: string + enum: + - s + blacklist: + type: object + required: + - all + properties: + "2402": + type: boolean + default: false + "2403": + type: boolean + default: false + "2404": + type: boolean + default: false + "2405": + type: boolean + default: false + "2406": + type: boolean + default: false + "2407": + type: boolean + default: false + "2408": + type: boolean + default: false + "2409": + type: boolean + default: false + "2410": + type: boolean + default: false + "2411": + type: boolean + default: false + "2412": + type: boolean + default: false + "2413": + type: boolean + default: false + "2414": + type: boolean + default: false + "2415": + type: boolean + default: false + "2416": + type: boolean + default: false + "2417": + type: boolean + default: false + "2418": + type: boolean + default: false + "2419": + type: boolean + default: false + "2420": + type: boolean + default: false + "2421": + type: boolean + default: false + "2422": + type: boolean + default: false + "2423": + type: boolean + default: false + "2424": + type: boolean + default: false + "2425": + type: boolean + default: false + "2426": + type: boolean + default: false + "2427": + type: boolean + default: false + "2428": + type: boolean + default: false + "2429": + type: boolean + default: false + "2430": + type: boolean + default: false + "2431": + type: boolean + default: false + "2432": + type: boolean + default: false + "2433": + type: boolean + default: false + "2434": + type: boolean + default: false + "2435": + type: boolean + default: false + "2436": + type: boolean + default: false + "2437": + type: boolean + default: false + "2438": + type: boolean + default: false + "2439": + type: boolean + default: false + "2440": + type: boolean + default: false + "2441": + type: boolean + default: false + "2442": + type: boolean + default: false + "2443": + type: boolean + default: false + "2444": + type: boolean + default: false + "2445": + type: boolean + default: false + "2446": + type: boolean + default: false + "2447": + type: boolean + default: false + "2448": + type: boolean + default: false + "2449": + type: boolean + default: false + "2450": + type: boolean + default: false + "2451": + type: boolean + default: false + "2452": + type: boolean + default: false + "2453": + type: boolean + default: false + "2454": + type: boolean + default: false + "2455": + type: boolean + default: false + "2456": + type: boolean + default: false + "2457": + type: boolean + default: false + "2458": + type: boolean + default: false + "2459": + type: boolean + default: false + "2460": + type: boolean + default: false + "2461": + type: boolean + default: false + "2462": + type: boolean + default: false + "2463": + type: boolean + default: false + "2464": + type: boolean + default: false + "2465": + type: boolean + default: false + "2466": + type: boolean + default: false + "2467": + type: boolean + default: false + "2468": + type: boolean + default: false + "2469": + type: boolean + default: false + "2470": + type: boolean + default: false + "2471": + type: boolean + default: false + "2472": + type: boolean + default: false + "2473": + type: boolean + default: false + "2474": + type: boolean + default: false + "2475": + type: boolean + default: false + "2476": + type: boolean + default: false + "2477": + type: boolean + default: false + "2478": + type: boolean + default: false + "2479": + type: boolean + default: false + example: + masterId: 5 + ahtEnable: false + pairingTimeout: + value: 25 + unit: s + blackList: + "2402": false + "2403": false + "2404": false + "2405": false + "2406": false + "2407": false + "2408": false + "2409": false + "2410": false + "2411": false + "2412": false + "2413": false + "2414": false + "2415": false + "2416": false + "2417": false + "2418": false + "2419": false + "2420": false + "2421": false + "2422": false + "2423": false + "2424": false + "2425": false + "2426": false + "2427": false + "2428": false + "2429": false + "2430": false + "2431": false + "2432": false + "2433": false + "2434": false + "2435": false + "2436": false + "2437": false + "2438": false + "2439": false + "2440": false + "2441": false + "2442": false + "2443": false + "2444": false + "2445": false + "2446": false + "2447": false + "2448": false + "2449": false + "2450": false + "2451": false + "2452": false + "2453": false + "2454": false + "2455": false + "2456": false + "2457": false + "2458": false + "2459": false + "2460": false + "2461": false + "2462": false + "2463": false + "2464": false + "2465": false + "2466": false + "2467": false + "2468": false + "2469": false + "2470": false + "2471": false + "2472": false + "2473": false + "2474": false + "2475": false + "2476": false + "2477": false + "2478": false + "2479": false + + tracksStatisticsChannel: + properties: + trackNumber: + type: integer + minimum: 1 + maximum: 5 + channelErrors: + type: object + # required: # @todo wireles + # - all + properties: + "2402": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2403": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2404": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2405": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2406": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2407": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2408": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2409": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2410": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2411": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2412": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2413": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2414": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2415": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2416": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2417": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2418": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2419": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2420": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2421": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2422": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2423": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2424": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2425": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2426": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2427": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2428": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2429": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2430": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2431": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2432": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2433": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2434": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2435": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2436": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2437": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2438": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2439": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2440": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2441": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2442": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2443": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2444": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2445": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2446": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2447": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2448": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2449": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2450": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2451": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2452": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2453": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2454": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2455": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2456": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2457": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2458": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2459": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2460": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2461": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2462": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2463": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2464": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2465": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2466": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2467": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2468": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2469": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2470": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2471": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2472": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2473": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2474": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2475": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2476": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2477": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2478": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + "2479": + type: integer + minimum: 0 + maximum: 65535 # 0 to 100, 65535 means no data available + example: + trackNumber: 2 + channelErrors: + "2402": 0 + "2403": 0 + "2404": 0 + "2405": 0 + "2406": 0 + "2407": 3 + "2408": 1 + "2409": 5 + "2410": 9 + "2411": 6 + "2412": 4 + "2413": 1 + "2414": 0 + "2415": 0 + "2416": 0 + "2417": 0 + "2418": 0 + "2419": 0 + "2420": 0 + "2421": 0 + "2422": 0 + "2423": 0 + "2424": 0 + "2425": 0 + "2426": 0 + "2427": 0 + "2428": 0 + "2429": 0 + "2430": 0 + "2431": 0 + "2432": 0 + "2433": 0 + "2434": 0 + "2435": 3 + "2436": 2 + "2437": 5 + "2438": 2 + "2439": 0 + "2440": 0 + "2441": 0 + "2442": 0 + "2443": 0 + "2444": 0 + "2445": 0 + "2446": 0 + "2447": 0 + "2448": 0 + "2449": 0 + "2450": 0 + "2451": 0 + "2452": 0 + "2453": 0 + "2454": 0 + "2455": 0 + "2456": 0 + "2457": 0 + "2458": 0 + "2459": 0 + "2460": 0 + "2461": 0 + "2462": 0 + "2463": 0 + "2464": 0 + "2465": 0 + "2466": 0 + "2467": 0 + "2468": 0 + "2469": 0 + "2470": 0 + "2471": 0 + "2472": 0 + "2473": 0 + "2474": 0 + "2475": 0 + "2476": 0 + "2477": 0 + "2478": 0 + "2479": 0 + + trackConfiguration: + properties: + statusInfo: + type: string + enum: + - STOP + - CYCLIC + - ROAMING + - SERVICE + txPower: + type: integer + minimum: 1 + maximum: 31 + example: + trackMode: CYCLIC + + trackConfigurationPost: + properties: + statusInfo: + type: string + enum: + - STOP + - CYCLIC + - ROAMING + - SERVICE + txPower: + type: integer + minimum: 1 + maximum: 31 + example: + trackMode: CYCLIC + txPower: 20 + + # wirelessPortConfigurationGet: # @todo wireles + # properties: + # portMode: + # type: string + # enum: + # - DEACTIVATED + # - CYCLIC + # - ROAMING + # validationBackup: + # type: string + # enum: + # - NO_DEVICE_CHECK + # - TYPE_COMPATIBLE_DEVICE_V1.1 + # - TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE + # - TYPE_COMPATIBLE_DEVICE_V1.1_RESTORE + # vendorId: + # type: integer + # minimum: 1 + # maximum: 65535 + # deviceId: + # type: integer + # minimum: 1 + # maximum: 16777215 + # portCycleTime: + # type: object + # required: + # - value + # - unit + # properties: + # value: + # type: integer + # minimum: 0 ## 0 means Freerunning + # maximum: 315 ## Step size 5ms + # unit: + # type: string + # enum: + # - ms + # trackNumber: + # type: integer + # minimum: 1 + # maximum: 5 + # slotNumber: + # type: integer + # minimum: 0 + # maximum: 7 + # slotType: + # type: string + # enum: + # - "SSLOT" + # - "DSLOT" + # maxRetry: + # type: integer + # minimum: 2 + # maximum: 31 + # imaTime: + # type: object + # required: + # - base + # - multiplier + # properties: + # base: + # type: string + # enum: + # - "1664us" + # - "5ms" + # - "1s" + # - "1min" + # multiplier: + # type: integer + # minimum: 1 + # maximum: 255 + # deviceTxPower: + # type: integer + # minimum: 0 + # maximum: 31 + # lowPowerDevice: + # type: string + # enum: + # - "NORMAL" + # - "LOW_POWER" + # maxPDSegLength: + # type: integer + # minimum: 0 + # maximum: 32 + # uniqueId: + # type: string + # deviceAlias: + # type: string + # example: + # portMode: CYCLIC + # validationBackup: TYPE_COMPATIBLE_DEVICE_V1.1 + # vendorId: 888 + # deviceId: 1 + # portCycleTime: + # value: 0 + # unit: ms + # trackNumber: 5 + # slotNumber: 1 + # slotType: SSLOT + # maxRetry: 20 + # imaTime: + # base: 1664us + # multiplier: 60 + # deviceTxPower: 31 + # lowPowerDevice: NORMAL + # maxPDSegLength: 0 + # uniqueId: 03:78:00:00:01:32:50:60:46 + # deviceAlias: "Port_X01" + + # wirelessPortConfigurationPost: # @todo wireles + # properties: + # portMode: + # type: string + # enum: + # - DEACTIVATED + # - CYCLIC + # - ROAMING + # validationBackup: + # type: string + # enum: + # - NO_DEVICE_CHECK + # - TYPE_COMPATIBLE_DEVICE_V1.1 + # - TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE + # - TYPE_COMPATIBLE_DEVICE_V1.1_RESTORE + # vendorId: + # type: integer + # minimum: 1 + # maximum: 65535 + # deviceId: + # type: integer + # minimum: 1 + # maximum: 16777215 + # portCycleTime: + # type: object + # required: + # - value + # - unit + # properties: + # value: + # type: integer + # minimum: 0 ## 0 means Freerunning + # maximum: 315 ## Step size 5ms + # unit: + # type: string + # enum: + # - ms + # trackNumber: + # type: integer + # minimum: 1 + # maximum: 5 + # slotNumber: + # type: integer + # minimum: 0 + # maximum: 7 + # slotType: + # type: string + # enum: + # - "SSLOT" + # - "DSLOT" + # maxRetry: + # type: integer + # minimum: 2 + # maximum: 31 + # imaTime: + # type: object + # required: + # - base + # - multiplier + # properties: + # base: + # type: string + # enum: + # - "1664us" + # - "5ms" + # - "1s" + # - "1min" + # multiplier: + # type: integer + # minimum: 1 + # maximum: 255 + # deviceTxPower: + # type: integer + # minimum: 0 + # maximum: 31 + # lowPowerDevice: + # type: string + # enum: + # - "NORMAL" + # - "LOW_POWER" + # maxPDSegLength: + # type: integer + # minimum: 0 + # maximum: 32 + # uniqueId: + # type: string + # example: + # portMode: CYCLIC + # validationBackup: TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE + # vendorId: 888 + # deviceId: 1 + # portCycleTime: + # value: 0 ##Or FreeRunning + # unit: ms + # trackNumber: 5 + # slotNumber: 1 + # slotType: SSLOT + # maxRetry: 20 + # imaTime: + # base: 1664us + # multiplier: 60 + # deviceTxPower: 31 + # lowPowerDevice: NORMAL + # maxPDSegLength: 0 + # uniqueId: 03:78:00:00:01:32:50:60:46 + + mqtt-iol-master: + type: string + description: The MQTT topic for the IO-Link Master. + example: "192.168.0.1:1883" + artifact: + type: string + description: IODD Artifacts like device, vendor images + enum: + - XML + - DeviceIcon + - DeviceSymbol + - VendorLogo + - zip + default: XML + masterIdentificationGet: + required: + - vendorName + - vendorId + - masterId + - masterType + type: object + properties: + vendorName: + type: string + minLength: 1 + maxLength: 64 + vendorId: + type: integer + minimum: 1 + maximum: 65535 + masterId: + type: integer + minimum: 1 + maximum: 4294967295 + masterType: + type: string + enum: + - Unspecific + - Master acc. V1.0 + - Master acc. V1.1 + - Failsafe_Master + - Wireless_Master + serialNumber: + type: string + minLength: 1 + maxLength: 16 + orderCode: + type: string + minLength: 1 + maxLength: 64 + productName: + type: string + minLength: 1 + maxLength: 64 + productId: + type: string + minLength: 1 + maxLength: 64 + hardwareRevision: + type: string + minLength: 1 + maxLength: 64 + firmwareRevision: + type: string + minLength: 1 + maxLength: 64 + vendorUrl: + type: string + format: uri + manualUrl: + type: string + format: uri + productInstanceUri: + type: string + descriptionFileUri: + type: string + applicationSpecificTag: + type: string + minLength: 1 + maxLength: 32 + locationTag: + type: string + minLength: 1 + maxLength: 32 + functionTag: + type: string + minLength: 1 + maxLength: 32 From f187ce19dfd773d76f416cc8e69acc94ba95bada Mon Sep 17 00:00:00 2001 From: roeseko Date: Mon, 5 Feb 2024 16:45:29 +0100 Subject: [PATCH 02/22] Fix underscore visualization --- JSON_for_IO-Link.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/JSON_for_IO-Link.yaml b/JSON_for_IO-Link.yaml index d593472..dfb0d4e 100644 --- a/JSON_for_IO-Link.yaml +++ b/JSON_for_IO-Link.yaml @@ -2896,11 +2896,11 @@ components: Parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ - Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "_". The following regex (/[^\w\n]/g) can be used.\ - Rule 3: Leading numbers shall be prefixed with “_“. \ + Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "\_". The following regex (/[^\w\n]/g) can be used.\ + Rule 3: Leading numbers shall be prefixed with "\_". \ Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ - Rule 5: Naming according the scheme {name}_{index} or {name}_{subindex} is always allowed even if names are not duplicated. \ - Rule 6: The naming of ArrayT elements is “element_{subindex}”. \ + Rule 5: Naming according the scheme {name}\_{index} or {name}\_{subindex} is always allowed even if names are not duplicated. \ + Rule 6: The naming of ArrayT elements is "element\_{subindex}". \ minLength: 1 maxLength: 71 subParameterName: @@ -2909,11 +2909,11 @@ components: Sub-parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ - Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "_". The following regex (/[^\w\n]/g) can be used. \ - Rule 3: Leading numbers shall be prefixed with “_“. \ + Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "\_". The following regex (/[^\w\n]/g) can be used. \ + Rule 3: Leading numbers shall be prefixed with "\_". \ Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ - Rule 5: Naming according the scheme {name}_{index} or {name}_{subindex} is always allowed even if names are not duplicated. \ - Rule 6: The naming of ArrayT elements is “element_{subindex}”. \ + Rule 5: Naming according the scheme {name}\_{index} or {name}\_{subindex} is always allowed even if names are not duplicated. \ + Rule 6: The naming of ArrayT elements is "element\_{subindex}". \ minLength: 1 maxLength: 71 cycleTime: @@ -5279,11 +5279,11 @@ components: Parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ - Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "_". The following regex (/[^\w\n]/g) can be used. \ - Rule 3: Leading numbers shall be prefixed with “_“. \ + Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "\_". The following regex (/[^\w\n]/g) can be used. \ + Rule 3: Leading numbers shall be prefixed with "\_". \ Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ - Rule 5: Naming according the scheme {name}_{index} or {name}_{subindex} is always allowed even if names are not duplicated. \ - Rule 6: The naming of ArrayT elements is “element_{subindex}”. + Rule 5: Naming according the scheme {name}\_{index} or {name}\_{subindex} is always allowed even if names are not duplicated. \ + Rule 6: The naming of ArrayT elements is "element\_{subindex}"". Note: The parameter name may change with the IODD version. If it is used by the client for accessing parameters, it needs to be verified that it is the same used by the master. \ schema: @@ -5298,11 +5298,11 @@ components: Sub-parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ - Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "_". The following regex (/[^\w\n]/g) can be used. \ - Rule 3: Leading numbers shall be prefixed with “_“. \ + Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "\_". The following regex (/[^\w\n]/g) can be used. \ + Rule 3: Leading numbers shall be prefixed with "\_". \ Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ - Rule 5: Naming according the scheme {name}_{index} or {name}_{subindex} is always allowed even if names are not duplicated. \ - Rule 6: The naming of ArrayT elements is “element_{subindex}”. \ + Rule 5: Naming according the scheme {name}\_{index} or {name}\_{subindex} is always allowed even if names are not duplicated. \ + Rule 6: The naming of ArrayT elements is "element\_{subindex}". \ Note: The parameter name may change with the IODD version. If it is used by the client for accessing parameters, it needs to be verified that it is the same used by the master. \ schema: From 2e8bd304563f50cb0e1732ce7020aaf925d2bca2 Mon Sep 17 00:00:00 2001 From: roeseko Date: Wed, 14 Feb 2024 11:16:36 +0100 Subject: [PATCH 03/22] Add specification merger workflow --- .github/workflows/spec-merge.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/spec-merge.yml diff --git a/.github/workflows/spec-merge.yml b/.github/workflows/spec-merge.yml new file mode 100644 index 0000000..beab9d3 --- /dev/null +++ b/.github/workflows/spec-merge.yml @@ -0,0 +1,21 @@ +name: Merge async api specification + +on: + - push + - pull_request + +jobs: + build: + name: Run swagger-merger + runs-on: ubuntu-latest + steps: + # Check out the repository + - uses: actions/checkout@v2 + + # install swagger-merger + - name: install swagger-merger + run: npm install -g swagger-merger + + # Run swagger-merger + - name: Run swagger-merger + run: swagger-merger -i .\MQTT_for_IO-Link.yaml .\schemas.yaml .\examples.yaml -o MQTT_for_IO-Link_merged.yaml From 32382737741e24a4fd8986a9be7f8e4aca6419c9 Mon Sep 17 00:00:00 2001 From: roeseko Date: Wed, 14 Feb 2024 11:27:44 +0100 Subject: [PATCH 04/22] Test workflow --- .github/workflows/spec-merge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spec-merge.yml b/.github/workflows/spec-merge.yml index beab9d3..8365f42 100644 --- a/.github/workflows/spec-merge.yml +++ b/.github/workflows/spec-merge.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: # Check out the repository - - uses: actions/checkout@v2 + - uses: actions/checkout@v1 # install swagger-merger - name: install swagger-merger @@ -18,4 +18,4 @@ jobs: # Run swagger-merger - name: Run swagger-merger - run: swagger-merger -i .\MQTT_for_IO-Link.yaml .\schemas.yaml .\examples.yaml -o MQTT_for_IO-Link_merged.yaml + run: swagger-merger -i MQTT_for_IO-Link.yaml schemas.yaml examples.yaml -o MQTT_for_IO-Link_merged.yaml From 51f50e8c9de78f43ca730d0e50725421ae9e7f6d Mon Sep 17 00:00:00 2001 From: roeseko Date: Wed, 14 Feb 2024 11:43:18 +0100 Subject: [PATCH 05/22] Upload merged files as artifacts --- .github/workflows/spec-merge.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/spec-merge.yml b/.github/workflows/spec-merge.yml index 8365f42..5a4d984 100644 --- a/.github/workflows/spec-merge.yml +++ b/.github/workflows/spec-merge.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: # Check out the repository - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 # install swagger-merger - name: install swagger-merger @@ -18,4 +18,18 @@ jobs: # Run swagger-merger - name: Run swagger-merger - run: swagger-merger -i MQTT_for_IO-Link.yaml schemas.yaml examples.yaml -o MQTT_for_IO-Link_merged.yaml + run: | + swagger-merger -i MQTT_for_IO-Link.yaml schemas.yaml examples.yaml -o MQTT_for_IO-Link_merged.yaml + swagger-merger -i JSON_for_IO-Link.yaml schemas.yaml examples.yaml -o JSON_for_IO-Link_merged.yaml + + - name: Upload merged MQTT_for_IO-Link YAML file as artifact + uses: actions/upload-artifact@v2 + with: + name: mqtt-yaml + path: MQTT_for_IO-Link_merged.yaml + + - name: Upload merged JSON_for_IO-Link YAML file as artifact + uses: actions/upload-artifact@v2 + with: + name: json-yaml + path: JSON_for_IO-Link_merged.yaml From 3cc74ddeec86975a2f38a1ff7fd82592f2c6d636 Mon Sep 17 00:00:00 2001 From: roeseko Date: Wed, 14 Feb 2024 11:51:28 +0100 Subject: [PATCH 06/22] Change node version --- .github/workflows/spec-merge.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/spec-merge.yml b/.github/workflows/spec-merge.yml index 5a4d984..dffbc30 100644 --- a/.github/workflows/spec-merge.yml +++ b/.github/workflows/spec-merge.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: # Check out the repository - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 # install swagger-merger - name: install swagger-merger @@ -23,13 +23,13 @@ jobs: swagger-merger -i JSON_for_IO-Link.yaml schemas.yaml examples.yaml -o JSON_for_IO-Link_merged.yaml - name: Upload merged MQTT_for_IO-Link YAML file as artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: mqtt-yaml path: MQTT_for_IO-Link_merged.yaml - name: Upload merged JSON_for_IO-Link YAML file as artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: json-yaml path: JSON_for_IO-Link_merged.yaml From 47c7dcd0ffeb0d5325a7255a9931c2fd1a5af43a Mon Sep 17 00:00:00 2001 From: roeseko Date: Wed, 14 Feb 2024 12:36:23 +0100 Subject: [PATCH 07/22] Change uptime to mqttuptime to make the meaning more clear --- JSON_for_IO-Link.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/JSON_for_IO-Link.yaml b/JSON_for_IO-Link.yaml index dfb0d4e..060605e 100644 --- a/JSON_for_IO-Link.yaml +++ b/JSON_for_IO-Link.yaml @@ -3616,7 +3616,7 @@ components: required: - connectionStatus - serverAddress - - upTime + - mqttUpTime properties: connectionStatus: type: string @@ -3630,7 +3630,8 @@ components: - NOT_AUTHORIZED serverAddress: type: string - upTime: + mqttUpTime: + description: Duration of established MQTT connection type: integer example: connectionStatus: CONNECTION_ACCEPTED From 7ced2e8d2a3d03dfa886fa163210ad2aa17c9106 Mon Sep 17 00:00:00 2001 From: roeseko Date: Wed, 14 Feb 2024 14:17:10 +0100 Subject: [PATCH 08/22] Strip down specification to basic feature set --- MQTT_for_IO-Link.yaml | 821 ++---------------------------------------- schemas.yaml | 2 +- 2 files changed, 28 insertions(+), 795 deletions(-) diff --git a/MQTT_for_IO-Link.yaml b/MQTT_for_IO-Link.yaml index a2c0bb5..2331bde 100644 --- a/MQTT_for_IO-Link.yaml +++ b/MQTT_for_IO-Link.yaml @@ -19,8 +19,6 @@ servers: protocol: mqtt protocolVersion: 3.1.1 description: io-link master as MQTT client - security: - - user-password: [] variables: iolm-ip: default: "192.168.0.1" @@ -32,7 +30,7 @@ servers: channels: "{originatorId}/gateway/identification": description: >- - publishes asset (e.g. gateway) nameplate information, send at startup or + Publishes gateway nameplate information, send at startup or onChange parameters: originatorId: @@ -48,23 +46,16 @@ channels: description: publishes gateway events parameters: originatorId: - description: >- - shall be the unique identifier of the originator and shall correspond - to the client id inside the MQTT message. It can be the ProductURI, - DNS name, IP address or MAC address of the device hosting the MQTT - publisher. By default the Hostname shall be used. schema: - type: string - example: iomaster_nr1 + $ref: "./schemas.yaml#/schemas/originatorId" publish: message: name: gatewayEvents payload: - $ref: "./schemas.yaml#/schemas/gatewayIdentificationGet" + $ref: "./schemas.yaml#/schemas/gatewayEventsGet" "{originatorId}/master/{masterNumber}/identification": - description: >- - publishes asset (e.g. gateway) nameplate information, send at startup or + description: publishes master identification data, send at startup or onChange parameters: originatorId: @@ -75,71 +66,50 @@ channels: $ref: "./schemas.yaml#/schemas/eventMasterNumber" publish: message: - name: gatewayIdentification + name: masterIdentification payload: $ref: "./schemas.yaml#/schemas/masterIdentificationGet" "{originatorId}/{deviceAlias}/identification": description: >- - publishes asset (e.g. device) nameplate information, send at connection + publishes device identification, send at connection startup (new connection) parameters: originatorId: - description: >- - shall be the unique identifier of the originator and shall correspond - to the client id inside the MQTT message. It can be the ProductURI, - DNS name, IP address or MAC address of the device hosting the MQTT - publisher. By default the Hostname shall be used. schema: - type: string - example: iomaster_nr1 + $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: - description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" schema: - type: string - example: port1 + $ref: "./schemas.yaml#/schemas/deviceAlias" publish: message: name: deviceIdentification payload: $ref: "./schemas.yaml#/schemas/deviceIdentificationGet" + bindings: + mqtt: + qos: 1 + retain: true "{originatorId}/{deviceAlias}/event": - description: "publishes the port status, send at startup/onChange" + description: "publishes the device events, send at startup/onChange" parameters: originatorId: - description: >- - shall be the unique identifier of the originator and shall correspond - to the client id inside the MQTT message. It can be the ProductURI, - DNS name, IP address or MAC address of the device hosting the MQTT - publisher. By default the Hostname shall be used. schema: - type: string - example: iomaster_nr1 + $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: - description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" schema: - type: string - example: port1 - subscribe: + $ref: "./schemas.yaml#/schemas/deviceAlias" + publish: message: - $ref: "#/components/messages/portstatus" - bindings: - mqtt: - qos: 1 - retain: true + payload: + $ref: "./schemas.yaml#/schemas/deviceEventsGet" "{originatorId}/{deviceAlias}/processData": parameters: originatorId: - description: >- - shall be the unique identifier of the originator and shall correspond - to the client id inside the MQTT message. It can be the ProductURI, - DNS name, IP address or MAC address of the device hosting the MQTT - publisher. By default the Hostname shall be used. schema: - type: string - example: iomaster_nr1 + $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" schema: @@ -151,753 +121,16 @@ channels: payload: $ref: "./schemas.yaml#/schemas/processDataValue" - "{originatorId}/{deviceAlias}/events": - description: >- - eventlog of the io link device, see - "iolink/v1/devices/{deviceAlias}/events" + "{originatorId}/{portNumber}/status": + description: "publishes the port status, send at startup/onChange" parameters: originatorId: - description: >- - shall be the unique identifier of the originator and shall correspond - to the client id inside the MQTT message. It can be the ProductURI, - DNS name, IP address or MAC address of the device hosting the MQTT - publisher. By default the Hostname shall be used. schema: - type: string - example: iomaster_nr1 - deviceAlias: - description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" + $ref: "./schemas.yaml#/schemas/originatorId" + portNumber: schema: - type: string - example: port1 - subscribe: + $ref: "./schemas.yaml#/schemas/eventPortNumber" + publish: message: - $ref: "#/components/messages/deviceEvents" - bindings: - mqtt: - qos: 1 - retain: true -components: - messages: - connection: - summary: onlinestate of the gateway - description: This will be issued as birth and lastwill message. - tags: - - name: gateway - payload: - type: string - enum: - - online - - offline - example: online - nameplate: - summary: contains the nameplate information of a gateway. - tags: - - name: gateway - payload: - type: object - properties: - vendorName: - type: string - default: Murrelektronik - vendorId: - type: number - default: 303 - vendorUrl: - type: string - format: url - default: "http://www.murrelektronik.com" - productName: - type: string - example: Impact67 PN DIO12 IOL4 IRT 7/8 5pin - orderCode: - type: string - example: 55132 - serialNumber: - type: string - example: 1234567 - productUri: - type: string - format: url - description: >- - Unique product identifier and link to product catalogue - (https://product.murrelektronik.com/{productCode}/{orderCode}/{serialNumber}) - example: "https://product.murrelektronik.com/XYZ/512345/01234567" - hardwareRevision: - type: string - example: 7 - softwareRevision: - type: string - example: 1.2.3 - deviceClass: - type: string - example: PN Profinet - nameOfStation: - type: string - description: Profinet station name - example: profinetstation - sysName: - type: string - description: Systemname - example: Device_123 - sysContact: - type: string - description: contact person (eMail) for this device or system - example: service@murrelektronik.de - sysLocation: - type: string - description: Location description of the device or system - example: Factory ABC Hall 123 - ethIpv4: - $ref: "#/components/schemas/networkConfiguration" - gatewayhealth: - summary: diagnostic health information of the gateway. - tags: - - name: gateway - payload: - type: object - required: - - health - - healthState - properties: - error: - type: string - description: Error message describing the error ocurred. - health: - $ref: "#/components/schemas/namurHealth" - healthState: - $ref: "#/components/schemas/namurHealthState" - example: - health: NORMAL_0 - healthState: 100 - portstatus: - summary: contains the status of the port. - tags: - - name: gateway - payload: - type: object - required: - - portNumber - - maxPowerSupply - - portType - - mode - - deviceAlias - - iqConfiguration - properties: - portNumber: - type: number - example: 1 - maxPowerSupply: - type: object - required: - - value - - unit - properties: - value: - type: number - example: 0.3 - unit: - type: string - example: A - portType: - type: string - enum: - - CLASS_A - - CLASS_B - - CLASS_A_WITH_PORT_POWER_OFF_ON - - FAILSAFE_PORT_A_WITHOUT_SAFETY_DIGITAL_INPUTS - - FAILSAFE_PORT_A_WITH_SAFETY_DIGITAL_INPUTS - - FAILSAFE_PORT_B - - WIRELESS_MASTER - example: CLASS_A - mode: - type: string - enum: - - DEACTIVATED - - IOLINK_MANUAL - - IOLINK_AUTOSTART - - DIGITAL_INPUT - - DIGITAL_OUTPUT - example: DEACTIVATED - deviceAlias: - type: string - example: master1port1 - iqConfiguration: - type: string - enum: - - NOT_SUPPORTED - - DIGITAL_INPUT - - DIGITAL_OUTPUT - example: DIGITAL_INPUT - validationAndBackup: - type: string - description: Used by the IO-Link Master just when portMode is IOLINK_MANUAL. - enum: - - NO_DEVICE_CHECK - - TYPE_COMPATIBLE_DEVICE_V1.0 - - TYPE_COMPATIBLE_DEVICE_V1.1 - - TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE - - TYPE_COMPATIBLE_DEVICE_V1.1_RESTORE - example: NO_DEVICE_CHECK - cycleTime: - description: >- - Used by the IO-Link Master just when portMode is IOLINK_MANUAL or - IOLINK_AUTOSTART. Default value is 0 ms which means as fast as - possible - type: object - required: - - value - - unit - properties: - value: - type: number - example: 2.3 - unit: - type: string - enum: - - ms - example: ms - vendorId: - type: integer - minimum: 1 - maximum: 65535 - description: >- - Used by the IO-Link Master just when portMode is IOLINK_MANUAL and - validationAndBackup is not NO_DEVICE_CHECK. - example: 1234 - deviceId: - type: integer - minimum: 1 - maximum: 16777215 - description: >- - Used by the IO-Link Master just when portMode is IOLINK_MANUAL and - validationAndBackup is not NO_DEVICE_CHECK. - example: 15464 - nameplate_iolink: - summary: contains the nameplate information of an IO-Link device. - description: | - This will be issued when an IO-Link device was detected. - tags: - - name: device - payload: - type: object - properties: - vendorName: - type: string - default: Murrelektronik - vendorId: - type: number - default: 303 - vendorUrl: - type: string - format: url - default: "http://www.murrelektronik.com" - productName: - type: string - orderCode: - type: string - serialNumber: - type: string - productUri: - type: string - format: url - description: >- - Unique identifier and link to product catalogue - (https://product.murrelektronik.com/{productCode}/{orderCode}/{serialNumber}) - hardwareRevision: - type: string - firmwareRevision: - type: string - example: - vendorName: Murrelektronik - vendorId: 303 - vendorUrl: "http://www.murrelektronik.com/" - orderCode: 55132 - productName: Impact67 PN DIO12 IOL4 IRT 7/8" 5pin - serialNumber: "123456789" - hardwareRevision: 1.0.0 - softwareRevision: 1.0.1 - devicehealth: - summary: contains the health information of the device. - tags: - - name: device - payload: - required: - - health - - healthState - type: object - properties: - health: - $ref: "#/components/schemas/namurHealth" - healthState: - $ref: "#/components/schemas/namurHealthState" - errors: - type: object - properties: - iolErrors: - type: object - properties: - isIolWirebreak: - type: boolean - isIolShortCircuit: - type: boolean - isProcessDataInvalid: - type: boolean - isDataStorageFaulty: - type: boolean - isValidationFailure: - type: boolean - validationError: - type: object - properties: - isWrongCycleTime: - type: boolean - isWrongIolinkRevision: - type: boolean - isWrongPdInLength: - type: boolean - isWrongPdOutLength: - type: boolean - isWrongVendorId: - type: boolean - isWrongdeviceAlias: - type: boolean - isWrongSerialNumber: - type: boolean - isShortCircuitPin4: - type: boolean - isShortCircuitPin2: - type: boolean - isOverloadStatusPin4: - type: boolean - isOverloadStatusPin2: - type: boolean - isActuatorWarningPin4: - type: boolean - isActuatorWarningPin2: - type: boolean - deviceEvents: - summary: events - tags: - - name: device - payload: - $ref: "#/components/schemas/deviceEvents" - processdata_IOLink: - summary: >- - Read the process data values (input and output) from the specified - Device - tags: - - name: device - payload: - $ref: "#/components/schemas/deviceProcessDataValueIOLINK" - processdata_Misc: - summary: >- - Read the process data values (input and output) from the specified - Device. - tags: - - name: device - payload: - $ref: "#/components/schemas/deviceProcessDataValueMisc" - schemas: - eventOrigin: - type: string - enum: - - ALL - - GATEWAY - - MASTERS - - PORTS - - DEVICES - default: ALL - cycleTime: - type: object - required: - - value - - unit - properties: - value: - type: number - unit: - type: string - enum: - - ms - processData: - allOf: - - type: object - required: - - direction - properties: - direction: - $ref: "#/components/schemas/content" - oneOf: - - type: object - required: - - interval - properties: - interval: - $ref: "#/components/schemas/cycleTime" - - type: object - required: - - onChange - properties: - onChange: - type: boolean - content: - type: string - enum: - - getData - - setData - - getSetData - default: getData - mqttConfiguration: - type: object - required: - - clientMode - properties: - clientMode: - type: string - serverAddress: - type: string - username: - type: string - password: - type: string - lastWill: - type: object - required: - - topic - - message - - qos - - retain - properties: - topic: - type: string - message: - type: string - qos: - type: string - enum: - - 0_ONLY_ONCE - - 1_AT_LEAST_ONCE - - 2_EXACTLY_ONCE - retain: - type: boolean - keepAliveTime: - type: integer - mqttConnectionStatus: - allOf: - - type: object - required: - - connectionStatus - - serverAddress - - upTime - properties: - connectionStatus: - type: string - enum: - - CLIENT_INACTIVE - - CONNECTION_ACCEPTED - - UNACCEPTABLE_PROTOCOL_VERSION - - IDENTIFIER_REJECTED - - SERVER_UNAVAILABLE - - BAD_USERNAME_OR_PASSWORD - - NOT_AUTHORIZED - serverAddress: - type: string - upTime: - type: integer - example: - connectionStatus: CONNECTION_ACCEPTED - serverAddress: "http://broker-address.com" - upTime: 1050 - deviceProcessDataValueIOLINK: - type: object - description: > - The cqValue is present in the 'getData' object if the CQ (pin4) is - configured as digital input. The cqValue is present in the 'setData' - object if the CQ (pin4) is configured as digital output. The ioLink is - present either in the 'getData' or 'setData' or both objects if the CQ - (pin4) is configured to IO-Link mode. The iqValue is present in the - 'getData' object if the IQ (pin2) is configured as digital input. The - iqValue is present in the 'setData' object if the IQ (pin4) is - configured as digital output. - properties: - getData: - $ref: "#/components/schemas/processDataValue" - setData: - $ref: "#/components/schemas/processDataValue" - processDataValue: - type: object - properties: - ioLink: - type: object - description: | - Process data in IO-Link mode - required: - - valid - - value - properties: - valid: - type: boolean - description: | - Process data validity - value: - anyOf: - - $ref: "#/components/schemas/deviceByteArrayTypeValue" - - $ref: "#/components/schemas/deviceSimpleTypeValue" - description: | - Process data value - cqValue: - type: boolean - description: > - IO-Link cable CQ (pin4) level if it is used as digital input or - output (SIO mode). (false - 0 V, true - 24 V) - example: false - iqValue: - type: boolean - description: > - IO-Link cable IQ (pin2) level if it is used as digital input or - output. (false - 0 V, true - 24 V) - example: false - deviceProcessDataValueMisc: - type: object - description: | - "Messageblock for misc. messages (example)". - properties: - getData: - type: string - example: daten - setData: - type: string - example: daten - deviceByteArrayTypeValue: - type: object - required: - - value - properties: - value: - type: array - description: The value in byteArray format. - items: - type: number - minimum: 0 - maximum: 255 - example: - - 12 - - 22 - - 216 - deviceSimpleTypeValue: - type: object - properties: - value: - oneOf: - - type: boolean - - type: string - - type: number - description: The value (with simple type) in iodd format. - required: - - value - example: - value: 15.2 - deviceEvents: - type: object - required: - - time - - severity - - origin - - message - properties: - time: - $ref: "#/components/schemas/eventTime" - severity: - $ref: "#/components/schemas/eventSeverity" - message: - required: - - code - - mode - $ref: "#/components/schemas/eventObject" - eventObject: - type: object - properties: - code: - description: >- - IO-Link Port EventCode or IO-Link Device EventCode. This property is - mandatory for IO-Link Port Events or IO-Link Device Events. - type: number - example: 16912 - mode: - description: >- - IO-Link Port Event Mode or IO-Link Device EventMode. This property - is mandatory for IO-Link Port Events or IO-Link Device Events. - type: string - enum: - - SINGLESHOT - - APPEARS - - DISAPPEARS - example: APPEARS - text: - type: string - example: Device temperature over-run – Clear source of heat - eventOriginObject: - type: object - properties: - gateway: - type: string - example: 1 - masterNumber: - description: >- - This property is mandatory for IO-Link Master Events, IO-Link Port - Events and IO-Link Device Events. Should not be used for other log - entries. - type: integer - minimum: 1 - example: 1 - portNumber: - description: >- - This property is mandatory for IO-Link Port Events and IO-Link - Device Events. Should not be used for other log entries. - type: integer - minimum: 1 - example: 1 - deviceAlias: - description: >- - This property is mandatory for IO-Link Device Events. Should not be - used for other log entries. - type: string - example: Temperature_sensor_1 - eventSeverity: - description: >- - Indicates the severity of the message. The IO-Link EventType - NOTIFICATION maps to NOTICE, WARNING to WARNING and ERROR to ERROR. - type: string - enum: - - EMERGENCY - - ALERT - - CRITICAL - - ERROR - - WARNING - - NOTICE - - INFO - - DEBUG - example: WARNING - eventTime: - description: >- - Timestamp (format defined in DIN ISO 8601). This field can give an - absolute time or a relative time. Both formats are defined in DIN ISO - 8601. - type: string - example: "2021-05-18T07:31:54.123Z" - namurHealthState: - type: integer - maximum: 100 - minimum: 0 - description: >- - Reflects changing a meter for the health state as a result of - sub-optimal process and/or environmental conditions from 100 to 0 - namurHealth: - type: string - enum: - - NORMAL_0 - - FAILURE_1 - - CHECK_FUNCTION_2 - - OFF_SPEC_3 - - MAINTENANCE_REQUIRED_4 - - DIAGNOSIS_PASSIVE_5 - description: >- - health indicates the status as defined by NAMUR recommendation NE107 as - an DeviceHealthEnumeration value. - ipConfiguration: - type: string - enum: - - MANUAL - - DHCP - ipAddress: - type: string - example: 192.168.1.13 - subnetMask: - type: string - example: 255.255.255.0 - standardGateway: - type: string - example: 192.168.1.1 - dnsServer: - type: object - required: - - server - - configuration - properties: - server: - type: array - items: - type: string - example: - - 1.1.1.1 - - 2.2.2.2 - configuration: - type: string - enum: - - automatic - - custom - macAddress: - type: string - example: "FE:AB:3A:55:33:11" - valueUnitObject: - type: object - properties: - value: - type: integer - unit: - type: string - networkConfiguration: - type: array - items: - type: object - required: - - name - - ipConfiguration - - ipAddress - - subnetMask - - macAddress - properties: - name: - type: string - description: Name of the interface. - example: eth0 - ipConfiguration: - $ref: "#/components/schemas/ipConfiguration" - ipAddress: - $ref: "#/components/schemas/ipAddress" - subnetMask: - $ref: "#/components/schemas/subnetMask" - standardGateway: - $ref: "#/components/schemas/standardGateway" - dnsServer: - $ref: "#/components/schemas/dnsServer" - macAddress: - $ref: "#/components/schemas/macAddress" - ifSpeed: - type: array - items: - $ref: "#/components/schemas/valueUnitObject" - ifOperStatus: - type: array - items: - type: string - example: linkUp - parameters: - originatorId: - description: >- - This is the unique identifier of the originator and shall correspond to - the client id inside the MQTT message. It can be the ProductURI, DNS - name, IP address or MAC address of the device hosting the MQTT - publisher. By default the Hostname shall be used. - schema: - type: string - example: iomaster_nr1 - deviceAlias: - description: Id of the IO-Link device (e.g. port nr) - schema: - type: string - example: port1 - securitySchemes: - user-password: - type: userPassword + payload: + $ref: "./schemas.yaml#/schemas/mastersPortsStatusGet" diff --git a/schemas.yaml b/schemas.yaml index b93937b..880122d 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -1840,7 +1840,7 @@ schemas: description: > IO-Link cable IQ (pin2) level if it is used as digital input or output. (false - 0 V, true - 24 V) - + deviceProcessDataValueGet: type: object description: > From f1bac07bdec19dc0666e87a61ab143da5585496f Mon Sep 17 00:00:00 2001 From: roeseko Date: Wed, 14 Feb 2024 15:25:16 +0100 Subject: [PATCH 09/22] Change to subscribe --- MQTT_for_IO-Link.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MQTT_for_IO-Link.yaml b/MQTT_for_IO-Link.yaml index 2331bde..4b5d26c 100644 --- a/MQTT_for_IO-Link.yaml +++ b/MQTT_for_IO-Link.yaml @@ -36,7 +36,7 @@ channels: originatorId: schema: $ref: "./schemas.yaml#/schemas/originatorId" - publish: + subscribe: message: name: gatewayIdentification payload: @@ -48,7 +48,7 @@ channels: originatorId: schema: $ref: "./schemas.yaml#/schemas/originatorId" - publish: + subscribe: message: name: gatewayEvents payload: @@ -64,7 +64,7 @@ channels: masterNumber: schema: $ref: "./schemas.yaml#/schemas/eventMasterNumber" - publish: + subscribe: message: name: masterIdentification payload: @@ -81,7 +81,7 @@ channels: deviceAlias: schema: $ref: "./schemas.yaml#/schemas/deviceAlias" - publish: + subscribe: message: name: deviceIdentification payload: @@ -100,7 +100,7 @@ channels: deviceAlias: schema: $ref: "./schemas.yaml#/schemas/deviceAlias" - publish: + subscribe: message: payload: $ref: "./schemas.yaml#/schemas/deviceEventsGet" @@ -115,7 +115,7 @@ channels: schema: type: string example: port1 - publish: + subscribe: message: name: processdata payload: @@ -130,7 +130,7 @@ channels: portNumber: schema: $ref: "./schemas.yaml#/schemas/eventPortNumber" - publish: + subscribe: message: payload: $ref: "./schemas.yaml#/schemas/mastersPortsStatusGet" From e91331cd169bc63a06ea8829c5d59ef80085d0b4 Mon Sep 17 00:00:00 2001 From: roeseko Date: Thu, 15 Feb 2024 11:22:49 +0100 Subject: [PATCH 10/22] Remove type of mqtt topic parameter (V3 allows only string) --- schemas.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/schemas.yaml b/schemas.yaml index 880122d..97d218f 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -6,12 +6,16 @@ schemas: maxLength: 32 pattern: "^[a-zA-Z0-9_]{1,32}$" example: master1port1 + deviceAliasMqtt: + description: Unique deviceAlias. + portNumberMqtt: + description: Port number. + masterNumberMqtt: + description: Index of the master. originatorId: - type: string description: Shall be the unique identifier of the originator and shall correspond to the client id inside the MQTT message. It can be the ProductURI, DNS name, IP address or MAC address of the device hosting the MQTT publisher. - example: master1 parameterName: type: string description: | @@ -148,8 +152,8 @@ schemas: - PORTS - DEVICES default: ALL - eventMasterNumber: - type: integer + masterNumber: + description: Index of the master. minimum: 1 eventPortNumber: type: integer From e6c2ebf612da8ca337b5a1d627cb17d6bd4b975d Mon Sep 17 00:00:00 2001 From: roeseko Date: Thu, 15 Feb 2024 11:23:09 +0100 Subject: [PATCH 11/22] Update to V3 --- MQTT_for_IO-Link.yaml | 140 +++++++++++++++++++++++++++--------------- 1 file changed, 89 insertions(+), 51 deletions(-) diff --git a/MQTT_for_IO-Link.yaml b/MQTT_for_IO-Link.yaml index 4b5d26c..eb7035b 100644 --- a/MQTT_for_IO-Link.yaml +++ b/MQTT_for_IO-Link.yaml @@ -1,12 +1,13 @@ -asyncapi: 2.6.0 +asyncapi: 3.0.0 info: title: MQTT for IO-Link Master version: 0.0.3 description: > - This is the _AsyncAPI_ specification of MQTT topics by the IO-Link consortium. + This is the _AsyncAPI_ specification of MQTT topics by the IO-Link + consortium. termsOfService: "https://www.io-link.com" contact: - name: "IO-Link Community" + name: IO-Link Community email: info@io-link.com url: "http://www.io-link.com" license: @@ -15,57 +16,55 @@ info: defaultContentType: application/json servers: iol-master: - url: "{iolm-ip}:{port}" + host: "{iolm-ip}:{port}" protocol: mqtt protocolVersion: 3.1.1 description: io-link master as MQTT client variables: iolm-ip: - default: "192.168.0.1" + default: 192.168.0.1 port: enum: - "1883" - "8883" default: "1883" + channels: "{originatorId}/gateway/identification": + address: "{originatorId}/gateway/identification" description: >- Publishes gateway nameplate information, send at startup or onChange parameters: - originatorId: - schema: - $ref: "./schemas.yaml#/schemas/originatorId" - subscribe: - message: + $ref: "./schemas.yaml#/schemas/originatorId" + messages: + subscribe.message: name: gatewayIdentification payload: $ref: "./schemas.yaml#/schemas/gatewayIdentificationGet" "{originatorId}/gateway/events": + address: "{originatorId}/gateway/events" description: publishes gateway events parameters: - originatorId: - schema: - $ref: "./schemas.yaml#/schemas/originatorId" - subscribe: - message: + $ref: "./schemas.yaml#/schemas/originatorId" + messages: + subscribe.message: name: gatewayEvents payload: $ref: "./schemas.yaml#/schemas/gatewayEventsGet" "{originatorId}/master/{masterNumber}/identification": + address: "{originatorId}/master/{masterNumber}/identification" description: publishes master identification data, send at startup or onChange parameters: originatorId: - schema: - $ref: "./schemas.yaml#/schemas/originatorId" + $ref: "./schemas.yaml#/schemas/originatorId" masterNumber: - schema: - $ref: "./schemas.yaml#/schemas/eventMasterNumber" - subscribe: - message: + $ref: "./schemas.yaml#/schemas/masterNumberMqtt" + messages: + subscribe.message: name: masterIdentification payload: $ref: "./schemas.yaml#/schemas/masterIdentificationGet" @@ -76,47 +75,35 @@ channels: startup (new connection) parameters: originatorId: - schema: - $ref: "./schemas.yaml#/schemas/originatorId" + $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: - schema: - $ref: "./schemas.yaml#/schemas/deviceAlias" - subscribe: - message: + $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" + messages: + subscribe.message: name: deviceIdentification payload: $ref: "./schemas.yaml#/schemas/deviceIdentificationGet" - bindings: - mqtt: - qos: 1 - retain: true "{originatorId}/{deviceAlias}/event": description: "publishes the device events, send at startup/onChange" parameters: originatorId: - schema: - $ref: "./schemas.yaml#/schemas/originatorId" + $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: - schema: - $ref: "./schemas.yaml#/schemas/deviceAlias" - subscribe: - message: + $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" + messages: + subscribe.message: payload: $ref: "./schemas.yaml#/schemas/deviceEventsGet" "{originatorId}/{deviceAlias}/processData": parameters: originatorId: - schema: - $ref: "./schemas.yaml#/schemas/originatorId" + $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: - description: "Id of the device (e.g. (i.e. an IO-Link device, an IO-Port number)" - schema: - type: string - example: port1 - subscribe: - message: + $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" + messages: + subscribe.message: name: processdata payload: $ref: "./schemas.yaml#/schemas/processDataValue" @@ -125,12 +112,63 @@ channels: description: "publishes the port status, send at startup/onChange" parameters: originatorId: - schema: - $ref: "./schemas.yaml#/schemas/originatorId" + $ref: "./schemas.yaml#/schemas/originatorId" portNumber: - schema: - $ref: "./schemas.yaml#/schemas/eventPortNumber" - subscribe: - message: + $ref: "./schemas.yaml#/schemas/portNumberMqtt" + messages: + subscribe.message: payload: $ref: "./schemas.yaml#/schemas/mastersPortsStatusGet" +operations: + "{originatorId}/gateway/identification.subscribe": + action: send + channel: + $ref: "#/channels/{originatorId}~1gateway~1identification" + messages: + - $ref: >- + #/channels/{originatorId}~1gateway~1identification/messages/subscribe.message + "{originatorId}/gateway/events.subscribe": + action: send + channel: + $ref: "#/channels/{originatorId}~1gateway~1events" + messages: + - $ref: "#/channels/{originatorId}~1gateway~1events/messages/subscribe.message" + "{originatorId}/master/{masterNumber}/identification.subscribe": + action: send + channel: + $ref: "#/channels/{originatorId}~1master~1{masterNumber}~1identification" + messages: + - $ref: >- + #/channels/{originatorId}~1master~1{masterNumber}~1identification/messages/subscribe.message + "{originatorId}/{deviceAlias}/identification.subscribe": + action: send + channel: + $ref: "#/channels/{originatorId}~1{deviceAlias}~1identification" + bindings: + mqtt: + qos: 1 + retain: true + messages: + - $ref: >- + #/channels/{originatorId}~1{deviceAlias}~1identification/messages/subscribe.message + "{originatorId}/{deviceAlias}/event.subscribe": + action: send + channel: + $ref: "#/channels/{originatorId}~1{deviceAlias}~1event" + messages: + - $ref: >- + #/channels/{originatorId}~1{deviceAlias}~1event/messages/subscribe.message + "{originatorId}/{deviceAlias}/processData.subscribe": + action: send + channel: + $ref: "#/channels/{originatorId}~1{deviceAlias}~1processData" + messages: + - $ref: >- + #/channels/{originatorId}~1{deviceAlias}~1processData/messages/subscribe.message + "{originatorId}/{portNumber}/status.subscribe": + action: send + channel: + $ref: "#/channels/{originatorId}~1{portNumber}~1status" + messages: + - $ref: >- + #/channels/{originatorId}~1{portNumber}~1status/messages/subscribe.message From 89733899a0248f4a3b72d972dd367382946d5d84 Mon Sep 17 00:00:00 2001 From: roeseko Date: Fri, 16 Feb 2024 14:53:57 +0100 Subject: [PATCH 12/22] Remove unsed schemas --- JSON_for_IO-Link.yaml | 19 ------------------- schemas.yaml | 6 +++++- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/JSON_for_IO-Link.yaml b/JSON_for_IO-Link.yaml index 060605e..c84041a 100644 --- a/JSON_for_IO-Link.yaml +++ b/JSON_for_IO-Link.yaml @@ -5181,14 +5181,6 @@ components: type: integer minimum: 1 required: true - trackNumber: - name: trackNumber - in: path - description: trackNumber identification number starting with 1 - schema: - type: integer - minimum: 1 - required: true portNumber: name: portNumber in: path @@ -5531,17 +5523,6 @@ components: value: code: 106 message: MQTT feature not supported - HTTP_503: - description: Service unavailable - content: - application/json: - schema: - $ref: "#/components/schemas/errorObject" - examples: - "107": - value: - code: 107 - message: "Service temporarily unavailable" examples: # reusable examples exampleMasterConfiguration: diff --git a/schemas.yaml b/schemas.yaml index 97d218f..75e99f5 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -11,11 +11,15 @@ schemas: portNumberMqtt: description: Port number. masterNumberMqtt: - description: Index of the master. + description: Index of the master. originatorId: description: Shall be the unique identifier of the originator and shall correspond to the client id inside the MQTT message. It can be the ProductURI, DNS name, IP address or MAC address of the device hosting the MQTT publisher. + parameterIdentMqtt: + description: Identifier of the parameter. It can be the parameterName or the index of the parameter. + subParameterIdentMqtt: + description: Identifier of the sub-parameter. It can be the sub-parameterName or the sub-index of the parameter. parameterName: type: string description: | From d528c73753d150a210d80368a435edaadc090230 Mon Sep 17 00:00:00 2001 From: roeseko Date: Fri, 16 Feb 2024 14:54:37 +0100 Subject: [PATCH 13/22] General refinement and add request-response --- MQTT_for_IO-Link.yaml | 181 +++++++++++++++++++++++++++++++----------- 1 file changed, 133 insertions(+), 48 deletions(-) diff --git a/MQTT_for_IO-Link.yaml b/MQTT_for_IO-Link.yaml index eb7035b..9142433 100644 --- a/MQTT_for_IO-Link.yaml +++ b/MQTT_for_IO-Link.yaml @@ -1,10 +1,8 @@ asyncapi: 3.0.0 info: - title: MQTT for IO-Link Master - version: 0.0.3 - description: > - This is the _AsyncAPI_ specification of MQTT topics by the IO-Link - consortium. + title: MQTT for IO-Link Gateways + version: 0.1.0 + description: This is the recommended specification for IO-Link gateway MQTT communication by the IO-Link consortium. termsOfService: "https://www.io-link.com" contact: name: IO-Link Community @@ -19,7 +17,7 @@ servers: host: "{iolm-ip}:{port}" protocol: mqtt protocolVersion: 3.1.1 - description: io-link master as MQTT client + description: IO-Link gateway as MQTT client variables: iolm-ip: default: 192.168.0.1 @@ -32,115 +30,188 @@ servers: channels: "{originatorId}/gateway/identification": address: "{originatorId}/gateway/identification" - description: >- - Publishes gateway nameplate information, send at startup or - onChange + description: Publishes gateway nameplate information, send at connection startup/on change parameters: $ref: "./schemas.yaml#/schemas/originatorId" messages: - subscribe.message: - name: gatewayIdentification + publish.message: + name: gatewayIdentificationMessage payload: $ref: "./schemas.yaml#/schemas/gatewayIdentificationGet" "{originatorId}/gateway/events": address: "{originatorId}/gateway/events" - description: publishes gateway events + description: Publishes list of occured gateway events, send on change parameters: $ref: "./schemas.yaml#/schemas/originatorId" messages: - subscribe.message: - name: gatewayEvents + publish.message: + name: gatewayEventsMessage payload: $ref: "./schemas.yaml#/schemas/gatewayEventsGet" "{originatorId}/master/{masterNumber}/identification": address: "{originatorId}/master/{masterNumber}/identification" - description: publishes master identification data, send at startup or - onChange + description: Publishes master identification data, send at connection startup/on change parameters: originatorId: $ref: "./schemas.yaml#/schemas/originatorId" masterNumber: $ref: "./schemas.yaml#/schemas/masterNumberMqtt" messages: - subscribe.message: - name: masterIdentification + publish.message: + name: masterIdentificationMessage payload: $ref: "./schemas.yaml#/schemas/masterIdentificationGet" + "{originatorId}/{portNumber}/status": + address: "{originatorId}/{portNumber}/status" + description: Publishes the port status, send at connection startup/on change + parameters: + originatorId: + $ref: "./schemas.yaml#/schemas/originatorId" + portNumber: + $ref: "./schemas.yaml#/schemas/portNumberMqtt" + messages: + publish.message: + name: portStatusMessage + payload: + $ref: "./schemas.yaml#/schemas/mastersPortsStatusGet" + "{originatorId}/{deviceAlias}/identification": - description: >- - publishes device identification, send at connection - startup (new connection) + address: "{originatorId}/{deviceAlias}/identification" + description: Publishes device identification, send at connection startup/on change parameters: originatorId: $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" messages: - subscribe.message: - name: deviceIdentification + publish.message: + name: deviceIdentificationMessage payload: $ref: "./schemas.yaml#/schemas/deviceIdentificationGet" "{originatorId}/{deviceAlias}/event": - description: "publishes the device events, send at startup/onChange" + address: "{originatorId}/{deviceAlias}/event" + description: Publishes device events, send at connection startup/on change parameters: originatorId: $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" messages: - subscribe.message: + publish.message: + name: deviceEventsMessage payload: $ref: "./schemas.yaml#/schemas/deviceEventsGet" "{originatorId}/{deviceAlias}/processData": + address: "{originatorId}/{deviceAlias}/processData" + description: Publishes device process data, cyclically or on change parameters: originatorId: $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" messages: - subscribe.message: - name: processdata + publish.message: + name: deviceProcessDataMessage payload: $ref: "./schemas.yaml#/schemas/processDataValue" - "{originatorId}/{portNumber}/status": - description: "publishes the port status, send at startup/onChange" + "{originatorId}/{deviceAlias}/parameter/{parameterIdent}": + address: "{originatorId}/{deviceAlias}/parameter/{parameterIdent}" + description: Publishes device parameter data, depending on the configuration via REST (POST /mqtt/topics), cyclically or on change parameters: originatorId: $ref: "./schemas.yaml#/schemas/originatorId" - portNumber: - $ref: "./schemas.yaml#/schemas/portNumberMqtt" + deviceAlias: + $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" + parameterIdent: + $ref: "./schemas.yaml#/schemas/parameterIdentMqtt" messages: - subscribe.message: + publish.message: + name: deviceParameterMessage payload: - $ref: "./schemas.yaml#/schemas/mastersPortsStatusGet" + $ref: "./schemas.yaml#/schemas/deviceParameterValueGetPost" + + "{originatorId}/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}": + address: "{originatorId}/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}" + description: Publishes device sub-parameter data, depending on the configuration via REST (POST /mqtt/topics), cyclically or on change + parameters: + originatorId: + $ref: "./schemas.yaml#/schemas/originatorId" + deviceAlias: + $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" + parameterIdent: + $ref: "./schemas.yaml#/schemas/parameterIdentMqtt" + subParameterIdent: + $ref: "./schemas.yaml#/schemas/subParameterIdentMqtt" + messages: + publish.message: + name: deviceSubParameterMessage + payload: + $ref: "./schemas.yaml#/schemas/deviceParameterValueGetPost" + + "{originatorId}/{deviceAlias}/parameter/request": + address: "{originatorId}/{deviceAlias}/parameter/request" + description: Listening to device parameter requests + parameters: + originatorId: + $ref: "./schemas.yaml#/schemas/originatorId" + deviceAlias: + $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" + messages: + publish.message: + name: deviceRequestMessage + payload: + $ref: "./schemas.yaml#/schemas/deviceBlockParameterizationPost" + + "{originatorId}/{deviceAlias}/parameter/response": + address: "{originatorId}/{deviceAlias}/parameter/response" + description: Publishes device parameter response depending on the request {originatorId}/{deviceAlias}/parameter/request + parameters: + originatorId: + $ref: "./schemas.yaml#/schemas/originatorId" + deviceAlias: + $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" + messages: + publish.message: + name: deviceResponseMessage + payload: + $ref: "./schemas.yaml#/schemas/deviceBlockParameterizationPostParametersAnswer" + operations: - "{originatorId}/gateway/identification.subscribe": + "{originatorId}/gateway/identification.publish": action: send channel: $ref: "#/channels/{originatorId}~1gateway~1identification" messages: - $ref: >- - #/channels/{originatorId}~1gateway~1identification/messages/subscribe.message - "{originatorId}/gateway/events.subscribe": + #/channels/{originatorId}~1gateway~1identification/messages/publish.message + "{originatorId}/gateway/events.publish": action: send channel: $ref: "#/channels/{originatorId}~1gateway~1events" messages: - - $ref: "#/channels/{originatorId}~1gateway~1events/messages/subscribe.message" - "{originatorId}/master/{masterNumber}/identification.subscribe": + - $ref: "#/channels/{originatorId}~1gateway~1events/messages/publish.message" + "{originatorId}/master/{masterNumber}/identification.publish": action: send channel: $ref: "#/channels/{originatorId}~1master~1{masterNumber}~1identification" messages: - $ref: >- - #/channels/{originatorId}~1master~1{masterNumber}~1identification/messages/subscribe.message - "{originatorId}/{deviceAlias}/identification.subscribe": + #/channels/{originatorId}~1master~1{masterNumber}~1identification/messages/publish.message + + "{originatorId}/{portNumber}/status.publish": + action: send + channel: + $ref: "#/channels/{originatorId}~1{portNumber}~1status" + messages: + - $ref: >- + #/channels/{originatorId}~1{portNumber}~1status/messages/publish.message + "{originatorId}/{deviceAlias}/identification.publish": action: send channel: $ref: "#/channels/{originatorId}~1{deviceAlias}~1identification" @@ -150,25 +221,39 @@ operations: retain: true messages: - $ref: >- - #/channels/{originatorId}~1{deviceAlias}~1identification/messages/subscribe.message - "{originatorId}/{deviceAlias}/event.subscribe": + #/channels/{originatorId}~1{deviceAlias}~1identification/messages/publish.message + "{originatorId}/{deviceAlias}/event.publish": action: send channel: $ref: "#/channels/{originatorId}~1{deviceAlias}~1event" messages: - $ref: >- - #/channels/{originatorId}~1{deviceAlias}~1event/messages/subscribe.message - "{originatorId}/{deviceAlias}/processData.subscribe": + #/channels/{originatorId}~1{deviceAlias}~1event/messages/publish.message + "{originatorId}/{deviceAlias}/processData.publish": action: send channel: $ref: "#/channels/{originatorId}~1{deviceAlias}~1processData" messages: - $ref: >- - #/channels/{originatorId}~1{deviceAlias}~1processData/messages/subscribe.message - "{originatorId}/{portNumber}/status.subscribe": + #/channels/{originatorId}~1{deviceAlias}~1processData/messages/publish.message + "{originatorId}/{deviceAlias}/parameter/parameterIdent.publish": action: send channel: - $ref: "#/channels/{originatorId}~1{portNumber}~1status" + $ref: "#/channels/{originatorId}~1{deviceAlias}~1parameter~1{parameterIdent}" + messages: + - $ref: >- + #/channels/{originatorId}~1{deviceAlias}~1parameter~1{parameterIdent}/messages/publish.message + ? "{originatorId}/{deviceAlias}/parameter/parameterIdent/subParameterIdent.publish" + : action: send + channel: + $ref: "#/channels/{originatorId}~1{deviceAlias}~1parameter~1{parameterIdent}~1{subParameterIdent}" messages: - $ref: >- - #/channels/{originatorId}~1{portNumber}~1status/messages/subscribe.message + #/channels/{originatorId}~1{deviceAlias}~1parameter~1{parameterIdent}/messages/publish.message + "{originatorId}/{deviceAlias}/parameter/request.subscribe": + action: receive + channel: + $ref: "#/channels/{originatorId}~1{deviceAlias}~1parameter~1request" + reply: + channel: + $ref: "#/channels/{originatorId}~1{deviceAlias}~1parameter~1response" From 2fd587e3100223389852f0463ed49c6580b722dd Mon Sep 17 00:00:00 2001 From: roeseko Date: Mon, 18 Mar 2024 12:08:09 +0100 Subject: [PATCH 14/22] Adjust topics to be harmonized with REST endpoints --- MQTT_for_IO-Link.yaml | 82 ++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/MQTT_for_IO-Link.yaml b/MQTT_for_IO-Link.yaml index 9142433..a808e4d 100644 --- a/MQTT_for_IO-Link.yaml +++ b/MQTT_for_IO-Link.yaml @@ -50,8 +50,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/gatewayEventsGet" - "{originatorId}/master/{masterNumber}/identification": - address: "{originatorId}/master/{masterNumber}/identification" + "{originatorId}/masters/{masterNumber}/identification": + address: "{originatorId}/masters/{masterNumber}/identification" description: Publishes master identification data, send at connection startup/on change parameters: originatorId: @@ -64,12 +64,14 @@ channels: payload: $ref: "./schemas.yaml#/schemas/masterIdentificationGet" - "{originatorId}/{portNumber}/status": - address: "{originatorId}/{portNumber}/status" + "{originatorId}/masters/{masterNumber}/ports/{portNumber}/status": + address: "{originatorId}/masters/{masterNumber}/ports/{portNumber}/status" description: Publishes the port status, send at connection startup/on change parameters: originatorId: $ref: "./schemas.yaml#/schemas/originatorId" + masterNumber: + $ref: "./schemas.yaml#/schemas/masterNumberMqtt" portNumber: $ref: "./schemas.yaml#/schemas/portNumberMqtt" messages: @@ -78,8 +80,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/mastersPortsStatusGet" - "{originatorId}/{deviceAlias}/identification": - address: "{originatorId}/{deviceAlias}/identification" + "{originatorId}/devices/{deviceAlias}/identification": + address: "{originatorId}/devices/{deviceAlias}/identification" description: Publishes device identification, send at connection startup/on change parameters: originatorId: @@ -92,8 +94,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/deviceIdentificationGet" - "{originatorId}/{deviceAlias}/event": - address: "{originatorId}/{deviceAlias}/event" + "{originatorId}/devices/{deviceAlias}/event": + address: "{originatorId}/devices/{deviceAlias}/event" description: Publishes device events, send at connection startup/on change parameters: originatorId: @@ -106,8 +108,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/deviceEventsGet" - "{originatorId}/{deviceAlias}/processData": - address: "{originatorId}/{deviceAlias}/processData" + "{originatorId}/devices/{deviceAlias}/processData": + address: "{originatorId}/devices/{deviceAlias}/processData" description: Publishes device process data, cyclically or on change parameters: originatorId: @@ -120,8 +122,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/processDataValue" - "{originatorId}/{deviceAlias}/parameter/{parameterIdent}": - address: "{originatorId}/{deviceAlias}/parameter/{parameterIdent}" + "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}": + address: "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}" description: Publishes device parameter data, depending on the configuration via REST (POST /mqtt/topics), cyclically or on change parameters: originatorId: @@ -136,8 +138,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/deviceParameterValueGetPost" - "{originatorId}/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}": - address: "{originatorId}/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}" + ? "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}" + : address: "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}" description: Publishes device sub-parameter data, depending on the configuration via REST (POST /mqtt/topics), cyclically or on change parameters: originatorId: @@ -154,8 +156,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/deviceParameterValueGetPost" - "{originatorId}/{deviceAlias}/parameter/request": - address: "{originatorId}/{deviceAlias}/parameter/request" + "{originatorId}/devices/{deviceAlias}/parameter/request": + address: "{originatorId}/devices/{deviceAlias}/parameter/request" description: Listening to device parameter requests parameters: originatorId: @@ -168,9 +170,9 @@ channels: payload: $ref: "./schemas.yaml#/schemas/deviceBlockParameterizationPost" - "{originatorId}/{deviceAlias}/parameter/response": - address: "{originatorId}/{deviceAlias}/parameter/response" - description: Publishes device parameter response depending on the request {originatorId}/{deviceAlias}/parameter/request + "{originatorId}/devices/{deviceAlias}/parameter/response": + address: "{originatorId}/devices/{deviceAlias}/parameter/response" + description: Publishes device parameter response depending on the request {originatorId}/devices/{deviceAlias}/parameter/request parameters: originatorId: $ref: "./schemas.yaml#/schemas/originatorId" @@ -196,64 +198,64 @@ operations: $ref: "#/channels/{originatorId}~1gateway~1events" messages: - $ref: "#/channels/{originatorId}~1gateway~1events/messages/publish.message" - "{originatorId}/master/{masterNumber}/identification.publish": + "{originatorId}/masters/{masterNumber}/identification.publish": action: send channel: - $ref: "#/channels/{originatorId}~1master~1{masterNumber}~1identification" + $ref: "#/channels/{originatorId}~1masters~1{masterNumber}~1identification" messages: - $ref: >- - #/channels/{originatorId}~1master~1{masterNumber}~1identification/messages/publish.message + #/channels/{originatorId}~1masters~1{masterNumber}~1identification/messages/publish.message - "{originatorId}/{portNumber}/status.publish": + "{originatorId}/masters/{masterNumber}/ports/{portNumber}/status.publish": action: send channel: - $ref: "#/channels/{originatorId}~1{portNumber}~1status" + $ref: "#/channels/{originatorId}~1masters~1{masterNumber}~1ports~1{portNumber}~1status" messages: - $ref: >- - #/channels/{originatorId}~1{portNumber}~1status/messages/publish.message - "{originatorId}/{deviceAlias}/identification.publish": + #/channels/{originatorId}~1masters~1{masterNumber}~1ports~1{portNumber}~1status/messages/publish.message + "{originatorId}/devices/{deviceAlias}/identification.publish": action: send channel: - $ref: "#/channels/{originatorId}~1{deviceAlias}~1identification" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1identification" bindings: mqtt: qos: 1 retain: true messages: - $ref: >- - #/channels/{originatorId}~1{deviceAlias}~1identification/messages/publish.message + #/channels/{originatorId}~1devices~1{deviceAlias}~1identification/messages/publish.message "{originatorId}/{deviceAlias}/event.publish": action: send channel: - $ref: "#/channels/{originatorId}~1{deviceAlias}~1event" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1event" messages: - $ref: >- - #/channels/{originatorId}~1{deviceAlias}~1event/messages/publish.message + #/channels/{originatorId}~1devices~1{deviceAlias}~1event/messages/publish.message "{originatorId}/{deviceAlias}/processData.publish": action: send channel: - $ref: "#/channels/{originatorId}~1{deviceAlias}~1processData" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1processData" messages: - $ref: >- - #/channels/{originatorId}~1{deviceAlias}~1processData/messages/publish.message + #/channels/{originatorId}~1devices~1{deviceAlias}~1processData/messages/publish.message "{originatorId}/{deviceAlias}/parameter/parameterIdent.publish": action: send channel: - $ref: "#/channels/{originatorId}~1{deviceAlias}~1parameter~1{parameterIdent}" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}" messages: - $ref: >- - #/channels/{originatorId}~1{deviceAlias}~1parameter~1{parameterIdent}/messages/publish.message - ? "{originatorId}/{deviceAlias}/parameter/parameterIdent/subParameterIdent.publish" + #/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}/messages/publish.message + ? "{originatorId}/devices/{deviceAlias}/parameter/parameterIdent/subParameterIdent.publish" : action: send channel: - $ref: "#/channels/{originatorId}~1{deviceAlias}~1parameter~1{parameterIdent}~1{subParameterIdent}" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}~1{subParameterIdent}" messages: - $ref: >- - #/channels/{originatorId}~1{deviceAlias}~1parameter~1{parameterIdent}/messages/publish.message - "{originatorId}/{deviceAlias}/parameter/request.subscribe": + #/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}/messages/publish.message + "{originatorId}/devices/{deviceAlias}/parameter/request.subscribe": action: receive channel: - $ref: "#/channels/{originatorId}~1{deviceAlias}~1parameter~1request" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1request" reply: channel: - $ref: "#/channels/{originatorId}~1{deviceAlias}~1parameter~1response" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1response" From 1c9fb4fcc950f6ee2a74739837e5a1eafd3e2a08 Mon Sep 17 00:00:00 2001 From: roeseko Date: Mon, 18 Mar 2024 15:34:04 +0100 Subject: [PATCH 15/22] Add merge command to readme --- README.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0895696..3c58574 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,31 @@ JSON serialization for IO-Link data. In order to raise a bugfix, improvement or change/feature request file an issue. This issue will then be discussed by the community and the change can be done via pull request. Minor changes like typing errors can be fixed directly by a pull request and does not require opening an issue. ## Branches: - - master: released version (1.0) - - version-1-x: Draft for the next version +- master: released version (1.0) +- version-1-x: Draft for the next version -## Open in Swagger Editor: - https://editor.swagger.io/?url=https://raw.githubusercontent.com/iolinkcommunity/JSON_for_IO-Link/version-1-x/JSON_for_IO-Link.yaml - - https://studio.asyncapi.com/?url=https://raw.githubusercontent.com/iolinkcommunity/JSON_for_IO-Link/version-1-x/MQTT_for_IO-Link.yaml +## Open in Swagger Editor: +https://editor.swagger.io/?url=https://raw.githubusercontent.com/iolinkcommunity/JSON_for_IO-Link/version-1-x/JSON_for_IO-Link.yaml + +https://studio.asyncapi.com/?url=https://raw.githubusercontent.com/iolinkcommunity/JSON_for_IO-Link/version-1-x/MQTT_for_IO-Link.yaml ## Linting The Linting tool ["Spectral"](https://stoplight.io/open-source/spectral) is used for automatic validation of the specifications. You can run it locally with the command: -```docker run --rm -v ${PWD}:/usr/src/spectral stoplight/spectral lint -r spectral.yaml JSON_for_IO-Link.yaml ``` +`docker run --rm -v ${PWD}:/usr/src/spectral stoplight/spectral lint -r spectral.yaml JSON_for_IO-Link.yaml ` + +## Merge files + +Installation of merging tool: + +`npm install -g swagger-merger ` + +Run swagger-merger: + +`swagger-merger -i MQTT_for_IO-Link.yaml schemas.yaml examples.yaml -o MQTT_for_IO-Link_merged.yaml` +`swagger-merger -i JSON_for_IO-Link.yaml schemas.yaml examples.yaml -o JSON_for_IO-Link_merged.yaml` From b64ab7c254a777bf06da4912da007dc61586e2e7 Mon Sep 17 00:00:00 2001 From: roeseko Date: Mon, 18 Mar 2024 15:47:17 +0100 Subject: [PATCH 16/22] Introduce transactionId to map request to response --- MQTT_for_IO-Link.yaml | 54 +++++++++++++++++++++++-------------------- schemas.yaml | 2 ++ 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/MQTT_for_IO-Link.yaml b/MQTT_for_IO-Link.yaml index a808e4d..65b3920 100644 --- a/MQTT_for_IO-Link.yaml +++ b/MQTT_for_IO-Link.yaml @@ -94,8 +94,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/deviceIdentificationGet" - "{originatorId}/devices/{deviceAlias}/event": - address: "{originatorId}/devices/{deviceAlias}/event" + "{originatorId}/devices/{deviceAlias}/events": + address: "{originatorId}/devices/{deviceAlias}/events" description: Publishes device events, send at connection startup/on change parameters: originatorId: @@ -108,8 +108,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/deviceEventsGet" - "{originatorId}/devices/{deviceAlias}/processData": - address: "{originatorId}/devices/{deviceAlias}/processData" + "{originatorId}/devices/{deviceAlias}/processdata/value": + address: "{originatorId}/devices/{deviceAlias}/processdata/value" description: Publishes device process data, cyclically or on change parameters: originatorId: @@ -122,8 +122,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/processDataValue" - "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}": - address: "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}" + "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}/value": + address: "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}/value" description: Publishes device parameter data, depending on the configuration via REST (POST /mqtt/topics), cyclically or on change parameters: originatorId: @@ -138,8 +138,8 @@ channels: payload: $ref: "./schemas.yaml#/schemas/deviceParameterValueGetPost" - ? "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}" - : address: "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}" + ? "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}/value" + : address: "{originatorId}/devices/{deviceAlias}/parameter/{parameterIdent}/{subParameterIdent}/value" description: Publishes device sub-parameter data, depending on the configuration via REST (POST /mqtt/topics), cyclically or on change parameters: originatorId: @@ -156,28 +156,32 @@ channels: payload: $ref: "./schemas.yaml#/schemas/deviceParameterValueGetPost" - "{originatorId}/devices/{deviceAlias}/parameter/request": - address: "{originatorId}/devices/{deviceAlias}/parameter/request" + "{originatorId}/devices/{deviceAlias}/parameter/request/{transactionId}": + address: "{originatorId}/devices/{deviceAlias}/parameter/request/{transactionId}" description: Listening to device parameter requests parameters: originatorId: $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" + transactionId: + $ref: "./schemas.yaml#/schemas/transactionId" messages: publish.message: name: deviceRequestMessage payload: $ref: "./schemas.yaml#/schemas/deviceBlockParameterizationPost" - "{originatorId}/devices/{deviceAlias}/parameter/response": - address: "{originatorId}/devices/{deviceAlias}/parameter/response" - description: Publishes device parameter response depending on the request {originatorId}/devices/{deviceAlias}/parameter/request + "{originatorId}/devices/{deviceAlias}/parameter/response/{transactionId}": + address: "{originatorId}/devices/{deviceAlias}/parameter/response/{transactionId}" + description: Publishes device parameter response depending on the request {originatorId}/devices/{deviceAlias}/parameter/request/{transactionId} parameters: originatorId: $ref: "./schemas.yaml#/schemas/originatorId" deviceAlias: $ref: "./schemas.yaml#/schemas/deviceAliasMqtt" + transactionId: + $ref: "./schemas.yaml#/schemas/transactionId" messages: publish.message: name: deviceResponseMessage @@ -227,35 +231,35 @@ operations: "{originatorId}/{deviceAlias}/event.publish": action: send channel: - $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1event" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1events" messages: - $ref: >- - #/channels/{originatorId}~1devices~1{deviceAlias}~1event/messages/publish.message + #/channels/{originatorId}~1devices~1{deviceAlias}~1events/messages/publish.message "{originatorId}/{deviceAlias}/processData.publish": action: send channel: - $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1processData" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1processdata~1value" messages: - $ref: >- - #/channels/{originatorId}~1devices~1{deviceAlias}~1processData/messages/publish.message + #/channels/{originatorId}~1devices~1{deviceAlias}~1processdata~1value/messages/publish.message "{originatorId}/{deviceAlias}/parameter/parameterIdent.publish": action: send channel: - $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}~1value" messages: - $ref: >- - #/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}/messages/publish.message + #/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}~1value/messages/publish.message ? "{originatorId}/devices/{deviceAlias}/parameter/parameterIdent/subParameterIdent.publish" : action: send channel: - $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}~1{subParameterIdent}" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}~1{subParameterIdent}~1value" messages: - $ref: >- - #/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}/messages/publish.message - "{originatorId}/devices/{deviceAlias}/parameter/request.subscribe": - action: receive + #/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1{parameterIdent}~1value/messages/publish.message + ? "{originatorId}/devices/{deviceAlias}/parameter/request/{transactionId}.subscribe" + : action: receive channel: - $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1request" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1request~1{transactionId}" reply: channel: - $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1response" + $ref: "#/channels/{originatorId}~1devices~1{deviceAlias}~1parameter~1response~1{transactionId}" diff --git a/schemas.yaml b/schemas.yaml index 75e99f5..71e2e44 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -1,4 +1,6 @@ schemas: + transactionId: + description: Unique identifier for the transaction in UUIDv4 format. deviceAlias: type: string description: Unique deviceAlias. From dbf9945c3017d9092942b7dfb6cf00a45207ed21 Mon Sep 17 00:00:00 2001 From: roeseko Date: Mon, 8 Apr 2024 10:38:29 +0200 Subject: [PATCH 17/22] Change description of transaction id --- schemas.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas.yaml b/schemas.yaml index 71e2e44..c392733 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -1,6 +1,6 @@ schemas: transactionId: - description: Unique identifier for the transaction in UUIDv4 format. + description: Unique identifier for the transaction in for example as UUIDv4. deviceAlias: type: string description: Unique deviceAlias. From 4e6a2b57076ef40644b99ae38495ebeffb5d9408 Mon Sep 17 00:00:00 2001 From: roeseko Date: Fri, 24 May 2024 16:17:35 +0200 Subject: [PATCH 18/22] Add parameter restrictions and move artifact schema into separate file --- JSON_for_IO-Link.yaml | 60 +++++++++++-------------------------------- schemas.yaml | 46 +++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 45 deletions(-) diff --git a/JSON_for_IO-Link.yaml b/JSON_for_IO-Link.yaml index de6252c..1ca8a84 100644 --- a/JSON_for_IO-Link.yaml +++ b/JSON_for_IO-Link.yaml @@ -2672,16 +2672,6 @@ paths: components: schemas: - artifact: - type: string - description: IODD Artifacts like device, vendor images - enum: - - XML - - DeviceIcon - - DeviceSymbol - - VendorLogo - - zip - default: XML parameterIdent: oneOf: - $ref: "#/components/schemas/parameterName" @@ -2982,6 +2972,7 @@ components: numberOfPorts: type: integer minimum: 1 + maximum: 255 maxPowerSupply: type: object required: @@ -2994,12 +2985,15 @@ components: unit: type: string minLength: 1 + maxLength: 32 eventTime: description: >- Timestamp (format defined in DIN ISO 8601). This field can give an absolute time or a relative time. Both formats are defined in DIN ISO 8601. type: string + minLength: 1 + maxLength: 32 eventSeverity: description: >- Indicates the severity of the message. The IO-Link EventType @@ -3032,6 +3026,7 @@ components: Device Events. Should not be used for other log entries. type: integer minimum: 1 + maximum: 255 deviceAlias: description: >- This property is mandatory for IO-Link Device Events. Should not be @@ -3079,38 +3074,6 @@ components: $ref: "#/components/schemas/eventOriginObject" message: $ref: "#/components/schemas/eventObject" - blockParameterizationPostParametersRequest: - type: array - minItems: 1 - items: - type: object - required: - - identifier - properties: - identifier: - oneOf: - - type: object - required: - - index - properties: - index: - type: integer - minimum: 0 - maximum: 65535 - subIndex: - type: integer - minimum: 0 - maximum: 255 - - type: object - required: - - parameterName - properties: - parameterName: - $ref: "#/components/schemas/parameterName" - subParameterName: - $ref: "#/components/schemas/subParameterName" - content: - $ref: "#/components/schemas/deviceParameterValueGetPost" deviceBlockParameterizationPostParametersAnswer: type: array items: @@ -3249,13 +3212,20 @@ components: macAddress: type: string pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" + minLength: 1 + maxLength: 17 serialNumber: type: string + minLength: 1 + maxLength: 16 orderCode: type: string + minLength: 1 maxLength: 64 productName: type: string + minLength: 1 + maxLength: 64 productId: type: string hardwareRevision: @@ -4831,7 +4801,7 @@ components: - WRITE - READ parameters: - $ref: "#/components/schemas/blockParameterizationPostParametersRequest" + $ref: "./schemas.yaml#/schemas/blockParameterizationPostParametersRequest" index: type: integer description: Index of ISDU variable @@ -4862,7 +4832,7 @@ components: availableArtifacts: type: array items: - $ref: "#/components/schemas/artifact" + $ref: "./schemas.yaml#/schemas/artifact" ioddFileName: type: string ioddFile: @@ -4944,7 +4914,7 @@ components: required: false in: query schema: - $ref: "#/components/schemas/artifact" + $ref: "./schemas.yaml#/schemas/artifact" vendorId: name: vendorId in: query diff --git a/schemas.yaml b/schemas.yaml index c392733..c14948b 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -235,6 +235,7 @@ schemas: numberOfPorts: type: integer minimum: 1 + maximum: 255 maxPowerSupply: type: object required: @@ -247,12 +248,15 @@ schemas: unit: type: string minLength: 1 + maxLength: 32 eventTime: description: >- Timestamp (format defined in DIN ISO 8601). This field can give an absolute time or a relative time. Both formats are defined in DIN ISO 8601. type: string + minLength: 1 + maxLength: 32 eventSeverity: description: >- Indicates the severity of the message. The IO-Link EventType @@ -285,6 +289,7 @@ schemas: Device Events. Should not be used for other log entries. type: integer minimum: 1 + maximum: 255 deviceAlias: $ref: "#/schemas/deviceAlias" eventObject: @@ -451,34 +456,58 @@ schemas: macAddress: type: string pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" + minLength: 1 + maxLength: 17 serialNumber: type: string + minLength: 1 + maxLength: 16 orderCode: type: string + minLength: 1 maxLength: 64 productName: type: string + minLength: 1 + maxLength: 64 productId: type: string hardwareRevision: type: string + minLength: 1 maxLength: 64 firmwareRevision: type: string + minLength: 1 + maxLength: 64 vendorName: type: string + minLength: 1 + maxLength: 64 vendorUrl: type: string + minLength: 1 + maxLength: 64 manualUrl: type: string + minLength: 1 + maxLength: 64 productInstanceUri: type: string + minLength: 1 + maxLength: 64 applicationSpecificTag: type: string + minLength: 1 + maxLength: 64 locationTag: type: string + minLength: 1 + maxLength: 64 functionTag: type: string + minLength: 1 + maxLength: 64 example: macAddress: "00:02:72:CE:A6:49" serialNumber: "C134A746" @@ -503,6 +532,8 @@ schemas: properties: ifName: type: string + minLength: 1 + maxLength: 64 ipConfiguration: $ref: "#/schemas/ipConfiguration" ipAddress: @@ -531,12 +562,21 @@ schemas: properties: clientMode: type: string + enum: + - ACTIVE + - INACTIVE serverAddress: type: string + minLength: 1 + maxLength: 64 username: type: string + minLength: 1 + maxLength: 64 password: type: string + minLength: 1 + maxLength: 64 lastWill: type: object required: @@ -547,6 +587,8 @@ schemas: properties: topic: type: string + minLength: 1 + maxLength: 64 message: type: string qos: @@ -559,11 +601,15 @@ schemas: type: boolean keepAliveTime: type: integer + minimum: 1 + maximum: 65535 clientId: type: string description: MQTT Client identifier to address and identify the iolink master as MQTT client. It needs to be unique within the MQTT network. Since this parameter is optional, default value shall be set internally to a unique value (e.g. master name + MAC). + minLength: 1 + maxLength: 64 originatorId: $ref: "#/schemas/originatorId" mqttConfigurationTopic: From 393795a7d87f6b59f97f178f30cf3d5d638e315e Mon Sep 17 00:00:00 2001 From: roeseko Date: Fri, 7 Jun 2024 18:45:33 +0200 Subject: [PATCH 19/22] Remove schema definition because moved to separate file --- JSON_for_IO-Link.yaml | 2371 ++--------------------------------------- schemas.yaml | 243 +++-- 2 files changed, 242 insertions(+), 2372 deletions(-) diff --git a/JSON_for_IO-Link.yaml b/JSON_for_IO-Link.yaml index 1ca8a84..4b6c807 100644 --- a/JSON_for_IO-Link.yaml +++ b/JSON_for_IO-Link.yaml @@ -159,7 +159,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "150": value: @@ -170,7 +170,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "101": value: @@ -211,7 +211,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "150": value: @@ -222,7 +222,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "101": value: @@ -245,7 +245,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/gatewayIdentificationGet" + $ref: "./schemas.yaml#/schemas/gatewayIdentificationGet" "401": $ref: "#/components/responses/HTTP_401" "403": @@ -265,7 +265,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/gatewayCapabilitiesGet" + $ref: "./schemas.yaml#/schemas/gatewayCapabilitiesGet" "401": $ref: "#/components/responses/HTTP_401" "403": @@ -285,7 +285,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/gatewayConfigurationGetPost" + $ref: "./schemas.yaml#/schemas/gatewayConfigurationGetPost" examples: Manual: value: @@ -336,7 +336,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/gatewayConfigurationGetPost" + $ref: "./schemas.yaml#/schemas/gatewayConfigurationGetPost" examples: Manual: value: @@ -436,7 +436,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/gatewayEventsGet" + $ref: "./schemas.yaml#/schemas/gatewayEventsGet" examples: origin=ALL: value: @@ -575,7 +575,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mqttConfigurationGetPost" + $ref: "./schemas.yaml#/schemas/mqttConfigurationGetPost" examples: Active client: value: @@ -615,7 +615,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mqttConfigurationGetPost" + $ref: "./schemas.yaml#/schemas/mqttConfigurationGetPost" examples: Active Client: value: @@ -661,7 +661,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/mqttConfigurationTopicGet" + $ref: "./schemas.yaml#/schemas/mqttConfigurationTopicGet" example: - topicId: 1 topicName: Sensor34/processData @@ -726,7 +726,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mqttConfigurationTopicPost" + $ref: "./schemas.yaml#/schemas/mqttConfigurationTopicPost" examples: Process Data: value: @@ -798,7 +798,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mqttConfigurationTopicGet" + $ref: "./schemas.yaml#/schemas/mqttConfigurationTopicGet" examples: Process Data: value: @@ -890,7 +890,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mqttConnectionStatusGet" + $ref: "./schemas.yaml#/schemas/mqttConnectionStatusGet" "401": $ref: "#/components/responses/HTTP_401" "403": @@ -925,7 +925,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ioddsGet" + $ref: "./schemas.yaml#/schemas/ioddsGet" "400": # code 305, 306 $ref: "#/components/responses/HTTP_400" "401": @@ -981,15 +981,15 @@ paths: content: application/xml: schema: - $ref: "#/components/schemas/ioddFile" + $ref: "./schemas.yaml#/schemas/ioddFile" example: "IODD XML file" img/png: schema: - $ref: "#/components/schemas/ioddFile" + $ref: "./schemas.yaml#/schemas/ioddFile" example: "iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAYAAAAmlE46AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAJaSURBVDhPPVPPS3JRED0+LVGpIMUfSCW2iVLEiEytv6IWgiLtFNwJbVp9EP0DIogtol0LEaV2QovWSbgQdCFGLbIgBDW08sftzvTpgcu77905c2bOnaeaTCZCAiqVitcU1WoV39/f2NzchE6n42/TOMkBxuMxERmNRkMcHByIxcVF4XQ6xfr6urDZbMLj8YhcLvc/SggSU6Yq6XQaW1tbCAaDiEQirGIymbC6uor5+XmcnJzg6OiIY7k6ypDP5xGPx+FwOPDw8MCHLpeLyRqNht8J7XYbfr8fV1dXf0SLxcIBT09PnJ3Q6XSwsbGBtbU1fieQ0svLC25ubqAQu9froVgsMun8/BwXFxdYWlqC7AvPz89MkPl5Wa1Wbkut1Wr/HR8f4/DwEMlkEtfX17i/v8dgMEA4HMbX1xcqlcqsErVajff3dyi1Wo0NCYVCuL29BZVtNBqRyWSQSCSwvb2N4XD4Z4hcVB2RVbJZshf9fh96vZ6D9vb28Pr6inK5zK6ORiMmtVotnJ6eIpVKQSEFCjYYDNwD4efnB4VCAfv7+3h7e+NvlOjs7AyxWAwfHx9QvF4vDcFsKqiXUqmEx8dH7pdaILdpH41GuW9yG81mU5jNZiHLE7u7u8Ln8/HTbrcLqSzzCSGvgJ/SbZ6qbDYr+B5pUsi5hYWFmTKVS3tSJkxNpGuiCphIBzs7O2wQHZBZiqKg2+1CVoDLy0vIqjhBvV7H8vIy+O8gBQLZT5dOMzo3N8fKNGbkwcrKCu7u7mYmsuJUgfD5+cmOyt7ZbSIEAgG43W4+J5IQAr+h1V0CntKWLwAAAABJRU5ErkJggg==" application/zip: schema: - $ref: "#/components/schemas/ioddArchive" + $ref: "./schemas.yaml#/schemas/ioddArchive" example: "IODD in archive format provided by the IODD finder" "400": # code 305, 306 @@ -1017,11 +1017,11 @@ paths: content: application/xml: schema: - $ref: "#/components/schemas/ioddFile" + $ref: "./schemas.yaml#/schemas/ioddFile" example: "IODD XML file" application/zip: schema: - $ref: "#/components/schemas/ioddArchive" + $ref: "./schemas.yaml#/schemas/ioddArchive" example: "IODD in archive format provided by the IODD finder" responses: "204": @@ -1057,7 +1057,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/identificationMasters" + $ref: "./schemas.yaml#/schemas/identificationMasters" "401": $ref: "#/components/responses/HTTP_401" "403": @@ -1079,7 +1079,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/masterCapabilitiesGet" + $ref: "./schemas.yaml#/schemas/masterCapabilitiesGet" examples: IO-Link: value: @@ -1113,7 +1113,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/masterIdentificationGet" + $ref: "./schemas.yaml#/schemas/masterIdentificationGet" examples: IO-Link: value: @@ -1172,7 +1172,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/masterIdentificationPost" + $ref: "./schemas.yaml#/schemas/masterIdentificationPost" examples: All optional fiels: value: @@ -1208,7 +1208,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersConfigurationGetPost" + $ref: "./schemas.yaml#/schemas/mastersConfigurationGetPost" examples: IO-Link: $ref: "#/components/examples/exampleMasterConfiguration" @@ -1233,7 +1233,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersConfigurationGetPost" + $ref: "./schemas.yaml#/schemas/mastersConfigurationGetPost" examples: IO-Link: $ref: "#/components/examples/exampleMasterConfiguration" @@ -1293,7 +1293,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersTrackstatusGet" + $ref: "./schemas.yaml#/schemas/mastersTrackstatusGet" "401": $ref: "#/components/responses/HTTP_401" "403": @@ -1316,7 +1316,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersScanGet" + $ref: "./schemas.yaml#/schemas/mastersScanGet" "401": $ref: "#/components/responses/HTTP_401" "403": @@ -1336,7 +1336,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersScanPost" + $ref: "./schemas.yaml#/schemas/mastersScanPost" responses: "204": description: Successful operation @@ -1394,7 +1394,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersPortsGet" + $ref: "./schemas.yaml#/schemas/mastersPortsGet" examples: IO-Link: value: @@ -1446,7 +1446,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersPortsQualityallGet" + $ref: "./schemas.yaml#/schemas/mastersPortsQualityallGet" "401": $ref: "#/components/responses/HTTP_401" "403": @@ -1472,7 +1472,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/portCapabilitiesGet" + $ref: "./schemas.yaml#/schemas/portCapabilitiesGet" examples: CLASS_A: value: @@ -1538,7 +1538,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersPortsStatusGet" + $ref: "./schemas.yaml#/schemas/mastersPortsStatusGet" examples: IO-Link: value: @@ -1587,7 +1587,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/portConfigurationGet" + $ref: "./schemas.yaml#/schemas/portConfigurationGet" examples: IO-Link: value: @@ -1645,7 +1645,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/portConfigurationPost" + $ref: "./schemas.yaml#/schemas/portConfigurationPost" examples: Complete configuration: value: @@ -1718,7 +1718,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/dataStorageGetPost" + $ref: "./schemas.yaml#/schemas/dataStorageGetPost" examples: Data Storage with valid content: value: @@ -1731,8 +1731,13 @@ paths: TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGl Empty Data Storage: value: - header: {} - content: "" + header: + vendorId: 26 + deviceId: 65253 + iolinkRevision: "1.1" + parameterChecksum: 123456 + content: >- + '' "401": $ref: "#/components/responses/HTTP_401" "403": @@ -1755,7 +1760,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/dataStorageGetPost" + $ref: "./schemas.yaml#/schemas/dataStorageGetPost" examples: Data Storage with valid content: value: @@ -1798,7 +1803,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersPortsPairingPost" + $ref: "./schemas.yaml#/schemas/mastersPortsPairingPost" responses: "204": description: Successful operation @@ -1829,7 +1834,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/mastersPortsQualityGet" + $ref: "./schemas.yaml#/schemas/mastersPortsQualityGet" "401": $ref: "#/components/responses/HTTP_401" "403": @@ -1855,7 +1860,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/devicesGet" + $ref: "./schemas.yaml#/schemas/devicesGet" "401": $ref: "#/components/responses/HTTP_401" "403": @@ -1877,7 +1882,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceCapabilitiesGet" + $ref: "./schemas.yaml#/schemas/deviceCapabilitiesGet" example: minimumCycleTime: value: 2.3 @@ -1911,7 +1916,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceIdentificationGet" + $ref: "./schemas.yaml#/schemas/deviceIdentificationGet" "400": # code 307 $ref: "#/components/responses/HTTP_400" "401": @@ -1935,7 +1940,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/portIdentificationPost" + $ref: "./schemas.yaml#/schemas/portIdentificationPost" examples: All optional fields: value: @@ -1971,7 +1976,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceProcessDataValueGet" + $ref: "./schemas.yaml#/schemas/deviceProcessDataValueGet" examples: ? "Format=byteArray, CQ in IO-Link (only input), IQ in digital output" : value: @@ -2027,7 +2032,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceProcessDataValuePost" + $ref: "./schemas.yaml#/schemas/deviceProcessDataValuePost" examples: ? "format=byteArray, CQ (pin4) in IO-Link, IQ (pin2) in digital output" : value: @@ -2081,7 +2086,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/processDataValue" + $ref: "./schemas.yaml#/schemas/processDataValue" examples: ? "Format=byteArray, CQ (pin4) in IO-Link, IQ (pin2) in digital input" : value: @@ -2133,7 +2138,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/processDataValue" + $ref: "./schemas.yaml#/schemas/processDataValue" examples: ? "Format=byteArray, CQ (pin4) in digital output, IQ (pin2) in digital input" : value: @@ -2177,7 +2182,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceParametersGet" + $ref: "./schemas.yaml#/schemas/deviceParametersGet" "400": # code 305, 306, 601 $ref: "#/components/responses/HTTP_400" "401": @@ -2208,7 +2213,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceParameterValueGetPost" + $ref: "./schemas.yaml#/schemas/deviceParameterValueGetPost" examples: format=byteArray: value: @@ -2255,7 +2260,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceParameterValueGetPost" + $ref: "./schemas.yaml#/schemas/deviceParameterValueGetPost" examples: "payload as byteArray": value: @@ -2309,7 +2314,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceSubParametersGet" + $ref: "./schemas.yaml#/schemas/deviceSubParametersGet" "400": # code 601 $ref: "#/components/responses/HTTP_400" "401": @@ -2342,7 +2347,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceParameterSubindexValueGetPost" + $ref: "./schemas.yaml#/schemas/deviceParameterSubindexValueGetPost" examples: format=byteArray: value: @@ -2384,7 +2389,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceParameterSubindexValueGetPost" + $ref: "./schemas.yaml#/schemas/deviceParameterSubindexValueGetPost" examples: format=byteArray: value: { "value": [0, 156, 125, 25] } @@ -2424,7 +2429,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceBlockParameterizationPost" + $ref: "./schemas.yaml#/schemas/deviceBlockParameterizationPost" examples: "read, format=byteArray": value: @@ -2482,7 +2487,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceBlockParameterizationPostParametersAnswer" + $ref: "./schemas.yaml#/schemas/deviceBlockParameterizationPostParametersAnswer" examples: "read, format=byteArray": value: @@ -2605,7 +2610,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceEventsGet" + $ref: "./schemas.yaml#/schemas/deviceEventsGet" "400": # code 305, 306 $ref: "#/components/responses/HTTP_400" "401": @@ -2633,7 +2638,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/deviceFirmwareUpdateStatusGet" + $ref: "./schemas.yaml#/schemas/deviceFirmwareUpdateStatusGet" "400": # code 305, 306 $ref: "#/components/responses/HTTP_400" "403": @@ -2668,2225 +2673,9 @@ paths: content: multipart/form-data: schema: - $ref: "#/components/schemas/deviceFirmwareUpdatePost" + $ref: "./schemas.yaml#/schemas/deviceFirmwareUpdatePost" components: - schemas: - parameterIdent: - oneOf: - - $ref: "#/components/schemas/parameterName" - - $ref: "#/components/schemas/index" - parameterName: - type: string - description: | - Parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ - Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ - Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ - Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "\_". The following regex (/[^\w\n]/g) can be used.\ - Rule 3: Leading numbers shall be prefixed with "\_". \ - Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ - Rule 5: Naming according the scheme {name}\_{index} or {name}\_{subindex} is always allowed even if names are not duplicated. \ - Rule 6: The naming of ArrayT elements is "element\_{subindex}". \ - minLength: 1 - maxLength: 71 - subParameterIdent: - oneOf: - - $ref: "#/components/schemas/subParameterName" - - $ref: "#/components/schemas/subindex" - subindex: - type: integer - description: Subindex of ISDU variable with the given index - minimum: 0 - maximum: 255 - subParameterName: - type: string - description: | - Sub-parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ - Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ - Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ - Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "\_". The following regex (/[^\w\n]/g) can be used. \ - Rule 3: Leading numbers shall be prefixed with "\_". \ - Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ - Rule 5: Naming according the scheme {name}\_{index} or {name}\_{subindex} is always allowed even if names are not duplicated. \ - Rule 6: The naming of ArrayT elements is "element\_{subindex}". \ - minLength: 1 - maxLength: 71 - cycleTime: - type: object - required: - - value - - unit - properties: - value: - type: number - minimum: 0 - example: 10 - unit: - type: string - enum: - - ms - default: ms - event: - type: object - ipConfiguration: - type: string - enum: - - MANUAL - - DHCP - processData: - allOf: - - type: object - required: - - direction - - format - properties: - direction: - $ref: "#/components/schemas/content" - format: - $ref: "#/components/schemas/format" - oneOf: - - type: object - required: - - interval - properties: - interval: - $ref: "#/components/schemas/cycleTime" - - type: object - required: - - onChange - properties: - onChange: - type: boolean - format: - type: string - enum: - - byteArray - - iodd - default: byteArray - content: - type: string - enum: - - getData - - setData - - getSetData - default: getData - mqttParameter: - type: object - required: - - format - properties: - parameter: - $ref: "#/components/schemas/parameter" - format: - $ref: "#/components/schemas/format" - oneOf: - - type: object - required: - - interval - properties: - interval: - $ref: "#/components/schemas/cycleTime" - - type: object - required: - - onChange - properties: - onChange: - type: boolean - parameter: - oneOf: - - type: object - required: - - parameterName - properties: - parameterName: - $ref: "#/components/schemas/parameterName" - subParameterName: - $ref: "#/components/schemas/subParameterName" - - type: object - required: - - index - properties: - index: - type: integer - example: 233 - subindex: - type: integer - example: 2 - eventOrigin: - type: string - enum: - - ALL - - GATEWAY - - MASTERS - - PORTS - - DEVICES - default: ALL - eventMasterNumber: - type: integer - minimum: 1 - eventPortNumber: - type: integer - minimum: 1 - eventdeviceAlias: - type: string - minLength: 1 - maxLength: 32 - eventTop: - type: integer - minimum: 1 - eventBottom: - type: integer - minimum: 1 - identificationMasters: - type: array - items: - type: object - required: - - masterNumber - properties: - masterNumber: - type: integer - minimum: 1 - serialNumber: - type: string - minLength: 1 - maxLength: 16 - locationTag: - type: string - minLength: 1 - maxLength: 32 - example: - - masterNumber: 1 - serialNumber: A12345678B - locationTag: slotNumber 5 - - masterNumber: 2 - serialNumber: 123A45B783 - locationTag: slotNumber 6 - masterIdentificationGet: - required: - - vendorName - - vendorId - - masterId - - masterType - type: object - properties: - vendorName: - type: string - minLength: 1 - maxLength: 64 - vendorId: - type: integer - minimum: 1 - maximum: 65535 - masterId: - type: integer - minimum: 1 - maximum: 4294967295 - masterType: - type: string - enum: - - Unspecific - - Master acc. V1.0 - - Master acc. V1.1 - - Failsafe_Master - - Wireless_Master - serialNumber: - type: string - minLength: 1 - maxLength: 16 - orderCode: - type: string - minLength: 1 - maxLength: 64 - productName: - type: string - minLength: 1 - maxLength: 64 - productId: - type: string - minLength: 1 - maxLength: 64 - hardwareRevision: - type: string - minLength: 1 - maxLength: 64 - firmwareRevision: - type: string - minLength: 1 - maxLength: 64 - vendorUrl: - type: string - format: uri - manualUrl: - type: string - format: uri - productInstanceUri: - type: string - descriptionFileUri: - type: string - applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 - locationTag: - type: string - minLength: 1 - maxLength: 32 - functionTag: - type: string - minLength: 1 - maxLength: 32 - masterIdentificationPost: - type: object - properties: - applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 - locationTag: - type: string - minLength: 1 - maxLength: 32 - functionTag: - type: string - minLength: 1 - maxLength: 32 - gatewayCapabilitiesGet: - required: - - ioddSupported - - mqttSupported - type: object - properties: - ioddSupported: - type: boolean - mqttSupported: - type: boolean - example: - ioddSupported: true - mqttSupported: true - masterCapabilitiesGet: - required: - - numberOfPorts - type: object - properties: - numberOfPorts: - type: integer - minimum: 1 - maximum: 255 - maxPowerSupply: - type: object - required: - - value - - unit - properties: - value: - type: number - minimum: 0 - unit: - type: string - minLength: 1 - maxLength: 32 - eventTime: - description: >- - Timestamp (format defined in DIN ISO 8601). This field can give an - absolute time or a relative time. Both formats are defined in DIN ISO - 8601. - type: string - minLength: 1 - maxLength: 32 - eventSeverity: - description: >- - Indicates the severity of the message. The IO-Link EventType - NOTIFICATION maps to NOTICE, WARNING to WARNING and ERROR to ERROR. - type: string - enum: - - EMERGENCY - - ALERT - - CRITICAL - - ERROR - - WARNING - - NOTICE - - INFO - - DEBUG - eventOriginObject: - type: object - properties: - gateway: - type: string - masterNumber: - description: >- - This property is mandatory for IO-Link Master Events, IO-Link Port - Events and IO-Link Device Events. Should not be used for other log - entries. - type: integer - minimum: 1 - portNumber: - description: >- - This property is mandatory for IO-Link Port Events and IO-Link - Device Events. Should not be used for other log entries. - type: integer - minimum: 1 - maximum: 255 - deviceAlias: - description: >- - This property is mandatory for IO-Link Device Events. Should not be - used for other log entries. - type: string - minLength: 1 - maxLength: 32 - eventObject: - type: object - properties: - code: - description: >- - IO-Link Port EventCode or IO-Link Device EventCode. This property is - mandatory for IO-Link Port Events or IO-Link Device Events. - type: integer - minimum: 0 - maximum: 65535 - mode: - description: >- - IO-Link Port Event Mode or IO-Link Device EventMode. This property - is mandatory for IO-Link Port Events or IO-Link Device Events. - type: string - enum: - - SINGLESHOT - - APPEARS - - DISAPPEARS - text: - type: string - minLength: 1 - gatewayEventsGet: - type: array - items: - type: object - required: - - time - - severity - - origin - - message - properties: - time: - $ref: "#/components/schemas/eventTime" - severity: - $ref: "#/components/schemas/eventSeverity" - origin: - $ref: "#/components/schemas/eventOriginObject" - message: - $ref: "#/components/schemas/eventObject" - deviceBlockParameterizationPostParametersAnswer: - type: array - items: - type: object - required: - - identifier - - result - properties: - identifier: - oneOf: - - type: object - required: - - index - properties: - index: - type: integer - minimum: 0 - maximum: 65535 - subIndex: - type: integer - minimum: 0 - maximum: 255 - - type: object - required: - - parameterName - properties: - parameterName: - $ref: "#/components/schemas/parameterName" - subParameterName: - $ref: "#/components/schemas/subParameterName" - result: - type: object - required: - - parameterExchangeResult - properties: - parameterExchangeResult: - type: string - enum: - - WRITE_SUCCESS - - READ_SUCCESS - - ERROR - content: - $ref: "#/components/schemas/deviceParameterValueGetPost" - iolinkError: - $ref: "#/components/schemas/iolinkErrorObject" - deviceFirmwareUpdatePost: - type: object - properties: - password: - type: string - description: password for updating the device if required - iolfwfile: - type: string - format: binary - description: IOLFW File for the device - required: - - iolfwfile - deviceFirmwareUpdateStatusGet: - type: object - properties: - active: - type: boolean - description: >- - Indicates if a firmware update is currently in progress. - stage: - type: string - description: >- - Indicates the current stage of the firmware update. - enum: - - PREPARATION - - DOWNLOAD - - VALIDATION - - UPDATE - - FINISHED - message: - type: string - description: >- - Status message according to BLOB Transfer & Firmware Update Specification Version 1.1 September 2019 (Table 19 – Error displays of FW-Update tools). - example: Selected file is not a firmware update file - action: - type: string - description: >- - Indicates the action to be taken by the user according to BLOB Transfer & Firmware Update Specification Version 1.1 September 2019 (Table 19 – Error displays of FW-Update tools). - example: Look for a file with extension .iolfw - progress: - type: number - description: >- - Indicates the progress of the firmware update in percent. - minimum: 0 - maximum: 100 - - deviceEventsGet: - type: array - items: - type: object - required: - - time - - severity - - origin - - message - properties: - time: - $ref: "#/components/schemas/eventTime" - severity: - $ref: "#/components/schemas/eventSeverity" - origin: - required: - - master - - port - - deviceAlias - allOf: - - $ref: "#/components/schemas/eventOriginObject" - message: - required: - - code - - mode - allOf: - - $ref: "#/components/schemas/eventObject" - example: - - time: "2018-05-18T07:31:54.123Z" - severity: WARNING - origin: - master: 1 - port: 1 - deviceAlias: Temperature_sensor_1 - message: - code: 16912 - mode: APPEARS - text: Device temperature over-run – Clear source of heat - gatewayIdentificationGet: - type: object - required: - - macAddress - - vendorName - properties: - macAddress: - type: string - pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" - minLength: 1 - maxLength: 17 - serialNumber: - type: string - minLength: 1 - maxLength: 16 - orderCode: - type: string - minLength: 1 - maxLength: 64 - productName: - type: string - minLength: 1 - maxLength: 64 - productId: - type: string - hardwareRevision: - type: string - maxLength: 64 - firmwareRevision: - type: string - vendorName: - type: string - vendorUrl: - type: string - manualUrl: - type: string - productInstanceUri: - type: string - applicationSpecificTag: - type: string - locationTag: - type: string - functionTag: - type: string - example: - macAddress: "00:02:72:CE:A6:49" - serialNumber: "C134A746" - productId: "TMP34Z" - vendorName: "SensorCompany" - productName: "FlowSensor34" - hardwareRevision: "V3.45" - firmwareRevision: "V1.30" - productInstanceUri: "sensor.tmp.23.com" - gatewayConfigurationGetPost: - type: object - required: - - ethIpv4 - properties: - ethIpv4: - type: array - minItems: 1 - items: - type: object - required: - - ipConfiguration - properties: - ifName: - type: string - ipConfiguration: - $ref: "#/components/schemas/ipConfiguration" - ipAddress: - type: string - format: ipv4 - pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ - subnetMask: - type: string - format: ipv4 - pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ - standardGateway: - type: string - format: ipv4 - pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ - example: - ethIpv4: - - ifName: "eth0" - ipConfiguration: MANUAL - ipAddress: 192.168.1.13 - subnetMask: 255.255.255.0 - standardGateway: 192.168.1.1 - mqttConfigurationGetPost: - type: object - required: - - clientMode - properties: - clientMode: - type: string - serverAddress: - type: string - username: - type: string - password: - type: string - lastWill: - type: object - required: - - topic - - message - - qos - - retain - properties: - topic: - type: string - message: - type: string - qos: - type: string - enum: - - 0_ONLY_ONCE - - 1_AT_LEAST_ONCE - - 2_EXACTLY_ONCE - retain: - type: boolean - keepAliveTime: - type: integer - mqttConfigurationTopic: - allOf: - - type: object - required: - - qos - - deviceAlias - properties: - qos: - type: string - enum: - - 0_ONLY_ONCE - - 1_AT_LEAST_ONCE - - 2_EXACTLY_ONCE - deviceAlias: - type: string - description: Unique deviceAlias. - - oneOf: - - type: object - properties: - event: - $ref: "#/components/schemas/event" - processData: - $ref: "#/components/schemas/processData" - parameter: - $ref: "#/components/schemas/mqttParameter" - mqttConfigurationTopicPost: - allOf: - - type: object - properties: - topicName: - type: string - - $ref: "#/components/schemas/mqttConfigurationTopic" - mqttConfigurationTopicGet: - allOf: - - type: object - required: - - topicId - properties: - topicId: - type: integer - - type: object - required: - - topicName - properties: - topicName: - type: string - - $ref: "#/components/schemas/mqttConfigurationTopic" - example: - topicId: 1 - topicName: PD input - qos: 1_AT_LEAST_ONCE - deviceAlias: DT35 - processData: - direction: getData - format: iodd - interval: - value: 10 - unit: ms - mqttConnectionStatusGet: - allOf: - - type: object - required: - - connectionStatus - - serverAddress - - mqttUpTime - properties: - connectionStatus: - type: string - enum: - - CLIENT_INACTIVE - - CONNECTION_ACCEPTED - - UNACCEPTABLE_PROTOCOL_VERSION - - IDENTIFIER_REJECTED - - SERVER_UNAVAILABLE - - BAD_USERNAME_OR_PASSWORD - - NOT_AUTHORIZED - serverAddress: - type: string - mqttUpTime: - description: Duration of established MQTT connection - type: integer - example: - connectionStatus: CONNECTION_ACCEPTED - serverAddress: "http://broker-address.com" - upTime: 1050 - deviceCapabilitiesGet: - required: - - minimumCycleTime - - supportedProfiles - type: object - properties: - minimumCycleTime: - $ref: "#/components/schemas/cycleTime" - supportedProfiles: - type: array - items: - type: integer - minimum: 1 - deviceIdentificationGet: - required: - - vendorId - - deviceId - - iolinkRevision - - vendorName - - productName - type: object - properties: - vendorId: - type: integer - minimum: 1 - maximum: 65535 - deviceId: - type: integer - minimum: 1 - maximum: 16777215 - iolinkRevision: - type: string - enum: - - "1.0" - - "1.1" - vendorName: - description: Mandatory if the Device suports the ISDU. - type: string - minLength: 1 - maxLength: 64 - vendorText: - type: string - vendorUrl: - type: string - productName: - description: Mandatory if the Device suports the ISDU. - type: string - minLength: 1 - maxLength: 64 - productId: - type: string - minLength: 1 - maxLength: 64 - productText: - type: string - minLength: 1 - maxLength: 64 - serialNumber: - type: string - minLength: 1 - maxLength: 16 - hardwareRevision: - type: string - minLength: 1 - maxLength: 64 - firmwareRevision: - type: string - productInstanceUri: - type: string - ioddUri: - type: string - applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 - locationTag: - type: string - minLength: 1 - maxLength: 32 - functionTag: - type: string - minLength: 1 - maxLength: 32 - example: - vendorId: 26 - deviceId: 8389226 - iolinkRevision: "1.1" - vendorName: SICK AG - vendorText: Sensor Intelligence. - productName: SLG-2 - productId: SLG-2 - productText: The SLG-2 IO-Link device is a smart lightgrid - serialNumber: Serial123456 - hardwareRevision: 3.2.1.444R - firmwareRevision: 3.2.1.888R - vendorUrl: "http://www.sick.com" - productInstanceUri: "http://www.sick.com/SLG-2/Serial123456" - ioddUri: "https://ioddfinder.io-link.com/26/42/SICK-SLG-2-20210428-IODD1.1" - # 'https://ioddfinder.io-link.com/api/vendors/26/iodds/11541/files/zip/rated' - # 'https://ioddfinder.io-link.com/productvariants/search/32872' - applicationSpecificTag: Fallback light switch - locationTag: Down under - functionTag: Check end of belt - portIdentificationPost: - type: object - properties: - applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 - example: Fallback light switch - locationTag: - type: string - minLength: 1 - maxLength: 32 - example: Down under - functionTag: - type: string - minLength: 1 - maxLength: 32 - example: Check start of belt - portCapabilitiesGet: - type: object - required: - - portType - properties: - portType: - type: string - enum: - - CLASS_A - - CLASS_B - - CLASS_A_WITH_PORT_POWER_OFF_ON - - FAILSAFE_PORT_A_WITHOUT_SAFETY_DIGITAL_INPUTS - - FAILSAFE_PORT_A_WITH_SAFETY_DIGITAL_INPUTS - - FAILSAFE_PORT_B - - WIRELESS_MASTER - slotType: - description: >- - slotType for Wireless Master only - type: string - enum: - - SSLOT - - DSLOT - maxPowerSupply: - description: >- - maxPowerSupply is not supported in IO-Link Wireless. - type: object - required: - - value - - unit - properties: - value: - type: number - unit: - type: string - - portConfigurationGet: - type: object - required: - - mode - - iqConfiguration - - deviceAlias - properties: - mode: - type: string - enum: - - DEACTIVATED - - IOLINK_MANUAL - - IOLINK_AUTOSTART - - DIGITAL_INPUT - - DIGITAL_OUTPUT - - WIOLINK_CYCLIC_AUTOPAIRING - - WIOLINK_CYCLIC - - WIOLINK_ROAMING_AUTOPAIRING - - WIOLINK_ROAMING - validationAndBackup: - description: required if portMode is IOLINK_MANUAL. - type: string - enum: - - NO_DEVICE_CHECK - - TYPE_COMPATIBLE_DEVICE_V1.0 - - TYPE_COMPATIBLE_DEVICE_V1.1 - - TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE - - TYPE_COMPATIBLE_DEVICE_V1.1_RESTORE - cycleTime: - description: >- - required if portMode is IOLINK_MANUAL or - IOLINK_AUTOSTART. Default value is 0 ms which means as fast as possible. - Note: If the applied value for cycle time cannot exactly be mapped, - the port shall use the next possible higher value. If the cycle time is greater - than 132.8 ms the error 702 shall be returned. - Note: This value is not used in IO-Link wireless use - wMasterCycleTimeOut and wMasterCycleTimeIn instead. - type: object - allOf: - - $ref: "#/components/schemas/cycleTime" - vendorId: - description: >- - required if portMode is IOLINK_MANUAL and - validationAndBackup is not NO_DEVICE_CHECK. - type: integer - minimum: 1 - maximum: 65535 - deviceId: - description: >- - required if portMode is IOLINK_MANUAL and - validationAndBackup is not NO_DEVICE_CHECK. - type: integer - minimum: 1 - maximum: 16777215 - iqConfiguration: - description: >- - iqConfiguration is not supported in IO-Link Wireless. - type: string - enum: - - NOT_SUPPORTED - - DIGITAL_INPUT - - DIGITAL_OUTPUT - deviceAlias: - type: string - slotNumber: - description: >- - slot number of the Wireless-Device (Wireless Master only). - type: integer - minimum: 0 - maximum: 7 - trackNumber: - description: >- - track number of the Wireless-Device, maximum depends on the number of - available tracks on the Wireless-Master (Wireless Master only). - type: integer - minimum: 1 - maximum: 5 - deviceTxPower: - description: >- - transmission power of the Wireless-Device (Wireless Master only). - type: integer - minimum: 1 - maximum: 31 - maxRetry: - description: >- - Number of Retries for process data (Wireless Master only). - type: integer - minimum: 2 - maximum: 31 - imaTime: - description: >- - I am alive time for the wireless connection (Wireless Master only). - type: object - required: - - base - - multiplier - properties: - base: - description: >- - IMA timeout base. - type: string - enum: - - "1664us" - - "5ms" - - "1s" - - "1min" - multiplier: - description: >- - IMA timeout multiplier. - type: integer - minimum: 1 - maximum: 255 - slotType: - description: >- - Single Slot or Double Slot (Wireless Master only). - type: string - enum: - - "SSLOT" - - "DSLOT" - lowEnergyDevice: - description: >- - to set low energy mode (Wireless Master only and Wireless-Device has to support low energy). - type: boolean - default: false - maxPDSegLength: - description: >- - maximum process data output segment length (Wireless Master only). - type: integer - minimum: 0 - maximum: 32 - wMasterCycleTimeOut: - description: >- - Wireless-Master cycle time output for PD data (Wireless Master only). - type: object - required: - - base - properties: - base: - type: string - enum: - - "FreeRunning" - - "5ms" - multiplier: - type: integer - minimum: 1 - maximum: 63 - wMasterCycleTimeIn: - description: >- - Wireless-Master cycle time input for PD data (Wireless Master only). - type: object - required: - - base - properties: - base: - type: string - enum: - - "FreeRunning" - - "5ms" - multiplier: - type: integer - minimum: 1 - maximum: 63 - uniqueId: - description: >- - unique identifier for each Wireless-Device (Wireless Master only). - type: string - minLength: 26 - maxLength: 26 - - mastersConfigurationGetPost: # TODO: IOLW - properties: - wMasterId: - description: >- - Master identifier for connection with Wireless-Devices. - type: integer - minimum: 1 - maximum: 29 - advancedConnectivity: - description: >- - To set advanced connectivity functions on the Wireless-Master. - type: object - properties: - "ahtEnable": - description: >- - To enable or disable the Adaptive Hopping Table. - type: boolean - default: false - pairingTimeout: - description: >- - Timeout for pairing by BUTTON / UNIQUE. - type: object - required: - - value - - unit - properties: - value: - type: integer - minimum: 5 - maximum: 255 - unit: - type: string - enum: - - s - serviceTrackNumber: - description: >- - W-Track number used for service requests (Scan/Pairing/Roaming). - type: integer - minimum: 1 - maximum: 5 - default: 1 - serviceTrackMode: - description: >- - Mode of the service track. - type: string - enum: - - CYCLIC - - ROAMING - trackTxPower: - description: >- - transmission power of the W-Track (0 = Disable) - type: object - properties: - "track_1": - type: integer - minimum: 0 - maximum: 31 - default: 0 - "track_2": - type: integer - minimum: 0 - maximum: 31 - default: 0 - "track_3": - type: integer - minimum: 0 - maximum: 31 - default: 0 - "track_4": - type: integer - minimum: 0 - maximum: 31 - default: 0 - "track_5": - type: integer - minimum: 0 - maximum: 31 - default: 0 - blockList: - type: object - properties: - "2403": - type: boolean - default: false - "2404": - type: boolean - default: false - "2405": - type: boolean - default: false - "2406": - type: boolean - default: false - "2407": - type: boolean - default: false - "2408": - type: boolean - default: false - "2409": - type: boolean - default: false - "2410": - type: boolean - default: false - "2411": - type: boolean - default: false - "2412": - type: boolean - default: false - "2413": - type: boolean - default: false - "2414": - type: boolean - default: false - "2415": - type: boolean - default: false - "2416": - type: boolean - default: false - "2417": - type: boolean - default: false - "2418": - type: boolean - default: false - "2419": - type: boolean - default: false - "2420": - type: boolean - default: false - "2421": - type: boolean - default: false - "2422": - type: boolean - default: false - "2423": - type: boolean - default: false - "2424": - type: boolean - default: false - "2425": - type: boolean - default: false - "2426": - type: boolean - default: false - "2427": - type: boolean - default: false - "2428": - type: boolean - default: false - "2429": - type: boolean - default: false - "2430": - type: boolean - default: false - "2431": - type: boolean - default: false - "2432": - type: boolean - default: false - "2433": - type: boolean - default: false - "2434": - type: boolean - default: false - "2435": - type: boolean - default: false - "2436": - type: boolean - default: false - "2437": - type: boolean - default: false - "2438": - type: boolean - default: false - "2439": - type: boolean - default: false - "2440": - type: boolean - default: false - "2441": - type: boolean - default: false - "2442": - type: boolean - default: false - "2443": - type: boolean - default: false - "2444": - type: boolean - default: false - "2445": - type: boolean - default: false - "2446": - type: boolean - default: false - "2447": - type: boolean - default: false - "2448": - type: boolean - default: false - "2449": - type: boolean - default: false - "2450": - type: boolean - default: false - "2451": - type: boolean - default: false - "2452": - type: boolean - default: false - "2453": - type: boolean - default: false - "2454": - type: boolean - default: false - "2455": - type: boolean - default: false - "2456": - type: boolean - default: false - "2457": - type: boolean - default: false - "2458": - type: boolean - default: false - "2459": - type: boolean - default: false - "2460": - type: boolean - default: false - "2461": - type: boolean - default: false - "2462": - type: boolean - default: false - "2463": - type: boolean - default: false - "2464": - type: boolean - default: false - "2465": - type: boolean - default: false - "2466": - type: boolean - default: false - "2467": - type: boolean - default: false - "2468": - type: boolean - default: false - "2469": - type: boolean - default: false - "2470": - type: boolean - default: false - "2471": - type: boolean - default: false - "2472": - type: boolean - default: false - "2473": - type: boolean - default: false - "2474": - type: boolean - default: false - "2475": - type: boolean - default: false - "2476": - type: boolean - default: false - "2477": - type: boolean - default: false - "2478": - type: boolean - default: false - mastersPortsPairingPost: # TODO: IOLW - properties: - portPairing: - type: string - enum: - - Unpairing - - PairingUnique - - PairingButton - example: - WPortPairing: PairingUnique - - mastersScanGet: # TODO: IOLW - properties: - scanStatus: - type: string - enum: - - NoScanWasPerformed - - ScanInProgress - - ScanEnded - scanResults: - type: array - properties: - slotType: - type: string - enum: - - "SSLOT" - - "DSLOT" - uniqueId: - type: string - minLength: 26 - maxLength: 26 - iolinkRevision: - type: string - enum: - - "1.1" - lastSeen: - $ref: "#/components/schemas/eventTime" - example: - scanStatus: ScanEnded - scanResults: - - slotType: SSLOT - uniqueId: 03:78:00:00:01:32:50:60:46 - iolinkRevision: "1.1" - lastSeen: "2022-12-01T08:42:23.314Z" - - slotType: DSLOT - uniqueId: 03:78:00:00:01:32:50:60:47 - iolinkRevision: "1.1" - lastSeen: "2022-12-01T09:42:23.314Z" - - mastersScanPost: # TODO: IOLW - properties: - txPower: - type: integer - minimum: 1 - maximum: 31 - example: - txPower: 31 - - mastersPortsGet: # TODO: IOLW - type: array - items: - type: object - required: - - portNumber - - statusInfo - - deviceAlias - properties: - portNumber: - type: number - deviceAlias: - type: string - statusInfo: - type: string - enum: # see Terminology in V.113, Table E.4 PortStatusList - - COMMUNICATION_LOST # NO_DEVICE - - DEACTIVATED # DEACTIVATED - - INCORRECT_DEVICE # PORT_DIAG - - DEVICE_STARTING # - - DEVICE_ONLINE # OPERATE - - DIGITAL_INPUT_C/Q # DI_CQ - - DIGITAL_OUTPUT_C/Q # DO_CQ - - NOT_AVAILABLE # NOT_AVAILABLE - - PORT_POWER_OFF # PORT_POWER_OFF - - PAIRING_FAULT # PAIRING_TIMEOUT, PAIRING_WRONG_SLOTTYPE - slotNumber: - description: >- - slot number of the Wireless-Device (Wireless Master only). - type: integer - minimum: 0 - maximum: 7 - trackNumber: - description: >- - track number of the Wireless-Device, maximum depends on the number of - available tracks on the Wireless-Master (Wireless Master only). - type: integer - minimum: 1 - maximum: 5 - slotType: - description: >- - Single Slot or Double Slot (Wireless Master only). - type: string - enum: - - "SSLOT" - - "DSLOT" - deviceInfo: - description: >- - Wireless Master only. - type: object - properties: - vendorId: - type: integer - minimum: 1 - maximum: 65535 - deviceId: - type: integer - minimum: 1 - maximum: 16777215 - productName: - type: string - minLength: 1 - maxLength: 64 - - mastersPortsStatusGet: # TODO: IOLW - properties: - statusInfo: - type: string - enum: # see Terminology in V.113, Table E.4 PortStatusList - - COMMUNICATION_LOST # NO_DEVICE - - DEACTIVATED # DEACTIVATED - - INCORRECT_DEVICE # PORT_DIAG - - DEVICE_STARTING # - - DEVICE_ONLINE # OPERATE - - DIGITAL_INPUT_C/Q # DI_CQ - - DIGITAL_OUTPUT_C/Q # DO_CQ - - NOT_AVAILABLE # NOT_AVAILABLE - - PORT_POWER_OFF # PORT_POWER_OFF - - PAIRING_FAULT # PAIRING_TIMEOUT, PAIRING_WRONG_SLOTTYPE - iolinkRevision: - description: >- - Mandatory if the portStatusInfo is INCORRECT_DEVICE, PREOPERATE or - OPERATE. - type: string - enum: - - "1.0" - - "1.1" - transmissionRate: - description: >- - Mandatory if the portStatusInfo is INCORRECT_DEVICE, PREOPERATE or - OPERATE. transmissionRate is not used in IO-Link Wireless. - type: string - enum: - - COM1 - - COM2 - - COM3 - masterCycleTime: - description: >- - Mandatory if the portStatusInfo is INCORRECT_DEVICE, PREOPERATE or - OPERATE. masterCycleTime is not used in IO-Link wireless use - wMasterCycleTimeOut and wMasterCycleTimeIn instead. - type: object - allOf: - - $ref: "#/components/schemas/cycleTime" - portQualityInfo: - description: >- - status information of the Process Data (Wireless Master only). - type: object - properties: - "pdInValid": - type: boolean - default: false - "pdOutValid": - type: boolean - default: false - inputDataLength: - description: >- - this element contains the input data length as number of octets of the Device provided by the PDIn service (Wireless Master only). - type: integer - minimum: 0 - maximum: 32 - outputDataLength: - description: >- - this element contains the output data length as number of octets of the Device provided by the PDOut service (Wireless Master only). - type: integer - minimum: 0 - maximum: 32 - vendorId: - description: >- - Wireless Master only. - type: integer - minimum: 1 - maximum: 65535 - deviceId: - description: >- - Wireless Master only. - type: integer - minimum: 1 - maximum: 16777215 - wMasterCycleTimeOut: - description: >- - Wireless-Master cycle time output for PD data (Wireless Master only). - type: object - required: - - base - properties: - base: - type: string - enum: - - "FreeRunning" - - "5ms" - multiplier: - type: integer - minimum: 1 - maximum: 63 - wMasterCycleTimeIn: - description: >- - Wireless-Master cycle time input for PD data (Wireless Master only). - type: object - required: - - base - properties: - base: - type: string - enum: - - "FreeRunning" - - "5ms" - multiplier: - type: integer - minimum: 1 - maximum: 63 - - mastersTrackstatusGet: # TODO: IOLW - type: array - items: - type: object - properties: - trackNumber: - type: number - Mode: - type: string - enum: - - DEACTIVATED - - CYCLIC - - ROAMING - - SCAN - - PAIRING - txPower: - type: integer - minimum: 1 - maximum: 31 - example: - - trackNumber: 1 - Mode: CYCLIC - txPower: 31 - - trackNumber: 2 - Mode: ROAMING - txPower: 31 - - mastersPortsQualityallGet: # TODO: IOLW - type: array - items: - type: object - properties: - portNumber: - type: number - 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 - - mastersPortsQualityGet: # TODO: IOLW - 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: - lqiMaster: 100 - rssiMaster: -40 - lqiDevice: 100 - rssiDevice: -39 - - portConfigurationPost: - description: "Note: At least one of the mode, iqConfiguration, - deviceAlias properties shall be included to the POST request" - type: object - properties: - mode: - type: string - enum: - - DEACTIVATED - - IOLINK_MANUAL - - IOLINK_AUTOSTART - - DIGITAL_INPUT - - DIGITAL_OUTPUT - - WIOLINK_CYCLIC_AUTOPAIRING - - WIOLINK_CYCLIC - - WIOLINK_ROAMING_AUTOPAIRING - - WIOLINK_ROAMING - validationAndBackup: - description: >- - required if the port's mode is IOLINK_MANUAL. - type: string - enum: - - NO_DEVICE_CHECK - - TYPE_COMPATIBLE_DEVICE_V1.0 - - TYPE_COMPATIBLE_DEVICE_V1.1 - - TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE - - TYPE_COMPATIBLE_DEVICE_V1.1_RESTORE - cycleTime: - description: >- - If no cycleTime configured with mode IOLINK_MANUAL or - IOLINK_AUTOSTART, the possible fastest cycle time is used by the - IO-Link Master. If the applied value for cycle time cannot exactly be - mapped, the port shall use the next possible higher value. - If the cycle time is greater than 132.8 ms the error 702 shall - be returned. This value is not used in IO-Link wireless use - wMasterCycleTimeOut and wMasterCycleTimeIn instead. - type: object - allOf: - - $ref: "#/components/schemas/cycleTime" - vendorId: - description: >- - required if the port's mode is IOLINK_MANUAL and validationAndBackup is - not NO_DEVICE_CHECK. - type: integer - minimum: 1 - maximum: 65535 - deviceId: - description: >- - required if the port's mode is IOLINK_MANUAL and validationAndBackup is - not NO_DEVICE_CHECK. - type: integer - minimum: 1 - maximum: 16777215 - iqConfiguration: - description: >- - iqConfiguration is not supported in IO-Link Wireless. - type: string - enum: - - NOT_SUPPORTED - - DIGITAL_INPUT - - DIGITAL_OUTPUT - - ANALOG_INPUT - - ANALOG_OUTPUT - - POWER_2 - deviceAlias: - type: string - minLength: 1 - maxLength: 32 - slotNumber: - description: >- - slot number of the Wireless-Device (Wireless Master only). - type: integer - minimum: 0 - maximum: 7 - trackNumber: - description: >- - track number of the Wireless-Device, maximum depends on the number of - available tracks on the Wireless-Master (Wireless Master only). - type: integer - minimum: 1 - maximum: 5 - deviceTxPower: - description: >- - transmission power of the Wireless-Device (Wireless Master only). - type: integer - minimum: 1 - maximum: 31 - maxRetry: - description: >- - Number of Retries for process data (Wireless Master only). - type: integer - minimum: 2 - maximum: 31 - imaTime: - description: >- - I am alive time for the wireless connection (Wireless Master only). - type: object - required: - - base - - multiplier - properties: - base: - description: >- - IMA timeout base. - type: string - enum: - - "1664us" - - "5ms" - - "1s" - - "1min" - multiplier: - description: >- - IMA timeout multiplier. - type: integer - minimum: 1 - maximum: 255 - slotType: - description: >- - Single Slot or Double Slot (Wireless Master only). - type: string - enum: - - "SSLOT" - - "DSLOT" - lowEnergyDevice: - description: >- - to set low energy mode (Wireless Master only and Wireless-Device has to support low energy). - type: boolean - default: false - maxPDSegLength: - description: >- - maximum process data output segment length (Wireless Master only). - type: integer - minimum: 0 - maximum: 32 - wMasterCycleTimeOut: - description: >- - Wireless-Master cycle time output for PD data (Wireless Master only). - type: object - required: - - base - properties: - base: - type: string - enum: - - "FreeRunning" - - "5ms" - multiplier: - type: integer - minimum: 1 - maximum: 63 - wMasterCycleTimeIn: - description: >- - Wireless-Master cycle time input for PD data (Wireless Master only). - type: object - required: - - base - properties: - base: - type: string - enum: - - "FreeRunning" - - "5ms" - multiplier: - type: integer - minimum: 1 - maximum: 63 - uniqueId: - description: >- - unique identifier for each Wireless-Device (Wireless Master only). - type: string - minLength: 26 - maxLength: 26 - - dataStorageGetPost: - description: >- - In case the Data Storage is empty, the header object is empty and the - content is an empty string. - type: object - required: - - header - - content - properties: - header: - oneOf: - - type: object - required: - - vendorId - - deviceId - - iolinkRevision - properties: - vendorId: - type: integer - minimum: 1 - maximum: 65535 - deviceId: - type: integer - minimum: 1 - maximum: 16777215 - iolinkRevision: - type: string - enum: - - "1.0" - - "1.1" - parameterChecksum: - type: integer - - type: object # empty object - additionalProperties: false - minProperties: 0 - maxProperties: 0 - content: - description: Base64 coded DS data Ojects. Max size = 2KB*1.33. - type: string - # format: byte - processDataValue: - type: object - properties: - iolink: - description: Process data in IO-Link mode - allOf: - - type: object - required: - - valid - properties: - valid: - type: boolean - description: > - Process data validity in case of incoming process data see PQI (Table E.10 - IO-Link Interface and System Specification V1.13). The valid flag is required and is equivalent to OE (Table E.11 IO-Link Interface and System Specification V1.13). In case it is set to false the process data should be invalidated by master command 0x99 (see Table B.2 - IO-Link Interface and System Specification V1.13). - - type: object - required: - - value - properties: - value: - oneOf: - - $ref: "#/components/schemas/deviceByteArrayTypeValue" - - $ref: "#/components/schemas/deviceSimpleTypeValue" - - $ref: "#/components/schemas/deviceComplexTypeValue" - unit: - $ref: "#/components/schemas/deviceSimpleTypeValueUnit" - description: > - Process data value - cqValue: - type: boolean - description: > - IO-Link cable CQ (pin4) level if it is used as digital input or - output (SIO mode). (false - 0 V, true - 24 V) - iqValue: - type: boolean - description: > - IO-Link cable IQ (pin2) level if it is used as digital input or output. - (false - 0 V, true - 24 V) - example: - "format=byteArray, pin4=IO-Link, pin2=sio": - iolink: - valid: true - value: - - 15 - - 123 - - 126 - - 236 - iqValue: true - "format=iodd, pin4=IO-Link, pin2=deactivated/not available": - iolink: - valid: true - value: - Valve_1: - value: true - Valve_2: - value: false - "format=byteArray/iodd, pin4=sio, pin2=deactivated/not available": - cqValue: false - devicesGet: - type: array - items: - type: object - description: > - Information about the device access parameter like master/ port number and the unique deviceAlias. - required: - - deviceAlias - - masterNumber - - portNumber - properties: - deviceAlias: - type: string - minLength: 1 - maxLength: 32 - masterNumber: - type: integer - minimum: 1 - portNumber: - type: integer - minimum: 1 - ioddFileName: - type: string - minLength: 1 - maxLength: 128 - example: - - deviceAlias: DT35 - masterNumber: 1 - portNumber: 1 - - deviceAlias: TAD081 - masterNumber: 1 - portNumber: 2 - - deviceAlias: BNI_IOL - masterNumber: 1 - portNumber: 3 - - deviceAlias: master1port4 - masterNumber: 1 - portNumber: 4 - ioddFileName: vendorname-devicename-20231016-IODD1.1.xml - deviceProcessDataValueGet: - type: object - description: > - The cqValue is present in the 'getData' object if the CQ (pin4) is configured as - digital input. The cqValue is present in the 'setData' object if the CQ (pin4) - is configured as digital output. The iolink is present either in the - 'getData' or 'setData' or both objects if the CQ (pin4) is configured to IO-Link mode. - The iqValue is present in the 'getData' object if the IQ (pin2) is configured as - digital input. The iqValue is present in the 'setData' object if the IQ (pin4) - is configured as digital output. - properties: - getData: - $ref: "#/components/schemas/processDataValue" - setData: - $ref: "#/components/schemas/processDataValue" - deviceProcessDataValuePost: - $ref: "#/components/schemas/processDataValue" - deviceByteArrayTypeValue: - type: array - description: The value in byteArray format. - items: - type: integer - minimum: 0 - maximum: 255 - deviceSimpleTypeValue: - oneOf: - - type: boolean - - type: string - - type: number - description: The value (with simple type) in iodd format. - deviceComplexTypeEntry: - type: object - description: The entry for a complex iodd type - required: - - value - properties: - value: - $ref: "#/components/schemas/deviceSimpleTypeValue" - unit: - $ref: "#/components/schemas/deviceSimpleTypeValueUnit" - deviceSimpleTypeValueUnit: - type: string - description: The unit for the simple type number value in SI format. - deviceComplexTypeValue: - type: object - minProperties: 1 - maxProperties: 255 - description: The value (with complex type) in iodd format. - additionalProperties: - $ref: "#/components/schemas/deviceComplexTypeEntry" - deviceParametersGet: - type: array - items: - type: object - required: - - index - - parameterName - properties: - index: - type: integer - minimum: 0 - maximum: 65535 - parameterName: - $ref: "#/components/schemas/parameterName" - subindexAccessSupported: - type: boolean - description: only for complex parameters (records or arrays) required. Not allowed for simple parameters - example: - - index: 16 - parameterName: "Vendor_Name" - - index: 18 - parameterName: "Product_Name" - - index: 19 - parameterName: "ProductID" - - index: 60 - parameterName: "SSC_1_Param" - subindexAccessSupported: true - deviceSubParametersGet: - type: array - items: - type: object - required: - - subIndex - - subParameterName - properties: - subIndex: - type: integer - minimum: 1 - maximum: 255 - subParameterName: - $ref: "#/components/schemas/subParameterName" - example: - - subIndex: 1 - subParameterName: Master_command - - subIndex: 2 - subParameterName: Master_cycle_time - - subIndex: 3 - subParameterName: Minimum_cycle_time - deviceParameterValueGetPost: - type: object - properties: - value: - oneOf: - - $ref: "#/components/schemas/deviceByteArrayTypeValue" - - $ref: "#/components/schemas/deviceSimpleTypeValue" - - $ref: "#/components/schemas/deviceComplexTypeValue" - unit: - $ref: "#/components/schemas/deviceSimpleTypeValueUnit" - deviceParameterSubindexValueGetPost: - type: object - properties: - value: - oneOf: - - $ref: "#/components/schemas/deviceByteArrayTypeValue" - - $ref: "#/components/schemas/deviceSimpleTypeValue" - - $ref: "#/components/schemas/deviceComplexTypeValue" - unit: - $ref: "#/components/schemas/deviceSimpleTypeValueUnit" - deviceBlockParameterizationPost: - type: object - required: - - direction - - parameters - properties: - direction: - type: string - enum: - - WRITE - - READ - parameters: - $ref: "./schemas.yaml#/schemas/blockParameterizationPostParametersRequest" - index: - type: integer - description: Index of ISDU variable - minimum: 0 - maximum: 65535 - ioddIdentification: - type: object - required: - - vendorId - - deviceId - - version - - releaseDate - - iolinkRevision - properties: - vendorId: - type: number - deviceId: - type: number - version: - type: string - releaseDate: - type: string - iolinkRevision: - type: string - enum: - - "1.0" - - "1.1" - availableArtifacts: - type: array - items: - $ref: "./schemas.yaml#/schemas/artifact" - ioddFileName: - type: string - ioddFile: - description: The IODD XML file or other IODD artifacts. - type: string - format: binary - ioddArchive: - description: The IODD in archive format (e.g. IODD Finder) containing XML file and device images. - type: string - format: binary - ioddsGet: - type: array - items: - $ref: "#/components/schemas/ioddIdentification" - example: - - vendorId: 1234 - deviceId: 4567 - version: "4.3" - releaseDate: "2018-01-02" - iolinkRevision: "1.1" - - vendorId: 4321 - deviceId: 8765 - version: "2.1" - releaseDate: "2015-01-02" - iolinkRevision: "1.1" - availableArtifacts: [XML, DeviceIcon, DeviceSymbol, VendorLogo] - ioddFileName: vendorname-devicename-20231016-IODD1.1.xml - iolinkErrorObject: - type: object - required: - - code - - message - properties: - code: - type: integer - minimum: 0 - maximum: 65535 - message: - type: string - minLength: 1 - errorObject: - type: object - required: - - code - - message - properties: - code: - type: integer - minimum: 0 - message: - type: string - minLength: 1 - iolinkError: - $ref: "#/components/schemas/iolinkErrorObject" securitySchemes: basicAuth: description: Basic authentication mechanism with user and password provided in the HTTP header. @@ -4987,25 +2776,25 @@ components: in: query description: The event source to filter schema: - $ref: "#/components/schemas/eventOrigin" + $ref: "./schemas.yaml#/schemas/eventOrigin" eventMasterNumber: name: masterNumber in: query description: masterNumber is only applicable with origin=MASTERS and origin=PORTS schema: - $ref: "#/components/schemas/eventMasterNumber" + $ref: "./schemas.yaml#/schemas/masterNumber" eventPortNumber: name: portNumber in: query description: portnumber is only applicable with origin=PORTS schema: - $ref: "#/components/schemas/eventPortNumber" + $ref: "./schemas.yaml#/schemas/eventPortNumber" eventdeviceAlias: name: deviceAlias in: query description: deviceAlias is only applicable with origin=DEVICES schema: - $ref: "#/components/schemas/eventdeviceAlias" + $ref: "./schemas.yaml#/schemas/eventdeviceAlias" eventTop: name: top in: query @@ -5013,7 +2802,7 @@ components: Delivers or removes the oldest n events of the event buffer. top is mutually exclusive to bottom. schema: - $ref: "#/components/schemas/eventTop" + $ref: "./schemas.yaml#/schemas/eventTop" eventBottom: name: bottom in: query @@ -5021,19 +2810,19 @@ components: Delivers or removes the youngest n events of the event buffer. bottom is mutually exclusive to top. schema: - $ref: "#/components/schemas/eventBottom" + $ref: "./schemas.yaml#/schemas/eventBottom" format: name: format in: query description: Value format in response document schema: - $ref: "#/components/schemas/format" + $ref: "./schemas.yaml#/schemas/format" parameterIdent: name: parameterIdent in: path description: Parameter access either via index or parametername. Access via parametername requires IODD support. schema: - $ref: "#/components/schemas/parameterIdent" + $ref: "./schemas.yaml#/schemas/parameterIdent" required: true subParameterIdent: name: subParameterIdent @@ -5088,7 +2877,7 @@ components: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "104": description: Fieldbus controller or another gateway protocol has claimed priority @@ -5204,7 +2993,7 @@ components: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "150": description: due to user management restrictions @@ -5216,7 +3005,7 @@ components: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "150": description: due to user management restrictions @@ -5228,7 +3017,7 @@ components: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "103": value: @@ -5273,7 +3062,7 @@ components: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "101": value: @@ -5292,7 +3081,7 @@ components: content: application/json: schema: - $ref: "#/components/schemas/errorObject" + $ref: "./schemas.yaml#/schemas/errorObject" examples: "105": value: diff --git a/schemas.yaml b/schemas.yaml index c14948b..7bf0cc0 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -8,19 +8,19 @@ schemas: maxLength: 32 pattern: "^[a-zA-Z0-9_]{1,32}$" example: master1port1 - deviceAliasMqtt: + deviceAliasMqtt: # path parameter shall not contain a type according to async api spec description: Unique deviceAlias. - portNumberMqtt: + portNumberMqtt: # path parameter shall not contain a type according to async api spec description: Port number. - masterNumberMqtt: + masterNumberMqtt: # path parameter shall not contain a type according to async api spec description: Index of the master. - originatorId: + originatorId: # path parameter shall not contain a type according to async api spec description: Shall be the unique identifier of the originator and shall correspond to the client id inside the MQTT message. It can be the ProductURI, DNS name, IP address or MAC address of the device hosting the MQTT publisher. - parameterIdentMqtt: + parameterIdentMqtt: # path parameter shall not contain a type according to async api spec description: Identifier of the parameter. It can be the parameterName or the index of the parameter. - subParameterIdentMqtt: + subParameterIdentMqtt: # path parameter shall not contain a type according to async api spec description: Identifier of the sub-parameter. It can be the sub-parameterName or the sub-index of the parameter. parameterName: type: string @@ -34,7 +34,7 @@ schemas: Rule 5: Naming according the scheme {name}_{index} or {name}_{subindex} is always allowed even if names are not duplicated. \ Rule 6: The naming of ArrayT elements is “element_{subindex}”. \ minLength: 1 - maxLength: 71 + maxLength: 64 subParameterName: type: string description: | @@ -47,7 +47,7 @@ schemas: Rule 5: Naming according the scheme {name}_{index} or {name}_{subindex} is always allowed even if names are not duplicated. \ Rule 6: The naming of ArrayT elements is “element_{subindex}”. \ minLength: 1 - maxLength: 71 + maxLength: 64 cycleTime: type: object required: @@ -144,11 +144,9 @@ schemas: - index properties: index: - type: integer - example: 233 + $ref: "#/schemas/index" subindex: - type: integer - example: 2 + $ref: "#/schemas/subIndex" eventOrigin: type: string enum: @@ -165,15 +163,41 @@ schemas: type: integer minimum: 1 eventdeviceAlias: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/deviceAlias" eventTop: type: integer minimum: 1 eventBottom: type: integer minimum: 1 + serialNumber: + type: string + minLength: 1 + serialNumberDevice: + type: string + minLength: 1 + maxLength: 16 + vendorId: + type: integer + minimum: 1 + maximum: 65535 + vendorName: + type: string + minLength: 1 + maxLength: 64 + deviceId: + type: integer + minimum: 1 + maximum: 16777215 + productName: + type: string + minLength: 1 + maxLength: 64 + iolinkRevision: + type: string + enum: + - "1.0" + - "1.1" identificationMasters: type: array items: @@ -182,12 +206,9 @@ schemas: - masterNumber properties: masterNumber: - type: integer - minimum: 1 + $ref: "#/schemas/masterNumber" serialNumber: - type: string - minLength: 1 - maxLength: 16 + $ref: "#/schemas/serialNumber" locationTag: type: string minLength: 1 @@ -199,6 +220,11 @@ schemas: - masterNumber: 2 serialNumber: 123A45B783 locationTag: slotNumber 6 + index: + type: integer + minimum: 0 + maximum: 65535 + example: 233 masterIdentificationPost: type: object properties: @@ -283,6 +309,7 @@ schemas: entries. type: integer minimum: 1 + maximum: 255 portNumber: description: >- This property is mandatory for IO-Link Port Events and IO-Link @@ -314,6 +341,7 @@ schemas: text: type: string minLength: 1 + maxLength: 255 gatewayEventsGet: type: array items: @@ -347,13 +375,9 @@ schemas: - index properties: index: - type: integer - minimum: 0 - maximum: 65535 + $ref: "#/schemas/index" subIndex: - type: integer - minimum: 0 - maximum: 255 + $ref: "#/schemas/subIndex" - type: object required: - parameterName @@ -379,13 +403,9 @@ schemas: - index properties: index: - type: integer - minimum: 0 - maximum: 65535 + $ref: "#/schemas/index" subIndex: - type: integer - minimum: 0 - maximum: 255 + $ref: "#/schemas/subIndex" - type: object required: - parameterName @@ -459,9 +479,7 @@ schemas: minLength: 1 maxLength: 17 serialNumber: - type: string - minLength: 1 - maxLength: 16 + $ref: "#/schemas/serialNumber" orderCode: type: string minLength: 1 @@ -481,9 +499,7 @@ schemas: minLength: 1 maxLength: 64 vendorName: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/vendorName" vendorUrl: type: string minLength: 1 @@ -626,8 +642,7 @@ schemas: - 1_AT_LEAST_ONCE - 2_EXACTLY_ONCE deviceAlias: - type: string - description: Unique deviceAlias. + $ref: "#/schemas/deviceAlias" - oneOf: - type: object properties: @@ -719,18 +734,11 @@ schemas: type: object properties: vendorId: - type: integer - minimum: 1 - maximum: 65535 + $ref: "#/schemas/vendorId" deviceId: - type: integer - minimum: 1 - maximum: 16777215 + $ref: "#/schemas/deviceId" iolinkRevision: - type: string - enum: - - "1.0" - - "1.1" + $ref: "#/schemas/iolinkRevision" vendorName: description: Mandatory if the Device suports the ISDU. type: string @@ -754,9 +762,7 @@ schemas: minLength: 1 maxLength: 64 serialNumber: - type: string - minLength: 1 - maxLength: 16 + $ref: "#/schemas/serialNumberDevice" hardwareRevision: type: string minLength: 1 @@ -1362,9 +1368,7 @@ schemas: minLength: 26 maxLength: 26 iolinkRevision: - type: string - enum: - - "1.1" + $ref: "#/schemas/iolinkRevision" lastSeen: $ref: "#/schemas/eventTime" example: @@ -1471,10 +1475,7 @@ schemas: description: >- Mandatory if the portStatusInfo is INCORRECT_DEVICE, PREOPERATE or OPERATE. - type: string - enum: - - "1.0" - - "1.1" + $ref: "#/schemas/iolinkRevision" transmissionRate: description: >- Mandatory if the portStatusInfo is INCORRECT_DEVICE, PREOPERATE or @@ -1845,10 +1846,7 @@ schemas: minimum: 1 maximum: 16777215 iolinkRevision: - type: string - enum: - - "1.0" - - "1.1" + $ref: "#/schemas/iolinkRevision" parameterChecksum: type: integer - type: object # empty object @@ -1858,7 +1856,6 @@ schemas: content: description: Base64 coded DS data Ojects. Max size = 2KB*1.33. type: string - # format: byte processDataValue: type: object properties: @@ -1956,9 +1953,7 @@ schemas: - parameterName properties: index: - type: integer - minimum: 0 - maximum: 65535 + $ref: "#/schemas/index" parameterName: $ref: "#/schemas/parameterName" subindexAccessSupported: @@ -1983,9 +1978,7 @@ schemas: - subParameterName properties: subIndex: - type: integer - minimum: 1 - maximum: 255 + $ref: "#/schemas/subIndex" subParameterName: $ref: "#/schemas/subParameterName" example: @@ -2038,18 +2031,15 @@ schemas: - iolinkRevision properties: vendorId: - type: number + $ref: "#/schemas/vendorId" deviceId: - type: number + $ref: "#/schemas/deviceId" version: type: string releaseDate: type: string iolinkRevision: - type: string - enum: - - "1.0" - - "1.1" + $ref: "#/schemas/iolinkRevision" availableArtifacts: type: array items: @@ -2091,6 +2081,7 @@ schemas: message: type: string minLength: 1 + maxLength: 255 errorObject: type: object required: @@ -2171,9 +2162,7 @@ schemas: - Failsafe_Master - Wireless_Master serialNumber: - type: string - minLength: 1 - maxLength: 16 + $ref: "#/schemas/serialNumber" orderCode: type: string minLength: 1 @@ -2735,7 +2724,11 @@ schemas: "2477": false "2478": false "2479": false - + subIndex: + type: integer + minimum: 0 + maximum: 255 + example: 12 tracksStatisticsChannel: properties: trackNumber: @@ -3477,3 +3470,91 @@ schemas: type: string minLength: 1 maxLength: 32 + deviceFirmwareUpdateStatusGet: + type: object + properties: + active: + type: boolean + description: >- + Indicates if a firmware update is currently in progress. + stage: + type: string + description: >- + Indicates the current stage of the firmware update. + enum: + - PREPARATION + - DOWNLOAD + - VALIDATION + - UPDATE + - FINISHED + message: + type: string + description: >- + Status message according to BLOB Transfer & Firmware Update Specification Version 1.1 September 2019 (Table 19 – Error displays of FW-Update tools). + example: Selected file is not a firmware update file + action: + type: string + description: >- + Indicates the action to be taken by the user according to BLOB Transfer & Firmware Update Specification Version 1.1 September 2019 (Table 19 – Error displays of FW-Update tools). + example: Look for a file with extension .iolfw + progress: + type: number + description: >- + Indicates the progress of the firmware update in percent. + minimum: 0 + maximum: 100 + deviceFirmwareUpdatePost: + type: object + properties: + password: + type: string + description: password for updating the device if required + iolfwfile: + type: string + format: binary + description: IOLFW File for the device + required: + - iolfwfile + devicesGet: + type: array + items: + type: object + description: > + Information about the device access parameter like master/ port number and the unique deviceAlias. + required: + - deviceAlias + - masterNumber + - portNumber + properties: + deviceAlias: + type: string + minLength: 1 + maxLength: 32 + masterNumber: + type: integer + minimum: 1 + portNumber: + type: integer + minimum: 1 + ioddFileName: + type: string + minLength: 1 + maxLength: 128 + example: + - deviceAlias: DT35 + masterNumber: 1 + portNumber: 1 + - deviceAlias: TAD081 + masterNumber: 1 + portNumber: 2 + - deviceAlias: BNI_IOL + masterNumber: 1 + portNumber: 3 + - deviceAlias: master1port4 + masterNumber: 1 + portNumber: 4 + ioddFileName: vendorname-devicename-20231016-IODD1.1.xml + parameterIdent: + oneOf: + - $ref: "#/schemas/parameterName" + - $ref: "#/schemas/index" From 2dc83ca0db65450f19bfd6aafd64e6b76723cf90 Mon Sep 17 00:00:00 2001 From: roeseko Date: Mon, 10 Jun 2024 16:58:24 +0200 Subject: [PATCH 20/22] Clean up schemas and references --- JSON_for_IO-Link.yaml | 43 +- schemas.yaml | 1035 ++++++++++++----------------------------- 2 files changed, 290 insertions(+), 788 deletions(-) diff --git a/JSON_for_IO-Link.yaml b/JSON_for_IO-Link.yaml index 4b6c807..011d15a 100644 --- a/JSON_for_IO-Link.yaml +++ b/JSON_for_IO-Link.yaml @@ -2788,13 +2788,13 @@ components: in: query description: portnumber is only applicable with origin=PORTS schema: - $ref: "./schemas.yaml#/schemas/eventPortNumber" + $ref: "./schemas.yaml#/schemas/portNumber" eventdeviceAlias: name: deviceAlias in: query description: deviceAlias is only applicable with origin=DEVICES schema: - $ref: "./schemas.yaml#/schemas/eventdeviceAlias" + $ref: "./schemas.yaml#/schemas/deviceAlias" eventTop: name: top in: query @@ -2833,44 +2833,7 @@ components: minimum: 0 maximum: 255 required: true - parameterName: - name: parameterName - in: path - description: | - Parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ - Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ - Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ - Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "\_". The following regex (/[^\w\n]/g) can be used. \ - Rule 3: Leading numbers shall be prefixed with "\_". \ - Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ - Rule 5: Naming according the scheme {name}\_{index} or {name}\_{subindex} is always allowed even if names are not duplicated. \ - Rule 6: The naming of ArrayT elements is "element\_{subindex}"". - - Note: The parameter name may change with the IODD version. If it is used by the client for accessing parameters, it needs to be verified that it is the same used by the master. \ - schema: - type: string - minLength: 1 - maxLength: 71 - required: true - subParameterName: - name: subParameterName - in: path - description: | - Sub-parameter name. Comes from the IODD but might be reformatted according to the JSON mapping specification. \ - Constraints for strings in keys of JSON key-value-pairs (see [9]) and URLs require the following conversion rules for those names: \ - Rule 1: Names are based on the IODD XML Element Name inside variables or process data 159 resolving the text in primary language. \ - Rule 2: Only alphanumeric characters and underscores are allowed. All other characters are replaced by "\_". The following regex (/[^\w\n]/g) can be used. \ - Rule 3: Leading numbers shall be prefixed with "\_". \ - Rule 4: If there are duplicate IO-Link names, the IO-Link index or subindex has to be accessed by appending the index number or subindex number behind the name according to the following scheme: {name}_{index} or {name}_{subindex}. \ - Rule 5: Naming according the scheme {name}\_{index} or {name}\_{subindex} is always allowed even if names are not duplicated. \ - Rule 6: The naming of ArrayT elements is "element\_{subindex}". \ - - Note: The parameter name may change with the IODD version. If it is used by the client for accessing parameters, it needs to be verified that it is the same used by the master. \ - schema: - type: string - minLength: 1 - maxLength: 71 - required: true + responses: HTTP_400: description: Bad request diff --git a/schemas.yaml b/schemas.yaml index 7bf0cc0..c3723ad 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -14,6 +14,11 @@ schemas: description: Port number. masterNumberMqtt: # path parameter shall not contain a type according to async api spec description: Index of the master. + serverAddressMqtt: + description: Serveraddress. + type: string + minLength: 1 + maxLength: 64 originatorId: # path parameter shall not contain a type according to async api spec description: Shall be the unique identifier of the originator and shall correspond to the client id inside the MQTT message. It can be the ProductURI, @@ -159,17 +164,19 @@ schemas: masterNumber: description: Index of the master. minimum: 1 - eventPortNumber: + portNumber: type: integer minimum: 1 - eventdeviceAlias: - $ref: "#/schemas/deviceAlias" eventTop: type: integer minimum: 1 eventBottom: type: integer minimum: 1 + orderCode: + type: string + minLength: 1 + maxLength: 64 serialNumber: type: string minLength: 1 @@ -185,6 +192,10 @@ schemas: type: string minLength: 1 maxLength: 64 + vendorText: + type: string + minLength: 1 + maxLength: 64 deviceId: type: integer minimum: 1 @@ -198,6 +209,22 @@ schemas: enum: - "1.0" - "1.1" + tags: + type: string + minLength: 1 + maxLength: 32 + wirelessTrackNumber: + type: integer + minimum: 0 + maximum: 31 + default: 0 + wirelessSlotNumber: + type: integer + minimum: 0 + maximum: 7 + wirelessBlockList: + type: boolean + default: false identificationMasters: type: array items: @@ -225,21 +252,20 @@ schemas: minimum: 0 maximum: 65535 example: 233 + subIndex: + type: integer + minimum: 0 + maximum: 255 + example: 12 masterIdentificationPost: type: object properties: applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" locationTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" functionTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" gatewayCapabilitiesGet: required: - ioddSupported @@ -259,9 +285,7 @@ schemas: type: object properties: numberOfPorts: - type: integer - minimum: 1 - maximum: 255 + $ref: "#/schemas/portNumber" maxPowerSupply: type: object required: @@ -307,16 +331,12 @@ schemas: This property is mandatory for IO-Link Master Events, IO-Link Port Events and IO-Link Device Events. Should not be used for other log entries. - type: integer - minimum: 1 - maximum: 255 + $ref: "#/schemas/masterNumber" portNumber: description: >- This property is mandatory for IO-Link Port Events and IO-Link Device Events. Should not be used for other log entries. - type: integer - minimum: 1 - maximum: 255 + $ref: "#/schemas/portNumber" deviceAlias: $ref: "#/schemas/deviceAlias" eventObject: @@ -474,16 +494,11 @@ schemas: - vendorName properties: macAddress: - type: string - pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" - minLength: 1 - maxLength: 17 + $ref: "#/schemas/macAddress" serialNumber: $ref: "#/schemas/serialNumber" orderCode: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/orderCode" productName: type: string minLength: 1 @@ -513,17 +528,11 @@ schemas: minLength: 1 maxLength: 64 applicationSpecificTag: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/tags" locationTag: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/tags" functionTag: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/tags" example: macAddress: "00:02:72:CE:A6:49" serialNumber: "C134A746" @@ -553,17 +562,11 @@ schemas: ipConfiguration: $ref: "#/schemas/ipConfiguration" ipAddress: - type: string - format: ipv4 - pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ + $ref: "#/schemas/ipAddress" subnetMask: - type: string - format: ipv4 - pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ + $ref: "#/schemas/subnetMask" standardGateway: - type: string - format: ipv4 - pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ + $ref: "#/schemas/standardGateway" example: ethIpv4: - ifName: "eth0" @@ -582,9 +585,7 @@ schemas: - ACTIVE - INACTIVE serverAddress: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/serverAddressMqtt" username: type: string minLength: 1 @@ -704,7 +705,7 @@ schemas: - BAD_USERNAME_OR_PASSWORD - NOT_AUTHORIZED serverAddress: - type: string + $ref: "#/schemas/serverAddressMqtt" upTime: type: integer example: @@ -741,18 +742,14 @@ schemas: $ref: "#/schemas/iolinkRevision" vendorName: description: Mandatory if the Device suports the ISDU. - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/vendorName" vendorText: - type: string + $ref: "#/schemas/vendorText" vendorUrl: type: string productName: description: Mandatory if the Device suports the ISDU. - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/productName" productId: type: string minLength: 1 @@ -774,17 +771,11 @@ schemas: ioddUri: type: string applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" locationTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" functionTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" example: vendorId: 26 deviceId: 8389226 @@ -809,19 +800,13 @@ schemas: type: object properties: applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" example: Fallback light switch locationTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" example: Down under functionTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" example: Check start of belt portCapabilitiesGet: type: object @@ -902,16 +887,12 @@ schemas: description: >- required if portMode is IOLINK_MANUAL and validationAndBackup is not NO_DEVICE_CHECK. - type: integer - minimum: 1 - maximum: 65535 + $ref: "#/schemas/vendorId" deviceId: description: >- required if portMode is IOLINK_MANUAL and validationAndBackup is not NO_DEVICE_CHECK. - type: integer - minimum: 1 - maximum: 16777215 + $ref: "#/schemas/deviceId" iqConfiguration: description: >- iqConfiguration is not supported in IO-Link Wireless. @@ -921,20 +902,16 @@ schemas: - DIGITAL_INPUT - DIGITAL_OUTPUT deviceAlias: - type: string + $ref: "#/schemas/deviceAlias" slotNumber: description: >- slot number of the Wireless-Device (Wireless Master only). - type: integer - minimum: 0 - maximum: 7 + $ref: "#/schemas/wirelessSlotNumber" trackNumber: description: >- track number of the Wireless-Device, maximum depends on the number of available tracks on the Wireless-Master (Wireless Master only). - type: integer - minimum: 1 - maximum: 5 + $ref: "#/schemas/wirelessTrackNumber" deviceTxPower: description: >- transmission power of the Wireless-Device (Wireless Master only). @@ -1029,7 +1006,7 @@ schemas: mastersConfigurationGetPost: # TODO: IOLW properties: - wMasterId: + wMasterId: #ToDo roeseko What masterId is this? Same as in identification object? description: >- Master identifier for connection with Wireless-Devices. type: integer @@ -1064,10 +1041,7 @@ schemas: serviceTrackNumber: description: >- W-Track number used for service requests (Scan/Pairing/Roaming). - type: integer - minimum: 1 - maximum: 5 - default: 1 + $ref: "#/schemas/wirelessTrackNumber" serviceTrackMode: description: >- Mode of the service track. @@ -1081,261 +1055,170 @@ schemas: type: object properties: "track_1": - type: integer - minimum: 0 - maximum: 31 - default: 0 + $ref: "#/schemas/wirelessTrackNumber" "track_2": - type: integer - minimum: 0 - maximum: 31 - default: 0 + $ref: "#/schemas/wirelessTrackNumber" "track_3": - type: integer - minimum: 0 - maximum: 31 - default: 0 + $ref: "#/schemas/wirelessTrackNumber" "track_4": - type: integer - minimum: 0 - maximum: 31 - default: 0 + $ref: "#/schemas/wirelessTrackNumber" "track_5": - type: integer - minimum: 0 - maximum: 31 - default: 0 + $ref: "#/schemas/wirelessTrackNumber" blockList: type: object properties: "2403": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2404": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2405": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2406": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2407": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2408": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2409": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2410": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2411": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2412": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2413": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2414": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2415": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2416": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2417": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2418": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2419": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2420": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2421": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2422": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2423": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2424": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2425": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2426": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2427": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2428": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2429": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2430": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2431": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2432": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2433": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2434": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2435": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2436": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2437": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2438": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2439": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2440": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2441": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2442": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2443": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2444": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2445": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2446": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2447": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2448": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2449": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2450": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2451": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2452": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2453": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2454": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2455": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2456": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2457": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2458": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2459": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2460": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2461": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2462": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2463": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2464": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2465": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2466": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2467": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2468": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2469": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2470": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2471": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2472": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2473": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2474": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2475": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2476": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2477": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2478": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" mastersPortsPairingPost: # TODO: IOLW properties: portPairing: @@ -1402,9 +1285,9 @@ schemas: - deviceAlias properties: portNumber: - type: number + $ref: "#/schemas/portNumber" deviceAlias: - type: string + $ref: "#/schemas/deviceAlias" statusInfo: type: string enum: # see Terminology in V.113, Table E.4 PortStatusList @@ -1421,16 +1304,12 @@ schemas: slotNumber: description: >- slot number of the Wireless-Device (Wireless Master only). - type: integer - minimum: 0 - maximum: 7 + $ref: "#/schemas/wirelessSlotNumber" trackNumber: description: >- track number of the Wireless-Device, maximum depends on the number of available tracks on the Wireless-Master (Wireless Master only). - type: integer - minimum: 1 - maximum: 5 + $ref: "#/schemas/wirelessTrackNumber" slotType: description: >- Single Slot or Double Slot (Wireless Master only). @@ -1444,17 +1323,11 @@ schemas: type: object properties: vendorId: - type: integer - minimum: 1 - maximum: 65535 + $ref: "#/schemas/vendorId" deviceId: - type: integer - minimum: 1 - maximum: 16777215 + $ref: "#/schemas/deviceId" productName: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/productName" mastersPortsStatusGet: # TODO: IOLW properties: @@ -1567,7 +1440,7 @@ schemas: type: object properties: trackNumber: - type: number + $ref: "#/schemas/wirelessTrackNumber" Mode: type: string enum: @@ -1594,7 +1467,7 @@ schemas: type: object properties: portNumber: - type: number + $ref: "#/schemas/portNumber" lqiMaster: type: integer minimum: 0 @@ -1690,16 +1563,12 @@ schemas: description: >- required if the port's mode is IOLINK_MANUAL and validationAndBackup is not NO_DEVICE_CHECK. - type: integer - minimum: 1 - maximum: 65535 + $ref: "#/schemas/vendorId" deviceId: description: >- required if the port's mode is IOLINK_MANUAL and validationAndBackup is not NO_DEVICE_CHECK. - type: integer - minimum: 1 - maximum: 16777215 + $ref: "#/schemas/deviceId" iqConfiguration: description: >- iqConfiguration is not supported in IO-Link Wireless. @@ -1712,22 +1581,16 @@ schemas: - ANALOG_OUTPUT - POWER_2 deviceAlias: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/deviceAlias" slotNumber: description: >- slot number of the Wireless-Device (Wireless Master only). - type: integer - minimum: 0 - maximum: 7 + $ref: "#/schemas/wirelessSlotNumber" trackNumber: description: >- track number of the Wireless-Device, maximum depends on the number of available tracks on the Wireless-Master (Wireless Master only). - type: integer - minimum: 1 - maximum: 5 + $ref: "#/schemas/wirelessTrackNumber" deviceTxPower: description: >- transmission power of the Wireless-Device (Wireless Master only). @@ -1838,13 +1701,9 @@ schemas: - iolinkRevision properties: vendorId: - type: integer - minimum: 1 - maximum: 65535 + $ref: "#/schemas/vendorId" deviceId: - type: integer - minimum: 1 - maximum: 16777215 + $ref: "#/schemas/deviceId" iolinkRevision: $ref: "#/schemas/iolinkRevision" parameterChecksum: @@ -2035,9 +1894,9 @@ schemas: deviceId: $ref: "#/schemas/deviceId" version: - type: string + $ref: "#/schemas/ioddDescriptionText" releaseDate: - type: string + $ref: "#/schemas/ioddDescriptionText" iolinkRevision: $ref: "#/schemas/iolinkRevision" availableArtifacts: @@ -2048,6 +1907,16 @@ schemas: description: The IODD XML file or other IODD artifacts. type: string format: binary + ioddDescriptionText: + description: The decription text from IODD For all others Description/@textId. + type: string + minLength: 1 + maxLength: 255 + ioddNameDescription: + decription: The decription text from IODD For all Name/@textId + type: string + minLength: 1 + maxLength: 64 ioddArchive: description: The IODD in archive format (e.g. IODD Finder) containing XML file and device images. type: string @@ -2079,9 +1948,7 @@ schemas: minimum: 0 maximum: 65535 message: - type: string - minLength: 1 - maxLength: 255 + $ref: "#/schemas/ioddDescriptionText" errorObject: type: object required: @@ -2092,18 +1959,23 @@ schemas: type: integer minimum: 0 message: - type: string - minLength: 1 + $ref: "#/schemas/ioddDescriptionText" iolinkError: $ref: "#/schemas/iolinkErrorObject" ipAddress: type: string + format: ipv4 + pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ example: 192.168.1.13 subnetMask: type: string + format: ipv4 + pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ example: 255.255.255.0 standardGateway: type: string + format: ipv4 + pattern: ^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$ example: 192.168.1.1 dnsServer: type: object @@ -2125,6 +1997,9 @@ schemas: - custom macAddress: type: string + pattern: "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$" + minLength: 1 + maxLength: 17 example: "FE:AB:3A:55:33:11" valueUnitObject: type: object @@ -2142,13 +2017,9 @@ schemas: type: object properties: vendorName: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/vendorName" vendorId: - type: integer - minimum: 1 - maximum: 65535 + $ref: "#/schemas/vendorId" masterId: type: integer minimum: 1 @@ -2164,9 +2035,7 @@ schemas: serialNumber: $ref: "#/schemas/serialNumber" orderCode: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/orderCode" productName: type: string minLength: 1 @@ -2194,17 +2063,11 @@ schemas: gsdUri: type: string applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" locationTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" functionTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" example: vendorName: Vendor GmbH vendorId: 26 @@ -2227,17 +2090,11 @@ schemas: type: object properties: applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" locationTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" functionTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" deviceEvents: summary: events @@ -2379,7 +2236,7 @@ schemas: example: "linkUp" masterConfiguration: properties: - masterId: + masterId: #ToDo roeseko What masterId is this? Same as in identification object? type: integer minimum: 1 maximum: 29 @@ -2406,239 +2263,161 @@ schemas: - all properties: "2402": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2403": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2404": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2405": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2406": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2407": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2408": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2409": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2410": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2411": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2412": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2413": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2414": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2415": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2416": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2417": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2418": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2419": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2420": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2421": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2422": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2423": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2424": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2425": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2426": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2427": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2428": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2429": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2430": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2431": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2432": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2433": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2434": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2435": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2436": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2437": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2438": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2439": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2440": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2441": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2442": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2443": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2444": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2445": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2446": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2447": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2448": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2449": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2450": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2451": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2452": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2453": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2454": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2455": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2456": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2457": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2458": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2459": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2460": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2461": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2462": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2463": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2464": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2465": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2466": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2467": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2468": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2469": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2470": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2471": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2472": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2473": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2474": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2475": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2476": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2477": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2478": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" "2479": - type: boolean - default: false + $ref: "#/schemas/wirelessBlockList" example: masterId: 5 ahtEnable: false @@ -2724,23 +2503,16 @@ schemas: "2477": false "2478": false "2479": false - subIndex: - type: integer - minimum: 0 - maximum: 255 - example: 12 tracksStatisticsChannel: properties: trackNumber: - type: integer - minimum: 1 - maximum: 5 + $ref: "#/schemas/wirelessTrackNumber" channelErrors: type: object # required: # @todo wireles # - all properties: - "2402": + "2402": # ToDo roeseko What is mean by this value? Is this the error code for this channel? type: integer minimum: 0 maximum: 65535 # 0 to 100, 65535 means no data available @@ -3167,221 +2939,6 @@ schemas: trackMode: CYCLIC txPower: 20 - # wirelessPortConfigurationGet: # @todo wireles - # properties: - # portMode: - # type: string - # enum: - # - DEACTIVATED - # - CYCLIC - # - ROAMING - # validationBackup: - # type: string - # enum: - # - NO_DEVICE_CHECK - # - TYPE_COMPATIBLE_DEVICE_V1.1 - # - TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE - # - TYPE_COMPATIBLE_DEVICE_V1.1_RESTORE - # vendorId: - # type: integer - # minimum: 1 - # maximum: 65535 - # deviceId: - # type: integer - # minimum: 1 - # maximum: 16777215 - # portCycleTime: - # type: object - # required: - # - value - # - unit - # properties: - # value: - # type: integer - # minimum: 0 ## 0 means Freerunning - # maximum: 315 ## Step size 5ms - # unit: - # type: string - # enum: - # - ms - # trackNumber: - # type: integer - # minimum: 1 - # maximum: 5 - # slotNumber: - # type: integer - # minimum: 0 - # maximum: 7 - # slotType: - # type: string - # enum: - # - "SSLOT" - # - "DSLOT" - # maxRetry: - # type: integer - # minimum: 2 - # maximum: 31 - # imaTime: - # type: object - # required: - # - base - # - multiplier - # properties: - # base: - # type: string - # enum: - # - "1664us" - # - "5ms" - # - "1s" - # - "1min" - # multiplier: - # type: integer - # minimum: 1 - # maximum: 255 - # deviceTxPower: - # type: integer - # minimum: 0 - # maximum: 31 - # lowPowerDevice: - # type: string - # enum: - # - "NORMAL" - # - "LOW_POWER" - # maxPDSegLength: - # type: integer - # minimum: 0 - # maximum: 32 - # uniqueId: - # type: string - # deviceAlias: - # type: string - # example: - # portMode: CYCLIC - # validationBackup: TYPE_COMPATIBLE_DEVICE_V1.1 - # vendorId: 888 - # deviceId: 1 - # portCycleTime: - # value: 0 - # unit: ms - # trackNumber: 5 - # slotNumber: 1 - # slotType: SSLOT - # maxRetry: 20 - # imaTime: - # base: 1664us - # multiplier: 60 - # deviceTxPower: 31 - # lowPowerDevice: NORMAL - # maxPDSegLength: 0 - # uniqueId: 03:78:00:00:01:32:50:60:46 - # deviceAlias: "Port_X01" - - # wirelessPortConfigurationPost: # @todo wireles - # properties: - # portMode: - # type: string - # enum: - # - DEACTIVATED - # - CYCLIC - # - ROAMING - # validationBackup: - # type: string - # enum: - # - NO_DEVICE_CHECK - # - TYPE_COMPATIBLE_DEVICE_V1.1 - # - TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE - # - TYPE_COMPATIBLE_DEVICE_V1.1_RESTORE - # vendorId: - # type: integer - # minimum: 1 - # maximum: 65535 - # deviceId: - # type: integer - # minimum: 1 - # maximum: 16777215 - # portCycleTime: - # type: object - # required: - # - value - # - unit - # properties: - # value: - # type: integer - # minimum: 0 ## 0 means Freerunning - # maximum: 315 ## Step size 5ms - # unit: - # type: string - # enum: - # - ms - # trackNumber: - # type: integer - # minimum: 1 - # maximum: 5 - # slotNumber: - # type: integer - # minimum: 0 - # maximum: 7 - # slotType: - # type: string - # enum: - # - "SSLOT" - # - "DSLOT" - # maxRetry: - # type: integer - # minimum: 2 - # maximum: 31 - # imaTime: - # type: object - # required: - # - base - # - multiplier - # properties: - # base: - # type: string - # enum: - # - "1664us" - # - "5ms" - # - "1s" - # - "1min" - # multiplier: - # type: integer - # minimum: 1 - # maximum: 255 - # deviceTxPower: - # type: integer - # minimum: 0 - # maximum: 31 - # lowPowerDevice: - # type: string - # enum: - # - "NORMAL" - # - "LOW_POWER" - # maxPDSegLength: - # type: integer - # minimum: 0 - # maximum: 32 - # uniqueId: - # type: string - # example: - # portMode: CYCLIC - # validationBackup: TYPE_COMPATIBLE_DEVICE_V1.1_BACKUP_AND_RESTORE - # vendorId: 888 - # deviceId: 1 - # portCycleTime: - # value: 0 ##Or FreeRunning - # unit: ms - # trackNumber: 5 - # slotNumber: 1 - # slotType: SSLOT - # maxRetry: 20 - # imaTime: - # base: 1664us - # multiplier: 60 - # deviceTxPower: 31 - # lowPowerDevice: NORMAL - # maxPDSegLength: 0 - # uniqueId: 03:78:00:00:01:32:50:60:46 - mqtt-iol-master: type: string description: The MQTT topic for the IO-Link Master. @@ -3405,13 +2962,9 @@ schemas: type: object properties: vendorName: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/vendorName" vendorId: - type: integer - minimum: 1 - maximum: 65535 + $ref: "#/schemas/vendorId" masterId: type: integer minimum: 1 @@ -3429,13 +2982,9 @@ schemas: minLength: 1 maxLength: 16 orderCode: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/orderCode" productName: - type: string - minLength: 1 - maxLength: 64 + $ref: "#/schemas/productName" productId: type: string minLength: 1 @@ -3459,17 +3008,11 @@ schemas: descriptionFileUri: type: string applicationSpecificTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" locationTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" functionTag: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/tags" deviceFirmwareUpdateStatusGet: type: object properties: @@ -3527,15 +3070,11 @@ schemas: - portNumber properties: deviceAlias: - type: string - minLength: 1 - maxLength: 32 + $ref: "#/schemas/deviceAlias" masterNumber: - type: integer - minimum: 1 + $ref: "#/schemas/masterNumber" portNumber: - type: integer - minimum: 1 + $ref: "#/schemas/portNumber" ioddFileName: type: string minLength: 1 From ccb28b0f7b54e1d9519171cea12d135584b723cb Mon Sep 17 00:00:00 2001 From: roeseko Date: Tue, 11 Jun 2024 09:46:29 +0200 Subject: [PATCH 21/22] Update license text --- LICENSE | 222 ++++++++++++-------------------------------------------- 1 file changed, 46 insertions(+), 176 deletions(-) diff --git a/LICENSE b/LICENSE index 6f06789..172f289 100644 --- a/LICENSE +++ b/LICENSE @@ -1,176 +1,46 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS +Disclaimer / License: +License Conditions for OpenAPI specification for IO-Link and AsyncAPI specification for IO-Link +Conditions in Respect of the Transfer of Use of OpenAPI specification for IO-Link and AsyncAPI specification for IO-Link + +between + +IO-Link community at Profibus Nutzerorganisation e.V. Karlsruhe (PNO) +and User hereinafter referred to as the "User" + +Preamble + +IO-Link community is prepared to grant to the User, under the conditions of this agreement, rights of use in respect of OpenAPI specification for IO-Link and AsyncAPI specification for IO-Link (hereinafter referred to as the "Software"). + +1. Rights of use + +1.1 IO-Link community hereby grants to the User the non-exclusive, non-transferable right, free of charge and for an unlimited period of time, to use the Software in accordance with the conditions of this license agreement. + +1.2 The Software is protected by copyright laws and by international agreements against unauthorized copying. The User is not allowed to change or remove the copyright notices and registration numbers contained in the Software. The User is allowed to make copies of the Software and can transfer the Software to another data storage medium solely for the purpose of data backup or archiving. The Software is provided solely for internal use by the User. The User is not allowed to carry out reverse compiling or to make changes or extensions to the Software. + +1.3 Without prejudice to the rights of use granted to the User by IO-Link community , IO-Link community shall retain all rights to the software including the documentation belonging thereto and all further papers. + +1.4 The parties agree that granting of licenses does not involve any technical +support from IO-Link community for the User. + +2. Publications + +Explicit approval from IO-Link community is required in advance if the User plans to make any publications in connection with this software or to publish the results of tests made with this Software. + +3. Limitations + +The User is not allowed to hire out or lend the Software to other parties. This license agreement only grants the User the rights to use the Software. + +4. Warranty + +The software is handed over free of charge. IO-Link community shall not provide any warranty in respect thereof. The use of the software shall be at the sole risk of the User. + +5. Liability + +Claims for damages against IO-Link community arising from or in connection with this agreement shall be excluded, irrespective of legal grounds, in particular claims on the grounds of production stoppage, loss of profit, loss of information and data or consequential damages, insofar as liability is not cogent for example according to product liability legislation or in cases of intent, gross negligence, absence of warranted characteristics or because of violation of fundamental contractual obligations. Compensation for damages on grounds of violation of fundamental contractual obligations shall however be limited to foreseeable damages typical of this type of contract, insofar as no intent or gross negligence applies. + +6. Applicable law/place of jurisdiction + +German law shall apply to the exclusion of the UN law on international sale of goods. The sole place of jurisdiction for all disputes arising from or on the basis of this agreement shall be Karlsruhe. + +If any of the conditions in the license agreement should become invalid for any reason, this does not affect the validity of the remaining conditions. + From fe93d1059fc1227bab10e29211b03657f615ef71 Mon Sep 17 00:00:00 2001 From: roeseko Date: Mon, 24 Jun 2024 16:47:14 +0200 Subject: [PATCH 22/22] Adjust todos --- schemas.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/schemas.yaml b/schemas.yaml index c3723ad..f32956a 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -1006,7 +1006,7 @@ schemas: mastersConfigurationGetPost: # TODO: IOLW properties: - wMasterId: #ToDo roeseko What masterId is this? Same as in identification object? + wMasterId: #TODO roeseko What masterId is this? Same as in identification object? description: >- Master identifier for connection with Wireless-Devices. type: integer @@ -2236,7 +2236,7 @@ schemas: example: "linkUp" masterConfiguration: properties: - masterId: #ToDo roeseko What masterId is this? Same as in identification object? + masterId: #TODO roeseko What masterId is this? Same as in identification object? type: integer minimum: 1 maximum: 29 @@ -2509,10 +2509,10 @@ schemas: $ref: "#/schemas/wirelessTrackNumber" channelErrors: type: object - # required: # @todo wireles + # required: # @TODO wireles # - all properties: - "2402": # ToDo roeseko What is mean by this value? Is this the error code for this channel? + "2402": # TODO roeseko What is mean by this value? Is this the error code for this channel? type: integer minimum: 0 maximum: 65535 # 0 to 100, 65535 means no data available