int saveGeneralMeasurement(GeneralMeasurementIOV generalMeasurementIOV, GeneralMeasurement measurement) Description: Saves single general measurement into the database. The method returns version number of saved data (in case of multiple similar inserts the old one is not removed, but new version of the same data is created instead). Parameters: – generalMeasurementIOV - a structure of type and validity interval of the measurement. Each field of the structure has to be given. – measurement - a structure of value, description and unit of the measurement. Each field of the structure has to be given.
void saveBatchedGeneralMeasurements( map<GeneralMeasurementIOV, GeneralMeasurement> batchedMeasurements) Description: Saves group of single general measurement into the database. In case of multiple inserts for the same IOV and type, the old measurement is not removed, but its new version is created instead. Parameters: – batchedMeasurements - a map with GeneralMeasurementIOV keys and values of GeneralMeasurement structures. Each field of the structures ( GeneralMeasurementIOV andGeneralMeasurement) has to be given.
int saveGeneralMeasurementVector(GeneralMeasurementIOV generalMeasurementIOV, vector<GeneralMeasurement> measurements) Description: Saves general measurement vector into the database. Values of the vector refers to one measurement. Method returns version number of saved data (in case of multiple similar inserts the old one is not removed, but new version of the same data is created instead). Parameters: – generalMeasurementIOV - a structure of type and validity interval of measurement. Each field of the GeneralMeasurementIOV structure has to be given. – measurements - a vector of values, descriptions and units. Each field of the GeneralMeasurement structure has to be given.
void saveBatchedGeneralMeasurementVectors( map<GeneralMeasurementIOV, vector<GeneralMeasurement>> batchedGeneralMeasurementVectors ) Description: Saves group of general measurement vectors into the database. In case of multiple similar inserts the old one is not removed, but new version of the same data is created instead. Parameters: – batchedGeneralMeasurementVectors - a map of measurements. Keys of saved map are intervals of validity and types. Values of the map are measurements’ vectors. Each vector refers to one measurement.
GeneralMeasurement loadGeneralMeasurement(long timestamp, string typeName) Description: Loads latest version of single general measurement for given timestamp from the database. Parameters: – timestamp - timestamp value. Nonnegative long value. – typeName - measurement type name. Cannot be null or empty string.
GeneralMeasurement loadGeneralMeasurement(long timestamp, string typeName, int version) Description: Loads specific version of single general measurement for given timestamp from the database. Parameters: – timestamp - timestamp value. Nonnegative long value. – typeName - measurement type name. Cannot be null or empty string. – version - version number. Positive integer value.
map<GeneralMeasurementIOV, GeneralMeasurement> loadGeneral- Measurements(long startTime, long endTime, string typeName) Description: Loads map of single general measurements for specific type and period of time. Each key of returned map has different interval of validity and the same type name. A value of the map is single measurement. If there are more than one version of any measurement, the latest version is loaded into the map. Parameters: – startTime - start of time period for which vector of measurements will be returned. Nonnegative long value. – endTime - end of time period for which vector of measurements will be returned. Nonnegative long value. – typeName - measurement type name. Cannot be null or empty string.
vector<GeneralMeasurement>loadGeneralMeasurementVector(long timestamp, string typeName) Description: Loads latest version of general measurement vector for given timestamp from the database. Each element of the vector refer to one measurement. Parameters: – timestamp - timestamp value. Nonnegative long value. – typeName - measurement type name. Cannot be null or empty string.
vector<GeneralMeasurement>loadGeneralMeasurementVector(long timestamp, string typeName, int version) Description: Loads specific version of general measurements vector for given timestamp from the database. Each element of the vector refer to one measurement. Parameters: – timestamp - timestamp value. Nonnegative long value. – typeName - measurement type name. Cannot be null or empty string. – version - version number. Positive integer value.
map<GeneralMeasurementIOV, vector<GeneralMeasurement>>loadGeneralMeasurementVectors( long startTime, long endTime, string type- Name) Description: Loads map of general measurements for specific type and period of time. Each key of returned map has different interval of validity and the same type name. A value of the map is measurement vector. If there are more than one version of any measurement vector, the latest version is loaded into the map. Parameters: – startTime- start of time period for which vector of measurements will be returned. Nonnegative long value. – endTime - end of time period for which vector of measurements will be returned. Nonnegative long value. – typeName - measurement type name. Cannot be null or empty string.
GeneralMeasurement - a structure representing general measurement. Fields: – string description - a description of measurement. – string unit - a unit of measurement. – double value - a value of a measurement.
GeneralMeasurementIOV - a structure representing general measurement type and interval of validity. Fields: – string startTime - a interval validity start time. – string endTime - a interval validity end time. – double typeName - a name of measurement’s type.