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

The MgrQueryTime class manages the collection of data queries, and the internal data queue that contains all synchronized data items from the data queries, all fused together. More...

Inherits MyCaffe.db.stream.IXQuery.

Public Member Functions

 MgrQueryTime (int nQueryCount, DateTime dtStart, int nTimeSpanInMs, int nSegmentSize, int nMaxCount, string strSchema, List< IXCustomQuery > rgCustomQueries)
 The constructor. More...
 
void AddDirectQuery (IXCustomQuery iqry)
 Add a custom query directly to the streaming database. More...
 
void Reset (int nStartOffset)
 Reset the query to the start date used in Initialize, optionally with an offset from the start. More...
 
void Shutdown ()
 Shutdown the data queries and consolidation thread. More...
 
List< int > GetQuerySize ()
 Returns the query size of the data in the form: [0] = channels [1] = height [2] = width. More...
 
SimpleDatum Query (int nWait)
 Query the next data in the streaming database. More...
 
byte[] ConvertOutput (float[] rg, out string type)
 Converts the output values into the native type used by the CustomQuery. More...
 
Dictionary< string, float > QueryInfo ()
 The Query information returns information about the data queried such as header information. More...
 

Detailed Description

The MgrQueryTime class manages the collection of data queries, and the internal data queue that contains all synchronized data items from the data queries, all fused together.

Definition at line 18 of file MgrQueryTime.cs.

Constructor & Destructor Documentation

◆ MgrQueryTime()

MyCaffe.db.stream.MgrQueryTime.MgrQueryTime ( int  nQueryCount,
DateTime  dtStart,
int  nTimeSpanInMs,
int  nSegmentSize,
int  nMaxCount,
string  strSchema,
List< IXCustomQuery rgCustomQueries 
)

The constructor.

Parameters
nQueryCountSpecifies the size of each query.
dtStartSpecifies the state date used for data collection.
nTimeSpanInMsSpecifies the time increment used between each data item.
nSegmentSizeSpecifies the amount of data to query on the back-end from each custom query.
nMaxCountSpecifies the maximum number of items to allow in memory.
strSchemaSpecifies the database schema.
rgCustomQueriesOptionally, specifies any custom queries to add directly.

The database schema defines the number of custom queries to use along with their names. A simple key=value; list defines the streaming database schema using the following format:

"ConnectionCount=2;
Connection0_CustomQueryName=Test1;
Connection0_CustomQueryParam=param_string1
Connection1_CustomQueryName=Test2;
Connection1_CustomQueryParam=param_string2"

Each param_string specifies the parameters of the custom query and may include the database connection string, database table, and database fields to query.

Definition at line 55 of file MgrQueryTime.cs.

Member Function Documentation

◆ AddDirectQuery()

void MyCaffe.db.stream.MgrQueryTime.AddDirectQuery ( IXCustomQuery  iqry)

Add a custom query directly to the streaming database.

By default, the streaming database looks in the

'./CustomQuery'

folder relative to the streaming database assembly to look for CustomQuery DLL's that implement the IXCustomQuery interface. When found, these assemblies are added to the list accessible via the schema. Alternatively, custom queries may be added directly using this method.

Parameters
iqrySpecifies the custom query to add.

Definition at line 202 of file MgrQueryTime.cs.

◆ ConvertOutput()

byte[] MyCaffe.db.stream.MgrQueryTime.ConvertOutput ( float[]  rg,
out string  type 
)

Converts the output values into the native type used by the CustomQuery.

Parameters
rgSpecifies the raw output data.
typeReturns the output type.
Returns
The converted output data is returned as a byte stream.

Definition at line 299 of file MgrQueryTime.cs.

◆ GetQuerySize()

List< int > MyCaffe.db.stream.MgrQueryTime.GetQuerySize ( )

Returns the query size of the data in the form: [0] = channels [1] = height [2] = width.

Returns
The query size is returned.

Definition at line 243 of file MgrQueryTime.cs.

◆ Query()

SimpleDatum MyCaffe.db.stream.MgrQueryTime.Query ( int  nWait)

Query the next data in the streaming database.

Parameters
nWaitSpecfies the maximum amount of time (in ms.) to wait for data.
Returns
A simple datum containing the data is returned.

Definition at line 262 of file MgrQueryTime.cs.

◆ QueryInfo()

Dictionary< string, float > MyCaffe.db.stream.MgrQueryTime.QueryInfo ( )

The Query information returns information about the data queried such as header information.

Returns
The information about the data is returned.

Definition at line 309 of file MgrQueryTime.cs.

◆ Reset()

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

Reset the query to the start date used in Initialize, optionally with an offset from the start.

Parameters
nStartOffsetOptionally, specifies the offset from the start to use (default = 0).

Definition at line 211 of file MgrQueryTime.cs.

◆ Shutdown()

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

Shutdown the data queries and consolidation thread.

Definition at line 229 of file MgrQueryTime.cs.


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