public class RocSimulation extends ModuleAdapter
Multiple Rocs can be synchronized by running test.RocSynchronizer.
Modifier and Type | Class and Description |
---|---|
(package private) class |
RocSimulation.EventGeneratingThread
This thread generates events with junk data in it (all zeros except first word which
is the event number).
|
ModuleAdapter.RateCalculatorThread
attributeMap, avgEventSize, emu, endCallback, epThreadsSetInConfig, errorMsg, eventCountTotal, eventProducingThreads, eventRate, goodChunk_X_EtBufSize, id, inputChanLevels, inputChanNames, inputChannelCount, inputChannels, logger, maxEventSize, minEventSize, moduleState, name, outputChanLevels, outputChanNames, outputChannelCount, outputChannels, outputOrder, paused, prestartCallback, RateCalculator, representStatistics, statGatheringPeriod, statistics, timeStatsOn, timeToBuild, wordCountTotal, wordRate
Constructor and Description |
---|
RocSimulation(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> attributeMap,
Emu emu)
Constructor RocSimulation creates a simulated ROC instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addInputChannels(java.util.ArrayList<DataChannel> input_channels)
Add the given input channels to this EmuModule object.
|
void |
clearChannels()
Remove all channels from this EmuModule object.
|
void |
end()
This method implements the END transition of the CODA run control state machine.
|
(package private) void |
eventToOutputRing(int ringNum,
java.nio.ByteBuffer buf,
ByteBufferItem item,
ByteBufferSupply bbSupply)
This method is called by a running EventGeneratingThread.
|
java.util.ArrayList<DataChannel> |
getInputChannels()
Get the input channels of this EmuModule object.
|
int |
getInternalRingCount()
Get the number of items this EmuModule object has in its internal rings.
|
void |
go()
This method implements the GO transition of the CODA run control state machine.
|
void |
prestart()
This method implements the PRESTART transition of the CODA run control state machine.
|
void |
reset()
This method implements the RESET transition of the CODA run control state machine.
|
(package private) void |
writeEventBuffer(java.nio.ByteBuffer buf,
java.nio.ByteBuffer templateBuf,
long eventNumber,
long timestamp,
boolean syncBit,
boolean copy) |
addOutputChannels, adjustStatistics, download, eventToOutputChannel, eventToOutputChannel, getAttr, getEndCallback, getError, getEventProducingThreadCount, getInputLevels, getInputNames, getIntAttr, getOutputChannels, getOutputLevels, getOutputNames, getOutputOrder, getPrestartCallback, getStatistics, name, pause, registerEndCallback, registerPrestartCallback, representsEmuStatistics, state
public RocSimulation(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> attributeMap, Emu emu)
name
- name of moduleattributeMap
- map containing attributes of moduleemu
- Emu this module belongs to.public void addInputChannels(java.util.ArrayList<DataChannel> input_channels)
addInputChannels
in interface EmuModule
addInputChannels
in class ModuleAdapter
input_channels
- the input channels to add to this EmuModule objectpublic java.util.ArrayList<DataChannel> getInputChannels()
getInputChannels
in interface EmuModule
getInputChannels
in class ModuleAdapter
public void clearChannels()
clearChannels
in interface EmuModule
clearChannels
in class ModuleAdapter
public int getInternalRingCount()
getInternalRingCount
in interface EmuModule
getInternalRingCount
in class ModuleAdapter
void eventToOutputRing(int ringNum, java.nio.ByteBuffer buf, ByteBufferItem item, ByteBufferSupply bbSupply)
ringNum
- the id number of the output channel ring bufferbuf
- the event to place on output channel ring bufferitem
- item corresponding to the buffer allowing buffer to be reusedbbSupply
- supply of ByteBuffers.void writeEventBuffer(java.nio.ByteBuffer buf, java.nio.ByteBuffer templateBuf, long eventNumber, long timestamp, boolean syncBit, boolean copy)
public void reset()
reset
in interface CODAStateMachine
reset
in class ModuleAdapter
public void end() throws CmdExecException
end
in interface CODAStateMachine
end
in class ModuleAdapter
CmdExecException
- if error during command execution.public void prestart()
prestart
in interface CODAStateMachine
prestart
in class ModuleAdapter
public void go()
go
in interface CODAStateMachine
go
in class ModuleAdapter