DSStreamCB
Stream context block structure.
Synopsis
typedef struct DSStreamCB {
Item creatorTask;
uint32 creatorSignal;
int32 creatorStatus;
Item threadItem;
void* threadStackBlock;
Item acquirePort;
long bufDataSize;
DSDataBufPtr freeBufHead;
unsigned long streamFlags;
uint32 clockOffset;
uint32 lastValidClock;
uint32 branchDest;
Item requestPort;
uint32 requestPortSignal;
Item acqReplyPort;
uint32 acqReplyPortSignal;
MemPoolPtr dataMsgPool;
Item subsReplyPort;
uint32 subsReplyPortSignal;
MemPoolPtr subsMsgPool;
DSDataBufPtr filledBufHead;
DSDataBufPtr filledBufTail;
long totalBufferCount;
long currentFreeBufferCount;
DSRequestMsgPtr endOfStreamMsg;
int32 repliesPending;
DSRequestMsgPtr requestMsgHead;
DSRequestMsgPtr requestMsgTail;
long numSubscribers;
DSSubscriber subscriber[DS_MAX_SUBSCRIBERS];
} DSStreamCB, *DSStreamCBPtr
Description
This data structure contains all the contexts necessary to drive a stream, including a description of all subscribers and the information necessary to manage all memory buffers. One of these data structures exists for each open stream.
Fields
creatorTask
- Task to signal when initialization complete.
creatorSignal
- Signal to send for synchronous completion.
creatorStatus
- Result code for creator.
threadItem
- Thread Item for the server process.
threadStackBlock
- Pointer to thread's stack memory block.
acquirePort
- Acquisition module message port.
bufDataSize
- Size of data buffers in BYTES.
freeBufHead
- Pointer to list of free data buffers.
streamFlags
- Stream state flags.
clockOffset
- Offset to get relative stream clock.
lastValidClock
- Set when stream stopped.
branchDest
- Marker to branching to
STRM_GO_INPROGRESS true.
requestPort
- Work request message port.
requestPortSignal
- Signal for request port.
acqReplyPort
- Reply port for data acquisition communications.
acqReplyPortSignal
- Signal for data acquisition reply port.
dataMsgPool
- Pool of data message blocks.
subsReplyPort
- Reply port for subscriber communication.
subsReplyPortSignal
- Signal for subscriber reply port.
subsMsgPool
- Pool of subscriber message blocks.
filledBufHead
- Pointer to list of filled data buffers.
filledBufTail
- Pointer to end of list of filled data buffers.
repliesPending
- Number of replies needed before replying to request.
requestMsgHead
- Pointer to first request message in queue.
requestMsgTail
- Pointer to last request message in queue.
numSubscribers
- Number of subscribers.
Associated Files
DataStream.h