网络拍照在子类构造函数中调用updatetime

lowmem
XI.CHEN 4 weeks ago
parent 8ff8a4bb1e
commit 1772027e9e

@ -12,6 +12,16 @@
#include <cstring>
#include <algorithm>
HangYuCtrl::HangYuCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime)
: VendorCtrl(ip, userName, password, channel, netHandle, syncTime)
{
if (syncTime)
{
time_t ts = time(NULL);
UpdateTime(ts);
}
}
HangYuCtrl::~HangYuCtrl()
{

@ -10,7 +10,7 @@
class HangYuCtrl : public VendorCtrl
{
public:
using VendorCtrl::VendorCtrl;
HangYuCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
virtual ~HangYuCtrl();
virtual bool SetOsd(uint8_t channel, std::string osd, uint8_t pos);

@ -12,6 +12,16 @@
#include <cstring>
#include <algorithm>
HikonCtrl::HikonCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime)
: VendorCtrl(ip, userName, password, channel, netHandle, syncTime)
{
if (syncTime)
{
time_t ts = time(NULL);
UpdateTime(ts);
}
}
HikonCtrl::~HikonCtrl()
{

@ -10,7 +10,7 @@
class HikonCtrl : public VendorCtrl
{
public:
using VendorCtrl::VendorCtrl;
HikonCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
virtual ~HikonCtrl();
virtual bool SetOsd(uint8_t channel, std::string osd, uint8_t pos);

@ -7,11 +7,7 @@
VendorCtrl::VendorCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime/* = true*/) :
m_ip(ip), m_userName(userName), m_password(password), m_channel(channel), m_netHandle(netHandle)
{
if (syncTime)
{
time_t ts = time(NULL);
// UpdateTime(ts);
}
}
std::string VendorCtrl::CvtJSONToString(const Json::Value& data)
{

@ -8,6 +8,16 @@
#include <json/json.h>
YuShiCtrl::YuShiCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime)
: VendorCtrl(ip, userName, password, channel, netHandle, syncTime)
{
if (syncTime)
{
time_t ts = time(NULL);
UpdateTime(ts);
}
}
YuShiCtrl::~YuShiCtrl()
{

@ -10,7 +10,8 @@
class YuShiCtrl : public VendorCtrl
{
public:
using VendorCtrl::VendorCtrl;
// using VendorCtrl::VendorCtrl;
YuShiCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
virtual ~YuShiCtrl();
virtual bool SetOsd(uint8_t channel, std::string osd, uint8_t pos);

Loading…
Cancel
Save