public class FileLogReader extends AbstractLogReader
registry
Constructor and Description |
---|
FileLogReader(java.io.File file,
Registry registry)
Construct a new FileLogReader.
|
FileLogReader(java.lang.String name,
Registry registry)
Construct a new FileLogReader.
|
Modifier and Type | Method and Description |
---|---|
CommandsRecord |
getCommands(int time)
Get the agent commands at a particular timestep.
|
Config |
getConfig()
Get the configuration entry in the log file.
|
java.util.Set<EntityID> |
getEntitiesWithUpdates(int time)
Get the set of EntityIDs that have perception updates in a given timestep.
|
int |
getMaxTimestep()
Get the last timestep recorded in this log.
|
PerceptionRecord |
getPerception(int time,
EntityID entity)
Get the perception record for a particular entity at a particular time.
|
UpdatesRecord |
getUpdates(int time)
Get the simulator updates at a particular timestep.
|
WorldModel<? extends Entity> |
getWorldModel(int time)
Get the state of the world at a particular timestep.
|
public FileLogReader(java.lang.String name, Registry registry) throws java.io.IOException, LogException
name
- The name of the file to read.registry
- The registry to use for reading log entries.java.io.IOException
- If the file cannot be read.LogException
- If there is a problem reading the log.public FileLogReader(java.io.File file, Registry registry) throws java.io.IOException, LogException
file
- The file object to read.registry
- The registry to use for reading log entries.java.io.IOException
- If the file cannot be read.LogException
- If there is a problem reading the log.public Config getConfig()
LogReader
public int getMaxTimestep() throws LogException
LogReader
LogException
- If there is a problem reading the log.public WorldModel<? extends Entity> getWorldModel(int time) throws LogException
LogReader
time
- The timestep to look up. If this is zero then the world initial conditions will be returned.LogException
- If there is a problem reading the log.public java.util.Set<EntityID> getEntitiesWithUpdates(int time) throws LogException
LogReader
time
- The timestep to look up.LogException
- If there is a problem reading the log.public PerceptionRecord getPerception(int time, EntityID entity) throws LogException
LogReader
time
- The timestep to look up.entity
- The entity to look up.LogException
- If there is a problem reading the log.public CommandsRecord getCommands(int time) throws LogException
LogReader
time
- The timestep to look up.LogException
- If there is a problem reading the log.public UpdatesRecord getUpdates(int time) throws LogException
LogReader
time
- The timestep to look up.LogException
- If there is a problem reading the log.