Loading...
Searching...
No Matches
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 <SensorHub.idl>
#include <PeripheralDevicePackage.idl>
#include <PortFuse.idl>
#include <NumericSensor.idl>
#include <Sensor.idl>
#include <UserEvent.idl>
#include <GatewaySensorManager.idl>
/** Peripheral Devices */
module peripheral {
/** Peripheral Device Manager */
interface DeviceManager {
constant int ERR_INVALID_PARAMS = 1; ///< Invalid parameters
constant int ERR_NOT_ON_SECONDARY = 2; ///< Unsupported on secondary instance
/** 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.Thresholds> defaultThresholdsMap; ///< Default thresholds by peripheral device type
int maxActivePoweredDryContacts; ///< The maximum number of concurrently active powered dry contacts
boolean muteOtherAccessControlUnit; ///< Mute other access control unit (door handle) enabled
};
/** 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.TypeSpec type; ///< Device (sensor) type
boolean isActuator; ///< Is actuator or not
string identifier; ///< Device type identifier
string name; ///< Device type display name
sensors.NumericSensor.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 extends idl.Event {
vector<Device> devices; ///< Affected devices
vector<Device> allDevices; ///< New list of discovered devices after change
};
/** Event: A peripheral device was added */
valueobject DeviceAddedEvent extends DeviceEvent { };
/** Event: A peripheral device was removed */
valueobject DeviceRemovedEvent extends DeviceEvent { };
/** 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 extends idl.Event {
vector<PackageInfo> packageInfos; ///< Information about affected packages
vector<PackageInfo> allPackages; ///< New list of discovered packages after change
};
/** Event: A peripheral device package was added */
valueobject PackageAddedEvent extends PackageEvent { };
/** Event: A peripheral device package was removed */
valueobject PackageRemovedEvent extends PackageEvent { };
/** Peripheral device statistics */
structure Statistics {
int cSumErrCnt; ///< CRC / checksum error counter
int fuseTripCnt; ///< external ports fuse trip counter
};
/**
* Get the list of peripheral device slots.
*
* @return List of peripheral device slots
*/
vector<DeviceSlot> getDeviceSlots();
/**
* Get a DeviceSlot by its index
*
* @param idx index of the slot to get (0-based)
* @return the requested slot
*/
DeviceSlot getDeviceSlot(in int idx);
/**
* Get the list of sensor hubs.
*
* @return List of sensor hubs at ports of requested type
*/
vector<SensorHub> getSensorHubs();
/**
* Get the list of currently attached peripheral devices
*
* @return List of all discovered peripheral devices
*/
vector<Device> getDiscoveredDevices();
/**
* Get the list of currently attached peripheral device packages
*
* @return List of all discovered peripheral device packages
*/
vector<PackageInfo> 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 1 if any parameters are invalid
* @return 2 if this is a secondary instance; use primary to set settings
*/
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> getDiscoveredPackages();
/**
* Get the fuse for the sensor port
*
* @return A fuse instance, if available
*/
portsmodel.PortFuse getPortFuse();
/**
* Get gateway sensors configuration manager
*
* @return A GatewaySensorManager instance
*/
GatewaySensorManager getGatewaySensorManager();
};
}
#endif /* !__PERIPHERAL_DEVICE_MANAGER_IDL__ */
peripheral::DeviceManager
Peripheral Device Manager.
Definition PeripheralDeviceManager.idl:22
peripheral::DeviceManager::getDiscoveredPackageInfos
vector< PackageInfo > getDiscoveredPackageInfos()
Get the list of currently attached peripheral device packages.
peripheral::DeviceManager::getSettings
Settings getSettings()
Retrieve the peripheral DeviceManager's settings.
peripheral::DeviceManager::getMetaData
MetaData getMetaData()
Retreive the Peripheral DeviceManager's metadata.
peripheral::DeviceManager::getStatistics
Statistics getStatistics()
Retrieve statistics.
peripheral::DeviceManager::getDeviceSlot
DeviceSlot getDeviceSlot(in int idx)
Get a DeviceSlot by its index.
peripheral::DeviceManager::getPortFuse
portsmodel::PortFuse getPortFuse()
Get the fuse for the sensor port.
peripheral::DeviceManager::getDiscoveredPackages
vector< Package > getDiscoveredPackages()
Get the list of currently attached peripheral device packages.
peripheral::DeviceManager::getDeviceSlots
vector< DeviceSlot > getDeviceSlots()
Get the list of peripheral device slots.
peripheral::DeviceManager::getDiscoveredDevices
vector< Device > getDiscoveredDevices()
Get the list of currently attached peripheral devices.
peripheral::DeviceManager::getFirmwareUpdateState
FirmwareUpdateState getFirmwareUpdateState()
Return the state of device firmware updates running on devices connected to this device manager.
peripheral::DeviceManager::getSensorHubs
vector< SensorHub > getSensorHubs()
Get the list of sensor hubs.
peripheral::DeviceManager::setSettings
int setSettings(in Settings settings)
Change the peripheral DeviceManager's settings.
peripheral::DeviceManager::DeviceFirmwareUpdateState
DeviceFirmwareUpdateState
Enumeration: State of device firmware update.
Definition PeripheralDeviceManager.idl:91
peripheral::DeviceManager::UPDATE_STARTED
@ UPDATE_STARTED
Update is running.
Definition PeripheralDeviceManager.idl:92
peripheral::DeviceManager::UPDATE_SUCCESSFUL
@ UPDATE_SUCCESSFUL
Update has finished successfully.
Definition PeripheralDeviceManager.idl:93
peripheral::DeviceManager::ZCoordMode
ZCoordMode
Z Coordinate Mode identifier.
Definition PeripheralDeviceManager.idl:28
peripheral::DeviceManager::RACKUNITS
@ RACKUNITS
Z coordinate of slot settings is in rack units.
Definition PeripheralDeviceManager.idl:29
peripheral::DeviceManager::getGatewaySensorManager
GatewaySensorManager getGatewaySensorManager()
Get gateway sensors configuration manager.
peripheral::DeviceManager::getDeviceTypeInfos
vector< DeviceTypeInfo > getDeviceTypeInfos()
Get the list of all peripheral device type infos.
peripheral::DeviceSlot
Peripheral Device Slot.
Definition PeripheralDeviceSlot.idl:47
peripheral::GatewaySensorManager
Gateway Sensor Configuration Interface.
Definition GatewaySensorManager.idl:20
portsmodel::PortFuse
Interface describing a controllable fuse for a device port.
Definition PortFuse.idl:17
sensors::NumericSensor
A sensor with numeric readings.
Definition NumericSensor.idl:17
sensors::Sensor
Sensor interface
Definition Sensor.idl:15
idl
Basic IDL definitions.
Definition Event.idl:10
peripheral
Peripheral Devices.
Definition GatewaySensorManager.idl:17
portsmodel
Ports.
Definition Port.idl:16
sensors
Sensors Model.
Definition AccumulatingNumericSensor.idl:13
idl::Event
Common base for all events.
Definition Event.idl:13
peripheral::DeviceManager::DeviceAddedEvent
Event: A peripheral device was added.
Definition PeripheralDeviceManager.idl:79
peripheral::DeviceManager::DeviceEvent
Event: A peripheral device was added or removed.
Definition PeripheralDeviceManager.idl:73
peripheral::DeviceManager::DeviceEvent::devices
vector< Device > devices
Affected devices.
Definition PeripheralDeviceManager.idl:74
peripheral::DeviceManager::DeviceEvent::allDevices
vector< Device > allDevices
New list of discovered devices after change.
Definition PeripheralDeviceManager.idl:75
peripheral::DeviceManager::DeviceFirmwareUpdateStateChangedEvent
Event: Firmware update on a device was started or has finished.
Definition PeripheralDeviceManager.idl:98
peripheral::DeviceManager::DeviceFirmwareUpdateStateChangedEvent::newVersion
string newVersion
Firmware version to be updated to.
Definition PeripheralDeviceManager.idl:100
peripheral::DeviceManager::DeviceFirmwareUpdateStateChangedEvent::state
DeviceFirmwareUpdateState state
Update state.
Definition PeripheralDeviceManager.idl:102
peripheral::DeviceManager::DeviceFirmwareUpdateStateChangedEvent::oldVersion
string oldVersion
Firmware version before update.
Definition PeripheralDeviceManager.idl:99
peripheral::DeviceManager::DeviceFirmwareUpdateStateChangedEvent::serial
string serial
Serial number of device.
Definition PeripheralDeviceManager.idl:101
peripheral::DeviceManager::DeviceRemovedEvent
Event: A peripheral device was removed.
Definition PeripheralDeviceManager.idl:82
peripheral::DeviceManager::DeviceTypeInfo
Peripheral device type info.
Definition PeripheralDeviceManager.idl:51
peripheral::DeviceManager::DeviceTypeInfo::isActuator
boolean isActuator
Is actuator or not.
Definition PeripheralDeviceManager.idl:53
peripheral::DeviceManager::DeviceTypeInfo::defaultRange
sensors::NumericSensor Range defaultRange
Default sensor range (numeric sensors only)
Definition PeripheralDeviceManager.idl:56
peripheral::DeviceManager::DeviceTypeInfo::type
sensors::Sensor TypeSpec type
Device (sensor) type.
Definition PeripheralDeviceManager.idl:52
peripheral::DeviceManager::DeviceTypeInfo::defaultDecDigits
int defaultDecDigits
Default sensor precision (numeric sensors only)
Definition PeripheralDeviceManager.idl:57
peripheral::DeviceManager::DeviceTypeInfo::name
string name
Device type display name.
Definition PeripheralDeviceManager.idl:55
peripheral::DeviceManager::DeviceTypeInfo::identifier
string identifier
Device type identifier.
Definition PeripheralDeviceManager.idl:54
peripheral::DeviceManager::FirmwareUpdateStateChangedEvent
Event: Firmware update state has changed This event will be sent to enclose one of more DeviceFirmwar...
Definition PeripheralDeviceManager.idl:109
peripheral::DeviceManager::FirmwareUpdateStateChangedEvent::newState
FirmwareUpdateState newState
New update state.
Definition PeripheralDeviceManager.idl:110
peripheral::DeviceManager::FirmwareUpdateState
Firmware update status.
Definition PeripheralDeviceManager.idl:61
peripheral::DeviceManager::FirmwareUpdateState::remaining
int remaining
Number of peripheral devices that are still pending to be updated.
Definition PeripheralDeviceManager.idl:63
peripheral::DeviceManager::FirmwareUpdateState::active
boolean active
true if any peripheral device is currently updated
Definition PeripheralDeviceManager.idl:62
peripheral::DeviceManager::MetaData
Peripheral DeviceManager's metadata.
Definition PeripheralDeviceManager.idl:45
peripheral::DeviceManager::MetaData::onboardDeviceCount
int onboardDeviceCount
Number of onboard peripheral devices.
Definition PeripheralDeviceManager.idl:47
peripheral::DeviceManager::MetaData::oneWirePortCount
int oneWirePortCount
Number of 1-wire ports.
Definition PeripheralDeviceManager.idl:46
peripheral::DeviceManager::PackageAddedEvent
Event: A peripheral device package was added.
Definition PeripheralDeviceManager.idl:120
peripheral::DeviceManager::PackageEvent
Event: A peripheral device package was added or removed.
Definition PeripheralDeviceManager.idl:114
peripheral::DeviceManager::PackageEvent::packageInfos
vector< PackageInfo > packageInfos
Information about affected packages.
Definition PeripheralDeviceManager.idl:115
peripheral::DeviceManager::PackageEvent::allPackages
vector< PackageInfo > allPackages
New list of discovered packages after change.
Definition PeripheralDeviceManager.idl:116
peripheral::DeviceManager::PackageRemovedEvent
Event: A peripheral device package was removed.
Definition PeripheralDeviceManager.idl:122
peripheral::DeviceManager::SettingsChangedEvent
Event: Peripheral device manager's settings have been changed.
Definition PeripheralDeviceManager.idl:67
peripheral::DeviceManager::SettingsChangedEvent::newSettings
Settings newSettings
Settings after change.
Definition PeripheralDeviceManager.idl:69
peripheral::DeviceManager::SettingsChangedEvent::oldSettings
Settings oldSettings
Settings before change.
Definition PeripheralDeviceManager.idl:68
peripheral::DeviceManager::Settings
peripheral DeviceManager's s settings
Definition PeripheralDeviceManager.idl:34
peripheral::DeviceManager::Settings::presenceDetectionTimeout
int presenceDetectionTimeout
Timeout for presence detection (sec)
Definition PeripheralDeviceManager.idl:38
peripheral::DeviceManager::Settings::defaultThresholdsMap
map< string, sensors::NumericSensor.Thresholds > defaultThresholdsMap
Default thresholds by peripheral device type.
Definition PeripheralDeviceManager.idl:39
peripheral::DeviceManager::Settings::deviceAltitude
float deviceAltitude
Altitude of device in meters.
Definition PeripheralDeviceManager.idl:37
peripheral::DeviceManager::Settings::zCoordMode
ZCoordMode zCoordMode
Z coordinate semantics.
Definition PeripheralDeviceManager.idl:35
peripheral::DeviceManager::Settings::muteOtherAccessControlUnit
boolean muteOtherAccessControlUnit
Mute other access control unit (door handle) enabled.
Definition PeripheralDeviceManager.idl:41
peripheral::DeviceManager::Settings::autoManageNewDevices
boolean autoManageNewDevices
Automatically manage newly detected devices.
Definition PeripheralDeviceManager.idl:36
peripheral::DeviceManager::Settings::maxActivePoweredDryContacts
int maxActivePoweredDryContacts
The maximum number of concurrently active powered dry contacts.
Definition PeripheralDeviceManager.idl:40
peripheral::DeviceManager::Statistics
Peripheral device statistics.
Definition PeripheralDeviceManager.idl:125
peripheral::DeviceManager::Statistics::fuseTripCnt
int fuseTripCnt
external ports fuse trip counter
Definition PeripheralDeviceManager.idl:127
peripheral::DeviceManager::Statistics::cSumErrCnt
int cSumErrCnt
CRC / checksum error counter.
Definition PeripheralDeviceManager.idl:126
peripheral::DeviceManager::UnknownDeviceAttachedEvent
Event: An unknown device was attached.
Definition PeripheralDeviceManager.idl:85
peripheral::DeviceManager::UnknownDeviceAttachedEvent::romCode
string romCode
Device ROM code.
Definition PeripheralDeviceManager.idl:86
peripheral::DeviceManager::UnknownDeviceAttachedEvent::position
vector< PosElement > position
Device position in the chain.
Definition PeripheralDeviceManager.idl:87
sensors::NumericSensor::Range
Range of possible sensor readings.
Definition NumericSensor.idl:24
sensors::NumericSensor::Thresholds
Numeric sensor thresholds.
Definition NumericSensor.idl:111
sensors::Sensor::TypeSpec
Complete sensor type specification.
Definition Sensor.idl:177