# AcqContext

Acquisition context structure.

### Synopsis

    typedef struct AcqContext {
     Item creatorTask;
     uint32 creatorSignal;
     int32 creatorStatus;
     char* fileName;
     ItemPoolPtr ioReqItemPoolPtr;
     Item threadItem;
     void* threadStackBlock;
     Item requestPort;
     uint32 requestPortSignal;
     Item ioDoneReplyPort;
     uint32 ioDoneReplyPortSignal;
     DataAcqMsgPtr requestQueue;
     DataAcqMsgPtr abortQueue;
     DataAcqMsgPtr dataQueueHead;
     DataAcqMsgPtr dataQueueTail;
     Boolean fEOFWasSent;
     long offset;
     BlockFile blockFile;
     Item dsReqReplyPort;
     uint32 dsReqReplyPortSignal;
     uint32 subscriberPortSignal;
     Item subscriberPort;
     DSStreamCBPtr streamCBPtr;
     MarkerChunkPtr markerChunk;
    } AcqContext, *AcqContextPtr

### Description

The context block containing state and environment variables for a data acquisition thread.

### Fields

`creatorTask`
  Item of the task that created the acquisition thread, usually the task to signal that the acquisition thread has been initialized.

`creatorSignal`
  Signal to send for synchronous completion.

`creatorStatus`
  Initialization status code of acquisition thread, usually returned to the creator task for error checking.

`fileName`
  Pointer to the character string that is the name of the file from which the task acquires data.

`ioReqItemPoolPtr`
  Pointer to the pool of `ioReqItem` items allocated by the data buffers for the thread. See `DSDataBuf{}` for more details.

`threadItem`
  Item of the acquisition thread.

`threadStackBlock`
  Pointer to the stack memory block allocated to the acquisition thread.

`requestPort`
  DataStreamer message port through which the thread receives acquisition requests.

`requestPortSignal`
  Signal associated with `requestPort.`

`ioDoneReplyPort`
  Message port for I/O completion messages.

`ioDoneReplyPortSignal`
  Signal associated with ioDoneReplyPort.

`requestQueue`
  List of outstanding I/O request messages.

`abortQueue`
  List of outstanding I/O request messages that are considered `aborted'.

`dataQueueHead`
  Head of requests waiting for ioreqitems.

`dataQueueTail`
  Tail of requests waiting for ioreqitems.

`fEOFWasSent`
  Indicates whether an end of file character (`EOF`) has been sent to the acquisition thread: `TRUE` if one has been sent, `FALSE` if not.

`offset`
  Location in the block file at which the acquisition thread is currently reading blocks of data. The offset is calculated, in blocks, as an offset from the beginning of the file.

`blockFile`
  Block file from which the acquisition thread acquires blocks of data.

`dsReqReplyPort`
  Reply port for requests to streamer.

`dsReqReplyPortSignal`
  Signal for replies to streamer requests

`subscriberPortSignal`
  Signal for receipt of subscriber messages.

`subscriberPort`
  Message port for our data type.

`streamCBPtr`
  Stream control block of connected stream.

`markerChunk`
  Pointer to copy of most recent translation table.

### Associated Files

DataAcq.h

### See Also

`DSDataBuf`