Difference between revisions of "Truxton message set priority"
Jump to navigation
Jump to search
(Created page with "Tells sets the priority of this message in the queue. =Syntax= <syntaxhighlight lang="C"> void truxton_message_set_route_id( uint64_t message_handle, uint32_t route_id ); </s...") |
|||
| (3 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
| − | void | + | void truxton_message_set_priority( uint64_t message_handle, int32_t priority ); |
| − | </ | + | </source> |
=Parameters= | =Parameters= | ||
| Line 10: | Line 10: | ||
The handle to a message created by the [[truxton_message_create]] call. | The handle to a message created by the [[truxton_message_create]] call. | ||
| − | ==<code> | + | ==<code>priority</code>== |
| − | The | + | The priority of this message in the queue. |
| − | + | The greater the value, the greater the priority. | |
| + | Priority 1 is less important than priority 100. | ||
=Sample= | =Sample= | ||
| − | < | + | <source lang="C" highlight="3"> |
| − | void make_highest_priority(uint64_t message) | + | void make_highest_priority( uint64_t message ) |
{ | { | ||
truxton_message_set_priority( message, INT_MAX ); | truxton_message_set_priority( message, INT_MAX ); | ||
} | } | ||
| − | </ | + | </source> |
Latest revision as of 06:48, 10 January 2023
Tells sets the priority of this message in the queue.
Syntax
void truxton_message_set_priority( uint64_t message_handle, int32_t priority );
Parameters
message_handle
The handle to a message created by the truxton_message_create call.
priority
The priority of this message in the queue. The greater the value, the greater the priority. Priority 1 is less important than priority 100.
Sample
void make_highest_priority( uint64_t message )
{
truxton_message_set_priority( message, INT_MAX );
}