GTN_GetTerminalStatus
指令原型:
GT_API GTN_GetTerminalStatus(short core,short index,TTerminalStatus *pTerminalStatus)
指令类型:
立即指令,调用后立即生效。
指令说明:
读取网络型模块的通讯状态。
指令参数说明:
| core |
核号,正整数,取值范围请参照核号参数范围一栏。
|
| index |
模块序号,正整数,取值范围请参照网络型模块序号参数范围一栏。
|
| pTerminalStatus |
位置比较信息参数结构体指针。详情说明请参照TTerminalStatus
TTerminalStatus
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:保留参数。
|
指令返回值:
请参照通用返回值说明。
指令示例:
注意事项: