|  | 
|  | Alarm (const DurationKey &key, const Duration &low_water, const Duration &high_water, bool enabled=true) | 
|  | Constructor. 
 | 
|  | Alarm (uint16_t family, uint8_t query_type, uint8_t response_type, const std::string &start_event_label, const std::string &stop_event_label, dhcp::SubnetID subnet_id, const Duration &low_water, const Duration &high_water, bool enabled=true) | 
|  | Constructor. 
 | 
| virtual | ~Alarm ()=default | 
|  | Destructor. 
 | 
| bool | checkSample (const Duration &sample, const Duration &report_interval) | 
|  | Checks a duration against the high and low water thresholds and calls the appropriate event handler. 
 | 
| void | clear () | 
|  | Sets the alarm back to the CLEAR state. 
 | 
| void | disable () | 
|  | Disables the alarm by setting the state to DISABLED. 
 | 
| Duration | getHighWater () const | 
|  | Get the high water threshold. 
 | 
| Timestamp | getLastHighWaterReport () | 
|  | Get the timestamp of the last high water report. 
 | 
| Duration | getLowWater () const | 
|  | Get the low water threshold. 
 | 
| State | getState () | 
|  | Get the alarm's state. 
 | 
| Timestamp | getStosTime () | 
|  | Get the time the current state began. 
 | 
| void | setHighWater (const Duration &high_water) | 
|  | Set the high water threshold. 
 | 
| void | setLastHighWaterReport (const Timestamp ×tamp=dhcp::PktEvent::now()) | 
|  | Set the timestamp of the last high water report. 
 | 
| void | setLowWater (const Duration &low_water) | 
|  | Set the low water threshold. 
 | 
| void | setState (State state) | 
|  | Sets the alarm state. 
 | 
|  | DurationKey (uint16_t family, uint8_t query_type, uint8_t response_type, const std::string &start_event_label, const std::string &stop_event_label, dhcp::SubnetID subnet_id) | 
|  | Constructor. 
 | 
| virtual | ~DurationKey ()=default | 
|  | Destructor. 
 | 
| uint16_t | getFamily () | 
|  | Get protocol family. 
 | 
| std::string | getLabel () const | 
|  | Get a composite label of the member values with text message types. 
 | 
| uint8_t | getQueryType () const | 
|  | Get the query packet type. 
 | 
| uint8_t | getResponseType () const | 
|  | Get the response packet type. 
 | 
| std::string | getStartEventLabel () const | 
|  | Get the start event label. 
 | 
| std::string | getStatName (const std::string &value_name) const | 
|  | Get the StatsMgr formatted compatible name. 
 | 
| std::string | getStopEventLabel () const | 
|  | Get the end event label. 
 | 
| dhcp::SubnetID | getSubnetId () const | 
|  | Get the subnet id. 
 | 
| bool | operator!= (const DurationKey &other) const | 
|  | Inequality operator. 
 | 
| bool | operator< (const DurationKey &other) const | 
|  | Less than operator. 
 | 
| bool | operator== (const DurationKey &other) const | 
|  | Equality operator. 
 | 
| void | setSubnetId (dhcp::SubnetID subnet_id) | 
|  | Set the subnet id. 
 | 
| virtual data::ElementPtr | toElement () const | 
|  | Renders the the duration key as an Element. 
 | 
| virtual | ~CfgToElement () | 
|  | Destructor. 
 | 
|  | 
| static std::string | getMessageTypeLabel (uint16_t family, uint16_t msg_type) | 
|  | Get a label for a family-specific message type (e.g. 
 | 
| static void | validateMessagePair (uint16_t family, uint8_t query_type, uint8_t response_type) | 
|  | Validates that a query and response message type pair is sane. 
 | 
| uint16_t | family_ | 
|  | Protocol family AF_INET or AF_INET6. 
 | 
| uint8_t | query_type_ | 
|  | Query message type (e.g. DHCPDISCOVER, DHCP6_SOLICIT). 
 | 
| uint8_t | response_type_ | 
|  | Response message type (e.g. DHCPOFFER, DHCP6_ADVERTISE). 
 | 
| std::string | start_event_label_ | 
|  | Label of the start event which begins the duration. 
 | 
| std::string | stop_event_label_ | 
|  | Label of the end event which ends the duration. 
 | 
| isc::dhcp::SubnetID | subnet_id_ | 
|  | Subnet ID of the subnet selected during query fulfillment. 
 | 
Defines an alarm for a duration. 
Definition at line 20 of file alarm.h.
      
        
          | bool isc::perfmon::Alarm::checkSample | ( | const Duration & | sample, | 
        
          |  |  | const Duration & | report_interval ) | 
      
 
Checks a duration against the high and low water thresholds and calls the appropriate event handler. 
- If the sample is less than the low water threshold: If the state is TRIGGERED, transition to CLEAR and return true otherwise return false.
- If the sample is greater than high water threshold: If the state is not TRIGGERED, transition to TRIGGERED
- If the state is TRIGGERED and the last report time either not set or is more than report interval old, update the last report time to current time and return true.
- Otherwise return false.
- Parameters
- 
  
    | sample | duration to test against the thresholds. |  | report_interval | amount of time that must elapse between high water reports. |  
 
- Returns
- True if alarm state should be reported.
- Exceptions
- 
  
  
Definition at line 96 of file alarm.cc.
References CLEAR, DISABLED, isc::dhcp::PktEvent::EMPTY_TIME(), isc_throw, isc::dhcp::PktEvent::now(), setState(), and TRIGGERED.
 
 
      
        
          | void isc::perfmon::Alarm::setState | ( | State | state | ) |  |