public void Send(string data)
        {
            BarcodeSimulator = new ConnectedObject();
            byte[] barcodelength = ConnectedObject.ConvertIntToByteArray16((short)data.Length);

            _writer.Write(Encoding.ASCII.GetString(BarcodeSimulator.MsgTerminatorStart.ToArray(), 0, BarcodeSimulator.MsgTerminatorStart.Count));
            _writer.Write(Encoding.ASCII.GetString(barcodelength, 0, barcodelength.Length));
            _writer.Write(data);
            _writer.Write(Encoding.ASCII.GetString(BarcodeSimulator.MsgTerminatorStop.ToArray(), 0, BarcodeSimulator.MsgTerminatorStop.Count));

            _writer.Flush();
        }