example_cargo_reg_protocol_access.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include "acc_integration.h"
#include "acc_version.h"
#include "example_cargo.h"
#include "acc_reg_protocol.h"
#include "example_cargo_reg_protocol.h"
#include "i2c_example_cargo.h"

Go to the source code of this file.

Functions

static uint32_t get_protocol_error_flags (void)
 Get the protocol error status flags. More...
 
void example_cargo_reg_read_application_id (uint32_t *value)
 
void example_cargo_reg_read_version (uint32_t *value)
 
void example_cargo_reg_read_protocol_status (uint32_t *value)
 
void example_cargo_reg_read_measure_counter (uint32_t *value)
 
void example_cargo_reg_read_actual_presence_update_rate (uint32_t *value)
 
bool example_cargo_reg_write_command (const uint32_t value)
 
void example_cargo_reg_read_application_status (uint32_t *value)
 
void example_cargo_reg_read_container_size (uint32_t *value)
 
bool example_cargo_reg_write_container_size (uint32_t value)
 
void example_cargo_reg_read_activate_utilization_level (uint32_t *value)
 
bool example_cargo_reg_write_activate_utilization_level (uint32_t value)
 
void example_cargo_reg_read_utilization_signal_quality (uint32_t *value)
 
bool example_cargo_reg_write_utilization_signal_quality (uint32_t value)
 
void example_cargo_reg_read_utilization_threshold_sensitivity (uint32_t *value)
 
bool example_cargo_reg_write_utilization_threshold_sensitivity (uint32_t value)
 
void example_cargo_reg_read_activate_presence (uint32_t *value)
 
bool example_cargo_reg_write_activate_presence (uint32_t value)
 
void example_cargo_reg_read_presence_update_rate (uint32_t *value)
 
bool example_cargo_reg_write_presence_update_rate (uint32_t value)
 
void example_cargo_reg_read_presence_sweeps_per_frame (uint32_t *value)
 
bool example_cargo_reg_write_presence_sweeps_per_frame (uint32_t value)
 
void example_cargo_reg_read_presence_signal_quality (uint32_t *value)
 
bool example_cargo_reg_write_presence_signal_quality (uint32_t value)
 
void example_cargo_reg_read_presence_inter_detection_threshold (uint32_t *value)
 
bool example_cargo_reg_write_presence_inter_detection_threshold (uint32_t value)
 
void example_cargo_reg_read_presence_intra_detection_threshold (uint32_t *value)
 
bool example_cargo_reg_write_presence_intra_detection_threshold (uint32_t value)
 
void example_cargo_reg_read_result_header (uint32_t *value)
 
void example_cargo_reg_read_utilization_distance (uint32_t *value)
 
void example_cargo_reg_read_utilization_level_mm (uint32_t *value)
 
void example_cargo_reg_read_utilization_level_percent (uint32_t *value)
 
void example_cargo_reg_read_presence_detected (uint32_t *value)
 
void example_cargo_reg_read_max_inter_presence_score (uint32_t *value)
 
void example_cargo_reg_read_max_intra_presence_score (uint32_t *value)
 

Function Documentation

◆ example_cargo_reg_read_activate_presence()

void example_cargo_reg_read_activate_presence ( uint32_t *  value)

Read: Whether to activate presence measurements. The command MEASURE_PRESENCE cannot succeed if this register if false.

Definition at line 185 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_activate_utilization_level()

void example_cargo_reg_read_activate_utilization_level ( uint32_t *  value)

Read: Whether to activate utilization level measurements. The command MEASURE_UTILIZATION_LEVEL cannot succeed if this register if false.

Definition at line 137 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_actual_presence_update_rate()

void example_cargo_reg_read_actual_presence_update_rate ( uint32_t *  value)

Read: Get the actual update rate (frame rate) of presence during a burst

Definition at line 77 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_application_id()

void example_cargo_reg_read_application_id ( uint32_t *  value)

Read: The application id register.

Definition at line 29 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_application_status()

void example_cargo_reg_read_application_status ( uint32_t *  value)

Read: Get example app status flags.

Definition at line 87 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_container_size()

void example_cargo_reg_read_container_size ( uint32_t *  value)

Read: Size of the container. Valid values to write are 10U, 20U and 40U.

Definition at line 92 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_max_inter_presence_score()

void example_cargo_reg_read_max_inter_presence_score ( uint32_t *  value)

Read: Inter presence score is a measure of the amount of slow motion detected. This register contains the maximum inter presence score during the 5s presence burst.

Definition at line 339 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_max_intra_presence_score()

void example_cargo_reg_read_max_intra_presence_score ( uint32_t *  value)

Read: Intra presence score is measure of the amount of slow motion detected. This register contains the maximum intra presence score during the 5s presence burst.

Definition at line 348 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_measure_counter()

void example_cargo_reg_read_measure_counter ( uint32_t *  value)

Read: Get the measure counter, the number of measurements performed since restart.

Definition at line 72 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_presence_detected()

void example_cargo_reg_read_presence_detected ( uint32_t *  value)

Read: Whether presence was detected during the 5s presence burst

Definition at line 330 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_presence_inter_detection_threshold()

void example_cargo_reg_read_presence_inter_detection_threshold ( uint32_t *  value)

Read: This is the threshold for detecting slower movements between frames. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Presence Detectors inter detection threshold parameter.

Definition at line 249 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_presence_intra_detection_threshold()

void example_cargo_reg_read_presence_intra_detection_threshold ( uint32_t *  value)

Read: This is the threshold for detecting faster movements between frames. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Presence Detectors intra detection threshold parameter.

Definition at line 265 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_presence_signal_quality()

void example_cargo_reg_read_presence_signal_quality ( uint32_t *  value)

Read: Signal quality. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Presence Detectors signal quality parameter.

Definition at line 233 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_presence_sweeps_per_frame()

void example_cargo_reg_read_presence_sweeps_per_frame ( uint32_t *  value)

Read: The number of sweeps that will be captured in each frame (measurement). For more information, see documentation about the Presence Detectors sweeps_per_frame parameter.

Definition at line 217 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_presence_update_rate()

void example_cargo_reg_read_presence_update_rate ( uint32_t *  value)

Read: The presence detector update rate (frame rate). This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Presence Detectors frame rate parameter.

Definition at line 201 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_protocol_status()

void example_cargo_reg_read_protocol_status ( uint32_t *  value)

Read: Get protocol error flags.

Definition at line 39 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_result_header()

void example_cargo_reg_read_result_header ( uint32_t *  value)

Read: The result header for the cargo result.

Definition at line 281 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_utilization_distance()

void example_cargo_reg_read_utilization_distance ( uint32_t *  value)

Read: The distance, in millimeters, to the detection.

Definition at line 303 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_utilization_level_mm()

void example_cargo_reg_read_utilization_level_mm ( uint32_t *  value)

Read: The fill level in millimeters. Fill level is the distance from the detection to the back of the container.

Definition at line 312 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_utilization_level_percent()

void example_cargo_reg_read_utilization_level_percent ( uint32_t *  value)

Read: The fill level in percent. Fill level is the distance from the detection to the back of the container.

Definition at line 321 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_utilization_signal_quality()

void example_cargo_reg_read_utilization_signal_quality ( uint32_t *  value)

Read: Signal quality. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Distance Detectors signal quality parameter.

Definition at line 153 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_utilization_threshold_sensitivity()

void example_cargo_reg_read_utilization_threshold_sensitivity ( uint32_t *  value)

Read: Threshold sensitivity. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Distance Detectors threshold sensitivity parameter.

Definition at line 169 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_read_version()

void example_cargo_reg_read_version ( uint32_t *  value)

Read: Get the RSS version.

Definition at line 34 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_activate_presence()

bool example_cargo_reg_write_activate_presence ( const uint32_t  value)

Write: Whether to activate presence measurements. The command MEASURE_PRESENCE cannot succeed if this register if false.

Definition at line 192 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_activate_utilization_level()

bool example_cargo_reg_write_activate_utilization_level ( const uint32_t  value)

Write: Whether to activate utilization level measurements. The command MEASURE_UTILIZATION_LEVEL cannot succeed if this register if false.

Definition at line 144 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_command()

bool example_cargo_reg_write_command ( const uint32_t  value)

Write: Execute command.

Definition at line 82 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_container_size()

bool example_cargo_reg_write_container_size ( const uint32_t  value)

Write: Size of the container. Valid values to write are 10U, 20U and 40U.

Definition at line 113 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_presence_inter_detection_threshold()

bool example_cargo_reg_write_presence_inter_detection_threshold ( const uint32_t  value)

Write: This is the threshold for detecting slower movements between frames. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Presence Detectors inter detection threshold parameter.

Definition at line 256 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_presence_intra_detection_threshold()

bool example_cargo_reg_write_presence_intra_detection_threshold ( const uint32_t  value)

Write: This is the threshold for detecting faster movements between frames. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Presence Detectors intra detection threshold parameter.

Definition at line 272 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_presence_signal_quality()

bool example_cargo_reg_write_presence_signal_quality ( const uint32_t  value)

Write: Signal quality. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Presence Detectors signal quality parameter.

Definition at line 240 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_presence_sweeps_per_frame()

bool example_cargo_reg_write_presence_sweeps_per_frame ( const uint32_t  value)

Write: The number of sweeps that will be captured in each frame (measurement). For more information, see documentation about the Presence Detectors sweeps_per_frame parameter.

Definition at line 224 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_presence_update_rate()

bool example_cargo_reg_write_presence_update_rate ( const uint32_t  value)

Write: The presence detector update rate (frame rate). This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Presence Detectors frame rate parameter.

Definition at line 208 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_utilization_signal_quality()

bool example_cargo_reg_write_utilization_signal_quality ( const uint32_t  value)

Write: Signal quality. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Distance Detectors signal quality parameter.

Definition at line 160 of file example_cargo_reg_protocol_access.c.

◆ example_cargo_reg_write_utilization_threshold_sensitivity()

bool example_cargo_reg_write_utilization_threshold_sensitivity ( const uint32_t  value)

Write: Threshold sensitivity. This register is x1000 compared to the Cargo Example Application. For more information, see documentation about the Distance Detectors threshold sensitivity parameter.

Definition at line 176 of file example_cargo_reg_protocol_access.c.

◆ get_protocol_error_flags()

static uint32_t get_protocol_error_flags ( void  )
static

Get the protocol error status flags.

Returns
error flags as uint32 register value

Definition at line 361 of file example_cargo_reg_protocol_access.c.