BSEC Sequence Diagram vs BSEC Example Sequence

I'm having hard time understanding why does BSEC API documentation show a sequence diagram that differs from the sequence of code execution provided by the BSEC example (from the folder in BSEC 2.4.0. download file). This is the sequence diagram from BSEC documentation:

As shown on the picture, the pseudo code could be written as the following code:

if (current_time_ns >= sensor_settings.next_call)
{)
if (sensor_settings.op_mode != current_op_mode)
{}
if (sensor_settings.trigger_measurement == 1)
{}
if (sensor_settings.process_data != 0)
{}

However, in BSEC example, the process flow is like this:

if (current_time_ns >= sensor_settings.next_call)
{
    if (sensor_settings.op_mode != current_op_mode)
    {}
    if (sensor_settings.trigger_measurement == 1)
    {}
    if (sensor_settings.process_data != 0)
    {}
)

I guess the code from BSEC example implies the proper operation, however its not clear whether the BSEC API documentation means the same thing?

1 reply