public static void Open() { switch (CommunicationWay) { case 0: { UsbCommunication.OpenPort(); break; } default: { UsbCommunication.OpenPort(); break; } } }
public static void Read(byte[] GetByte) { switch (CommunicationWay) { case 0: { UsbCommunication.Read(GetByte); break; } default: { UsbCommunication.Read(GetByte); break; } } }
public static void Init() { switch (CommunicationWay) { case 0: { UsbCommunication.Init(); break; } default: { UsbCommunication.Init(); break; } } }
public static void Write(byte[] SendByte) { switch (CommunicationWay) { case 0: { UsbCommunication.Write(SendByte); break; } default: { UsbCommunication.Write(SendByte); break; } } }
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; }