MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.db.stream.DataQuery Class Reference

The DataQuery manages a custom query interface and queues data from the custom query via an internal query thread. More...

Inheritance diagram for MyCaffe.db.stream.DataQuery:

Public Member Functions

 DataQuery (IXCustomQuery iquery, DateTime dtStart, TimeSpan tsInc, int nSegmentSize, int nMaxCount)
 The constructor. More...
 
void Dispose ()
 Release all resources used and shutdown. More...
 
void Shutdown ()
 Stop the internal query thread. More...
 
bool DataReady (int nCount)
 Returns true when data is ready, false otherwise. More...
 
bool DataDone ()
 Returns true when there is no more data to query. More...
 
double[] PeekDataAt (int nIdx)
 Returns data at an index within the queue without removing it, or null if no data exists at the index. More...
 
double PeekDataAt (int nIdx, int nFieldIdx)
 Returns data at an index and field within the queue without removing it. More...
 
double[] GetNextData ()
 Returns the next data and removes it from the queue. More...
 
void Reset (int nStartOffset)
 Reset the data query to and offset from the start date. More...
 

Properties

int FieldCount [get]
 Returns the number of fields (including the sync field) that this query manages. More...
 
bool EnableQueueThread [getset]
 Enable/disable the internal query thread. More...
 
int Count [get]
 Returns the number of items in the data queue. More...
 

Detailed Description

The DataQuery manages a custom query interface and queues data from the custom query via an internal query thread.

Definition at line 14 of file DataQuery.cs.

Constructor & Destructor Documentation

◆ DataQuery()

MyCaffe.db.stream.DataQuery.DataQuery ( IXCustomQuery  iquery,
DateTime  dtStart,
TimeSpan  tsInc,
int  nSegmentSize,
int  nMaxCount 
)

The constructor.

Parameters
iquerySpecifies the custom query managed.
dtStartSpecifies the start date for queries.
tsIncSpecifies the time increment between data items within a query.
nSegmentSizeSpecifies the number of items to collect on each query.
nMaxCountSpecifies the maximum number of items to store in memory.

Definition at line 38 of file DataQuery.cs.

Member Function Documentation

◆ DataDone()

bool MyCaffe.db.stream.DataQuery.DataDone ( )

Returns true when there is no more data to query.

Returns
Returns true when there is no more data to query.

Definition at line 119 of file DataQuery.cs.

◆ DataReady()

bool MyCaffe.db.stream.DataQuery.DataReady ( int  nCount)

Returns true when data is ready, false otherwise.

Parameters
nCountSpecifies the number of items in the data queue required to consider the data 'ready'.
Returns

Definition at line 107 of file DataQuery.cs.

◆ Dispose()

void MyCaffe.db.stream.DataQuery.Dispose ( )

Release all resources used and shutdown.

Definition at line 52 of file DataQuery.cs.

◆ GetNextData()

double[] MyCaffe.db.stream.DataQuery.GetNextData ( )

Returns the next data and removes it from the queue.

Returns
The next data is returned. When no data exists, null is returned.

Definition at line 153 of file DataQuery.cs.

◆ PeekDataAt() [1/2]

double[] MyCaffe.db.stream.DataQuery.PeekDataAt ( int  nIdx)

Returns data at an index within the queue without removing it, or null if no data exists at the index.

Parameters
nIdxSpecifies the index to check.
Returns
The data at the index is returned, or null if not data exists at that index.

Definition at line 129 of file DataQuery.cs.

◆ PeekDataAt() [2/2]

double MyCaffe.db.stream.DataQuery.PeekDataAt ( int  nIdx,
int  nFieldIdx 
)

Returns data at an index and field within the queue without removing it.

Parameters
nIdxSpecifies the index to check.
nFieldIdxSpecifies the field to check.
Returns
The data at the index and field is returned.

Definition at line 143 of file DataQuery.cs.

◆ Reset()

void MyCaffe.db.stream.DataQuery.Reset ( int  nStartOffset)

Reset the data query to and offset from the start date.

Parameters
nStartOffsetSpecifies the offset to use.

Definition at line 168 of file DataQuery.cs.

◆ Shutdown()

void MyCaffe.db.stream.DataQuery.Shutdown ( )

Stop the internal query thread.

Definition at line 60 of file DataQuery.cs.

Property Documentation

◆ Count

int MyCaffe.db.stream.DataQuery.Count
get

Returns the number of items in the data queue.

Definition at line 97 of file DataQuery.cs.

◆ EnableQueueThread

bool MyCaffe.db.stream.DataQuery.EnableQueueThread
getset

Enable/disable the internal query thread.

Definition at line 76 of file DataQuery.cs.

◆ FieldCount

int MyCaffe.db.stream.DataQuery.FieldCount
get

Returns the number of fields (including the sync field) that this query manages.

Definition at line 68 of file DataQuery.cs.


The documentation for this class was generated from the following file: