Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UAVCAN UAVCAN_Subscriber
NodeStatusProvider Class Reference
Provides the status and basic information about this node to other network participants. More...
#include <node_status_provider.hpp>
Inherits uavcan::TimerBase.
Public Member Functions | |
| int | startAndPublish (const TransferPriority priority=TransferPriority::Default) |
| Starts the provider and immediately broadcasts uavcan.protocol.NodeStatus. | |
| int | forcePublish () |
| Publish the message uavcan.protocol.NodeStatus right now, out of schedule. | |
| void | setStatusPublicationPeriod (uavcan::MonotonicDuration period) |
| Allows to override default publishing rate for uavcan.protocol.NodeStatus. | |
| void | setAdHocNodeStatusUpdater (IAdHocNodeStatusUpdater *updater) |
| Configure the optional handler that is invoked before every node status message is emitted. | |
| uint8_t | getHealth () const |
| Local node health code control. | |
| uint8_t | getMode () const |
| Local node mode code control. | |
| void | setVendorSpecificStatusCode (VendorSpecificStatusCode code) |
| Local node vendor-specific status code control. | |
| const NodeName & | getName () const |
| Local node name control. | |
| const protocol::SoftwareVersion & | getSoftwareVersion () const |
| Node version information. | |
Private Member Functions | |
| void | startOneShotWithDeadline (MonotonicTime deadline) |
| Various ways to start the timer - periodically or once. | |
| MonotonicDuration | getPeriod () const |
| Returns period if the timer is in periodic mode. | |
Detailed Description
Provides the status and basic information about this node to other network participants.
Usually the application does not need to deal with this class directly - it's instantiated by the node class.
Default values:
- health - OK
- mode - INITIALIZATION
Definition at line 51 of file node_status_provider.hpp.
Member Function Documentation
| int forcePublish | ( | ) |
Publish the message uavcan.protocol.NodeStatus right now, out of schedule.
Returns negative error code.
Definition at line 105 of file node_status_provider.hpp.
| uint8_t getHealth | ( | ) | const |
Local node health code control.
Definition at line 127 of file node_status_provider.hpp.
| uint8_t getMode | ( | ) | const |
Local node mode code control.
Definition at line 137 of file node_status_provider.hpp.
| const NodeName& getName | ( | ) | const |
Local node name control.
Can be set only once before the provider is started. The provider will refuse to start if the node name is not set.
Definition at line 159 of file node_status_provider.hpp.
| const protocol::SoftwareVersion& getSoftwareVersion | ( | ) | const |
Node version information.
Can be set only once before the provider is started.
Definition at line 166 of file node_status_provider.hpp.
| void setAdHocNodeStatusUpdater | ( | IAdHocNodeStatusUpdater * | updater ) |
Configure the optional handler that is invoked before every node status message is emitted.
By default no handler is installed. It is allowed to pass a null pointer, that will disable the ad-hoc update feature. IAdHocNodeStatusUpdater
Definition at line 117 of file uc_node_status_provider.cpp.
| void setStatusPublicationPeriod | ( | uavcan::MonotonicDuration | period ) |
Allows to override default publishing rate for uavcan.protocol.NodeStatus.
Refer to the DSDL definition of uavcan.protocol.NodeStatus to see what is the default rate. Doesn't fail; if the value is outside of acceptable range, a closest valid value will be used instead.
Definition at line 96 of file uc_node_status_provider.cpp.
| void setVendorSpecificStatusCode | ( | VendorSpecificStatusCode | code ) |
Local node vendor-specific status code control.
Definition at line 132 of file uc_node_status_provider.cpp.
| int startAndPublish | ( | const TransferPriority | priority = TransferPriority::Default ) |
Starts the provider and immediately broadcasts uavcan.protocol.NodeStatus.
Returns negative error code.
Definition at line 58 of file uc_node_status_provider.cpp.
Generated on Tue Jul 12 2022 17:17:37 by
1.7.2