Ejemplo n.º 1
0
        public static void SendMessage(BluetoothMessage message)
        {
            if (!isInitialized)
            {
                throw new InvalidOperationException("WT32: Please call Initialize() before sending messages.");
            }

            sendBuffer = Multiplexing.MUX(message);
            bluetooth.Write(sendBuffer, 0, sendBuffer.Length);
            Debug.Print("WT32: Message \"" + message.Command.Trim() + "\" sent to link " + message.Link + ".");
        }
Ejemplo n.º 2
0
        public static void ExcecuteCommand(string command)
        {
            if (!isInitialized)
            {
                throw new InvalidOperationException("WT32: Please call Initialize() before sending commands.");
            }

            sendBuffer = Multiplexing.MUX(new BluetoothMessage(Link.Control, command));
            bluetooth.Write(sendBuffer, 0, sendBuffer.Length);
            Debug.Print("WT32: Command \"" + command + "\" sent.");
        }