|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.ac.nagoyau.is.ss.kishii.suntori.message.RCRSCSMessageConverter
public class RCRSCSMessageConverter
The RCRSCSMessageConverter convert messages to bytes, and bytes to messages.
Field Summary | |
---|---|
int |
DAMAGE_PERCEPTION_LOS
|
int |
EXTINGUISHABLE_DISTANCE
|
int |
EXTINGUISHABLE_POWER
|
int |
HP_PERCEPTION_LOS
|
int |
RANGE_OF_VIEW
|
int |
TANK_MAX
|
Constructor Summary | |
---|---|
RCRSCSMessageConverter(rescuecore2.worldmodel.EntityID ownerID,
rescuecore2.config.Config config,
java.util.List<rescuecore2.worldmodel.EntityID> buildingList,
java.util.List<rescuecore2.worldmodel.EntityID> roadList,
java.util.List<rescuecore2.worldmodel.EntityID> refugeList,
java.util.List<rescuecore2.worldmodel.EntityID> areaList,
java.util.List<rescuecore2.worldmodel.EntityID> policeForceList,
java.util.List<rescuecore2.worldmodel.EntityID> ambulanceTeamList,
java.util.List<rescuecore2.worldmodel.EntityID> fireBrigadeList,
java.util.List<rescuecore2.worldmodel.EntityID> platoonAgentList,
java.util.List<rescuecore2.worldmodel.EntityID> policeOfficeList,
java.util.List<rescuecore2.worldmodel.EntityID> ambulanceCenterList,
java.util.List<rescuecore2.worldmodel.EntityID> fireStationList)
Deprecated. |
|
RCRSCSMessageConverter(rescuecore2.worldmodel.EntityID ownerID,
rescuecore2.standard.entities.StandardWorldModel model,
rescuecore2.config.Config config)
Constructor |
Method Summary | |
---|---|
static int |
bitToInt(java.util.List<java.lang.Integer> list,
int index,
int length)
Create int from a part of bit sequence. |
java.util.List<RCRSCSMessage> |
bytesToMessageList(byte[] bytes)
Convert received bytes to message list. In case failure happen halfway through converting, return list of message converted by then. |
static int |
getDataTypeIndex(java.util.EnumMap<DataType,java.lang.Integer> map,
DataType dType,
java.lang.Integer i)
This is private method used on converting. |
byte[] |
messageToBytes(java.util.List<RCRSCSMessage> messages)
Convert messages to bytes The messages that failed to cenvert are not contained. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final int EXTINGUISHABLE_POWER
public final int EXTINGUISHABLE_DISTANCE
public final int TANK_MAX
public final int HP_PERCEPTION_LOS
public final int DAMAGE_PERCEPTION_LOS
public final int RANGE_OF_VIEW
Constructor Detail |
---|
@Deprecated public RCRSCSMessageConverter(rescuecore2.worldmodel.EntityID ownerID, rescuecore2.config.Config config, java.util.List<rescuecore2.worldmodel.EntityID> buildingList, java.util.List<rescuecore2.worldmodel.EntityID> roadList, java.util.List<rescuecore2.worldmodel.EntityID> refugeList, java.util.List<rescuecore2.worldmodel.EntityID> areaList, java.util.List<rescuecore2.worldmodel.EntityID> policeForceList, java.util.List<rescuecore2.worldmodel.EntityID> ambulanceTeamList, java.util.List<rescuecore2.worldmodel.EntityID> fireBrigadeList, java.util.List<rescuecore2.worldmodel.EntityID> platoonAgentList, java.util.List<rescuecore2.worldmodel.EntityID> policeOfficeList, java.util.List<rescuecore2.worldmodel.EntityID> ambulanceCenterList, java.util.List<rescuecore2.worldmodel.EntityID> fireStationList)
public RCRSCSMessageConverter(rescuecore2.worldmodel.EntityID ownerID, rescuecore2.standard.entities.StandardWorldModel model, rescuecore2.config.Config config)
ownerID
- EntityID of this converter user(Agent or Center).model
- config
- Method Detail |
---|
public java.util.List<RCRSCSMessage> bytesToMessageList(byte[] bytes)
bytes
- converting bytes
public static int bitToInt(java.util.List<java.lang.Integer> list, int index, int length)
list
- index
- length
-
public byte[] messageToBytes(java.util.List<RCRSCSMessage> messages)
messages
- List of messages
public static int getDataTypeIndex(java.util.EnumMap<DataType,java.lang.Integer> map, DataType dType, java.lang.Integer i)
map
- dType
- i
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |