Code Examples
A repository of 155 code examples for BeepBeep
misc.temperature.MonitoringEvent Class Referenceabstract

Parent class of all the input events in this example. More...

Classes

class  PowerEvent
 Sub-class of monitoring event containing a voltage reading.
 
class  TemperatureEvent
 Sub-class of monitoring event containing a temperature reading.
 

Public Member Functions

 MonitoringEvent (int rack_id)
 Creates a new monitoring event. More...
 
int getRackID ()
 Gets the event's rack ID. More...
 
float getTimestamp ()
 Gets the event's timestamp. More...
 

Detailed Description

Parent class of all the input events in this example.

Definition at line 23 of file MonitoringEvent.java.

Constructor & Destructor Documentation

◆ MonitoringEvent()

misc.temperature.MonitoringEvent.MonitoringEvent ( int  rack_id)

Creates a new monitoring event.

Parameters
rack_idThe ID of the rack where the event occurs

Definition at line 41 of file MonitoringEvent.java.

42  {
43  super();
44  m_rackId = rack_id;
45  m_timestamp = (float) System.currentTimeMillis() / 1000f;
46  }

Member Function Documentation

◆ getRackID()

int misc.temperature.MonitoringEvent.getRackID ( )

Gets the event's rack ID.

Returns
The rack ID

Definition at line 52 of file MonitoringEvent.java.

53  {
54  return m_rackId;
55  }

◆ getTimestamp()

float misc.temperature.MonitoringEvent.getTimestamp ( )

Gets the event's timestamp.

Returns
The timestamp, in seconds

Definition at line 61 of file MonitoringEvent.java.

62  {
63  return m_timestamp;
64  }

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