PeripheralDeviceManager.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2012 Raritan Inc. All rights reserved.
*/
#ifndef __PERIPHERAL_DEVICE_MANAGER_IDL__
#define __PERIPHERAL_DEVICE_MANAGER_IDL__
#include <PeripheralDeviceSlot.idl>
#include <PeripheralDevicePackage.idl>
#include <PortFuse.idl>
#include <NumericSensor.idl>
#include <Sensor.idl>
#include <UserEvent.idl>
/** Peripheral Devices */
module peripheral {
/** Peripheral Device Manager */
interface DeviceManager_3_0_2 {
constant int ERR_INVALID_PARAMS = 1; ///< Invalid parameters
/** Z Coordinate Mode identifier */
enumeration ZCoordMode {
RACKUNITS, ///< Z coordinate of slot settings is in rack units
FREEFORM ///< Z coordinate of slot settings is free form text
};
/** peripheral DeviceManager's s settings */
structure Settings {
ZCoordMode zCoordMode; ///< Z coordinate semantics
boolean autoManageNewDevices; ///< Automatically manage newly detected devices
float deviceAltitude; ///< Altitude of device in meters
int presenceDetectionTimeout; ///< Timeout for presence detection (sec)
map<string, sensors.NumericSensor_4_0_3.Thresholds> defaultThresholdsMap; ///< Default thresholds by peripheral device type
int maxActivePoweredDryContacts; ///< The maximum number of concurrently active powered dry contacts
};
/** Peripheral DeviceManager's metadata */
structure MetaData {
int oneWirePortCount; ///< Number of 1-wire ports
int onboardDeviceCount; ///< Number of onboard peripheral devices
};
/** Peripheral device type info */
structure DeviceTypeInfo {
sensors.Sensor_4_0_3.TypeSpec type; ///< Device (sensor) type
boolean isActuator; ///< Is actuator or not
string identifier; ///< Device type identifier
string name; ///< Device type display name
sensors.NumericSensor_4_0_3.Range defaultRange; ///< Default sensor range (numeric sensors only)
int defaultDecDigits; ///< Default sensor precision (numeric sensors only)
};
/** Firmware update status */
structure FirmwareUpdateState {
boolean active; ///< \c true if any peripheral device is currently updated
int remaining; ///< Number of peripheral devices that are still pending to be updated
};
/** Event: Peripheral device manager's settings have been changed */
valueobject SettingsChangedEvent extends event.UserEvent {
Settings oldSettings; ///< Settings before change
Settings newSettings; ///< Settings after change
};
/** Event: A peripheral device was added or removed */
valueobject DeviceEvent_2_0_0 extends idl.Event {
vector<Device_3_0_2> devices; ///< Affected devices
vector<Device_3_0_2> allDevices; ///< New list of discovered devices after change
};
/** Event: A peripheral device was added */
valueobject DeviceAddedEvent_2_0_0 extends DeviceEvent_2_0_0 { };
/** Event: A peripheral device was removed */
valueobject DeviceRemovedEvent_2_0_0 extends DeviceEvent_2_0_0 { };
/** Event: An unknown device was attached */
valueobject UnknownDeviceAttachedEvent extends idl.Event {
string romCode; ///< Device ROM code
vector<PosElement> position; ///< Device position in the chain
};
/** Enumeration: State of device firmware update */
enumeration DeviceFirmwareUpdateState {
UPDATE_STARTED, ///< Update is running
UPDATE_SUCCESSFUL, ///< Update has finished successfully
UPDATE_FAILED ///< Update has failed
};
/** Event: Firmware update on a device was started or has finished */
valueobject DeviceFirmwareUpdateStateChangedEvent extends idl.Event {
string oldVersion; ///< Firmware version before update
string newVersion; ///< Firmware version to be updated to
string serial; ///< Serial number of device
DeviceFirmwareUpdateState state; ///< Update state
};
/** Event: Firmware update state has changed
* This event will be sent to enclose one of more {@link DeviceFirmwareUpdateStateChangedEvent}.
* That is, it will be sent before a series of firmware updates is started and after the
* firmware update series has ended. */
valueobject FirmwareUpdateStateChangedEvent extends idl.Event {
FirmwareUpdateState newState; ///< New update state
};
/** Event: A peripheral device package was added or removed */
valueobject PackageEvent_2_0_0 extends idl.Event {
vector<PackageInfo_2_0_1> packageInfos; ///< Information about affected packages
vector<PackageInfo_2_0_1> allPackages; ///< New list of discovered packages after change
};
/** Event: A peripheral device package was added */
valueobject PackageAddedEvent_2_0_0 extends PackageEvent_2_0_0 { };
/** Event: A peripheral device package was removed */
valueobject PackageRemovedEvent_2_0_0 extends PackageEvent_2_0_0 { };
/** Peripheral device statistics */
structure Statistics {
int cSumErrCnt; ///< CRC / checksum error counter
};
/**
* Get the list of peripheral device slots.
*
* @return List of peripheral device slots
*/
vector<DeviceSlot_2_0_3> getDeviceSlots();
/**
* Get a DeviceSlot by its index
*
* @param idx index of the slot to get
* @return the requested slot
*/
DeviceSlot_2_0_3 getDeviceSlot(in int idx);
/**
* Get the list of currently attached peripheral devices
*
* @return List of all discovered peripheral devices
*/
vector<Device_3_0_2> getDiscoveredDevices();
/**
* Get the list of currently attached peripheral device packages
*
* @return List of all discovered peripheral device packages
*/
vector<PackageInfo_2_0_1> getDiscoveredPackageInfos();
/**
* Retrieve the peripheral DeviceManager's settings.
*
* @return peripheral DeviceManager's settings
*/
Settings getSettings();
/**
* Change the peripheral DeviceManager's settings.
*
* @param settings New peripheral DeviceManager's settings
*
* @return 0 if OK
* @return ERR_INVALID_PARAMS if any parameters are invalid
*/
int setSettings(in Settings settings);
/**
* Retreive the Peripheral DeviceManager's metadata.
*
* @return Peripheral DeviceManager's metadata
*/
MetaData getMetaData();
/**
* Get the list of all peripheral device type infos
*
* @return List of all peripheral device type infos
*/
vector<DeviceTypeInfo> getDeviceTypeInfos();
/**
* Return the state of device firmware updates running
* on devices connected to this device manager
*
* @return Firmware update state
*/
FirmwareUpdateState getFirmwareUpdateState();
/**
* Retrieve statistics
*
* @return peripheral device statistics
*/
Statistics getStatistics();
/**
* Get the list of currently attached peripheral device packages
*
* @return List of all discovered peripheral device packages
*/
vector<Package_1_0_1> getDiscoveredPackages();
/**
* Get the fuse for the sensor port
*
* @return A fuse instance, if available
*/
portsmodel.PortFuse getPortFuse();
};
}
#endif /* !__PERIPHERAL_DEVICE_MANAGER_IDL__ */
peripheral::DeviceManager_3_0_2::UPDATE_STARTED
Update is running.
Definition: PeripheralDeviceManager.idl:88
peripheral::DeviceManager_3_0_2::MetaData::onboardDeviceCount
int onboardDeviceCount
Number of onboard peripheral devices.
Definition: PeripheralDeviceManager.idl:43
peripheral::DeviceManager_3_0_2::newSettings
Settings newSettings
Settings after change.
Definition: PeripheralDeviceManager.idl:65
sensors::NumericSensor_4_0_3::Range
Range of possible sensor readings.
Definition: NumericSensor.idl:24
peripheral::DeviceManager_3_0_2::UPDATE_SUCCESSFUL
Update has finished successfully.
Definition: PeripheralDeviceManager.idl:89
peripheral::DeviceManager_3_0_2::Settings::presenceDetectionTimeout
int presenceDetectionTimeout
Timeout for presence detection (sec)
Definition: PeripheralDeviceManager.idl:35
peripheral::DeviceManager_3_0_2::newVersion
string newVersion
Firmware version to be updated to.
Definition: PeripheralDeviceManager.idl:96
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::name
string name
Device type display name.
Definition: PeripheralDeviceManager.idl:51
peripheral::DeviceManager_3_0_2::Settings::zCoordMode
ZCoordMode zCoordMode
Z coordinate semantics.
Definition: PeripheralDeviceManager.idl:32
peripheral::DeviceManager_3_0_2::FirmwareUpdateState
Firmware update status.
Definition: PeripheralDeviceManager.idl:57
peripheral::DeviceManager_3_0_2::DeviceFirmwareUpdateState
DeviceFirmwareUpdateState
Enumeration: State of device firmware update.
Definition: PeripheralDeviceManager.idl:87
peripheral
Peripheral Devices.
Definition: PeripheralDeviceManager.idl:17
peripheral::DeviceManager_3_0_2::FirmwareUpdateState::active
boolean active
true if any peripheral device is currently updated
Definition: PeripheralDeviceManager.idl:58
peripheral::DeviceManager_3_0_2::Statistics
Peripheral device statistics.
Definition: PeripheralDeviceManager.idl:121
peripheral::DeviceManager_3_0_2::MetaData
Peripheral DeviceManager&#39;s metadata.
Definition: PeripheralDeviceManager.idl:41
peripheral::DeviceManager_3_0_2::ZCoordMode
ZCoordMode
Z Coordinate Mode identifier.
Definition: PeripheralDeviceManager.idl:25
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::defaultRange
sensors::NumericSensor_4_0_3 Range defaultRange
Default sensor range (numeric sensors only)
Definition: PeripheralDeviceManager.idl:52
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::identifier
string identifier
Device type identifier.
Definition: PeripheralDeviceManager.idl:50
idl
Basic IDL definitions.
Definition: Event.idl:10
peripheral::DeviceManager_3_0_2::MetaData::oneWirePortCount
int oneWirePortCount
Number of 1-wire ports.
Definition: PeripheralDeviceManager.idl:42
peripheral::DeviceManager_3_0_2::allPackages
vector< PackageInfo_2_0_1 > allPackages
New list of discovered packages after change.
Definition: PeripheralDeviceManager.idl:112
peripheral::DeviceManager_3_0_2::allDevices
vector< Device_3_0_2 > allDevices
New list of discovered devices after change.
Definition: PeripheralDeviceManager.idl:71
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::type
sensors::Sensor_4_0_3 TypeSpec type
Device (sensor) type.
Definition: PeripheralDeviceManager.idl:48
peripheral::DeviceManager_3_0_2::Statistics::cSumErrCnt
int cSumErrCnt
CRC / checksum error counter.
Definition: PeripheralDeviceManager.idl:122
peripheral::DeviceManager_3_0_2::state
DeviceFirmwareUpdateState state
Update state.
Definition: PeripheralDeviceManager.idl:98
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::isActuator
boolean isActuator
Is actuator or not.
Definition: PeripheralDeviceManager.idl:49
sensors::NumericSensor_4_0_3::Thresholds
Numeric sensor thresholds.
Definition: NumericSensor.idl:111
sensors::Sensor_4_0_3
Sensor interface
Definition: Sensor.idl:15
portsmodel
Ports.
Definition: Port.idl:15
peripheral::DeviceSlot_2_0_3
Peripheral Device Slot.
Definition: PeripheralDeviceSlot.idl:60
peripheral::DeviceManager_3_0_2::RACKUNITS
Z coordinate of slot settings is in rack units.
Definition: PeripheralDeviceManager.idl:26
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::defaultDecDigits
int defaultDecDigits
Default sensor precision (numeric sensors only)
Definition: PeripheralDeviceManager.idl:53
sensors
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
peripheral::DeviceManager_3_0_2::position
vector< PosElement > position
Device position in the chain.
Definition: PeripheralDeviceManager.idl:83
sensors::Sensor_4_0_3::TypeSpec
Complete sensor type specification.
Definition: Sensor.idl:160
portsmodel::PortFuse
Interface describing a controllable fuse for a device port.
Definition: PortFuse.idl:17
peripheral::DeviceManager_3_0_2::DeviceTypeInfo
Peripheral device type info.
Definition: PeripheralDeviceManager.idl:47
peripheral::DeviceManager_3_0_2::Settings::autoManageNewDevices
boolean autoManageNewDevices
Automatically manage newly detected devices.
Definition: PeripheralDeviceManager.idl:33
sensors::NumericSensor_4_0_3
A sensor with numeric readings.
Definition: NumericSensor.idl:17
peripheral::DeviceManager_3_0_2::Settings::maxActivePoweredDryContacts
int maxActivePoweredDryContacts
The maximum number of concurrently active powered dry contacts.
Definition: PeripheralDeviceManager.idl:37
peripheral::DeviceManager_3_0_2::Settings
peripheral DeviceManager&#39;s s settings
Definition: PeripheralDeviceManager.idl:31
peripheral::DeviceManager_3_0_2::Settings::deviceAltitude
float deviceAltitude
Altitude of device in meters.
Definition: PeripheralDeviceManager.idl:34
peripheral::DeviceManager_3_0_2::serial
string serial
Serial number of device.
Definition: PeripheralDeviceManager.idl:97
peripheral::DeviceManager_3_0_2::Settings::defaultThresholdsMap
map< string, sensors::NumericSensor_4_0_3.Thresholds > defaultThresholdsMap
Default thresholds by peripheral device type.
Definition: PeripheralDeviceManager.idl:36
peripheral::DeviceManager_3_0_2::FirmwareUpdateState::remaining
int remaining
Number of peripheral devices that are still pending to be updated.
Definition: PeripheralDeviceManager.idl:59
peripheral::DeviceManager_3_0_2
Peripheral Device Manager.
Definition: PeripheralDeviceManager.idl:20