commlib.message
クラス RCRSCSMessage

java.lang.Object
  上位を拡張 commlib.message.RCRSCSMessage
すべての実装されたインタフェース:
IMessage
直系の既知のサブクラス:
ReportMessage, TaskMessage, WorldInformation

public abstract class RCRSCSMessage
extends java.lang.Object
implements IMessage

This class represent the transmitted message.

作成者:
takefumi

コンストラクタの概要
RCRSCSMessage(BaseMessageType type, int time)
          Constructor
RCRSCSMessage(BaseMessageType type, java.util.List<java.lang.Integer> bitList, int offset, java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
          The method that the library use to convert the message.
RCRSCSMessage(java.util.List<RCRSCSData<?>> data, BaseMessageType type)
          Constructor
 
メソッドの概要
 boolean equals(java.lang.Object obj)
           
 java.util.List<RCRSCSData<?>> getData()
          Return list of data registered on the message.
 int getMessageBitSize(java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
          Return bit num of this message.
 BaseMessageType getMessageType()
          Return type of this message.
 int getSendTime()
          Return stem num that the message is created.
 int hashCode()
           
 boolean isSendable()
          This method confirm whether data necessary for sending message are existing.
 void setData(RCRSCSData<?> data)
          Register data on the message.
 void setData(RCRSCSData<?> data, int index)
          Register data on the message using specified index.
 
クラス java.lang.Object から継承されたメソッド
getClass, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

RCRSCSMessage

public RCRSCSMessage(BaseMessageType type,
                     int time)

Constructor

パラメータ:
type -
time -

RCRSCSMessage

public RCRSCSMessage(java.util.List<RCRSCSData<?>> data,
                     BaseMessageType type)

Constructor

パラメータ:
data -
type -

RCRSCSMessage

public RCRSCSMessage(BaseMessageType type,
                     java.util.List<java.lang.Integer> bitList,
                     int offset,
                     java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
The method that the library use to convert the message.

パラメータ:
type -
bitList -
offset -
bitSizeMap -
メソッドの詳細

getMessageBitSize

public int getMessageBitSize(java.util.EnumMap<DataType,java.lang.Integer> bitSizeMap)
Return bit num of this message.

パラメータ:
bitSizeMap -
戻り値:
??????????????????
bit num

getData

public java.util.List<RCRSCSData<?>> getData()
インタフェース IMessage の記述:
Return list of data registered on the message.

定義:
インタフェース IMessage 内の getData
戻り値:

setData

public void setData(RCRSCSData<?> data)
インタフェース IMessage の記述:
Register data on the message.

定義:
インタフェース IMessage 内の setData
パラメータ:
data - setted data

setData

public void setData(RCRSCSData<?> data,
                    int index)
インタフェース IMessage の記述:
Register data on the message using specified index.
If message have some DataType.AREA, we can assign where to be setted the adding data.

定義:
インタフェース IMessage 内の setData
パラメータ:
data - setted data

isSendable

public boolean isSendable()
This method confirm whether data necessary for sending message are existing.
If not, return false.

戻り値:
this message is senndable : true
otherwise : false

getMessageType

public BaseMessageType getMessageType()
Return type of this message.

戻り値:
type of message

hashCode

public int hashCode()
オーバーライド:
クラス java.lang.Object 内の hashCode

equals

public boolean equals(java.lang.Object obj)
オーバーライド:
クラス java.lang.Object 内の equals

getSendTime

public int getSendTime()
Return stem num that the message is created.

戻り値:
stem num