Class: Istat::Frames::MeasurementRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/istat/frames/measurement.rb

Constant Summary collapse

RID =
:rid
CPU =
:c
NETWORK =
:n
MEMORY =
:m
LOAD =
:lo
TEMP =

qnap only

:t
FAN =
:f
UPTIME =
:u
DISK =
:d

Constants inherited from Base

Base::DOCTYPE

Instance Method Summary collapse

Methods inherited from Base

#to_s

Constructor Details

#initialize(rid, since = -1)) ⇒ MeasurementRequest

create a new request based on the requested id. The default is to request only the last values (since -1)

Parameters:

  • rid (Integer)

    the request identifier (increases)

  • since (Integer) (defaults to: -1))

    the since field (-1 for last or -2 all)



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/istat/frames/measurement.rb', line 37

def initialize(rid, since = -1)
  super create([RID,     rid],
               [CPU,     since],
               [NETWORK, since],
               [MEMORY,  since],
               [LOAD,    since],
               [TEMP,    since],
               [FAN,     since],
               [UPTIME,  since],
               [DISK,    since])
end