|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
ConnectionID |
addInConnection(Connection c)
Add an input connection |
PortID |
addInPort(EventClass ec)
Add an input port |
PortID |
addInPort(java.util.Vector vec)
Add an input port |
void |
addOutConnection(PortID outport,
Time delay,
EntityID dest,
PortID destinport)
Add an output connection from an output port to a given dest |
PortID |
addOutPort(EventClass ec)
Add an output port |
PortID |
addOutPort(java.util.Vector vec)
Add an output port |
void |
connect(Time t,
Projection p,
Callback c)
Make connections at a given time |
void |
construct(Time t,
PopulationBuilder p,
Callback c)
Build a population at a given time |
void |
defaultEventHandler(Event e)
This method deals with built in events, used for querying and updating entity state. |
void |
deleteInConnection(ConnectionID cid)
Delete an input connection |
void |
deleteInPort(PortID inport)
Delete an input port |
void |
deleteOutConnection(PortID outport,
EntityID dest,
PortID destinport)
|
void |
deleteOutPort(PortID outport)
Delete an output port |
void |
destroy()
This method is called when the entity is deleted. |
void |
destroy(Time t,
Population p,
Callback c)
Destroy a population at a given time. |
void |
disconnect(Time t,
Projection p,
Callback c)
Delete connections at a given time |
java.util.Vector |
getClassesOfInPort(PortID pid)
Return the class of events accepted by an input port |
java.util.Vector |
getClassesOfOutPort(PortID pid)
Return the class of events produced by an output port |
EntityClass |
getEntityClass()
|
EventList |
getEventList()
Return the list of incoming events |
EntityID |
getID()
|
java.util.Vector |
getInConnections(PortID inport)
Return the input connections to a port |
int |
getIndex()
|
Time |
getLocalTime()
Get the current local time |
Time |
getMinOutputDelay()
Get the minimum output delay |
java.lang.String |
getName()
|
NeosimClasses |
getNeosimClasses()
Return the set of user defined classes. |
int |
getNumInConnections(PortID inport)
Return the number of input connections on a port |
int |
getNumOutConnections(PortID outport)
Return the number of output connections from a port |
Population |
getPopulation()
|
PopulationTree |
getPopulationTree(Time t)
Return the top level population tree. |
Time |
getRightWindowTime()
Get the right window time ( local time + o/p delay ) |
Time |
handleEvents(EventList el,
Time t)
User entities MUST extend this method : deal with events in el up to time t, and advance the entity's time to at least t and return the time actually advanced to (which may be later than t, as long as the state can be rewound back to t and no new events are generated after t). |
void |
init(Population p,
int index)
User entities can extend this method |
EntityClass |
lookupEntityClass(java.lang.String name)
Look up an EntityClass object given a name, e.g. |
EntityID |
lookupEntityID(Time t,
java.lang.String name)
Look up an Entity handle given a name, e.g. |
Population |
lookupPopulation(Time t,
java.lang.String name)
Look up a Population given a name, e.g. |
void |
queryEntity(Time t,
EntityID e,
EntityQuery eq,
Callback c)
Query another entity at a given time |
void |
queryOutputConnections(Time t,
PortID p,
ConnectionQuery cq,
Callback cb)
Query output connections of a port |
void |
queryPopulation(Time t,
Population p,
EntityQuery eq,
Callback c)
Query a population of entities at a given time |
void |
reset()
This method is called when simulation time is rest to zero. |
void |
resetOutputDelay()
Set output delay to its previous value |
void |
sendEvent(EntityID deste,
PortID destp,
Event e)
This method sends an event to input port p of entity deste. |
void |
sendEvent(PortID c,
Event e)
This method sends an event from output port c. |
void |
setDstConnectionParams(Connection c,
ConnectionID destcid,
java.util.Hashtable params)
Set additional connection parameters at dst end Called by ParamConnectionSpec.setDstParams |
void |
setMinOutputDelay(Time t)
Set the minimum output delay |
void |
setSrcConnectionParams(Connection c,
PortID srcpid,
java.util.Hashtable params)
Set additional connection parameters at src end Called by ParamConnectionSpec.setSrcParams |
void |
trace(java.lang.String msg)
Write a trace message |
void |
updateEntity(Time t,
EntityID e,
EntityUpdate eu,
Callback c)
Update another entity at a given time |
void |
updatePopulation(Time t,
Population p,
EntityUpdate eu,
Callback c)
Update a population of entities at a given time |
void |
zeroOutputDelay()
Zero delay on system output port |
Methods inherited from interface java.lang.Comparable |
compareTo |
Method Detail |
public void init(Population p, int index)
public Time handleEvents(EventList el, Time t)
el
- The (possible empty) event list in time stamp ordert
- The time to advance todefaultEventHandler(neosim.iface.Event)
public void reset()
public void destroy()
public void sendEvent(PortID c, Event e)
c
- The output port to send the event to.e
- The event to send. Its timestamp should
be the sending timepublic void sendEvent(EntityID deste, PortID destp, Event e)
deste
- The destination entitydestp
- The destination input porte
- The event to send. Its timestamp should
be the sending timepublic void defaultEventHandler(Event e)
e
- The event to handlepublic Population getPopulation()
public int getIndex()
public EntityClass getEntityClass()
public EntityID getID()
public java.lang.String getName()
public PopulationTree getPopulationTree(Time t)
t
- the time of the request (needed as the population tree
changes with time)public NeosimClasses getNeosimClasses()
public EntityClass lookupEntityClass(java.lang.String name)
name
- The fully qualified name of the classpublic EntityID lookupEntityID(Time t, java.lang.String name)
t
- The time of the requestname
- The fully qualified name of the entitypublic Population lookupPopulation(Time t, java.lang.String name)
t
- The time of the requestname
- The fully qualified name of the populationpublic void construct(Time t, PopulationBuilder p, Callback c)
t
- the time to build the population ( must be >= localTime() + getMinOutputDelay())p
- the population to buildc
- the callback to call when the population has been built.public void destroy(Time t, Population p, Callback c)
t
- the time to build the population ( must be >= localTime() + getMinOutputDelay())p
- the population to destroyc
- the callback to call when the population has been destroyedpublic void connect(Time t, Projection p, Callback c)
t
- the time to make the connections ( must be >= localTime() + getMinOutputDelay())p
- the projection to makec
- the callback to call when the connections have been madepublic void disconnect(Time t, Projection p, Callback c)
t
- the time to delete the connections ( must be >= localTime() + getMinOutputDelay())p
- the population to destroyc
- the callback to call when the population has been destroyedpublic void updateEntity(Time t, EntityID e, EntityUpdate eu, Callback c)
t
- the time to update the entity ( must be >= localTime() + getMinOutputDelay())e
- the handle of the entity to updateeu
- the update to performc
- the callback to call when the update has been donepublic void queryEntity(Time t, EntityID e, EntityQuery eq, Callback c)
t
- the time to query the entity ( must be >= localTime() + getMinOutputDelay())e
- the handle of the entity to queryeq
- the query to performc
- the callback to call with the results of the querypublic void updatePopulation(Time t, Population p, EntityUpdate eu, Callback c)
t
- the time to update the entity ( must be >= localTime() + getMinOutputDelay())p
- the population to updateeu
- the update to performc
- the callback to call when the update has been donepublic void queryPopulation(Time t, Population p, EntityQuery eq, Callback c)
t
- the time to query the population( must be >= localTime() + getMinOutputDelay())p
- the population to queryeq
- the query to performc
- the callback to call with the results of the query. The results will
be in the form of a vector of objects, indexed by entities' index in the population.public void queryOutputConnections(Time t, PortID p, ConnectionQuery cq, Callback cb)
t
- the time to query the connections( must be >= localTime() + getMinOutputDelay())p
- the output portcq
- the query to run on each output connectionc
- the callback to call with the results of the query. The results will
be in the form of a vector of objects, ordered by entity handle/input connection id.public PortID addOutPort(java.util.Vector vec)
vec
- the vector of EventClass events the port generatespublic PortID addOutPort(EventClass ec)
ec
- the EventClass the port generatespublic PortID addInPort(EventClass ec)
ec
- the EventClass the port acceptspublic PortID addInPort(java.util.Vector vec)
vec
- the vector of EventClass the port acceptspublic java.util.Vector getClassesOfInPort(PortID pid)
pid
- the input port idpublic java.util.Vector getClassesOfOutPort(PortID pid)
pid
- the output port idpublic int getNumInConnections(PortID inport)
inport
- the input port idpublic int getNumOutConnections(PortID outport)
outport
- the output port idpublic java.util.Vector getInConnections(PortID inport)
outport
- the output port idpublic void addOutConnection(PortID outport, Time delay, EntityID dest, PortID destinport)
outport
- the output port iddelay
- the delay on the connectiondest
- the destination entitydestinport
- the destination port idpublic void deleteOutConnection(PortID outport, EntityID dest, PortID destinport)
public ConnectionID addInConnection(Connection c)
c
- the input connection to addpublic void setSrcConnectionParams(Connection c, PortID srcpid, java.util.Hashtable params)
public void setDstConnectionParams(Connection c, ConnectionID destcid, java.util.Hashtable params)
public void deleteInConnection(ConnectionID cid)
cid
- the input connection to deletepublic void deleteInPort(PortID inport)
inport
- the input port idpublic void deleteOutPort(PortID outport)
inport
- the input port idpublic EventList getEventList()
public void zeroOutputDelay()
public void resetOutputDelay()
public Time getMinOutputDelay()
public void setMinOutputDelay(Time t)
public Time getRightWindowTime()
public Time getLocalTime()
public void trace(java.lang.String msg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |