Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }