Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does vxworks get logMsg Information

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "vxworks how to get logMsg information", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "vxworks how to get logMsg information" this article.

A superficial story

VxWorks provides a message logging mechanism, which mainly displays the debugging information of the system through the console of the system, and the function provided is logMsg (). It can be called in Task or ISR, and then the relevant information is printed by a Task called "tLogTask".

The story behind it

This mechanism is supported by the component INCLUDE_LOGGING

The function logMsg () calls msgQSend (), passing the statement fmt to a static message queue that can cache up to MAX_LOG_MSGS messages. The fourth parameter timeout of msgQSend () considers three situations: (a) when called in an interrupt, NO_WAIT; (b) normal Task is used, and WAIT_FOREVER; (c) unbreakable's Task is used, depending on the component LOG_MSG_UNBREAKABLE_TASK_NO_WAIT to decide whether to use NO_WAIT or WAIT_FOREVER. If msgQSend () fails to send, record the number of failures

The default properties of "tLogTask" are as follows

It calls msgQReceive (xx, WAIT_FOREVER) to receive the message sent by logMsg (), and then prints it to the console of the system. The console of the system, if there is PC Console, uses VGA, otherwise it uses serial port.

In addition, this mechanism also provides a function logFdAdd (int fd), which can simultaneously output these messages to other IO, such as Telnet or file.

The above is all the contents of the article "how to get logMsg Information from vxworks". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report