Legrand / Raritan / Server Technology Xerus™ JSON-RPC API: Unit.idl Source File

Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
Unit.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2010 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PDUMODEL_UNIT_IDL__
7#define __PDUMODEL_UNIT_IDL__
8
9#include <UserEvent.idl>
10
11/**
12 * PDU Model
13 */
14module pdumodel {
15
16 /** Unit interface */
17 interface Unit {
18
19 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
20
21 /** Display orientation */
22 enumeration Orientation {
23 NORMAL, ///< Normal orientation
24 FLIPPED ///< Upside-down
25 };
26
27 /** %Unit metadata */
28 structure MetaData {
29 boolean hasOrientationSensor; ///< \c true if a tilt sensor is present
30 vector<Orientation> supportedDisplayOrientations;
31 ///< Supported display orientations
32 };
33
34 /** %Unit settings */
35 structure Settings {
36 boolean buzzerMuted; ///< \c true if the buzzer is muted
37 boolean autoDisplayOrientation; ///< \c true for automatic orientation control
38 Orientation displayOrientation; ///< \c Manually configured orientation
39 };
40
41 /** Event: %Unit identification requested */
42 valueobject IdentificationStartedEvent extends event.UserEvent {
43 int duration; ///< Number of seconds the identification should be displayed
44 };
45
46 /**
47 * Retrieve the unit metadata.
48 *
49 * @return %Unit metadata
50 */
51 MetaData getMetaData();
52
53 /**
54 * Retrieve the unit settings.
55 *
56 * @return %Unit settings
57 */
58 Settings getSettings();
59
60 /**
61 * Change the unit settings.
62 *
63 * @param settings New unit settings
64 *
65 * @return 0 if OK
66 * @return ERR_INVALID_PARAM if any parameters are invalid
67 */
68 int setSettings(in Settings settings);
69
70 /**
71 * Display something distictive to identify the unit.
72 *
73 * @param seconds Number of seconds to display the identify string
74 */
75 void identify(in int seconds);
76
77 /**
78 * Mute buzzer, turn of all audible alarms.
79 *
80 * @param mute \c true to mute buzzer, \c false for normal mode
81 */
82 void muteBuzzer(in boolean mute);
83
84 /**
85 * Retrieve the current orientation of the display.
86 *
87 * @return Display orientation.
88 */
89 Orientation getDisplayOrientation();
90
91 };
92
93}
94
95#endif
pdumodel::Unit
Unit interface.
Definition Unit.idl:17
pdumodel::Unit::getDisplayOrientation
Orientation getDisplayOrientation()
Retrieve the current orientation of the display.
pdumodel::Unit::getMetaData
MetaData getMetaData()
Retrieve the unit metadata.
pdumodel::Unit::identify
void identify(in int seconds)
Display something distictive to identify the unit.
pdumodel::Unit::muteBuzzer
void muteBuzzer(in boolean mute)
Mute buzzer, turn of all audible alarms.
pdumodel::Unit::Orientation
Orientation
Display orientation.
Definition Unit.idl:22
pdumodel::Unit::NORMAL
@ NORMAL
Normal orientation.
Definition Unit.idl:23
pdumodel::Unit::setSettings
int setSettings(in Settings settings)
Change the unit settings.
pdumodel::Unit::getSettings
Settings getSettings()
Retrieve the unit settings.
pdumodel
PDU Model.
Definition Circuit.idl:16
pdumodel::Unit::IdentificationStartedEvent
Event: Unit identification requested.
Definition Unit.idl:42
pdumodel::Unit::IdentificationStartedEvent::duration
int duration
Number of seconds the identification should be displayed.
Definition Unit.idl:43
pdumodel::Unit::MetaData
Unit metadata
Definition Unit.idl:28
pdumodel::Unit::MetaData::supportedDisplayOrientations
vector< Orientation > supportedDisplayOrientations
Supported display orientations.
Definition Unit.idl:30
pdumodel::Unit::MetaData::hasOrientationSensor
boolean hasOrientationSensor
true if a tilt sensor is present
Definition Unit.idl:29
pdumodel::Unit::Settings
Unit settings
Definition Unit.idl:35
pdumodel::Unit::Settings::autoDisplayOrientation
boolean autoDisplayOrientation
true for automatic orientation control
Definition Unit.idl:37
pdumodel::Unit::Settings::buzzerMuted
boolean buzzerMuted
true if the buzzer is muted
Definition Unit.idl:36
pdumodel::Unit::Settings::displayOrientation
Orientation displayOrientation
Manually configured orientation
Definition Unit.idl:38