Difference between revisions of "Truxton message set priority"

From truxwiki.com
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...")
 
Line 3: Line 3:
 
=Syntax=
 
=Syntax=
 
<syntaxhighlight lang="C">
 
<syntaxhighlight lang="C">
void truxton_message_set_route_id( uint64_t message_handle, uint32_t route_id );
+
void truxton_message_set_priority( uint64_t message_handle, uint32_t priority );
 
</syntaxhighlight>
 
</syntaxhighlight>
  
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>route_id</code>==
+
==<code>priority</code>==
 
The identifier of the route to take.
 
The identifier of the route to take.
 
This should correspond to the <code>ID</code> column of the <code>LoadConfiguration</code> table.
 
This should correspond to the <code>ID</code> column of the <code>LoadConfiguration</code> table.

Revision as of 07:08, 16 June 2020

Tells sets the priority of this message in the queue.

Syntax

void truxton_message_set_priority( uint64_t message_handle, uint32_t priority );

Parameters

message_handle

The handle to a message created by the truxton_message_create call.

priority

The identifier of the route to take. This should correspond to the ID column of the LoadConfiguration table.

Sample

void make_highest_priority(uint64_t message)
{
   truxton_message_set_priority( message, INT_MAX );
}