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

Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
pdumodel::PowerMeterController Interface Reference

Power Meter Controller (PMC) interface. More...

`import <PowerMeterController.idl;`

## Classes
struct | PanelCreatedEvent
| Event: A panel was created. More...
struct | PanelDeletedEvent
| Event:: A panel was deleted. More...
struct | PowerMeterCreatedEvent
| Event: A power meter or panel was created. More...
struct | PowerMeterDeletedEvent
| Event: A power meter was deleted. More...
struct | ScanResult
| Meter board scan result. More...

## Public Member Functions
int | scanMeterBoard (in int powerMeterId, out ScanResult result)
| Scan for presence and configuration of a meter board.
map< int, PowerMeter > | getPowerMeters ()
| Retrieve the list of power meters and panels.
int | createPowerMeter (out PowerMeter powerMeter, in PowerMeter::Config config, in PowerMeter::Settings settings)
| Create a new standalone power meter (no panel).
int | createPanel (out Panel panel, in PowerMeter::Config config, in PowerMeter::Settings powerMeterSettings, in Panel::PanelSettings panelSettings)
| Create a new panel.
int | deletePowerMeter (in int powerMeterId)
| Delete a panel or power meter.

## Public Attributes
constant int | ERR_INVALID_PARAM = 1
| Invalid parameters.
constant int | ERR_METER_BOARD_BUSY = 2
| A power meter with the given ID already exists.

## Detailed Description

Power Meter Controller (PMC) interface.

Definition at line 20 of file PowerMeterController.idl.

## Member Function Documentation

## ◆ createPanel()

int pdumodel::PowerMeterController::createPanel | ( | out Panel | panel,
|  | in PowerMeter::Config | config,
|  | in PowerMeter::Settings | powerMeterSettings,
|  | in Panel::PanelSettings | panelSettings )

Create a new panel.

Parameters

  panel | Result: Newly created instance
  config | New power meter config
  powerMeterSettings | Power meter settings
  panelSettings | Panel settings

Returns
  0 if OK
  1 if any parameters are invalid
  2 if a power meter with the given ID already exists

## ◆ createPowerMeter()

int pdumodel::PowerMeterController::createPowerMeter | ( | out PowerMeter | powerMeter,
|  | in PowerMeter::Config | config,
|  | in PowerMeter::Settings | settings )

Create a new standalone power meter (no panel).

Parameters

  powerMeter | Result: Newly created instance
  config | New power meter config
  settings | Power meter settings

Returns
  0 if OK
  1 if any parameters are invalid
  2 if a power meter with the given ID already exists

## ◆ deletePowerMeter()

int pdumodel::PowerMeterController::deletePowerMeter | ( | in int | powerMeterId | ) |

Delete a panel or power meter.

Parameters

  powerMeterId | Power meter ID

Returns
  0 if OK
  1 if the power meter ID is invalid

## ◆ getPowerMeters()

map< int, PowerMeter > pdumodel::PowerMeterController::getPowerMeters | ( |  | ) |

Retrieve the list of power meters and panels.

Returns
  Power meter and panel instances, indexed by power meter ID

## ◆ scanMeterBoard()

int pdumodel::PowerMeterController::scanMeterBoard | ( | in int | powerMeterId,
|  | out ScanResult | result )

Scan for presence and configuration of a meter board.

Parameters

  powerMeterId | ID of meter board to be scanned
  result | Detected meter board properties

Returns
  0 if OK
  1 if the meter board ID is out of range

## Member Data Documentation

## ◆ ERR_INVALID_PARAM

constant int pdumodel::PowerMeterController::ERR_INVALID_PARAM = 1

Invalid parameters.

Definition at line 22 of file PowerMeterController.idl.

## ◆ ERR_METER_BOARD_BUSY

constant int pdumodel::PowerMeterController::ERR_METER_BOARD_BUSY = 2

A power meter with the given ID already exists.

Definition at line 23 of file PowerMeterController.idl.

The documentation for this interface was generated from the following file:

- PowerMeterController.idl