|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrescuecore2.components.AbstractComponent<T>
rescuecore2.components.AbstractAgent<rescuecore2.standard.entities.StandardWorldModel,E>
rescuecore2.standard.components.StandardAgent<E>
jp.ac.nagoyau.is.ss.kishii.suntori.message.components.AbstractCSAgent<E>
E
- public abstract class AbstractCSAgent<E extends rescuecore2.standard.entities.StandardEntity>
The AbstractCSAgent show the Agent using this communication library.
Field Summary | |
---|---|
protected java.util.List<RCRSCSMessage> |
receivedMessageList
|
Fields inherited from class rescuecore2.components.AbstractComponent |
---|
config, connection, model, random |
Constructor Summary | |
---|---|
AbstractCSAgent()
Constructor |
Method Summary | |
---|---|
protected void |
addMessage(RCRSCSMessage message)
Add sended message. |
protected int |
getMessageChannel()
Get the using message channel. |
protected void |
postConnect()
|
protected void |
receiveMessage(java.util.Collection<rescuecore2.messages.Command> heard)
Receive messages. In this method, only messages sended from the set channel will be converted. |
protected void |
sendMessage(int time)
Send message by using the set channel. |
protected void |
sendSpeak(int time,
int channel,
byte[] data)
|
protected void |
setMessageChannel(int channel)
Set the message channel used in sending messages. |
protected void |
think(int time,
rescuecore2.worldmodel.ChangeSet changed,
java.util.Collection<rescuecore2.messages.Command> heard)
|
protected abstract void |
thinking(int time,
rescuecore2.worldmodel.ChangeSet changed,
java.util.Collection<rescuecore2.messages.Command> heard)
Development part that have to be created by users. At this point,we already receive messages from other Agents. |
Methods inherited from class rescuecore2.standard.components.StandardAgent |
---|
createWorldModel, getRefuges, getRequestedEntityURNs, getRequestedEntityURNsEnum, location, sendClear, sendExtinguish, sendLoad, sendMove, sendMove, sendRescue, sendRest, sendSay, sendSubscribe, sendTell, sendUnload, shouldIndex |
Methods inherited from class rescuecore2.components.AbstractAgent |
---|
connect, getID, getPreferredNDC, me, postConnect, processMessage, processSense |
Methods inherited from class rescuecore2.components.AbstractComponent |
---|
getName, getPreferredLogContext, getPreferredRegistry, initialise, postConnect, processImmediately, send, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface rescuecore2.components.Component |
---|
getName, getPreferredLogContext, getPreferredRegistry, initialise, shutdown |
Field Detail |
---|
protected java.util.List<RCRSCSMessage> receivedMessageList
Constructor Detail |
---|
public AbstractCSAgent()
Method Detail |
---|
protected final void think(int time, rescuecore2.worldmodel.ChangeSet changed, java.util.Collection<rescuecore2.messages.Command> heard)
think
in class rescuecore2.components.AbstractAgent<rescuecore2.standard.entities.StandardWorldModel,E extends rescuecore2.standard.entities.StandardEntity>
protected abstract void thinking(int time, rescuecore2.worldmodel.ChangeSet changed, java.util.Collection<rescuecore2.messages.Command> heard)
protected void postConnect()
postConnect
in class rescuecore2.standard.components.StandardAgent<E extends rescuecore2.standard.entities.StandardEntity>
protected final void setMessageChannel(int channel)
channel
- protected final int getMessageChannel()
protected final void receiveMessage(java.util.Collection<rescuecore2.messages.Command> heard)
heard
- protected final void addMessage(RCRSCSMessage message)
message
- protected final void sendMessage(int time)
time
- protected final void sendSpeak(int time, int channel, byte[] data)
sendSpeak
in class rescuecore2.standard.components.StandardAgent<E extends rescuecore2.standard.entities.StandardEntity>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |