public class DataChannelImplEmu extends DataChannelAdapter
DataChannelAdapter.ThreadState| Modifier and Type | Field and Description |
|---|---|
protected ByteBufferSupply[] |
bbInSupply
Ring buffer holding ByteBuffers when using EvioCompactEvent reader for incoming events.
|
availableSequences, bAddrList, buffersPerSec, byteOrder, channelState, dataTransport, emu, endCallback, errorMsg, eventsPerBuffer, gotEndCmd, gotResetCmd, id, ignoreDataErrors, input, inputRingItemCount, ipAddrList, isFifo, logger, module, name, nanoSecPerBuf, nextEvent, nextSequences, outputChannelCount, outputChannelFill, outputIndex, outputModuleInternalRingCount, outputRingCount, outputRingItemCount, prescale, prestartCallback, regulateBufferRate, ringBufferIn, ringBuffersOut, ringIndex, sequenceBarriers, sequences, singleEventOut, totalRingCapacity| Constructor and Description |
|---|
DataChannelImplEmu(java.lang.String name,
DataTransportImplEmu transport,
java.util.Map<java.lang.String,java.lang.String> attributeMap,
boolean input,
Emu emu,
EmuModule module,
int outputIndex)
Constructor to create a new DataChannelImplEt instance.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
attachToInput(java.nio.channels.SocketChannel channel,
int sourceId,
int maxBufferSize,
int socketCount,
int socketPosition)
Once a client connects to the Emu domain server in the Emu transport object,
that socket is passed to this method and a thread is spawned to handle all
communications over it.
|
void |
end()
This method implements the END transition of the CODA run control state machine.
|
int |
getInputLevel()
Get the relative fill level (0-100) of the ring of this input channel.
|
TransportType |
getTransportType()
Get the type of transport this channel implements.
|
void |
go()
This method implements the GO transition of the CODA run control state machine.
|
void |
pause()
This method implements the PAUSE 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.
|
getDataTransport, getEndCallback, getError, getID, getModule, getNextOutputRingItem, getNextSequence, getOutputLevel, getOutputRingCount, getPrescale, getPrestartCallback, getRecordId, getRingBufferIn, getRingBuffersOut, gotoNextRingItem, isInput, name, registerEndCallback, registerPrestartCallback, regulateOutputBufferRate, releaseCurrentAndGoToNextOutputRingItem, releaseOutputRingItem, sequentialReleaseOutputRingItem, setDestinationBaList, setDestinationIpList, setNextEventAndRing, setRecordId, setupInputRingBuffers, setupOutputRingBuffers, statedownloadclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdownloadprotected ByteBufferSupply[] bbInSupply
DataChannelImplEmu(java.lang.String name,
DataTransportImplEmu transport,
java.util.Map<java.lang.String,java.lang.String> attributeMap,
boolean input,
Emu emu,
EmuModule module,
int outputIndex)
throws DataTransportException
DataTransportImplEt.createChannel(String, Map, boolean, Emu, EmuModule, int)
which is only used during PRESTART in Emu.name - the name of this channeltransport - the DataTransport object that this channel belongs toattributeMap - the hashmap of config file attributes for this channelinput - true if this is an input data channel, otherwise falseemu - emu this channel belongs tomodule - module this channel belongs tooutputIndex - order in which module's events will be sent to this
output channel (0 for first output channel, 1 for next, etc.).DataTransportException - - unable to create buffers or socket.final void attachToInput(java.nio.channels.SocketChannel channel,
int sourceId,
int maxBufferSize,
int socketCount,
int socketPosition)
throws java.io.IOException
This method is called synchronously by a single thread in the EmuDomainTcpServer class.
channel - data input socket/channelsourceId - CODA id # of data sourcemaxBufferSize - biggest chunk of data expected to be sent by data producersocketCount - total # of sockets data producer will be makingsocketPosition - position with respect to other data producers: 1, 2 ...java.io.IOException - if exception dealing with socket or input streampublic TransportType getTransportType()
getTransportType in interface DataChannelgetTransportType in class DataChannelAdapterpublic int getInputLevel()
getInputLevel in interface DataChannelgetInputLevel in class DataChannelAdapterpublic void prestart()
throws CmdExecException
prestart in interface CODAStateMachineprestart in class DataChannelAdapterCmdExecException - if error during command execution.public void go()
go in interface CODAStateMachinego in class CODAStateMachineAdapterpublic void pause()
pause in interface CODAStateMachinepause in class CODAStateMachineAdapterpublic void end()
end in interface CODAStateMachineend in class CODAStateMachineAdapterpublic void reset()
reset in interface CODAStateMachinereset in class CODAStateMachineAdapter