Class: SnmpTrapMonitoring
- Inherits:
-
Object
- Object
- SnmpTrapMonitoring
- Defined in:
- lib/monitor/server/snmp/snmptrap_monitoring.rb
Instance Method Summary collapse
- #active? ⇒ Boolean
- #get_snmptrap_ref ⇒ Object
- #get_state ⇒ Object
-
#initialize(st, snmptp_ref, sev) ⇒ SnmpTrapMonitoring
constructor
A new instance of SnmpTrapMonitoring.
- #raw_severity ⇒ Object
- #severity ⇒ Object
Constructor Details
#initialize(st, snmptp_ref, sev) ⇒ SnmpTrapMonitoring
Returns a new instance of SnmpTrapMonitoring.
3 4 5 6 7 8 |
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 3 def initialize (st, snmptp_ref, sev) @state=st @snmptrap_ref=snmptp_ref #index of $status @severity=sev end |
Instance Method Details
#active? ⇒ Boolean
18 19 20 |
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 18 def active?() return @state==1 end |
#get_snmptrap_ref ⇒ Object
10 11 12 |
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 10 def get_snmptrap_ref() return @snmptrap_ref end |
#get_state ⇒ Object
14 15 16 |
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 14 def get_state() return @state end |
#raw_severity ⇒ Object
22 23 24 |
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 22 def raw_severity() return @severity end |
#severity ⇒ Object
26 27 28 29 30 31 |
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 26 def severity() if @severity > 0 return $status[@severity-1] end return nil end |