Package | twaver |
Class | public class Alarm |
Inheritance | Alarm ![]() ![]() |
Implements | IAlarm |
In TWaver, the alarm object used to present the OSS server side alarm. An alarm means a network problem which is detected by OSS and is created by the server side of OSS. The server may transfer the alarm information to the client side and show it on the network topology view.
TWaver just defines the most general and most often used properties for alarm object. Just remember this alarm object is defined for UI side to use, not for server side or for database storage. The OSS server side should have a more comprehensive alarm object with more business properties. TWaver alarm can be considered a simple version of the server side alarm object.
TWaver alarm is a very lightweight object, you can create thousands of alarms and load into DataBox to show. However, it is always a good idea to load the alarms or elements only when UI need to show it. Using SubNetwork or more lazy-loading mechanism provided by TWaver to make your UI more lighweight, high performance, and elegant. Flex is mostly runs inside the browser. Not like Java Swing or other desktop UI platform, TWaver Flex is not designed to be used in the OSS which needs to show huge volume data. So always avoid load big volume data into TWaver Flex.
All TWaver alarms saved in AlarmBox
, which is an alarm container provided
by ElementBox
. Use elementBox.alarmBox
to access AlarmBox. AlarmBox
manages all alarm objects for this the ElementBox. Each alarm object can be specified
an ElementID property, which indicates where the alarm occured.
Alarm object can be customized to carry more additiona information. Use
setPropertyValue
to create a new property with any object type.
var alarm:Alarm = new Alarm(); box.alarmBox.add(alarm);
See also
Property | Defined By | ||
---|---|---|---|
acked : Boolean
Get the acked status. | Alarm | ||
alarmSeverity : AlarmSeverity
Get the alarm severity value. | Alarm | ||
![]() | children : ICollection [read-only]
Get all children data objects of this data object. | Data | |
![]() | childrenCount : int [read-only]
Get all children total count for this data. | Data | |
cleared : Boolean
Get the alarm cleared status. | Alarm | ||
![]() | clientProperties : ICollection [read-only]
Get a ICollection that contians all client proerty name. | Data | |
elementID : Object [read-only]
Get the element ID this alarm accured. | Alarm | ||
![]() | hasChildren : Boolean [read-only]
Check whether this data has children objects. | Data | |
![]() | icon : String
Get icon value for this data. | Data | |
![]() | id : Object [read-only]
Get the ID value of this data. | Data | |
![]() | name : String
Get name of this data. | Data | |
![]() | parent : IData
Get parent data object. | Data | |
![]() | toolTip : String
Get the tooltip text of this data. | Data |
Method | Defined By | ||
---|---|---|---|
Alarm(alarmID:Object = null, elementID:Object = null, alarmSeverity:AlarmSeverity = null, acked:Boolean = false, cleared:Boolean = false)
Constructor
| Alarm | ||
![]() |
Add a child data object for this data. | Data | |
![]() | addPropertyChangeListener(listener:Function, priority:int = 0, useWeakReference:Boolean = false):void
Add a property change listener to this data to monitoring property
change event. | Data | |
![]() | clearChildren():Boolean
Clear all children from this data. | Data | |
![]() | deserializeXML(serializer:XMLSerializer, xml:XML):void
Deserialize given XML data to data objects. | Data | |
![]() | dispatchPropertyChangeEvent(property:String, oldValue:Object, newValue:Object):Boolean
Dispatch property change event to all installed listeners. | Data | |
![]() | getChildAt(index:int):IData
Get child as specified index location. | Data | |
![]() | getClient(clientProp:String):*
Get specified client property value. | Data | |
![]() | getPropertyValue(property:String):Object
Get specified property value from this data. | Data | |
![]() | hasOwnProperty(name:String):Boolean
Whether this data has specified property. | Data | |
![]() | isDescendantOf(data:IData):Boolean
Check whether this data is a descendant of the specified data object. | Data | |
![]() | isParentOf(data:IData):Boolean
Check whether this data is the parent of specified data. | Data | |
![]() | isRelatedTo(data:IData):Boolean
Check whether this data has descendant relationship with the specified data. | Data | |
![]() | removeChild(child:IData):Boolean
Remove the specified child object. | Data | |
![]() | removePropertyChangeListener(listener:Function):void
Remove the specified property change listener. | Data | |
![]() |
Serialize this data object into XML. | Data | |
![]() |
Set client property for this data. | Data | |
![]() | setPropertyValue(property:String, value:Object):void
Set specified property name value on this data. | Data | |
![]() | toChildren(matchFunction:Function = null):ICollection
Iterate children collection by given callback function. | Data | |
![]() | toString():String [override]
| Data |
acked | property |
acked:Boolean
Get the acked status. True is acknowledged, otherwise false.
public function get acked():Boolean
public function set acked(value:Boolean):void
alarmSeverity | property |
alarmSeverity:AlarmSeverity
Get the alarm severity value. The alarm severity represent the
severe level of this alarm. All alarm severities are defined
in class twaver.AlarmSeverity
.
public function get alarmSeverity():AlarmSeverity
public function set alarmSeverity(value:AlarmSeverity):void
cleared | property |
cleared:Boolean
Get the alarm cleared status.
public function get cleared():Boolean
public function set cleared(value:Boolean):void
elementID | property |
elementID:Object
[read-only] Get the element ID this alarm accured.
public function get elementID():Object
Alarm | () | Constructor |
public function Alarm(alarmID:Object = null, elementID:Object = null, alarmSeverity:AlarmSeverity = null, acked:Boolean = false, cleared:Boolean = false)
Constructor
ParametersalarmID:Object (default = null ) — The identifier of this alarm object. This should be
unique value in the alarmBox container. If not specified, TWaver
will generate a value internally.
| |
elementID:Object (default = null ) — The element ID alarm occured. If a non-null value
specified, then TWaver will update the alarm state of the element,
show the alarm clue of the element on Network.
| |
alarmSeverity:AlarmSeverity (default = null ) — The alarm severity of this alarm. See all alarm
severities provided by TWaver in class twaver.AlarmSeverity
| |
acked:Boolean (default = false ) — Whether this alarm is acknowledged.
| |
cleared:Boolean (default = false ) — Whether this alarm is cleared.
|