update
This commit is contained in:
parent
d4588264fc
commit
189d894d3c
@ -2817,11 +2817,11 @@ void CRYDevice::heart_beat(int status)
|
|||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
Json::Value jsonLink;
|
Json::Value jsonLink;
|
||||||
Json::Value jsonDevice;
|
Json::Value jsonDevice;
|
||||||
Json::Value jsonValue;
|
|
||||||
for (int i = 0; i < PROCESSES_NUM; i++) {
|
for (int i = 0; i < PROCESSES_NUM; i++) {
|
||||||
if ((config.processes[i].state & 0x01) == TRUE) {
|
if ((config.processes[i].state & 0x01) == TRUE) {
|
||||||
char linkId[32];
|
char linkId[32];
|
||||||
if (config.processes[i].irn == 0) continue;
|
if (config.processes[i].irn == 0) continue;
|
||||||
|
Json::Value jsonValue;
|
||||||
#ifdef NOPOLL_64BIT_PLATFORM
|
#ifdef NOPOLL_64BIT_PLATFORM
|
||||||
snprintf(linkId, sizeof(linkId), "%ld", config.processes[i].irn);
|
snprintf(linkId, sizeof(linkId), "%ld", config.processes[i].irn);
|
||||||
#else
|
#else
|
||||||
@ -2830,7 +2830,7 @@ void CRYDevice::heart_beat(int status)
|
|||||||
jsonValue["linkId"] = linkId;
|
jsonValue["linkId"] = linkId;
|
||||||
jsonValue["online"] = (config.processes[i].real_softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
jsonValue["online"] = (config.processes[i].real_softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
||||||
jsonValue["real"] = (config.processes[i].real_softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
jsonValue["real"] = (config.processes[i].real_softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
||||||
if (config.processes[i].state & 0x20) {
|
if ((config.processes[i].state & 0x20) == 0x20) {
|
||||||
jsonValue["ftp"] = (config.processes[i].real_softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
jsonValue["ftp"] = (config.processes[i].real_softdog >= PROCESS_WATCHDOG_TIME) ? false : true;
|
||||||
}
|
}
|
||||||
jsonLink.append(jsonValue);
|
jsonLink.append(jsonValue);
|
||||||
@ -2845,6 +2845,7 @@ void CRYDevice::heart_beat(int status)
|
|||||||
if ((config.units[i].state & 0x01) == TRUE) {
|
if ((config.units[i].state & 0x01) == TRUE) {
|
||||||
char deviceId[32];
|
char deviceId[32];
|
||||||
if (config.units[i].irn == 0) continue;
|
if (config.units[i].irn == 0) continue;
|
||||||
|
Json::Value jsonValue;
|
||||||
#ifdef NOPOLL_64BIT_PLATFORM
|
#ifdef NOPOLL_64BIT_PLATFORM
|
||||||
snprintf(deviceId, sizeof(deviceId), "%ld", config.units[i].irn);
|
snprintf(deviceId, sizeof(deviceId), "%ld", config.units[i].irn);
|
||||||
#else
|
#else
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#define ADSP_READ_ID_REGISTER_ADDRESS 300 //读取文件及文件夹ID寄存器地址。
|
#define ADSP_READ_ID_REGISTER_ADDRESS 300 //读取文件及文件夹ID寄存器地址。
|
||||||
#define ADSP_READ_ID_REGISTER_LENGTH 32 //读取文件及文件夹ID寄存器长度。
|
#define ADSP_READ_ID_REGISTER_LENGTH 32 //读取文件及文件夹ID寄存器长度。
|
||||||
|
|
||||||
//#define vLog(...)
|
#define vLog(...)
|
||||||
static datalen2mbaddrmap m_datalen2mbaddr_map;
|
static datalen2mbaddrmap m_datalen2mbaddr_map;
|
||||||
static struDataLengthADSAddr m_datalen_adsaddr[] = {
|
static struDataLengthADSAddr m_datalen_adsaddr[] = {
|
||||||
{ 2, 421, 0.1 },
|
{ 2, 421, 0.1 },
|
||||||
@ -538,13 +538,18 @@ static void* ryftp_process(void* param)
|
|||||||
DWORD millisec = unix_time % 1000;
|
DWORD millisec = unix_time % 1000;
|
||||||
unix_time = localtime; unix_time *= 1000;
|
unix_time = localtime; unix_time *= 1000;
|
||||||
unix_time += millisec;
|
unix_time += millisec;
|
||||||
#if 0
|
#if 1
|
||||||
unionCP56Time st;
|
//if (mbt->GetCurID() == 29)
|
||||||
st = Time_ttounionCP56Time(localtime);
|
if (i == 2)
|
||||||
vLog(LOG_DEBUG, "data<%d> time is: %04d/%02d/%02d %02d:%02d:%02d.%03d\n", \
|
{
|
||||||
i, \
|
unionCP56Time st;
|
||||||
st.year + 2000, st.month, st.dayofmonth, \
|
st = Time_ttounionCP56Time(localtime);
|
||||||
st.hour, st.minute, st.millisecond/1000, st.millisecond%1000);
|
vLog(LOG_DEBUG, "unix_time is: %ld, localtime is: %d, and data<%d> time is: %04d/%02d/%02d %02d:%02d:%02d.%03d\n", \
|
||||||
|
unix_time, localtime,
|
||||||
|
i, \
|
||||||
|
st.year + 2000, st.month, st.dayofmonth, \
|
||||||
|
st.hour, st.minute, st.millisecond/1000, millisec);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
//vLog(LOG_DEBUG, "data.iPitchAngle1 is: %d, data.iPitchAngle2 is: %d, and data.iPitchAngle3 is: %d\n", data->iPitchAngle1, data->iPitchAngle2, data->iPitchAngle3);
|
//vLog(LOG_DEBUG, "data.iPitchAngle1 is: %d, data.iPitchAngle2 is: %d, and data.iPitchAngle3 is: %d\n", data->iPitchAngle1, data->iPitchAngle2, data->iPitchAngle3);
|
||||||
//如何将结构化数据传入,且快速获取
|
//如何将结构化数据传入,且快速获取
|
||||||
|
Loading…
Reference in New Issue
Block a user