| | |
| | | #include <stdarg.h> |
| | | #include <jsoncpp/json/json.h> |
| | | #include <arpa/inet.h> |
| | | #include <SqliteToolkit.hpp> |
| | | |
| | | #include "erl_interface.h" |
| | | #include "ei.h" |
| | |
| | | private: |
| | | void initCNode(); |
| | | |
| | | public: |
| | | //#todo setCNodeName |
| | | // 向erlang端直接发送sql语句 |
| | | bool getExecSqlResult(const std::string &strSql); |
| | | |
| | | public: |
| | | |
| | | // 将c节点名称设置给erlang使其可以在接收到消息时,能通知到本节点 |
| | | bool setCNodeName(); |
| | | |
| | | // 向erlang发送消息, #TODO 目前仅实现了信号,待实现消息体 |
| | | bool sendMessage(); |
| | | |
| | | //#todo sendMessage |
| | | |
| | | // 设置匿名c节点接受erlang节点向c节点发送的消息 |
| | | void test(pthread_cond_t *, pthread_mutex_t *); |
| | | |
| | | /*** |
| | |
| | | */ |
| | | bool removeNode(); |
| | | |
| | | |
| | | /** |
| | | * 修改集群名称 |
| | | * @param CluId |
| | | * @param CluName |
| | | * @return |
| | | */ |
| | | bool modifyCluName(std::string CluId, std::string CluName); |
| | | |
| | | |
| | |
| | | * @param TableName |
| | | * @param SyncType true 1||false 0 |
| | | * @param BwType "Black"1||"White"0 |
| | | * @param StartTime |
| | | * @param EndTime |
| | | * @return 创建状态 |
| | | */ |
| | | bool createDatabase(std::string TableType, std::string TableName, bool SyncType, std::string BwType, |
| | | std::string StartTime = "", std::string EndTime = ""); |
| | | |
| | | /*** |
| | | * 创建底库表 |
| | | * @param TableType TableType car||person |
| | | * @param TableName |
| | | * @param SyncType true 1||false 0 |
| | | * @param BwType "Black"1||"White"0 |
| | | * @param UploadFlag 是否上传 |
| | | * @param CmpThreshold 对比阈值 |
| | | * @param Enabled 是否启用 |
| | | * @param StartTime |
| | | * @param EndTime |
| | | * @return |
| | | */ |
| | | bool createDatabase(std::string t_tableName, FieldValues &fieldValues); |
| | | |
| | | /*** |
| | | * 更新底库表 |
| | |
| | | bool updateDatabase(std::string UUID, std::string TableType, std::string TableName, bool SyncType, |
| | | std::string BwType, std::string StartTime = "", std::string EndTime = ""); |
| | | |
| | | bool updateDatabase(std::string t_tableName, FieldValues &fieldValues); |
| | | |
| | | /*** |
| | | * 删除数据表 |
| | | * @param TableType car||person |
| | |
| | | * @return |
| | | */ |
| | | bool deleteDatabase(std::string TableType, std::string TableName, bool SyncType); |
| | | |
| | | bool deleteDatabase(std::string t_tableName); |
| | | |
| | | /*** |
| | | * 查询所有数据表 |
| | |
| | | bool addPerson(std::string &UUID, std::string TableName, std::string Feature, std::string ImgUrl = " ", |
| | | std::string IdCard = " ", std::string PersonName = " ", std::string Age = " ", |
| | | std::string Sex = " ", std::string PhoneNum = " "); |
| | | |
| | | bool |
| | | ErlangTool::ErlangDbTool::addPerson(std::string t_tableName, AddFaceData &faceData, FieldValues &fieldValues); |
| | | |
| | | bool updatePerson(std::string t_tableName, AddFaceData &faceData, FieldValues &fieldValues); |
| | | |
| | | vec_AddDataCache addPersons(std::string TableUuid, std::vector<SyncDB::AddPersonInfo> &tmpPer); |
| | | |
| | |
| | | std::string PerPicUrl, std::string PerFea); |
| | | // private: |
| | | /*** |
| | | * 重新连接节点 |
| | | * 为了防止过长时间连接被关闭,主动重新连接节点 |
| | | * @return 连接状态 |
| | | */ |
| | | bool resetConn(); |
| | |
| | | private: |
| | | //存储路径 |
| | | std::string m_path; |
| | | // erlang 节点名称 |
| | | std::string m_nodeName; |
| | | // 程序内的c节点名称 进程名+pid@127.0.0.1 |
| | | std::string m_cNodeName; |
| | | // 进程名+pid?#TODO |
| | | std::string m_pName; |
| | | std::string m_cookie; |
| | | |