Select Git revision
HdbppTimescaleDb.hpp
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
HdbppTimescaleDb.hpp 4.64 KiB
/* Copyright (C) : 2014-2019
European Synchrotron Radiation Facility
BP 220, Grenoble 38043, FRANCE
This file is part of libhdb++timescale.
libhdb++timescale is free software: you can redistribute it and/or modify
it under the terms of the Lesser GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
libhdb++timescale is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser
GNU General Public License for more details.
You should have received a copy of the Lesser GNU General Public License
along with libhdb++timescale. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _HDBPP_TIMESCALE_HPP
#define _HDBPP_TIMESCALE_HPP
#include <libhdb++/LibHdb++.h>
#include <string>
#include <tango.h>
#include <vector>
namespace hdbpp
{
class HdbppTimescaleDb : public AbstractDB
{
public:
/**
* @brief HdbppTimescaleDb constructor
*
* The configuration parameters must contain the following strings:
*
* @param configuration A list of configuration parameters to start the driver with.
*/
HdbppTimescaleDb(const std::vector<std::string> &configuration);
/**
* @brief Destroy the HdbppTimescaleDb library object
*/
virtual ~HdbppTimescaleDb();
/**
* @brief Insert an attribute archive event into the database
*
* Inserts an attribute archive event for the EventData into the database. If the attribute
* does not exist in the database, then an exception will be raised. If the attr_value
* field of the data parameter if empty, then the attribute is in an error state
* and the error message will be archived.
*
* @param event_data Tango event data about the attribute.
* @param event_data_type HDB event data for the attribute.
* @throw Tango::DevFailed
*/
virtual void insert_Attr(Tango::EventData *event_data, HdbEventDataType event_data_type);
/**
* @brief Inserts the attribute configuration data.
*
* Inserts the attribute configuration data (Tango Attribute Configuration event data)
* into the database. The attribute must be configured to be stored in HDB++,
* otherwise an exception will be thrown.
*
* @param conf_event_data Tango event data about the attribute.
* @param event_data_type HDB event data for the attribute.
* @throw Tango::DevFailed