43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
#ifndef DATASTORAGECLIENT_H
|
|
#define DATASTORAGECLIENT_H
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
|
|
namespace MySQL {
|
|
|
|
class MySQLClient;
|
|
|
|
} // namespace MySQL
|
|
|
|
namespace DataStorage {
|
|
|
|
class DataStorageClientImpl;
|
|
|
|
class DataStorageClient
|
|
{
|
|
public:
|
|
DataStorageClient(const std::shared_ptr<MySQL::MySQLClient>& pMySQLClient, const std::string& table);
|
|
~DataStorageClient();
|
|
|
|
public:
|
|
void LogValue(int deviceId, const std::string& dataName, int timestamp, int value);
|
|
void LogValue(int deviceId, const std::string& dataName, int timestamp, double value);
|
|
void LogValue(int deviceId, const std::string& dataName, int timestamp, const std::string& value);
|
|
|
|
void LogValueTimed(int deviceId, const std::string& dataName, int value);
|
|
void LogValueTimed(int deviceId, const std::string& dataName, double value);
|
|
void LogValueTimed(int deviceId, const std::string& dataName, const std::string& value);
|
|
|
|
public:
|
|
void MetronomeCallback();
|
|
|
|
private:
|
|
std::unique_ptr<DataStorageClientImpl> m_pDataStorageClientImpl;
|
|
};
|
|
|
|
} // namespace DataStorage
|
|
|
|
#endif // DATASTORAGECLIENT_H
|