com.adventnet.tl1.message
Class TL1AutonomousMessage

java.lang.Object
  extended by com.adventnet.tl1.message.TL1Message
      extended by com.adventnet.tl1.message.TL1AutonomousMessage

public class TL1AutonomousMessage
extends TL1Message

This object represents a TL1 Autonomous Message that is generated and sent from the NE. This message can be used by the NE to report alarm conditions, results of diagnostic and performance tests or to indicate change in the status of any NE parameter.

TL1 Autonomous Message block

The Autonomous Message contains an Autonomous ID field that identifies the the severity and nature of the autonomous message. It contains alarm code for severity.

See Also:
TL1Header, TL1AutoID, TL1TextBlock

Field Summary
static java.lang.String CRITICAL_ALARM
          Constant for Alarm code that represents Critical alarm.
static java.lang.String MAJOR_ALARM
          Constant for Alarm code that represents Major alarm.
static java.lang.String MINOR_ALARM
          Constant for Alarm code that represents Minor alarm.
static java.lang.String NO_ALARM
          Constant for Alarm code that represents No alarm.
static java.lang.String NON_ALARM
          Constant for Alarm code that represents No alarm.
 
Constructor Summary
TL1AutonomousMessage()
          Default Constructor that creates an instance of the TL1Autonomous object.
 
Method Summary
 byte[] encode()
          Encodes the message.
 TL1AutoID getAutoId()
          Get the TL1AutoID object of the message which indicates the severity and nature of the Autonomous Message.
 TL1Header getHeader()
          Get the TL1Header object contained within this Autonomous Message.
 int getSize()
          Return the size of the message.
 char getTerminator()
          Get the terminator character .
 TL1TextBlock getTextBlock()
          Get the TL1TextBlock object of the given message.
 void setAutoId(TL1AutoID autoID)
          Set the specified TL1AutoID on this Autonomous Message.
 void setHeader(TL1Header header)
          Set the TL1Header object with the given object.
 void setTerminator(char term)
          Set the terminator character.
 void setTextBlock(TL1TextBlock textBlock)
          Set the TL1TextBlock object with the given object.
 
Methods inherited from class com.adventnet.tl1.message.TL1Message
getType, isSetSplCharParsing, setSplCharParsing, setType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CRITICAL_ALARM

public static java.lang.String CRITICAL_ALARM
Constant for Alarm code that represents Critical alarm.


MAJOR_ALARM

public static java.lang.String MAJOR_ALARM
Constant for Alarm code that represents Major alarm.


MINOR_ALARM

public static java.lang.String MINOR_ALARM
Constant for Alarm code that represents Minor alarm.


NON_ALARM

public static java.lang.String NON_ALARM
Constant for Alarm code that represents No alarm.


NO_ALARM

public static java.lang.String NO_ALARM
Constant for Alarm code that represents No alarm.

Constructor Detail

TL1AutonomousMessage

public TL1AutonomousMessage()
Default Constructor that creates an instance of the TL1Autonomous object.

Method Detail

getHeader

public TL1Header getHeader()
Get the TL1Header object contained within this Autonomous Message. It is composed of the Source Identifier, TL1Date, TL1Time.

Returns:
TL1Header object.
See Also:
TL1Header

setHeader

public void setHeader(TL1Header header)
Set the TL1Header object with the given object. It is composed of the Source Identifier, TL1Date, TL1Time.

Parameters:
header - TL1Header object.
See Also:
TL1Header

getAutoId

public TL1AutoID getAutoId()
Get the TL1AutoID object of the message which indicates the severity and nature of the Autonomous Message.

Returns:
TL1 Autonomous ID object.
See Also:
TL1AutoID

setAutoId

public void setAutoId(TL1AutoID autoID)
Set the specified TL1AutoID on this Autonomous Message.

Parameters:
autoID - instance of TL1 Autonomous ID.
See Also:
TL1AutoID

getTextBlock

public TL1TextBlock getTextBlock()
Get the TL1TextBlock object of the given message. This is optional, used to represent information specific to the particular autonomous message.

Returns:
TL1TextBlock object.
See Also:
TL1TextBlock

setTextBlock

public void setTextBlock(TL1TextBlock textBlock)
Set the TL1TextBlock object with the given object. This is optional, used to represent information specific to the particular autonomous message.

Parameters:
textBlock - instance of TL1TextBlock.
See Also:
TL1TextBlock

setTerminator

public void setTerminator(char term)
Set the terminator character. It contains either ';' or '>' character. ';' indicates the termination of the response message. '>' indicates more reponse message will follow.

Parameters:
term - character (';' or '>')

getTerminator

public char getTerminator()
Get the terminator character . It returns either ';' or '>' character. ';' indicates the termination of the response message. '>' indicates more reponse message will follow.

Returns:
terminator character. (';' or '>').

getSize

public int getSize()
Return the size of the message.

Returns:
size as an integer.

encode

public byte[] encode()
Encodes the message. Not to be invoked by the user.This is used internally by the API.

Specified by:
encode in class TL1Message
Returns:
Returns the message as bytes.