public class PerceptionMessage extends Message implements HasTarget
Gained and lost objects are each described by an PerceptionMessage.ObjectNote
. The
ObjectNote contains the object OID (subject) and object type. The ObjectNote
may optionally contain some arbitrary object information (see
PerceptionMessage.ObjectNote.getObjectInfo()
).
ObjectNote supports a different target for each perceived object, but this capability is currently not used and may become deprecated.
Modifier and Type | Class and Description |
---|---|
static class |
PerceptionMessage.ObjectNote
Described a gained or lost perceivable object.
|
flags, msgId, msgInstanceOid, msgType, remoteAgent
Constructor and Description |
---|
PerceptionMessage()
No-arg constructor required for marshalling.
|
PerceptionMessage(MessageType msgType)
Create message of the given message type.
|
PerceptionMessage(MessageType msgType,
OID target)
Create message of the given message type and target.
|
Modifier and Type | Method and Description |
---|---|
void |
addStealthedObject(OID subjectOid)
Add a stealthed object.
|
PerceptionMessage.ObjectNote |
gainObject(OID targetOid,
OID subjectOid,
ObjectType objectType)
Add a gained object.
|
void |
gainObject(PerceptionMessage.ObjectNote note)
Add a gained object.
|
int |
getGainObjectCount()
Get number of gained objects.
|
java.util.List<PerceptionMessage.ObjectNote> |
getGainObjects()
Get gained object list.
|
int |
getLostObjectCount()
Get number of lost objects.
|
java.util.List<PerceptionMessage.ObjectNote> |
getLostObjects()
Get lost object list.
|
int |
getStealthedGainObjectCount()
Get number of gain objects that were in mode stealth.
|
java.util.List<PerceptionMessage.ObjectNote> |
getStealthedGainObjects()
Get gain object list that were in the stealth mode.
|
int |
getStealthedLostObjectCount()
Get number of lost objects that were in mode stealth.
|
java.util.List<PerceptionMessage.ObjectNote> |
getStealthedLostObjects()
Get lost object list that were in the stealth mode.
|
java.util.List<OID> |
getSteathedObjects()
Get stealthed object list.
|
OID |
getTarget()
Get the message target.
|
void |
lostObject(OID targetOid,
OID subjectOid)
Add a lost object.
|
void |
lostObject(OID targetOid,
OID subjectOid,
ObjectType objectType)
Add a lost object.
|
void |
lostObject(PerceptionMessage.ObjectNote note)
Add a lost object.
|
void |
setTarget(OID target)
Set the message target OID.
|
void |
stealthedGainObject(PerceptionMessage.ObjectNote note)
Add a gain object that were in stealth mode.
|
void |
stealthedLostObject(PerceptionMessage.ObjectNote note)
Add a lost object that were in stealth mode.
|
getEnqueueTime, getMsgId, getMsgInstanceOid, getMsgType, getSenderName, isRPC, setEnqueueTime, setEnqueueTime, setMsgInstanceOid, setMsgType, toBytes, toBytes, toBytes, ToString
public PerceptionMessage()
public PerceptionMessage(MessageType msgType)
public PerceptionMessage(MessageType msgType, OID target)
public OID getTarget()
public void setTarget(OID target)
public PerceptionMessage.ObjectNote gainObject(OID targetOid, OID subjectOid, ObjectType objectType)
public void gainObject(PerceptionMessage.ObjectNote note)
public void lostObject(OID targetOid, OID subjectOid, ObjectType objectType)
public void lostObject(PerceptionMessage.ObjectNote note)
public void stealthedGainObject(PerceptionMessage.ObjectNote note)
public void stealthedLostObject(PerceptionMessage.ObjectNote note)
public java.util.List<PerceptionMessage.ObjectNote> getGainObjects()
public java.util.List<PerceptionMessage.ObjectNote> getLostObjects()
public java.util.List<PerceptionMessage.ObjectNote> getStealthedGainObjects()
public java.util.List<PerceptionMessage.ObjectNote> getStealthedLostObjects()
public int getGainObjectCount()
public int getLostObjectCount()
public int getStealthedGainObjectCount()
public int getStealthedLostObjectCount()
public void addStealthedObject(OID subjectOid)
public java.util.List<OID> getSteathedObjects()