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 */
52
53 /**
54 * Retrieve the unit settings.
55 *
56 * @return %Unit settings
57 */
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 */
90
91 };
92
93}
94
95#endif
Unit interface.
Definition: Unit.idl:17
Orientation getDisplayOrientation()
Retrieve the current orientation of the display.
MetaData getMetaData()
Retrieve the unit metadata.
void identify(in int seconds)
Display something distictive to identify the unit.
void muteBuzzer(in boolean mute)
Mute buzzer, turn of all audible alarms.
Orientation
Display orientation.
Definition: Unit.idl:22
@ NORMAL
Normal orientation.
Definition: Unit.idl:23
int setSettings(in Settings settings)
Change the unit settings.
Settings getSettings()
Retrieve the unit settings.
PDU Model.
Definition: Ade.idl:12
Event: Unit identification requested.
Definition: Unit.idl:42
int duration
Number of seconds the identification should be displayed.
Definition: Unit.idl:43
Unit metadata
Definition: Unit.idl:28
vector< Orientation > supportedDisplayOrientations
Supported display orientations.
Definition: Unit.idl:30
boolean hasOrientationSensor
true if a tilt sensor is present
Definition: Unit.idl:29
Unit settings
Definition: Unit.idl:35
boolean autoDisplayOrientation
true for automatic orientation control
Definition: Unit.idl:37
boolean buzzerMuted
true if the buzzer is muted
Definition: Unit.idl:36
Orientation displayOrientation
Manually configured orientation
Definition: Unit.idl:38