public static bool IsConfigMessage(UBXModelBase message)
        {
            var attribute = message.GetType().GetTypeInfo().GetCustomAttribute <UBXConfigAttribute>();

            if (attribute != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
 /// <summary>
 /// Create description key for expecting a message of type.
 /// </summary>
 /// <param name="message">The message</param>
 public ExpectingDescription(UBXModelBase message)
 {
     if (message is AcknowledgeBase)
     {
         var ack = message as AcknowledgeBase;
         this.classId             = ack.ClassID;
         this.messageId           = ack.MessageID;
         this.expectedMessageMode = ExpectingMode.Acknowledge;
     }
     else
     {
         this.expectingType       = message.GetType();
         this.expectedMessageMode = ExpectingMode.Regular;
     }
 }
 internal static UBXMessageAttribute GetMessageAttribute(UBXModelBase message)
 {
     return(message.GetType().GetTypeInfo().GetCustomAttribute <UBXMessageAttribute>());
 }