DLLGetDriveCommunicationType
函数 DLLGetDriveCommunicationType 获取指定驱动的通信类型。(通信类型标识总线协议,如 EtherCAT 等。)
C/C++
ErrorCode DLLGetDriveCommunicationType(INT_PTR hClientHandle, int* outCommunicationType);
C#
Controller.Information.DriveCommunicationType — 属性,查询驱动通信类型。
参数
hClientHandle (INT_PTR)
客户端会话句柄,由 DLLSysConnect 获取。
outCommunicationType (int*)
输出。接收驱动通信类型值。0 表示 EtherCAT;其他值含义参见控制器固件文档。
返回值
返回 ErrorCode;NoError (0) 表示成功,正值为错误码,详见 SDK 发布头 ErrorCode.h。
说明
实际通信类型值应参考 OneSys/SystemModule.cpp 中 GetDriveCommunicationType 的实现。
示例
int commType = 0;
DLLGetDriveCommunicationType(handle, &commType);
/* 取值含义见 .NET SDK 的 DriveCommunicationType 枚举 */