|
|
@@ -16,7 +16,7 @@ typedef struct
|
|
|
static SMCBCom s_myCom = { 0 };
|
|
|
|
|
|
// 声明Go中处理串口请求并返回应答结果的函数(供C调用)
|
|
|
-extern char *RTU_ProcessJsonString(const char *s);
|
|
|
+extern char *RTU_JsonMsgProcCb(const char *jsonStr);
|
|
|
|
|
|
// 接收处理来自MCU控制板的数据报文帧, 串口-数据回调
|
|
|
static int comio_data_recv_proc(unsigned long wParam/*传递打开的串口句柄*/, unsigned long lParam/*保留暂未使用*/)
|
|
|
@@ -39,7 +39,7 @@ static int comio_data_recv_proc(unsigned long wParam/*传递打开的串口句
|
|
|
break;
|
|
|
case lwjsonSTREAMDONE: // 4, 解析已完成
|
|
|
sw_log_debug("[%s] %s received a request(%d bytes): %s", MODULE_NAME, log_prefix, nRecvBytes, pRecvBuf);
|
|
|
- char *pResponse = RTU_ProcessJsonString((const char *)pRecvBuf);
|
|
|
+ char *pResponse = RTU_JsonMsgProcCb((const char *)pRecvBuf);
|
|
|
if(pResponse)
|
|
|
{
|
|
|
int nRspBytes = strlen(pResponse);
|