資源簡介
基于linux 操作系統 modbus tcp 測試源碼。基于tcp的modbus。
代碼片段和文件信息
#include?
#include?
#include?“modbus_tcp.h“
#include?“shell.h“
#define?MAX_COMMAND_LEN?200
#define?MAX_CMD_NUM?20
int?main(int?argc?char?*argv[])?{
????char?command[MAX_COMMAND_LEN]?=?{0};
????int?argc_cmd;
????char?*argv_cmd[MAX_CMD_NUM];
????int?rc;
AGAIN:
????rc?=?init_shell();
????if?(rc?0)?{
????????goto?AGAIN;
????}
????while?(1)?{
????????printf(“\nmodbus_tcp_shell>?“);
????????fgets(command?sizeof(command)?stdin);
????????command[strlen(command)?-?1]?=?‘\0‘;
????????argc_cmd?=?shell_parse(command?argv_cmd);
????????shell_do_command(argc_cmd?argv_cmd);
????}
????return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????651??2012-07-27?11:12??modbustcp\main.c
?????文件????????135??2012-07-27?17:06??modbustcp\Makefile
?????文件??????18014??2012-07-31?14:48??modbustcp\modbus_tcp.c
?????文件???????1372??2012-07-26?17:46??modbustcp\modbus_tcp.cbp
?????文件???????3496??2012-07-31?14:27??modbustcp\modbus_tcp.h
?????文件????????853??2012-08-02?09:20??modbustcp\modbus_tcp.layout
?????文件???????9662??2012-07-31?14:57??modbustcp\shell.c
?????文件????????227??2012-07-27?15:06??modbustcp\shell.h
?????文件???????2274??2012-07-27?15:10??modbustcp\tcp.c
?????文件????????462??2012-07-27?15:09??modbustcp\tcp.h
?????目錄??????????0??2012-08-02?09:20??modbustcp
-----------?---------??----------?-----??----
????????????????37146????????????????????11
- 上一篇:自己手寫0到9的數字庫可用于訓練、識別
- 下一篇:VC繪制正弦曲線,可調繪制周期數
評論
共有 條評論