update
This commit is contained in:
parent
402ccd0eb1
commit
ecd5ab397c
@ -531,7 +531,8 @@ static void* ryftp_process(void* param)
|
|||||||
struRYDeviceData *data = (struRYDeviceData *)chunk.response;
|
struRYDeviceData *data = (struRYDeviceData *)chunk.response;
|
||||||
int uid = mbt->GetCurUnitID();
|
int uid = mbt->GetCurUnitID();
|
||||||
mbt->UnitFeedFTPDog(uid);
|
mbt->UnitFeedFTPDog(uid);
|
||||||
for (int i = 0; i < 250; i++, data++) { //每个文件有250个数据块
|
int data_count = (chunk.size / sizeof(struRYDeviceData));
|
||||||
|
for (int i = 0; i < data_count; i++, data++) { //每个文件有250个数据块
|
||||||
QLONG unix_time = filetime_to_unix(data->localtime);
|
QLONG unix_time = filetime_to_unix(data->localtime);
|
||||||
DWORD localtime = ((unix_time / 1000) - 28800L);
|
DWORD localtime = ((unix_time / 1000) - 28800L);
|
||||||
|
|
||||||
@ -550,7 +551,6 @@ static void* ryftp_process(void* param)
|
|||||||
st.hour, st.minute, st.millisecond/1000, millisec);
|
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);
|
|
||||||
//如何将结构化数据传入,且快速获取
|
//如何将结构化数据传入,且快速获取
|
||||||
Json::Value highspeedvalues;
|
Json::Value highspeedvalues;
|
||||||
for (datatypemap::iterator it = highspeedmap.begin(); it != highspeedmap.end(); it++) {
|
for (datatypemap::iterator it = highspeedmap.begin(); it != highspeedmap.end(); it++) {
|
||||||
@ -560,7 +560,6 @@ static void* ryftp_process(void* param)
|
|||||||
int point = it->second;
|
int point = it->second;
|
||||||
if (GetYCValue(point, fields, (const char *)data, dvalue)) {
|
if (GetYCValue(point, fields, (const char *)data, dvalue)) {
|
||||||
if (adsGetUnitYCIsFloat(uid, point)) {
|
if (adsGetUnitYCIsFloat(uid, point)) {
|
||||||
//fprintf(stderr, "%s, ", config.units[uid].ycs[order].name);
|
|
||||||
highspeedvalues[(const char *)config.units[uid].ycs[order].name] = adsGetUnitYCRealFromValue(uid, point, dvalue);
|
highspeedvalues[(const char *)config.units[uid].ycs[order].name] = adsGetUnitYCRealFromValue(uid, point, dvalue);
|
||||||
} else {
|
} else {
|
||||||
highspeedvalues[(const char *)config.units[uid].ycs[order].name] = dvalue;
|
highspeedvalues[(const char *)config.units[uid].ycs[order].name] = dvalue;
|
||||||
@ -583,9 +582,7 @@ static void* ryftp_process(void* param)
|
|||||||
int order = it->first;
|
int order = it->first;
|
||||||
int point = it->second;
|
int point = it->second;
|
||||||
if (GetYCValue(point, fields, (const char *)data, dvalue)) {
|
if (GetYCValue(point, fields, (const char *)data, dvalue)) {
|
||||||
//fprintf(stderr, "get<%d> value is: %d.\n", point, dvalue);
|
|
||||||
if (adsGetUnitYCIsFloat(uid, point)) {
|
if (adsGetUnitYCIsFloat(uid, point)) {
|
||||||
//fprintf(stderr, "%s, ", config.units[uid].ycs[order].name);
|
|
||||||
lowspeedvalues[(const char *)config.units[uid].ycs[order].name] = adsGetUnitYCRealFromValue(uid, point, dvalue);
|
lowspeedvalues[(const char *)config.units[uid].ycs[order].name] = adsGetUnitYCRealFromValue(uid, point, dvalue);
|
||||||
} else {
|
} else {
|
||||||
lowspeedvalues[(const char *)config.units[uid].ycs[order].name] = dvalue;
|
lowspeedvalues[(const char *)config.units[uid].ycs[order].name] = dvalue;
|
||||||
@ -599,7 +596,6 @@ static void* ryftp_process(void* param)
|
|||||||
int order = it->first;
|
int order = it->first;
|
||||||
int point = it->second.point;
|
int point = it->second.point;
|
||||||
int pos = it->second.pos;
|
int pos = it->second.pos;
|
||||||
//vLog(LOG_DEBUG, "start to get point is: %d, pos is: %d\n", point, pos);
|
|
||||||
if (GetYXValue(point, fields, (const char *)data, pos, bvalue)) {
|
if (GetYXValue(point, fields, (const char *)data, pos, bvalue)) {
|
||||||
lowspeedvalues[(const char *)config.units[uid].yxs[order].name] = (int)bvalue;
|
lowspeedvalues[(const char *)config.units[uid].yxs[order].name] = (int)bvalue;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user