修复bug

main
BlueMatthew 2 years ago
parent 39d97f4021
commit 8f9975d439

@ -17,10 +17,10 @@ MYSQL_LIB_FILE = mysqlclient
CFLAGS = -c -Werror -g -D_DEBUG -D_REENTRANT -Wformat -Wsign-compare -O3 -ansi
LIBS = -L$(MYSQL_LIB_PATH) -L/usr/local/lib64 -l$(MYSQL_LIB_FILE) -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lz -ldl -lpng -lnsl -luuid -lpthread -lm -lc -lstdc++
INCPATH = -I../include -I$(MYSQL_PATH)/include
INCPATH = -I./include -I$(MYSQL_PATH)/include
# global file
OBJS_PATH = ../obj
OBJS_PATH = ./obj
OBJS = $(OBJS_PATH)/HTService.o $(OBJS_PATH)/HTGlobal.o \
$(OBJS_PATH)/HTPublic.o $(OBJS_PATH)/HTThread.o \
$(OBJS_PATH)/HTInitUtils.o $(OBJS_PATH)/HTLogger.o \
@ -32,14 +32,14 @@ OBJS = $(OBJS_PATH)/HTService.o $(OBJS_PATH)/HTGlobal.o \
# $(OBJS_PATH)/HTTestOpencv.o
TARGET = ../bin/iecserver
#TARGET = ../bin/IMGService
TARGET = ./bin/iecserver
#TARGET = ./bin/IMGService
# for link
$(TARGET):$(OBJS)
$(CC) -Wall -O3 -o $(TARGET) $(OBJS) $(LIBS)
$(OBJS_PATH)/%.o : ./%.cpp
$(OBJS_PATH)/%.o : ./src/%.cpp
$(CC) $(CFLAGS) $(INCPATH) $< -o $@
$(OBJS_PATH)/%.o : ./compress/%.c
cc $(CFLAGS) $(INCPATH) $< -o $@
@ -48,8 +48,8 @@ $(OBJS_PATH)/%.o : ./compress/%.c
# clean flag str....
clean:
rm -rf $(OBJS_PATH)/*.o ../bin/core.* ../log/*.log $(TARGET)
rm -rf $(OBJS_PATH)/*.o ./bin/core.* ./log/*.log $(TARGET)
log :
rm -rf ../log/*.log ../bin/core.*
rm -rf ../log/*.log ./bin/core.*
obj:
rm -rf $(OBJS_PATH)/*.o

@ -13,8 +13,8 @@ monitor_enable = true
ht_server_version = 2019.06.11
[HT_LOCAL_HOST]
local_host_addr = 127.0.0.1
local_tcp_port = 2404
local_host_addr = 0.0.0.0
local_tcp_port = 2405
[HT_REMOTE_HOST]
#remote_host_addr = 192.168.1.1
@ -37,7 +37,7 @@ db_host_addr = 127.0.0.1
db_host_port = 3306
db_name = iec104
db_username = cac
db_password = Cac@123
db_password = Cac@4321
db_min_conn = 5
db_max_conn = 8

@ -20,7 +20,7 @@
#ifdef _WIN32
static const char HT_CONFIG_FILE[] = "../etc/ht_service.conf";
#else
static const char HT_CONFIG_FILE[] = "../etc/ht_service.conf" ;
static const char HT_CONFIG_FILE[] = "../etc/ht_service.conf";
#endif
class TConfig

@ -1410,17 +1410,10 @@ bool bSetPointTableValueYC(float v, unsigned int adr)
addOriginDataList(m_pIter->second); // 原始数据入库队列
vPrtLogMsg(LOG_DEBUG, RET_OK, "YC addr:%d(0x%04x) set val=%.4f added OriginDataList", adr, adr, (m_pIter->second).fval);
}
else
{
vPrtLogMsg(LOG_DEBUG, RET_OK, "YC addr:%d(0x%04x) set val=%.4f", adr, adr, (m_pIter->second).fval);
}
//vPrtLogMsg(LOG_DEBUG, RET_OK, "YC addr:%d(0x%04x) set val=%.4f", adr, adr, (m_pIter->second).fval);
}
}
else
{
vPrtLogMsg(LOG_DEBUG, RET_OK, "bSetPointTableValueYC:adr Not found, size=%d", (int)g_map_iec.size());
}
mutex_unlock(g_map_iec_mutex);
return true;
}
@ -1458,7 +1451,7 @@ bool bSetPointTableValueYC(const std::vector<IEC_OBJVAL_NEW>& values)
continue;
}
if (tableName.empty())
if (!tableName.empty())
{
tableName = (const char *)itDev->second.tableName;
dtimeFildName = (const char *)itDev->second.dtimeFieldName;

Loading…
Cancel
Save