Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
Modbus.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2011 Raritan Inc. All rights reserved.
4 */
5
6/**
7 * Device Settings
8 */
9module devsettings {
10
11 /** %Modbus service settings interface */
12 interface Modbus {
13
14 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
15
16 /** Device modbus capabilities */
17 structure Capabilities {
18 boolean hasModbusSerial; ///< Device has a serial %Modbus port
19 };
20
21 /**
22 * Retrieve the device %Modbus capabilities.
23 *
24 * @return %Modbus capbilities
25 */
27
28 /**
29 * %Modbus/TCP settings.
30 *
31 * @note Port number and enabled flag are configured using
32 * net::Net::setNetworkConfigServices.
33 */
34 structure TcpSettings {
35 boolean readonly; ///< Disallow write requests
36 };
37
38 /** Serial line parity */
39 enumeration Parity { NONE, EVEN, ODD };
40
41 /** %Modbus/serial settings. */
42 structure SerialSettings {
43 boolean enabled; ///< Enable the %Modbus/RTU service
44 int baudrate; ///< Baudrate
45 Parity parity; ///< Parity
46 int stopbits; ///< Number of stop bits (1 or 2)
47 boolean readonly; ///< Disallow write requests
48 };
49
50 /** %Modbus service settings */
51 structure Settings {
52 TcpSettings tcp; ///< %Modbus/TCP settings
53 SerialSettings serial; ///< %Modbus/serial settings
54 int primaryUnitId; ///< Main unit ID, 0 to disable
55 ///< @note Models that act as a simple Modbus device
56 ///< will ignore this setting for TCP connections and
57 ///< respond to all unit IDs.
58 };
59
60 /**
61 * Retrieve the %Modbus service settings.
62 *
63 * @return %Modbus service settings
64 */
66
67 /**
68 * Set the %Modbus service settings.
69 *
70 * @param settings New settings
71 *
72 * @return 0 if OK
73 * @return 1 if any parameters are invalid
74 */
75 int setSettings(in Settings settings);
76
77 };
78
79}
Modbus service settings interface
Definition: Modbus.idl:12
Parity
Serial line parity.
Definition: Modbus.idl:39
Capabilities getCapabilities()
Retrieve the device Modbus capabilities.
int setSettings(in Settings settings)
Set the Modbus service settings.
Settings getSettings()
Retrieve the Modbus service settings.
Device Settings.
Definition: Crestron.idl:9
Device modbus capabilities.
Definition: Modbus.idl:17
boolean hasModbusSerial
Device has a serial Modbus port.
Definition: Modbus.idl:18
Modbus/serial settings.
Definition: Modbus.idl:42
int stopbits
Number of stop bits (1 or 2)
Definition: Modbus.idl:46
boolean readonly
Disallow write requests.
Definition: Modbus.idl:47
boolean enabled
Enable the Modbus/RTU service.
Definition: Modbus.idl:43
Modbus service settings
Definition: Modbus.idl:51
SerialSettings serial
Modbus/serial settings
Definition: Modbus.idl:53
TcpSettings tcp
Modbus/TCP settings
Definition: Modbus.idl:52
int primaryUnitId
Main unit ID, 0 to disable.
Definition: Modbus.idl:54
Modbus/TCP settings.
Definition: Modbus.idl:34
boolean readonly
Disallow write requests.
Definition: Modbus.idl:35