Difference between revisions of "Truxton media get load configuration id"
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
This retrieves the load configuration used to load the data. | This retrieves the load configuration used to load the data. | ||
| − | This corresponds to the <code>LoadConfigurationID</code> column of the <code>Media</code> table. | + | This corresponds to the <code>[LoadConfigurationID]</code> column of the <code><nowiki>[</nowiki>[[Media Table|Media]]<nowiki>]</nowiki></code> table. |
| − | It should be a value from the <code>ID</code> column of the <code>LoadConfiguration</code> table. | + | It should be a value from the <code>[ID]</code> column of the <code>[LoadConfiguration]</code> table. |
A load configuration is the mapping of file types to the message queues that will process it. | A load configuration is the mapping of file types to the message queues that will process it. | ||
| Line 18: | Line 18: | ||
=Sample= | =Sample= | ||
<source lang="C" highlight="3"> | <source lang="C" highlight="3"> | ||
| − | void dump_route(uint64_t media) | + | void dump_route( uint64_t media ) |
{ | { | ||
uint64_t id = truxton_media_get_load_configuration_id( media ); | uint64_t id = truxton_media_get_load_configuration_id( media ); | ||
Latest revision as of 07:47, 3 February 2024
This retrieves the load configuration used to load the data.
This corresponds to the [LoadConfigurationID] column of the [Media] table.
It should be a value from the [ID] column of the [LoadConfiguration] table.
A load configuration is the mapping of file types to the message queues that will process it.
Syntax
uint64_t truxton_media_get_load_configuration_id( uint64_t media_handle );
Parameters
media_handle
The handle created by the truxton_media_open_id or truxton_media_create call.
Return value
The identifier for the load configuration.
Sample
void dump_route( uint64_t media )
{
uint64_t id = truxton_media_get_load_configuration_id( media );
printf( "The media is using configuration %" PRIu64 " to process the data\n", id );
}
The PRIu64 in the sample code above is a standard way of formatting a 64-bit unsigned integer in C.
Over the years, different compilers on different operating systems used different format specifiers for things, these PRI macros, along with some tricky string concatenation the compilers perform for you, allow you to maintain a single code base without a bunch of macro magic.