Package org.onosproject.alarm
Interface DeviceAlarmConfig
-
- All Superinterfaces:
Behaviour
,HandlerBehaviour
public interface DeviceAlarmConfig extends HandlerBehaviour
Abstraction of a device behaviour capable of translating a list of alarms from a device. Also provides a method to configure the address where to send the alarms/traps/notifications.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
configureDevice(IpAddress address, int port, String protocol)
Configures the device to send alarms to a particular Ip and port combination.<T> Set<Alarm>
translateAlarms(List<T> unparsedAlarms)
Returns the list of translated alarms from device-specific representation to ONOS alarms.-
Methods inherited from interface org.onosproject.net.driver.HandlerBehaviour
handler, setHandler
-
-
-
-
Method Detail
-
configureDevice
boolean configureDevice(IpAddress address, int port, String protocol)
Configures the device to send alarms to a particular Ip and port combination.- Parameters:
address
- address to wich the device should send alarmsport
- port on which the controller is listeningprotocol
- tcp or udp- Returns:
- boolean true if the device was properly configured
-
translateAlarms
<T> Set<Alarm> translateAlarms(List<T> unparsedAlarms)
Returns the list of translated alarms from device-specific representation to ONOS alarms.- Type Parameters:
T
- type of object given from the device- Parameters:
unparsedAlarms
- alarms arrived from the device depending on protocol- Returns:
- list of alarms consumed from the device
-
-