| 12345678910111213141516171819202122232425262728 |
- // +build ignore
- #include "mcu_ctrl_board.h"
- char *RTU_JsonMsgProcCb(const char *request)
- {
- char *response = (char *)malloc(MAX_LINE_CHARS);
- if (!response) return NULL;
- snprintf(response, MAX_LINE_CHARS, "{\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32601,\"message\":\"Method not found\"},\"id\":1}");
- return response;
- }
- int main(int argc,char *argv[])
- {
- int ret = MCBComInit();
- if(ret < 0)
- {
- sw_log_error("an error occurred while calling the MCBComInit() function(%d)!!", ret);
- goto end_p;
- }
- getchar();
- end_p:
- MCBComExit();
- return 0;
- }
|