Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
PeripheralDevicePackage.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2013 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PERIPHERAL_DEVICE_PACKAGE_IDL__
7#define __PERIPHERAL_DEVICE_PACKAGE_IDL__
8
9#include <PeripheralDeviceSlot.idl>
10
11/** Peripheral Devices */
12module peripheral {
13 /** Peripheral device package information */
14 structure PackageInfo {
15 enumeration State {
16 NORMAL, ///< Device package is in normal operation
17 FW_UPDATE, ///< Device package's firmware is being updated
18 INTERNAL_ERROR, ///< Device package's internal error flag is set
19 CONFIG_ERROR ///< Device package's internal configuration is invalid
20 };
21
22 structure HardwareInfo {
23 string serial; ///< serial number
24 string packageClass; ///< serial number prefix for current packages
25 string model; ///< like 'DPX-CC2' or 'DX-D2C6'
26 int minDowngradeVersion; ///< minimum downgrade version (or -1)
27 string revision; ///< hardware revision
28 string address; ///< ROM code for 1-wire devices
29 };
30
31 structure FirmwareInfo {
32 structure Version {
33 int majorNumber; ///< firmware version encoded as 'major << 4 | minor'
34 int minorNumber; ///< depreceated, was minor firmware version
35 int bootloaderVersion; ///< device bootloader version
36 };
37
38 time compileDate; ///< Date of firmware compilation (Deprecated: always returns 0)
39 Version version; ///< Firmware version (0.0 if not applicable)
40 time updateDate; ///< Date of device firmware update (Deprecated: always returns 0)
41 string firmwareName; ///< firmware file name
42 };
43
44 State state; ///< The peripheral device package operational state
45 vector<PosElement> position; ///< Position within 1-wire topo
46 HardwareInfo hwInfo; ///< Device package hardware specific information
47 FirmwareInfo fwInfo; ///< Device package firmware specific information
48 };
49
50 interface Package {
51 PackageInfo getPackageInfo();
52 };
53
55
56 constant int SUCCESS = 0;
57 constant int ERR_NOT_SUPPORTED = 1;
58 constant int ERR_OPERATION_FAILED = 2;
59
60 vector<string> getSupportedHandleTypes();
61 vector<string> getSupportedExternalDeviceTypes();
62
63 string getHandleType(in int channel);
64 string getExternalDeviceType(in int channel);
65
66 int setHandleType(in int channel, in string handleType);
67 int setExternalDeviceType(in int channel, in string type);
68
69 /** Event: A handle was opened without being electronically unlocked */
70 valueobject MechanicallyUnlockedEvent extends idl.Event {
71 PackageInfo packageInfo; ///< package info
72 int channel; ///< channel number (zero-based)
73 string doorStateName; ///< name of the door state sensor (if assigned)
74 string doorHandleName; ///< name of the door handle sensor (if assigned)
75 string doorLockName; ///< name of the door lock actuator (if assigned)
76 };
77
78 /** Event: A door was opened without unlocking the door handle */
79 valueobject DoorForcedOpenEvent extends idl.Event {
80 PackageInfo packageInfo; ///< package info
81 int channel; ///< channel number (zero-based)
82 string doorStateName; ///< name of the door state sensor (if assigned)
83 string doorHandleName; ///< name of the door handle sensor (if assigned)
84 string doorLockName; ///< name of the door lock actuator (if assigned)
85 };
86 };
87
89
90 /**
91 * This method outputs the given voltage value or zero if no value is available.
92 * @return 0 or the voltage value in V
93 */
95
96 /** Event: the voltage of this device changed */
97 valueobject VoltageChangedEvent extends idl.Event {
98 double oldVoltage; ///< old voltage
99 double newVoltage; ///< new voltage
100 };
101 };
102}
103
104#endif /* !__PERIPHERAL_DEVICE_PACKAGE_IDL__ */
double getBatteryVoltage()
This method outputs the given voltage value or zero if no value is available.
Basic IDL definitions.
Definition: Event.idl:10
Peripheral Devices.
Common base for all events.
Definition: Event.idl:13
Event: A door was opened without unlocking the door handle.
string doorLockName
name of the door lock actuator (if assigned)
string doorStateName
name of the door state sensor (if assigned)
string doorHandleName
name of the door handle sensor (if assigned)
Event: A handle was opened without being electronically unlocked.
string doorLockName
name of the door lock actuator (if assigned)
string doorStateName
name of the door state sensor (if assigned)
string doorHandleName
name of the door handle sensor (if assigned)
int minorNumber
depreceated, was minor firmware version
int majorNumber
firmware version encoded as 'major << 4 | minor'
time updateDate
Date of device firmware update (Deprecated: always returns 0)
Version version
Firmware version (0.0 if not applicable)
time compileDate
Date of firmware compilation (Deprecated: always returns 0)
int minDowngradeVersion
minimum downgrade version (or -1)
string model
like 'DPX-CC2' or 'DX-D2C6'
string packageClass
serial number prefix for current packages
string address
ROM code for 1-wire devices.
Peripheral device package information.
@ FW_UPDATE
Device package's firmware is being updated.
@ INTERNAL_ERROR
Device package's internal error flag is set.
@ NORMAL
Device package is in normal operation.
vector< PosElement > position
Position within 1-wire topo.
HardwareInfo hwInfo
Device package hardware specific information.
FirmwareInfo fwInfo
Device package firmware specific information.
State state
The peripheral device package operational state.