Skip to content

Commit

Permalink
Add activate property to mqtt topic configuration endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
roesekoSICKAG committed Jul 16, 2024
1 parent 1c87fb1 commit ba32bf0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 20 deletions.
39 changes: 19 additions & 20 deletions JSON_for_IO-Link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ paths:
$ref: "./schemas.yaml#/schemas/mqttConfigurationTopicGet"
example:
- topicId: 1
activated: true
activate: true
topicName: Sensor34/processData
qos: 1_AT_LEAST_ONCE
deviceAlias: DT35
Expand All @@ -675,13 +675,13 @@ paths:
value: 10
unit: ms
- topicId: 2
activated: true
activate: true
topicName: Sensor34/event
qos: 1_AT_LEAST_ONCE
deviceAlias: TAD081
event: {}
- topicId: 3
activated: false
activate: false
topicName: PD
qos: 0_ONLY_ONCE
deviceAlias: BNI_IOL
Expand All @@ -690,7 +690,7 @@ paths:
format: iodd
onChange: true
- topicId: 4
activated: false
activate: false
topicName: DT35_CycleTime
qos: 0_ONLY_ONCE
deviceAlias: DT35
Expand All @@ -700,7 +700,7 @@ paths:
format: iodd
onChange: true
- topicId: 5
activated: true
activate: true
topicName: deviceTemperature
qos: 0_ONLY_ONCE
deviceAlias: master1port2
Expand Down Expand Up @@ -735,7 +735,7 @@ paths:
examples:
Process Data:
value:
activated: true
activate: true
qos: 1_AT_LEAST_ONCE
deviceAlias: DT35
processData:
Expand All @@ -746,13 +746,13 @@ paths:
unit: ms
Event:
value:
activated: true
activate: true
qos: 1_AT_LEAST_ONCE
deviceAlias: TAD081
event: {}
Parameter (Index):
value:
activated: false
activate: false
qos: 0_ONLY_ONCE
deviceAlias: master1port1
parameter:
Expand All @@ -763,7 +763,7 @@ paths:
unit: ms
Parameter (ParameterName):
value:
activated: true
activate: true
topicName: deviceTemperature
qos: 0_ONLY_ONCE
deviceAlias: AHM36A
Expand Down Expand Up @@ -812,7 +812,7 @@ paths:
Process Data:
value:
topicId: 1
activated: true
activate: true
topicName: PD input
qos: 1_AT_LEAST_ONCE
deviceAlias: DT35
Expand All @@ -825,15 +825,15 @@ paths:
Event:
value:
topicId: 2
activated: true
activate: true
topicName: Event
qos: 1_AT_LEAST_ONCE
deviceAlias: TAD081
event: {}
Parameter (Index):
value:
topicId: 3
activated: true
activate: true
topicName: devvice/indexXY
qos: 0_ONLY_ONCE
deviceAlias: master1port1
Expand All @@ -846,7 +846,7 @@ paths:
Parameter (ParameterName):
value:
topicId: 5
activated: true
activate: true
topicName: deviceTemperature
qos: 0_ONLY_ONCE
deviceAlias: AHM36A
Expand Down Expand Up @@ -879,18 +879,18 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/mqttConfigurationTopicsTopicPost"
$ref: "./schemas.yaml#/schemas/mqttConfigurationTopicsTopicPost"
examples:
Deactivate Topic:
value:
activated: false
activate: false
Activate Topic:
value:
activated: true
activate: true
Process Data:
value:
topicId: 1
activated: true
activate: true
topicName: PD input
qos: 1_AT_LEAST_ONCE
deviceAlias: DT35
Expand All @@ -903,7 +903,7 @@ paths:
Event:
value:
topicId: 2
activated: true
activate: true
topicName: Event
qos: 1_AT_LEAST_ONCE
deviceAlias: TAD081
Expand All @@ -923,7 +923,7 @@ paths:
Parameter (ParameterName):
value:
topicId: 5
activated: true
activate: true
topicName: deviceTemperature
qos: 0_ONLY_ONCE
deviceAlias: AHM36A
Expand Down Expand Up @@ -2930,7 +2930,6 @@ components:
minimum: 0
maximum: 255
required: true

responses:
HTTP_400:
description: Bad request
Expand Down
25 changes: 25 additions & 0 deletions schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,8 @@ schemas:
- qos
- deviceAlias
properties:
activate:
type: boolean
qos:
type: string
enum:
Expand All @@ -660,6 +662,29 @@ schemas:
topicName:
type: string
- $ref: "#/schemas/mqttConfigurationTopic"
mqttConfigurationTopicsTopicPost:
anyOf:
- type: object
properties:
topicId:
type: integer
- type: object
properties:
topicName:
type: string
- $ref: "#/schemas/mqttConfigurationTopic"
example:
topicId: 1
activate: true
topicName: PD input
qos: 1_AT_LEAST_ONCE
deviceAlias: DT35
processData:
direction: getData
format: iodd
interval:
value: 10
unit: ms
mqttConfigurationTopicGet:
allOf:
- type: object
Expand Down

0 comments on commit ba32bf0

Please sign in to comment.