public DeveloperFieldDescription Add(FieldDescriptionMessage mesg)
        {
            DeveloperFieldDescription desc = null;

            byte?developerDataIndex    = mesg.GetDeveloperDataIndex();
            byte?fieldDefinitionNumber = mesg.GetFieldDefinitionNumber();

            if ((developerDataIndex != null) &&
                (fieldDefinitionNumber != null))
            {
                var key = new DeveloperDataKey(
                    (byte)developerDataIndex,
                    (byte)fieldDefinitionNumber);

                m_fieldDescriptionMessages[key] = mesg;

                // Build a Description of the pairing we just created
                var pair = GetMessages(key);
                if (pair != null)
                {
                    desc = new DeveloperFieldDescription(pair.Item1, pair.Item2);
                }
            }

            return(desc);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="desc"></param>
        /// <param name="devId"></param>
        /// <param name="size"></param>
        /// <exception cref="InvalidOperationException">
        ///     If description parameter is invalid
        /// </exception>
        public DeveloperFieldDefinition(FieldDescriptionMessage desc, DeveloperDataIdMessage devId, byte size)
        {
            byte?fieldDefinitionNumber = desc.GetFieldDefinitionNumber();
            byte?developerDataIndex    = desc.GetDeveloperDataIndex();

            if ((developerDataIndex != null) &&
                (fieldDefinitionNumber != null))
            {
                m_descriptionMessage = desc;
                m_developerIdMessage = devId;
                Size               = size;
                FieldNum           = (byte)fieldDefinitionNumber;
                DeveloperDataIndex = (byte)developerDataIndex;
            }
            else
            {
                throw new FitException("Description Message must have a valid developer data index and field definition number");
            }
        }