public bool GetMotorType(ref EMotorType motorType) { uint lastErrorCode = 0; var result = VcsWrapper.Device.VcsGetMotorType(KeyHandle, NodeId, ref motorType, ref lastErrorCode) > 0; LastErrorCode = lastErrorCode; return(result); }
public override bool Execute(string source) { bool result = false; var eposDevice = Device as EposDevice; var communication = eposDevice?.Communication as Epos4DeviceCommunication; EMotorType motorType = 0; if (communication != null) { var commandResult = communication.GetMotorType(ref motorType); if (commandResult) { SetParameterValue("MotorType", (short)motorType); } SetParameterValue("ErrorCode", communication.LastErrorCode); SetParameterValue("Result", commandResult); result = true; } return(result); }