Package org.yamcs.simulation
Class PerfMdbLoader
- java.lang.Object
-
- org.yamcs.simulation.PerfMdbLoader
-
- All Implemented Interfaces:
SpaceSystemLoader
public class PerfMdbLoader extends Object implements SpaceSystemLoader
Generates a MDB used for performance testing. It generates all unsigned integer parameters with the size in bits specified
-
-
Constructor Summary
Constructors Constructor Description PerfMdbLoader(YConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getConfigName()
The filename used to save the database after all the loaders have loaded it, is based on a concatenation of the config names returned by the loaders.SpaceSystem
load()
loads the SpaceSystem database in memory.boolean
needsUpdate(RandomAccessFile consistencyDateFile)
void
writeConsistencyDate(FileWriter consistencyDateFile)
-
-
-
Constructor Detail
-
PerfMdbLoader
public PerfMdbLoader(YConfiguration config)
-
-
Method Detail
-
needsUpdate
public boolean needsUpdate(RandomAccessFile consistencyDateFile) throws IOException, ConfigurationException
- Specified by:
needsUpdate
in interfaceSpaceSystemLoader
- Parameters:
consistencyDateFile
- check in this file when the last database has been loaded- Returns:
- if this loader has to reload the database from its source
- Throws:
IOException
- if the consistencyDateFile can not be read for some reasonConfigurationException
-
getConfigName
public String getConfigName()
Description copied from interface:SpaceSystemLoader
The filename used to save the database after all the loaders have loaded it, is based on a concatenation of the config names returned by the loaders. Thus if a loader can have multiple versions of the database, they should be saved in multiple files.- Specified by:
getConfigName
in interfaceSpaceSystemLoader
- Returns:
- a string to be used as the filename where the serialised instance will be stored.
-
writeConsistencyDate
public void writeConsistencyDate(FileWriter consistencyDateFile)
- Specified by:
writeConsistencyDate
in interfaceSpaceSystemLoader
- Parameters:
consistencyDateFile
- the file in which the consistency date should be written
-
load
public SpaceSystem load() throws ConfigurationException, DatabaseLoadException
Description copied from interface:SpaceSystemLoader
loads the SpaceSystem database in memory. Some references may be unresolved- Specified by:
load
in interfaceSpaceSystemLoader
- Throws:
DatabaseLoadException
ConfigurationException
-
-