private TopicInfo GetTopicInfo(ushort topicId, TopicIdType topicIdType, bool sendRegister=true) {
TopicInfo rez=_topics.Find(z => z.it==topicIdType && z.TopicId==topicId);
if(rez==null) {
if(topicIdType==TopicIdType.PreDefined) {
var cPath=PredefinedTopics.FirstOrDefault(z => z.Value==topicId).Key;
if(cPath!=null) {
rez=GetTopicInfo(cPath, sendRegister);
}
} else if(topicIdType==TopicIdType.ShortName) {
rez=GetTopicInfo(string.Format("{0}{1}", (char)(topicId>>8), (char)(topicId & 0xFF)), sendRegister);
}
if(rez!=null) {
rez.it=topicIdType;
}
}
return rez;
}
private ushort NextMsgId() {