eis/eqpm/eqpm_icei.h

72 lines
1.8 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
/**
* @file eqpm_icei.h
* @brief eqpm的ICE
* @author your name (you@domain.com)
* @version 0.1
* @date 2023-12-22
*
* Copyright: Baosight Co. Ltd.
* DO NOT COPY/USE WITHOUT PERMISSION
*
*/
#include <common/L2Event.h>
#include <ctime>
#include <dao/DbStandardDBAX.h>
#include <eqpm/eqp_status.h>
#include <eqpm/eqpm_alg.h>
#include <log4cplus/LOG.h>
#include <memory>
#include <proxy/MessageICE.h>
#include <string>
#include <thread>
#include <utility>
#include <zlib/MemCachedClient.h> ///MemCachedClient
namespace baosight {
/**
* @brief Ice接口类实现其中包含了对不同电文的调用
*/
class eqpmICEI : virtual public MessageICE {
public:
/**
* @brief Construct a new Eqp Alg I C E I object
*/
eqpmICEI();
virtual ~eqpmICEI();
/**
* @brief 简单数据调用接口
*/
virtual void SendDataShort(::Ice::Int, const ::Ice::ByteSeq &, ::Ice::Int,
const Ice::Current &);
/**
* @brief 复杂数据调用接口
*/
virtual void SendDataLong(::Ice::Int, const ::Ice::ByteSeq &, ::Ice::Int,
const ::std::string &, const ::std::string &,
const ::std::string &, const Ice::Current &);
/**
* @brief 定时器调用接口
*/
virtual void TimeNotify(::Ice::Int, const ::Ice::ByteSeq &,
const Ice::Current &);
private:
std::unique_ptr<LOG> logger_; ///< 本地logger
EqpmAlg eqpm_alg_; ///<设备点检规则计算类
const int hour_point_ = 23; ///<每天定时更新的时间点hour_point_:00:00F
const int minute_point_ = 0; ///<每天定时更新的时间点hour_point_:00:00F
time_t timep_;
std::tm *now_tm_p_;
EqpStatus eqp_status_;
MemCachedClient m_memclient; ///< MemCachedClient
string Jkey = "unit_status";
string Jvalue = "";
};
} // namespace baosight