public class FireState<FireIdType> extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FireState.PortAccessType
The types of port accesses.
|
Constructor and Description |
---|
FireState(Actor actor,
int id)
Construct a FireState with an actor and its id.
|
Modifier and Type | Method and Description |
---|---|
void |
fireStart(FiringEvent.FiringEventType type,
FireIdType fireId)
Record the start of a firing for this actor.
|
FireIdType |
fireStop(FiringEvent.FiringEventType type)
Record the stop of a firing, and get the fire index
for a type of fire.
|
Actor |
getActor()
Get the actor.
|
int |
getActorId()
Get the actor's id.
|
FireIdType |
getCurFireId()
Get the current (non-rw) firing index.
|
FireIdType |
getCurFireId(boolean wantRWFireId)
Get the current firing index.
|
FiringEvent.FiringEventType |
getLastStartFireType()
Get the last starting firing type seen.
|
FiringEvent.FiringEventType |
getNextStopFiringType()
Get the expected firing type for stopping the firing iteration.
|
int |
getNumberOfFirings()
Return the number of firings seen.
|
FireState.PortAccessType |
getPortLastAccess()
Get the last port access for the actor.
|
void |
setPortLastAccess(FireState.PortAccessType type)
Set the last port access for the actor.
|
public int getActorId()
public void fireStart(FiringEvent.FiringEventType type, FireIdType fireId)
type
- type of firing.fireId
- fire id.public FireIdType fireStop(FiringEvent.FiringEventType type)
type
- the current type of fire that runningpublic FireIdType getCurFireId()
public FireIdType getCurFireId(boolean wantRWFireId)
wantRWFireId
- If true, return current rw fire id, else
return current non-rw fire id. In the latter case, it returns
the id of the most recent prefire, fire, or postfire to start.
If none of those three types of fire are currently running,
it returns the id of the currently "iterate" firing. If no
"iterate" is currently running, returns UNKNOWN_FIRE_ID.public FiringEvent.FiringEventType getLastStartFireType()
public FiringEvent.FiringEventType getNextStopFiringType() throws RecordingException
RecordingException
public int getNumberOfFirings()
public FireState.PortAccessType getPortLastAccess()
public void setPortLastAccess(FireState.PortAccessType type)