コード例 #1
0
ファイル: Nonin9560.cs プロジェクト: jmmcmillan/Nonin9560
        public Nonin9560(bool attemptToReconnectEnabled, Packets.DataFormat dataFormat)
        {
            this.AttemptToReconnect = attemptToReconnectEnabled;
            this.DataFormat = dataFormat;

            btClient = new NoninBluetoothClient(AttemptToReconnect, DataFormat);

            btClient.MostRecentReadingUpdated += new EventHandler(ReadingUpdated);
            btClient.UnrecoverableError += new EventHandler<PulseOxErrorEventArgs>(btClient_UnrecoverableError);

            this.IsEnabled = true;
        }
コード例 #2
0
 public NoninBluetoothClient(bool atrEnabled, Packets.DataFormat dataFormat)
 {
     ATREnabled = atrEnabled;
     DataFormat = dataFormat;
 }
コード例 #3
0
        private bool SetDataFormat(Packets.DataFormat df)
        {
            byte[] selectDFPacket = Packets.DataFormatPackets[df];

            WriteStream(selectDFPacket);

            byte[] responseBytes = ReadStream(1);

            if (responseBytes[0].Equals(Packets.ACK))
            {
                return true;
            }

            return false;
        }