Overview | Package | Class | Tree | Deprecated | Index | Help | |||
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 |
void | addOutConnection(PortID outport,
Time delay,
EntityHandle dest,
PortID destinport)
Add an output connection from an output port to a given dest |
PortID | addOutPort(EventClass ec)
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,
EntityHandle 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 |
EventClass | getClassOfInPort(PortID pid)
Return the class of events accepted by an input port |
EventClass | getClassOfOutPort(PortID pid)
Return the class of events produced by an output port |
EntityClass | getEntityClass()
|
EventList | getEventList()
Return the list of incoming events |
EntityHandle | getHandle()
|
java.util.Vector | getInConnections(PortID inport)
Return the input connections to a port |
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. |
EntityHandle | lookupEntity(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,
EntityHandle 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(PortID c,
Event e)
This method sends an event from output port c. |
void | sendEvent(EntityHandle deste,
PortID destp,
Event e)
This method sends an event to input port p of entity deste. |
void | setMinOutputDelay(Time t)
Set the minimum output delay |
void | trace(java.lang.String msg)
Write a trace message |
void | updateEntity(Time t,
EntityHandle 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 |
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 order
t
- The time to advance topublic 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(EntityHandle deste, PortID destp, Event e)
deste
- The destination entity
destp
- The destination input port
e
- The event to send. Its timestamp should
be the sending timepublic void defaultEventHandler(Event e)
e
- The event to handlepublic Population getPopulation()
public EntityClass getEntityClass()
public EntityHandle getHandle()
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 EntityHandle lookupEntity(Time t, java.lang.String name)
t
- The time of the request
name
- The fully qualified name of the entitypublic Population lookupPopulation(Time t, java.lang.String name)
t
- The time of the request
name
- 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 build
c
- 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 destroy
c
- 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 make
c
- 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 destroy
c
- the callback to call when the population has been destroyedpublic void updateEntity(Time t, EntityHandle e, EntityUpdate eu, Callback c)
t
- the time to update the entity ( must be >= localTime() + getMinOutputDelay())
e
- the handle of the entity to update
eu
- the update to perform
c
- the callback to call when the update has been donepublic void queryEntity(Time t, EntityHandle e, EntityQuery eq, Callback c)
t
- the time to query the entity ( must be >= localTime() + getMinOutputDelay())
e
- the handle of the entity to query
eq
- the query to perform
c
- 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 update
eu
- the update to perform
c
- 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 query
eq
- the query to perform
c
- 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 port
cq
- the query to run on each output connection
c
- 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(EventClass ec)
ec
- the class of events the port generatespublic PortID addInPort(EventClass ec)
ec
- the class of events the port acceptspublic EventClass getClassOfInPort(PortID pid)
pid
- the input port idpublic EventClass getClassOfOutPort(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, EntityHandle dest, PortID destinport)
outport
- the output port id
delay
- the delay on the connection
dest
- the destination entity
destinport
- the destination port idpublic void deleteOutConnection(PortID outport, EntityHandle dest, PortID destinport)
public ConnectionID addInConnection(Connection c)
c
- the input connection to addpublic 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)
Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |