Truxton set black box activity
Jump to navigation
Jump to search
This function writes activity information to the Black Box about where you are in your source code.
Contents
Syntax
void truxton_set_black_box_activity( uint64_t activity, uint64_t source_code_file_identifier, uint64_t line_number_in_the_source_code_file );
Parameters
activity
An integer value that you created to represent the activity.
source_code_file_identifier
An integer value that you created to represent the name of the source code file.
line_number_in_the_source_code_file
The line number in the source code file.
Sample
#define CHECK_SIZE_CPP (0x1122334455)
#define GETTING_BYTES_PER_PAGE (1)
#define CHECKING_ALIGNMENT (2)
#define FINISHED (3)
int is_valid_size( file_object * f )
{
truxton_set_black_box_activity( GETTING_BYTES_PER_PAGE, CHECK_SIZE_CPP, __LINE__ );
if ( f->bytes_per_page < 3 )
{
return( 0 );
}
truxton_set_black_box_activity( CHECKING_ALIGNMENT, CHECK_SIZE_CPP, __LINE__ );
if ( check_alignment( f ) == 0 )
{
return( 0 );
}
truxton_set_black_box_activity( FINISHED, CHECK_SIZE_CPP, __LINE__ );
return( 0 );
}