跳转至

TVersion

模块通信状态结构体

结构体说明:

typedef struct
{ 
unsigned short type; 
short id; 
long status; 
unsigned long synchCount; 
unsigned long ringNetType; 
unsigned long portStatus; 
unsigned long sportDropCount; 
unsigned long reserve[7]; 
} TTerminalStatus;

type:模块类型。
id:模块物理序号。
status:模块状态,按位表示:

bit0:通讯状态,0:通讯错误,1:通讯正常。
bit1:使能状态,0:模块未使能,1:模块使能。
synchCount:保留参数,必须为0。
ringNetType:网络状态,按位表示:
bit0:连接状态,0:未连接,1:连接。
bit1:环回状态,0:环网,1:非环网。
portStatus:模块端口状态,按位表示:
bit2~3:同步状态,0:不正常,1:正常。
bit7:安全模式标识,0:安全模式,1:正常运行。
bit8:端口A物理连接状态,0:未连接,1:连接。
bit9:端口A工作准备状态,0:未准备完成,1:正常运行。
bit12:端口B物理连接状态,0:未连接,1:连接。
bit13:端口B工作准备状态,0:未准备完成,1:正常运行。
sportDropCount:模块丢包个数。
reserve:保留参数。

调用指令:

GTN_GetTerminalStatus

注意事项: