Loading...
Searching...
No Matches
Modbus.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2011 Raritan Inc. All rights reserved.
*/
/**
* Device Settings
*/
module devsettings {
/** %Modbus service settings interface */
interface Modbus {
constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
/** Device modbus capabilities */
structure Capabilities {
boolean hasModbusSerial; ///< Device has a serial %Modbus port
};
/**
* Retrieve the device %Modbus capabilities.
*
* @return %Modbus capbilities
*/
Capabilities getCapabilities();
/**
* %Modbus/TCP settings.
*
* @note Port number and enabled flag are configured using
* net::Net::setNetworkConfigServices.
*/
structure TcpSettings {
boolean readonly; ///< Disallow write requests
};
/** Serial line parity */
enumeration Parity { NONE, EVEN, ODD };
/** %Modbus/serial settings. */
structure SerialSettings {
boolean enabled; ///< Enable the %Modbus/RTU service
int baudrate; ///< Baudrate
Parity parity; ///< Parity
int stopbits; ///< Number of stop bits (1 or 2)
boolean readonly; ///< Disallow write requests
};
/** %Modbus service settings */
structure Settings {
TcpSettings tcp; ///< %Modbus/TCP settings
SerialSettings serial; ///< %Modbus/serial settings
int primaryUnitId; ///< Main unit ID, 0 to disable
///< @note Models that act as a simple Modbus device
///< will ignore this setting for TCP connections and
///< respond to all unit IDs.
};
/**
* Retrieve the %Modbus service settings.
*
* @return %Modbus service settings
*/
Settings getSettings();
/**
* Set the %Modbus service settings.
*
* @param settings New settings
*
* @return 0 if OK
* @return 1 if any parameters are invalid
*/
int setSettings(in Settings settings);
};
}
devsettings::Modbus
Modbus service settings interface
Definition Modbus.idl:12
devsettings::Modbus::Parity
Parity
Serial line parity.
Definition Modbus.idl:39
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
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::serial
SerialSettings serial
Modbus/serial settings
Definition Modbus.idl:53
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