IRPyro messaging application
Communications program between IRPyro and IRPyro evaluation tool

Given a byte string response from the firmware, selects the adequate frame for the GUI. More...

Collaboration diagram for Message Generator:

Functions

static void AFE_to_bytes (AFE_reg_type AFE_register, uint8_t *AFE_byte)
 encodes the AFE register contents of this_device into the IRPyro More...
 
static void asic_version_read (void)
 IRPyro ASIC version byte. More...
 
static void board_type_read (void)
 returns the byte identifying the board More...
 
static void bytes_to_gui_init (void)
 initialize bytes array More...
 
static void CCP_to_bytes (CCP_reg_type CCP_register, uint8_t *CCP_byte)
 encodes the CCP register contents of this_device into IRPyro More...
 
static bool condition_to_send_stream ()
 evaluates conditions to send stream More...
 
static uint8_t crc_gen (const uint8_t *current_byte, uint8_t bytes_to_process)
 calculates the xor on bytes_to_GUI More...
 
static void data_swap (uint8_t scope)
 
static void firmware_version_send (void)
 prepares the firmware version string More...
 
static void fndummy (void)
 null function to fill unimplemented gaps More...
 
static void gen_AFE_read (void)
 Get the AFE values Get byte[1] of the AFE register for: More...
 
static void gen_AFE_write (void)
 AFE write successful. More...
 
static void gen_CCP_read (void)
 collects CCP values according to Channel Configuration More...
 
static void gen_CCP_write (void)
 CCP write successful. More...
 
static void gen_WUP_read (void)
 Reads the WUP values of the selected sensor. More...
 
static void gen_WUP_write (void)
 WUP write successful. More...
 
static void get_darkpixel_state (void)
 operation successful More...
 
static void get_failure_flags (void)
 returns the value of the internal test byte More...
 
static void goto_sleep (void)
 Sleep command successful. More...
 
static void logical_channels_read (void)
 returns the value of the current scopes configuration More...
 
static void logical_channels_write (void)
 operation successful More...
 
void message_generator (uint8_t cmd_to_gui, uint8_t destination)
 prepares packet to GUI More...
 
static void message_generator_select_status (void)
 Send status to GUI on time. More...
 
static void message_generator_select_stream (void)
 Enables streaming to the GUI. More...
 
static void message_generator_selector ()
 test the condition to send a packet. More...
 
void message_prepack_data_sort (void)
 Sorts sampling data from configured sensors. More...
 
static void null_test_command (void)
 responds "ok" to GUI More...
 
static void report_error (void)
 Prepare the "err\n" string for the GUI. More...
 
static void reset_hard (void)
 board reset successful More...
 
static void reset_hardware (void)
 hardware reset successful More...
 
static void reset_soft (void)
 Sensor reset successful. More...
 
static void response_byte_array_ok (uint8_t *byte_array, uint8_t size_of_byte_array)
 prepares byte array + ok + crc as a byte array for GUI More...
 
static void response_err (void)
 prepares ok string for GUI More...
 
static void response_ok (void)
 prepares ok string for GUI More...
 
static void sampling_rate_read (void)
 returns the value of the sampling rate form the selected sensor More...
 
static void sampling_rate_write (void)
 
static void second_unit_id_read (void)
 operation successful More...
 
static void set_darkpixel_state (void)
 operation successful More...
 
static void set_emitter_state (void)
 operation successful More...
 
static void set_emitter_timings (void)
 operation successful More...
 
static void status_start (void)
 sends status start completion to GUI More...
 
static void status_stop (void)
 sends status stop to GUI More...
 
static void streaming_start (void)
 streaming start successful More...
 
static void streaming_stop (void)
 operation successful More...
 
static void unit_id_read (void)
 returns the unit id byte More...
 
static void unit_id_write (void)
 operation successful More...
 
static void wake_up (void)
 Wake up command successful. More...
 
static void WUP_to_bytes (WUP_reg_type WUP_register, uint8_t *WUP_byte)
 encodes the WUP register contents of this_device into the IRPyro More...
 

Variables

int32_t ConfiguredSensorsSamplingDataToGUI [8] = {0}
 Places sensor collected data in a buffer according to the map. More...
 
static int32_t current_sampling_data_frame_cnt = 1
 
static uint32_t sample_period_timer
 Sampling rate operation successful. More...
 
static int32_t sent_sampling_data_frame_cnt = 0
 

Detailed Description

Given a byte string response from the firmware, selects the adequate frame for the GUI.

*
* 
Note

Function Documentation

◆ AFE_to_bytes()

static void AFE_to_bytes ( AFE_reg_type  AFE_register,
uint8_t *  AFE_byte 
)
static

encodes the AFE register contents of this_device into the IRPyro

Definition at line 78 of file message_generator.c.

Here is the caller graph for this function:

◆ asic_version_read()

static void asic_version_read ( void  )
static

IRPyro ASIC version byte.

Definition at line 219 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ board_type_read()

static void board_type_read ( void  )
static

returns the byte identifying the board

Definition at line 453 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bytes_to_gui_init()

static void bytes_to_gui_init ( void  )
static

initialize bytes array

Definition at line 126 of file message_generator.c.

Here is the caller graph for this function:

◆ CCP_to_bytes()

static void CCP_to_bytes ( CCP_reg_type  CCP_register,
uint8_t *  CCP_byte 
)
static

encodes the CCP register contents of this_device into IRPyro

Definition at line 95 of file message_generator.c.

Here is the caller graph for this function:

◆ condition_to_send_stream()

static bool condition_to_send_stream ( )
static

evaluates conditions to send stream

Definition at line 565 of file message_generator.c.

Here is the caller graph for this function:

◆ crc_gen()

static uint8_t crc_gen ( const uint8_t *  current_byte,
uint8_t  bytes_to_process 
)
static

calculates the xor on bytes_to_GUI

Returns
xor value

Definition at line 134 of file message_generator.c.

Here is the caller graph for this function:

◆ data_swap()

static void data_swap ( uint8_t  scope)
static

Definition at line 525 of file message_generator.c.

Here is the caller graph for this function:

◆ firmware_version_send()

static void firmware_version_send ( void  )
static

prepares the firmware version string

Definition at line 207 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fndummy()

static void fndummy ( void  )
static

null function to fill unimplemented gaps

Definition at line 349 of file message_generator.c.

Here is the caller graph for this function:

◆ gen_AFE_read()

static void gen_AFE_read ( void  )
static

Get the AFE values Get byte[1] of the AFE register for:

  • specific sensor: indicated by wild card value
  • byte[1] of all the sensors present on the board

Definition at line 230 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gen_AFE_write()

static void gen_AFE_write ( void  )
static

AFE write successful.

Definition at line 256 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gen_CCP_read()

static void gen_CCP_read ( void  )
static

collects CCP values according to Channel Configuration

Definition at line 263 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gen_CCP_write()

static void gen_CCP_write ( void  )
static

CCP write successful.

Definition at line 295 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gen_WUP_read()

static void gen_WUP_read ( void  )
static

Reads the WUP values of the selected sensor.

Definition at line 302 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gen_WUP_write()

static void gen_WUP_write ( void  )
static

WUP write successful.

Definition at line 334 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_darkpixel_state()

static void get_darkpixel_state ( void  )
static

operation successful

Definition at line 481 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_failure_flags()

static void get_failure_flags ( void  )
static

returns the value of the internal test byte

Definition at line 446 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ goto_sleep()

static void goto_sleep ( void  )
static

Sleep command successful.

Definition at line 356 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ logical_channels_read()

static void logical_channels_read ( void  )
static

returns the value of the current scopes configuration

Definition at line 418 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ logical_channels_write()

static void logical_channels_write ( void  )
static

operation successful

Definition at line 425 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ message_generator()

void message_generator ( uint8_t  cmd_to_gui,
uint8_t  destination 
)

prepares packet to GUI

Definition at line 617 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ message_generator_select_status()

static void message_generator_select_status ( void  )
static

Send status to GUI on time.

Definition at line 596 of file message_generator.c.

Here is the caller graph for this function:

◆ message_generator_select_stream()

static void message_generator_select_stream ( void  )
static

Enables streaming to the GUI.

Definition at line 578 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ message_generator_selector()

static void message_generator_selector ( )
static

test the condition to send a packet.

Definition at line 609 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ message_prepack_data_sort()

void message_prepack_data_sort ( void  )

Sorts sampling data from configured sensors.

Definition at line 548 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ null_test_command()

static void null_test_command ( void  )
static

responds "ok" to GUI

Definition at line 200 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_error()

static void report_error ( void  )
static

Prepare the "err\n" string for the GUI.

Definition at line 502 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_hard()

static void reset_hard ( void  )
static

board reset successful

Definition at line 378 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_hardware()

static void reset_hardware ( void  )
static

hardware reset successful

Definition at line 385 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_soft()

static void reset_soft ( void  )
static

Sensor reset successful.

Definition at line 371 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ response_byte_array_ok()

static void response_byte_array_ok ( uint8_t *  byte_array,
uint8_t  size_of_byte_array 
)
static

prepares byte array + ok + crc as a byte array for GUI

Definition at line 181 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ response_err()

static void response_err ( void  )
static

prepares ok string for GUI

Definition at line 151 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ response_ok()

static void response_ok ( void  )
static

prepares ok string for GUI

Definition at line 163 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sampling_rate_read()

static void sampling_rate_read ( void  )
static

returns the value of the sampling rate form the selected sensor

Definition at line 393 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sampling_rate_write()

static void sampling_rate_write ( void  )
static

Definition at line 404 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ second_unit_id_read()

static void second_unit_id_read ( void  )
static

operation successful

Definition at line 474 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_darkpixel_state()

static void set_darkpixel_state ( void  )
static

operation successful

Definition at line 488 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_emitter_state()

static void set_emitter_state ( void  )
static

operation successful

Definition at line 439 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_emitter_timings()

static void set_emitter_timings ( void  )
static

operation successful

Definition at line 432 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ status_start()

static void status_start ( void  )
static

sends status start completion to GUI

Definition at line 509 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ status_stop()

static void status_stop ( void  )
static

sends status stop to GUI

Definition at line 516 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ streaming_start()

static void streaming_start ( void  )
static

streaming start successful

Definition at line 341 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ streaming_stop()

static void streaming_stop ( void  )
static

operation successful

Definition at line 495 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unit_id_read()

static void unit_id_read ( void  )
static

returns the unit id byte

Definition at line 460 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unit_id_write()

static void unit_id_write ( void  )
static

operation successful

Definition at line 467 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wake_up()

static void wake_up ( void  )
static

Wake up command successful.

Definition at line 364 of file message_generator.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WUP_to_bytes()

static void WUP_to_bytes ( WUP_reg_type  WUP_register,
uint8_t *  WUP_byte 
)
static

encodes the WUP register contents of this_device into the IRPyro

Definition at line 108 of file message_generator.c.

Here is the caller graph for this function:

Variable Documentation

◆ ConfiguredSensorsSamplingDataToGUI

int32_t ConfiguredSensorsSamplingDataToGUI[8] = {0}

Places sensor collected data in a buffer according to the map.

Packs collected data for the active channels into the firmware.

Parameters
scopeGUI scope ID

Definition at line 524 of file message_generator.c.

◆ current_sampling_data_frame_cnt

int32_t current_sampling_data_frame_cnt = 1
static

Definition at line 561 of file message_generator.c.

◆ sample_period_timer

uint32_t sample_period_timer
static

Sampling rate operation successful.

Definition at line 403 of file message_generator.c.

◆ sent_sampling_data_frame_cnt

int32_t sent_sampling_data_frame_cnt = 0
static

Definition at line 560 of file message_generator.c.