From: Chetal P. <che...@gm...> - 2014-08-18 17:46:37
|
>But it is not clear who/what should read that information Understood. The returned message is broadcasted to all clients which are accepted by server. I am trying to understand the how the information is consumed so that we are safe to return "partial match / no match found in lircd.conf". Once I have sufficient information, I will create a ticket to decide if we want to go ahead with this solution or restructure the API. On Sun, Aug 10, 2014 at 10:40 PM, Bengt Martensson <bu...@be...> wrote: > On 08/10/14 18:54, Bengt Martensson wrote: > >> The said function sits in the drivers and is called after some receiving >> data (duration) have been collected, and tries to match it to any of >> the, through the configuration file lircd.conf known signals >> ("decoding"). I understand that request so that if the collected data >> fits, but after the fit still data remains, this fact should be >> propagated back to the caller. Exactly how this should be done is not at >> all clear. That function either returns NULL or a text string meant for >> human consumption. (The actual result of the decoding is returned in >> some global variables.) So if "partial match" just can be slammed on the >> textual message, or somehow the return type should be changed, or some >> global variable should be set -- is completely unclear. And who is to >> evaluate the partial matches? The line appears more like a note to the >> author, than a specification. So it is not something "just do it". >> Restructuring APIs is not really "some suitable work that I can start >> working on". > > I should probably add that since the returned string (char *) seems just > for human consumption, nothing should break by just appending a message > that the match was only with a part of the available data. But it is not > clear who/what should read that information, that will probably just go > into the log file/syslog. > > Greets, > > Bengt > > ------------------------------------------------------------------------------ |