예제 #1
0
 public override UEI.HidIf.CommandType DoCommand(CrystalisHIDDevice dev)
 {
     Thread.Sleep(2000);
     m_tw.Write("(" + Thread.CurrentThread.GetHashCode() + ")");
     m_tw.WriteLine("Message1 wrote this:");
     m_tw.Flush();
     Thread.Sleep(2000);
     return UEI.HidIf.CommandType.ResponseSuccess;
 }
        /// <summary>
        /// GetFile to the remote.
        /// </summary>
        /// <param name="crys_comm">Crystalis device used to communicate with a remote</param>
        /// <returns>UEI.HidIf.CommandType</returns>
        public override UEI.HidIf.CommandType DoCommand(CrystalisHIDDevice crys_comm)
        {

            retVal = UEI.HidIf.CommandType.ResponseSuccess;
            if(UEI.HidIf.HidIFTraceSwitch.trace_switch.Level >= System.Diagnostics.TraceLevel.Info)
            {
                UEI.Diagnostics.Debug.WriteLine(String.Format("({0})GetFile.. executing",
                                                              Thread.CurrentThread.GetHashCode()));
            }

            retVal = crys_comm.GetFile(m_filename);

            if(UEI.HidIf.HidIFTraceSwitch.trace_switch.Level >= System.Diagnostics.TraceLevel.Info)
            {
                UEI.Diagnostics.Debug.WriteLine(String.Format("({0})GetFile.. complete",
                                                              Thread.CurrentThread.GetHashCode()));
            }
            return retVal;
        }
 public UEI.HidIf.CommandType DoCommandProcess(CrystalisHIDDevice crys_comm)
 {
     m_retVal = DoCommand(crys_comm);
     m_ewh.Set();
     SendCompleteEvent();
     return m_retVal;
 }
 /// <summary>
 /// Do a command asynchronously
 /// </summary>
 /// <param name="dev">Crystalis device used to communicate with a remote</param>
 /// <returns>UEI.HidIf.CommandType</returns>
 public abstract UEI.HidIf.CommandType DoCommand(CrystalisHIDDevice crys_comm);