Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This object provides information about the device hardware, firmware, and features.

devicestatus IDL

Code Block
languagejs
interface devicestatus {
    Promise<BVNinformationList> getBVNPipelines();
    Promise<BVNinformationList> getBVNComponents();
    Promise<Powerinformation> getPowerStatus();
    Promise<ExtensionsinformationList> getExtensions();
    Promise<POEinformation> getPOEStatus();
};

interface Powerinformation {
    attribute String source;
    attribute String switch_mode;
    attribute String battery;
    attribute int soc_percent;
};

interface BVNinformation {
    attribute String name;
    attribute int index;
    attribute BVNRegisterList registers;
    attribute BVNPipelineList items;                //@Optional
};

interface BVNRegister {
    attribute String name;
    attribute int offset;
};

interface BVNPipeline {
    attribute String name;
};

interface Extensionsinformation {
    attribute String name;
    attribute int size;            //@Optional
    attribute String id;
};

interface POEpowerinformation {
    attribute float value;
    attribute String units;
};

interface POEinformation {
    attribute String status;
    attribute POEpowerinformation power;     //@Optional
};                                                                                                  
Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px



Object Creation

To create a devicestatus object, load the @brightsign/status module using the require() method. 

Code Block
languagejs
var DeviceStatusClass = require("@brightsign/devicestatus");
var devicestatus = new DeviceStatusClass();

devicestatus

getPowerStatus()
Code Block
languagejs
Promise<Powerinformation> getPowerStatus()

Returns the device battery status as "charging", "discharging", "complete", "absent", or "fault".

getExtensions()
Code Block
languagejs
Promise<ExtensionsinformationList> getExtensions()

Returns a promise which yields an object containing an extensions array with each element containing at least a name field. Other fields may also be present, but should not be relied on.

getPOEStatus()
Code Block
languagejs
Promise<POEinformation> getPOEStatus()

Returns information about whether PoE (Power over Ethernet) network is supported, available, and/or active on a device.

Powerinformation

  • [String] source string:  possible  Possible values are "battery", "Ethernet", or "AC"

  • [String] switch_mode string:  returns Returns "soft" or "hard"

  • [String] battery string:  possible Possible values are "charging", "discharging", "complete", "absent", or "fault"

  • [int] soc_percent int:  the The state of charge of the battery in percent from 0 (empty) to 100 (full)

Extensionsinformation

  • [String] name string:  the The name of the extension

  • [size int] size: some Some extensions return a size and others do not. Players that have AC3 or E-AC3 licenses installed will report those as extensions but no size will be included.

POEpowerinformation

  • [value float] value:  returns Returns the "Power value"

  • [String] units string: returns the "Power value" units ("W")

POEinformation

  • [String] status string:  the  The status string can be "active", "standby", or "inactive"

  • [power POEpowerinformation] power: See See POEpowerinformation above for details.

Example

To get the power status of a device:

Code Block
languagejs
var DeviceStatusClass = require("@brightsign/devicestatus");
var devicestatus = new DeviceStatusClass();

devicestatus.getPowerStatus().then(
        function(data){
                console.log(JSON.stringify(data));
        })
    .catch(
        function(data){
                console.log("Error: " + data);
        })