Exemplo n.º 1
0
 public static void Open()
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 UsbCommunication.OpenPort();
                 break;
             }
         default:
             {
                 UsbCommunication.OpenPort();
                 break;
             }
     }
 }
Exemplo n.º 2
0
 public static void Read(byte[] GetByte)
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 UsbCommunication.Read(GetByte);
                 break;
             }
         default:
             {
                 UsbCommunication.Read(GetByte);
                 break;
             }
     }
 }
Exemplo n.º 3
0
 public static void Init()
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 UsbCommunication.Init();
                 break;
             }
         default:
             {
                 UsbCommunication.Init();
                 break;
             }
     }
 }
Exemplo n.º 4
0
 public static void Write(byte[] SendByte)
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 UsbCommunication.Write(SendByte);
                 break;
             }
         default:
             {
                 UsbCommunication.Write(SendByte);
                 break;
             }
     }
 }
Exemplo n.º 5
0
 public static bool IsOpen()
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 if (UsbCommunication.IsOpen()==1)
                 {
                     return true;
                 }
                 break;
             }
         default:
             {
                 if (UsbCommunication.IsOpen() == 1)
                 {
                     return true;
                 }
                 break;
             }
     }
     return false;
 }