3using System.Collections.Generic;
6using System.Runtime.Serialization;
9using System.Threading.Tasks;
16#pragma warning disable 1591
19 public interface IXStreamDatabaseEvent
21 [OperationContract(IsOneWay =
false)]
22 void OnResult(
string strMsg,
double dfProgress);
24 [OperationContract(IsOneWay =
false)]
25 void OnError(StreamDatabaseErrorData err);
28#pragma warning restore 1591
50 [ServiceContract(CallbackContract = typeof(IXStreamDatabaseEvent), SessionMode = SessionMode.Required)]
73 [OperationContract(IsOneWay =
false)]
79 [OperationContract(IsOneWay =
false)]
86 [OperationContract(IsOneWay =
false)]
87 void Reset(
int nStartOffset = 0);
94 [OperationContract(IsOneWay =
false)]
101 [OperationContract(IsOneWay =
false)]
108 [OperationContract(IsOneWay =
false)]
112#pragma warning disable 1591
117 public interface IXQuery
120 void Reset(
int nStartOffset);
122 List<int> GetQuerySize();
124 byte[] ConvertOutput(
float[] rg, out
string type);
125 Dictionary<string, float> QueryInfo();
128#pragma warning restore 1591
252 public static string Pack(
string str)
270#pragma warning disable 1591
273 public class StreamDatabaseErrorData
276 public bool Result {
get;
set; }
278 public string ErrorMessage {
get;
set; }
280 public string ErrorDetails {
get;
set; }
283#pragma warning restore 1591
The Result class contains a single result.
The SimpleDatum class holds a data input within host memory.
The Utility class provides general utility funtions.
static string Replace(string str, char ch1, char ch2)
Replaces each instance of one character with another character in a given string.
The ParamPacker is use to pack and unpack parameters sent to each custom query.
static string Pack(string str)
Pack the custom query parameters.
static string UnPack(string str)
Unpack the custom query parameters.
The custom query interface defines the functions implemented by each Custom Query object used to spec...
CUSTOM_QUERY_TYPE QueryType
Returns the custom query type supported by the custom query.
int FieldCount
Returns the field count for this query.
void Open()
Open a connection to the underlying database using the connection string specified.
IXCustomQuery Clone(string strParam)
Return a new instance of the custom query.
string Name
Returns the name of the Custom Query.
List< float[]> QueryRealF()
Query the data as a set one or more float arrays.
byte[] QueryBytes()
Query the raw bytes.
List< double[]> QueryRealD()
Query the data as a set one or more double arrays.
Dictionary< string, float > QueryInfo()
The Query information returns information about the data queried such as header information.
byte[] ConvertOutput(float[] rg, out string strType)
Converts the output values into the native type used by the CustomQuery.
double[] QueryByTime(DateTime dt, TimeSpan ts, int nCount)
Query the fields specified (in the Open function) starting from the date-time specified.
void Reset()
Reset the custom query.
List< int > GetQuerySize()
Returns the query count for the current query.
void Close()
Close a currently open connection.
The IXStreamDatabase interface is the main interface to the MyCaffe Streaing Database.
Dictionary< string, float > QueryInfo()
The Query information returns information about the data queried such as header information.
int[] QuerySize()
Returns the Query size using the Blob sizing methodology.
void Shutdown()
Shutdown the database.
void Reset(int nStartOffset=0)
Reset the query postion to the start established during Initialize.
void Initialize(QUERY_TYPE qt, string strSchema)
Initialize the streaming database by loading the initial queues.
SimpleDatum Query(int nWait=1000)
Query a setgment of data from the internal queueus.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.db.stream namespace contains all data streaming related classes.
CUSTOM_QUERY_TYPE
Defines the custom query type to use.
@ TIME
Each custom query supporting the TIME query, must implement the QueryByTime funtion.
@ REAL_FLOAT
Each custom query supporting the REAL query, where the base type is float, must implement the QueryRe...
@ BYTE
Each custom query supporting the BYTE query, must implement the QueryByte function.
@ REAL_DOUBLE
Each custom query supporting the REAL query, where the base type is double, must implement the QueryR...
QUERY_TYPE
Defines the query type to use.
@ SYNCHRONIZED
Specifies to use a synchronized query.
@ GENERAL
Specifies to use a general query.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...