Skip to content

How can I get total number of available models knowing protocol number? #1549

Answered by crankyoldgit
max5555 asked this question in Q&A
Discussion options

You must be logged in to vote

There is no standard or easy way.
You could write code to (ab)use irutils::modelToStr();
i.e. (Untested Code):

uint16_t howmanymodels(const decode_type_t protocol) {
  uint16_t model_count = 0;
  while (irutils::modelToStr(protocol, model_count) != kUnknownStr) {  
    model_count++;
  }
  return model_count;
} 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by crankyoldgit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants