High Performance Registration Library for Embedded Applications

I am looking for a high performance protocol library that I will use on an embedded device.

I also want to say that I previously used the PaulBunyan logging library, which provided an efficient method of transmitting information.

[Effective, I mean that it was the decision to transfer only __LINE__and __FILE__when sending data over a low-speed interface (for example, SERIAL) - of course, a comparison was made __LINE__ __FILE__by scanning a code].

Do you know such solutions, or at least similar ones?

Thanks in advance for any pointers / similar solutions,

Julian

+3
source share
2 answers

The solution is to implement this, since there are no open alternatives.

+2
source

It is best to use the same journal library that you mentioned, but with codes specific to the OS (for example: line number, file name, sequential messages), separately from the logical code. OS-specific code must be contained in functions or macros and then called from a logical code.

Example:

#OS_LINE   _LINE_
#OS_FILE   _FILE_
#OS_SEND(a) Send(a)

int log(void)
{
   char msg[50];
   sprintf(msg, "line %i, %s", OS_LINE, OS_FILE);
   OS_SEND(msg);
   return 0;
}

With this, you can reuse the library simply by changing the Mac OS for each device.

0
source

Source: https://habr.com/ru/post/1767515/


All Articles