2021-08-19 16:39:29 +02:00
|
|
|
openapi: 3.0.0
|
|
|
|
info:
|
|
|
|
title: ModbusService
|
|
|
|
version: "0.1"
|
|
|
|
|
|
|
|
paths:
|
|
|
|
/client:
|
|
|
|
get:
|
|
|
|
tags: [ "Client" ]
|
|
|
|
summary: List all configured clients
|
|
|
|
operationId: api.listClients
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: All configured clients
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Client'
|
|
|
|
post:
|
|
|
|
tags: [ "Client" ]
|
|
|
|
summary: Create a new client
|
|
|
|
operationId: api.createClient
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Client'
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Client successfully created
|
|
|
|
/action/coil/{client}/{address}:
|
|
|
|
get:
|
|
|
|
tags: [ "Action" ]
|
|
|
|
summary: Return a coil of client
|
|
|
|
operationId: api.readCoil
|
|
|
|
parameters:
|
|
|
|
- name: client
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
- name: address
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Status of the coil
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
put:
|
|
|
|
tags: [ "Action" ]
|
|
|
|
summary: Set a coil of client
|
|
|
|
operationId: api.writeCoil
|
|
|
|
parameters:
|
|
|
|
- name: client
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
- name: address
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
requestBody:
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
|
|
|
type: number
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Status of the coil
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
|
|
|
type: number
|
2021-08-20 13:17:02 +02:00
|
|
|
/action/discrete/{client}/{address}:
|
|
|
|
get:
|
|
|
|
tags: [ "Action" ]
|
|
|
|
summary: Return a discrete input of client
|
|
|
|
operationId: api.readDiscreteRegister
|
|
|
|
parameters:
|
|
|
|
- name: client
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
- name: address
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Status of the discrete input register
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
/action/input/{client}/{address}:
|
|
|
|
get:
|
|
|
|
tags: [ "Action" ]
|
|
|
|
summary: Return an input of client
|
|
|
|
operationId: api.readInputRegister
|
|
|
|
parameters:
|
|
|
|
- name: client
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: string
|
|
|
|
- name: address
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Status of the input register
|
|
|
|
content:
|
|
|
|
'application/json':
|
|
|
|
schema:
|
|
|
|
type: integer
|
2021-08-19 16:39:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
components:
|
|
|
|
schemas:
|
|
|
|
Client:
|
|
|
|
description: Modbus Client
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
address:
|
|
|
|
type: string
|