edu.umn.cs.crisys
Class ASW.DOICommandMessage

java.lang.Object
  |
  +--edu.umn.cs.crisys.RSM.Message
        |
        +--edu.umn.cs.crisys.ASW.DOICommandMessage
Enclosing class:
ASW

protected static class ASW.DOICommandMessage
extends edu.umn.cs.crisys.RSM.Message

Structue of DOI Command messages sent out by ASW.


Field Summary
 ASW.DOIStatusType command
          On/Off Command sent out by the ASW -- only field.
protected  java.lang.Object[] msg
           
 
Constructor Summary
ASW.DOICommandMessage()
          Constructor.
 
Method Summary
 void printMessage(java.io.PrintStream str, java.lang.String header)
          Utility method to print message to streams.
 void readMessage(java.lang.Object[] fields)
          Converts an Integer into DOI Command message field.
 java.lang.Object[] writeMessage()
          Converts DOI Command message fields as a basic Integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

command

public ASW.DOIStatusType command
On/Off Command sent out by the ASW -- only field.

msg

protected java.lang.Object[] msg
Constructor Detail

ASW.DOICommandMessage

public ASW.DOICommandMessage()
Constructor.
Method Detail

readMessage

public void readMessage(java.lang.Object[] fields)
Converts an Integer into DOI Command message field.
Overrides:
readMessage in class edu.umn.cs.crisys.RSM.Message

writeMessage

public java.lang.Object[] writeMessage()
Converts DOI Command message fields as a basic Integer. 0 denotes the On command and 1 denotes the Off command.
Overrides:
writeMessage in class edu.umn.cs.crisys.RSM.Message
Returns:
an array of one object corresponding the command as Integer.

printMessage

public void printMessage(java.io.PrintStream str,
                         java.lang.String header)
Utility method to print message to streams. This prints the number of fields and each field along with its corresponding Java object type. Calls writeMessage to convert the RSML-e mesage to raw objects. Derived classes may override this method, especially, if enumerations have to be printed as their descriptive strings.