Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
Ade.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2011 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PDUMODEL_ADE_IDL__
7#define __PDUMODEL_ADE_IDL__
8
9/**
10 * PDU Model
11 */
12module pdumodel {
13
14 /** Interface for ADE chips directly connected to main controller */
15 interface Ade {
16
17 /** ADE metadata */
18 structure MetaData {
19 string adeType; ///< ADE chip model
20 int channels; ///< Number of channels
21 double currentDivider; ///< Divider for converting raw readings to Amperes
22 double voltageDivider; ///< Divider for converting raw readings to Volts
23 double energyDivider; ///< Divider for converting raw readings to Wh/VAh
24 };
25
26 /** Raw sample data for a single channel */
27 structure Sample {
28 long vrms; ///< RMS voltage
29 long irms; ///< RMS current
30 long watt; ///< Active power
31 long va; ///< Apparent power
32 long wh; ///< Active energy (for this sample)
33 long vah; ///< Apparent energy (for this sample)
34 };
35
36 /** Map of ADE register values */
37 typedef map<string, long> RegisterMap;
38
39 /**
40 * Retrieve the ADE metadata.
41 *
42 * @return ADE metadata
43 */
45
46 /**
47 * Retrieve the latest raw samples.
48 *
49 * @return Vector of samples, one for each channel
50 */
51 vector<Sample> getLatestSample();
52
53 /**
54 * Retrieve the values of all supported calibration registers.
55 *
56 * @return Map of calibration register values
57 */
59
60 /**
61 * Set new values for some or all calibration registers.
62 *
63 * @note This command is only available during manufacturing!
64 *
65 * @param regs Map of new calibration register values
66 *
67 * @return 0 if OK
68 * @return 1 if any parameters are invalid
69 * @return 2 if the device is not in factory configuration mode
70 */
72
73 };
74
75}
76
77#endif
Interface for ADE chips directly connected to main controller.
Definition: Ade.idl:15
MetaData getMetaData()
Retrieve the ADE metadata.
map< string, long > RegisterMap
Map of ADE register values.
Definition: Ade.idl:37
int setCalibrationData(in RegisterMap regs)
Set new values for some or all calibration registers.
RegisterMap getCalibrationData()
Retrieve the values of all supported calibration registers.
vector< Sample > getLatestSample()
Retrieve the latest raw samples.
PDU Model.
Definition: Ade.idl:12
ADE metadata.
Definition: Ade.idl:18
int channels
Number of channels.
Definition: Ade.idl:20
double currentDivider
Divider for converting raw readings to Amperes.
Definition: Ade.idl:21
double voltageDivider
Divider for converting raw readings to Volts.
Definition: Ade.idl:22
string adeType
ADE chip model.
Definition: Ade.idl:19
double energyDivider
Divider for converting raw readings to Wh/VAh.
Definition: Ade.idl:23
Raw sample data for a single channel.
Definition: Ade.idl:27
long va
Apparent power.
Definition: Ade.idl:31
long irms
RMS current.
Definition: Ade.idl:29
long vrms
RMS voltage.
Definition: Ade.idl:28
long wh
Active energy (for this sample)
Definition: Ade.idl:32
long vah
Apparent energy (for this sample)
Definition: Ade.idl:33
long watt
Active power.
Definition: Ade.idl:30