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 */
26 Capabilities getCapabilities();
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 */
65 Settings getSettings();
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}
devsettings::Modbus
Modbus service settings interface
Definition Modbus.idl:12
devsettings::Modbus::Parity
Parity
Serial line parity.
Definition Modbus.idl:39
devsettings::Modbus::ERR_INVALID_PARAM
constant int ERR_INVALID_PARAM
Invalid parameters.
Definition Modbus.idl:14
devsettings::Modbus::getCapabilities
Capabilities getCapabilities()
Retrieve the device Modbus capabilities.
devsettings::Modbus::setSettings
int setSettings(in Settings settings)
Set the Modbus service settings.
devsettings::Modbus::getSettings
Settings getSettings()
Retrieve the Modbus service settings.
devsettings
Device Settings.
Definition Crestron.idl:9
serial
Serial Ports.
Definition AnalogModem.idl:12
devsettings::Modbus::Capabilities
Device modbus capabilities.
Definition Modbus.idl:17
devsettings::Modbus::Capabilities::hasModbusSerial
boolean hasModbusSerial
Device has a serial Modbus port.
Definition Modbus.idl:18
devsettings::Modbus::SerialSettings
Modbus/serial settings.
Definition Modbus.idl:42
devsettings::Modbus::SerialSettings::stopbits
int stopbits
Number of stop bits (1 or 2)
Definition Modbus.idl:46
devsettings::Modbus::SerialSettings::readonly
boolean readonly
Disallow write requests.
Definition Modbus.idl:47
devsettings::Modbus::SerialSettings::baudrate
int baudrate
Baudrate.
Definition Modbus.idl:44
devsettings::Modbus::SerialSettings::parity
Parity parity
Parity.
Definition Modbus.idl:45
devsettings::Modbus::SerialSettings::enabled
boolean enabled
Enable the Modbus/RTU service.
Definition Modbus.idl:43
devsettings::Modbus::Settings
Modbus service settings
Definition Modbus.idl:51
devsettings::Modbus::Settings::tcp
TcpSettings tcp
Modbus/TCP settings
Definition Modbus.idl:52
devsettings::Modbus::Settings::primaryUnitId
int primaryUnitId
Main unit ID, 0 to disable.
Definition Modbus.idl:54
devsettings::Modbus::TcpSettings
Modbus/TCP settings.
Definition Modbus.idl:34
devsettings::Modbus::TcpSettings::readonly
boolean readonly
Disallow write requests.
Definition Modbus.idl:35