2026-05-09 11:23:45 +08:00
|
|
|
#pragma once
|
|
|
|
|
/**
|
|
|
|
|
* @file update_data.h
|
|
|
|
|
* @brief 刷新数据到MemCachedClient
|
|
|
|
|
* @author your name (you@domain.com)
|
|
|
|
|
* @version 0.1
|
|
|
|
|
* @date 2023-12-22
|
|
|
|
|
*
|
|
|
|
|
* Copyright: Baosight Co. Ltd.
|
|
|
|
|
* DO NOT COPY/USE WITHOUT PERMISSION
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
#include <eqpalg/gb_item_memory.h>
|
|
|
|
|
#include <eqpalg/utility/eqp_stat.h>
|
|
|
|
|
#include <eqpalg/utility/eqp_status.h>
|
|
|
|
|
#include <log4cplus/LOG.h>
|
2026-05-09 13:30:09 +08:00
|
|
|
#include <zlib/MemCachedClient.h>
|
2026-05-09 11:23:45 +08:00
|
|
|
#include <memory>
|
|
|
|
|
#include <shm/SingletonTemp.hpp>
|
|
|
|
|
class UpDateData {
|
|
|
|
|
private:
|
2026-05-09 13:30:09 +08:00
|
|
|
MemCachedClient m_memclient;
|
|
|
|
|
string unitNo_ = string(CMemVar::Const()->UnitNo);
|
|
|
|
|
string Jkey_data_;
|
|
|
|
|
string Jkey_rule_stat_;
|
|
|
|
|
string Jkey_eqp_state_;
|
|
|
|
|
std::unique_ptr<LOG> logger_;
|
|
|
|
|
std::unique_ptr<EqpStatus> eqp_status_ptr_;
|
2026-05-09 11:23:45 +08:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* @brief 构造 指定key
|
|
|
|
|
* @param Jkey_data fdaaitem数据的key
|
|
|
|
|
* @param Jkey_rule_stat 规则shm的key
|
|
|
|
|
*/
|
|
|
|
|
UpDateData(string Jkey_data, string Jkey_rule_stat);
|
|
|
|
|
/**
|
|
|
|
|
* @brief 默认构造
|
|
|
|
|
*/
|
|
|
|
|
UpDateData();
|
|
|
|
|
~UpDateData();
|
|
|
|
|
/**
|
|
|
|
|
* @brief 更新fdaaitem数据
|
|
|
|
|
*/
|
|
|
|
|
void update_item_data();
|
|
|
|
|
/**
|
|
|
|
|
* @brief 刷新规则shm数据
|
|
|
|
|
*/
|
|
|
|
|
void update_rule_stat_data();
|
|
|
|
|
/**
|
|
|
|
|
* @brief
|
|
|
|
|
*/
|
|
|
|
|
void update_eqp_status();
|
|
|
|
|
};
|