32 lines
693 B
C++
32 lines
693 B
C++
#ifndef VIDICON_PROPERTIES_H
|
|
#define VIDICON_PROPERTIES_H
|
|
#include "common/json_util.h"
|
|
|
|
namespace zsy
|
|
{
|
|
struct VidiconProperties
|
|
{
|
|
std::string sn;
|
|
std::string name;
|
|
std::string ip;
|
|
uint16_t port{8000};
|
|
std::string username;
|
|
std::string passwd;
|
|
uint16_t type;
|
|
};
|
|
|
|
inline void from_json(const nlohmann::json &j, VidiconProperties &o)
|
|
{
|
|
PARSE_JSON(sn, o.sn);
|
|
PARSE_JSON(name, o.name);
|
|
PARSE_JSON(ip, o.ip);
|
|
PARSE_JSON(port, o.port);
|
|
PARSE_JSON(username, o.username);
|
|
PARSE_JSON(passwd, o.passwd);
|
|
PARSE_JSON(type, o.type);
|
|
}
|
|
}
|
|
|
|
|
|
#endif //VIDICON_PROPERTIES_H
|