Exemple #1
0
        /// <summary>
        /// Returns the channel ID portion of an extended message. Throws an exception if this is not an extended message.
        ///
        /// </summary>
        public ANT_ChannelID getDeviceIDfromExt()
        {
            ANT_ChannelID antChannelId = new ANT_ChannelID();

            byte[] numArray = this.splitExtMessage(ANT_Response.extMsgParts.DeviceID);
            antChannelId.deviceNumber       = (ushort)((uint)numArray[0] + ((uint)numArray[1] << 8));
            antChannelId.pairingBit         = Convert.ToBoolean((int)numArray[2] & 128);
            antChannelId.deviceTypeID       = (byte)((uint)numArray[2] & (uint)sbyte.MaxValue);
            antChannelId.transmissionTypeID = numArray[3];
            return(antChannelId);
        }
Exemple #2
0
        /// <summary>
        /// Returns the channel ID portion of an extended message. Throws an exception if this is not an extended message.
        /// </summary>
        public ANT_ChannelID getDeviceIDfromExt()
        {
            ANT_ChannelID extID = new ANT_ChannelID();

            byte[] rawID = splitExtMessage(extMsgParts.DeviceID);

            extID.deviceNumber       = (UInt16)(rawID[0] + (rawID[1] << 8));
            extID.pairingBit         = Convert.ToBoolean(rawID[2] & 0x80);
            extID.deviceTypeID       = (byte)(rawID[2] & 0x7F);
            extID.transmissionTypeID = rawID[3];

            return(extID);
        }
Exemple #3
0
        /// <summary>
        /// Returns the channel ID portion of an extended message. Throws an exception if this is not an extended message.
        /// </summary>
        public ANT_ChannelID getDeviceIDfromExt()
        {
            ANT_ChannelID extID = new ANT_ChannelID();
            byte[] rawID = splitExtMessage(extMsgParts.DeviceID);

            extID.deviceNumber = (UInt16)(rawID[0] + (rawID[1] << 8));
            extID.pairingBit = Convert.ToBoolean(rawID[2] & 0x80);
            extID.deviceTypeID = (byte)(rawID[2] & 0x7F);
            extID.transmissionTypeID = rawID[3];

            return extID;
        }