-func (ch *Channel) SendMultiRequest(msg api.Message) api.MultiRequestCtx {
- seqNum := ch.nextSeqNum()
- ch.reqChan <- &vppRequest{
- msg: msg,
- seqNum: seqNum,
- multi: true,
+func (ch *Channel) CheckCompatiblity(msgs ...api.Message) error {
+ var comperr api.CompatibilityError
+ for _, msg := range msgs {
+ _, err := ch.msgIdentifier.GetMessageID(msg)
+ if err != nil {
+ if uerr, ok := err.(*adapter.UnknownMsgError); ok {
+ comperr.IncompatibleMessages = append(comperr.IncompatibleMessages, getMsgID(uerr.MsgName, uerr.MsgCrc))
+ continue
+ }
+ // other errors return immediatelly
+ return err
+ }
+ comperr.CompatibleMessages = append(comperr.CompatibleMessages, getMsgNameWithCrc(msg))