RPi Locator and Display Services
|
Go to the source code of this file.
Variables | |
int | gd_i_rows = 4 |
int | gd_i_cols = 20 |
char * | gd_pch_serial_port |
char * | gd_pch_device_name = "pcf" |
PDisplayManager | gp_structure_pdm = NULL |
int generate_cpu_temps_info | ( | char * | msg | ) |
DO NOT USE THIS IN MODULES THAT HANDLE A I2C Based LCD RPi cannot handle I2C and GetCpuTemp() without locking the process in an uniterrupted sleep; forcing a power cycle.
Definition at line 348 of file skn_rpi_helpers.c.
References _temps::c, _temps::f, getCpuTemps(), and SZ_INFO_BUFF.
int generate_rpi_model_info | ( | char * | msg | ) |
Definition at line 328 of file skn_rpi_helpers.c.
References gd_ch_intfName, gd_ch_ipAddress, skn_get_number_of_cpu_cores(), and SZ_INFO_BUFF.
Referenced by skn_display_manager_do_work().
long getCpuTemps | ( | PCpuTemps | temps | ) |
DO NOT USE THIS IN MODULES THAT HANDLE A I2C Based LCD RPi cannot handle I2C and GetCpuTemp() without locking the process in an uniterrupted sleep; forcing a power cycle.
Redhat/Centos: /sys/class/hwmon/hwmon0/device/temp1_input Ubuntu/Debian: /sys/class/thermal/thermal_zone0/temp
Definition at line 293 of file skn_rpi_helpers.c.
References _temps::c, _temps::cbName, _temps::f, _temps::raw, and SD_WARNING.
Referenced by generate_cpu_temps_info().
void skn_device_manager_backlight | ( | int | af_backlight, |
int | state | ||
) |
Definition at line 184 of file skn_rpi_helpers.c.
Referenced by skn_device_manager_init_i2c(), and skn_device_manager_LCD_shutdown().
|
static |
Definition at line 188 of file skn_rpi_helpers.c.
References _IICLCD::af_backlight, _IICLCD::af_base, _IICLCD::af_blue, _IICLCD::af_db0, _IICLCD::af_db1, _IICLCD::af_db2, _IICLCD::af_db3, _IICLCD::af_db4, _IICLCD::af_db5, _IICLCD::af_db6, _IICLCD::af_db7, _IICLCD::af_e, _IICLCD::af_green, _IICLCD::af_red, _IICLCD::af_rs, _IICLCD::af_rw, _DISPLAY_MANAGER::dsp_cols, _DISPLAY_MANAGER::dsp_rows, gd_pch_device_name, _IICLCD::i2c_address, _DISPLAY_MANAGER::lcd, _IICLCD::lcd_handle, _DISPLAY_MANAGER::lcd_handle, PLATFORM_ERROR, SD_ERR, _IICLCD::setup, and skn_device_manager_backlight().
Referenced by skn_device_manager_MCP23008(), skn_device_manager_MCP23017(), and skn_device_manager_PCF8574().
int skn_device_manager_LCD_setup | ( | PDisplayManager | pdm, |
char * | device_name | ||
) |
Definition at line 234 of file skn_rpi_helpers.c.
References _DISPLAY_MANAGER::lcd_handle, PLATFORM_ERROR, skn_device_manager_MCP23008(), skn_device_manager_MCP23017(), skn_device_manager_PCF8574(), and skn_device_manager_SerialPort().
Referenced by skn_display_manager_do_work().
int skn_device_manager_LCD_shutdown | ( | PDisplayManager | pdm | ) |
Definition at line 257 of file skn_rpi_helpers.c.
References _IICLCD::af_backlight, _IICLCD::af_blue, _IICLCD::af_green, _IICLCD::af_red, gd_pch_device_name, _DISPLAY_MANAGER::lcd, _DISPLAY_MANAGER::lcd_handle, and skn_device_manager_backlight().
Referenced by skn_display_manager_do_work().
PLCDDevice skn_device_manager_MCP23008 | ( | PDisplayManager | pdm | ) |
Definition at line 110 of file skn_rpi_helpers.c.
References _IICLCD::af_backlight, _IICLCD::af_base, _IICLCD::af_db4, _IICLCD::af_db5, _IICLCD::af_db6, _IICLCD::af_db7, _IICLCD::af_e, _IICLCD::af_rs, _IICLCD::af_rw, _IICLCD::cbName, gd_i_i2c_address, _IICLCD::i2c_address, _DISPLAY_MANAGER::lcd, SD_ERR, SD_NOTICE, _IICLCD::setup, skn_device_manager_init_i2c(), and SZ_CHAR_BUFF.
Referenced by skn_device_manager_LCD_setup().
PLCDDevice skn_device_manager_MCP23017 | ( | PDisplayManager | pdm | ) |
Definition at line 72 of file skn_rpi_helpers.c.
References _IICLCD::af_backlight, _IICLCD::af_base, _IICLCD::af_blue, _IICLCD::af_db4, _IICLCD::af_db5, _IICLCD::af_db6, _IICLCD::af_db7, _IICLCD::af_e, _IICLCD::af_green, _IICLCD::af_red, _IICLCD::af_rs, _IICLCD::af_rw, _IICLCD::cbName, gd_i_i2c_address, _IICLCD::i2c_address, _DISPLAY_MANAGER::lcd, SD_ERR, SD_NOTICE, _IICLCD::setup, skn_device_manager_init_i2c(), and SZ_CHAR_BUFF.
Referenced by skn_device_manager_LCD_setup().
PLCDDevice skn_device_manager_PCF8574 | ( | PDisplayManager | pdm | ) |
Definition at line 145 of file skn_rpi_helpers.c.
References _IICLCD::af_backlight, _IICLCD::af_base, _IICLCD::af_db4, _IICLCD::af_db5, _IICLCD::af_db6, _IICLCD::af_db7, _IICLCD::af_e, _IICLCD::af_rs, _IICLCD::af_rw, _IICLCD::cbName, gd_i_i2c_address, _IICLCD::i2c_address, _DISPLAY_MANAGER::lcd, SD_ERR, SD_NOTICE, _IICLCD::setup, skn_device_manager_init_i2c(), and SZ_CHAR_BUFF.
Referenced by skn_device_manager_LCD_setup().
PLCDDevice skn_device_manager_SerialPort | ( | PDisplayManager | pdm | ) |
Definition at line 26 of file skn_rpi_helpers.c.
References _IICLCD::cbName, _IICLCD::ch_serial_port_name, gd_pch_serial_port, _DISPLAY_MANAGER::lcd, _IICLCD::lcd_handle, _DISPLAY_MANAGER::lcd_handle, PLATFORM_ERROR, SD_ERR, SD_NOTICE, and SZ_CHAR_BUFF.
Referenced by skn_device_manager_LCD_setup().
PDisplayLine skn_display_manager_add_line | ( | PDisplayManager | pdmx, |
char * | client_request_message | ||
) |
Definition at line 483 of file skn_rpi_helpers.c.
References _DISPLAY_LINE::active, ARY_MAX_DM_LINES, _DISPLAY_LINE::ch_display_msg, _DISPLAY_MANAGER::current_line, _DISPLAY_LINE::display_pos, gd_i_cols, _DISPLAY_LINE::msg_len, _DISPLAY_MANAGER::next_line, _DISPLAY_MANAGER::pdsp_collection, _DISPLAY_LINE::scroll_enabled, SD_DEBUG, skn_get_display_manager_ref(), skn_scroller_wrap_blanks(), and SZ_INFO_BUFF.
Referenced by skn_display_manager_do_work(), and skn_display_manager_message_consumer_thread().
|
static |
skn_display_manager_select_set
Definition at line 439 of file skn_rpi_helpers.c.
References _DISPLAY_LINE::active, ARY_MAX_DM_LINES, _DISPLAY_LINE::cbName, _DISPLAY_MANAGER::cbName, _DISPLAY_LINE::ch_display_msg, _DISPLAY_MANAGER::ch_welcome_msg, _DISPLAY_MANAGER::current_line, _DISPLAY_MANAGER::dsp_cols, _DISPLAY_MANAGER::dsp_rows, gd_i_cols, gd_i_rows, _DISPLAY_LINE::msg_len, _DISPLAY_MANAGER::msg_len, _DISPLAY_LINE::next, _DISPLAY_MANAGER::next_line, _DISPLAY_MANAGER::pdsp_collection, _DISPLAY_LINE::prev, _DISPLAY_LINE::scroll_enabled, SD_ERR, skn_scroller_wrap_blanks(), and SZ_INFO_BUFF.
Referenced by skn_display_manager_do_work().
|
static |
Definition at line 611 of file skn_rpi_helpers.c.
References ARY_MAX_DM_LINES, and _DISPLAY_MANAGER::pdsp_collection.
Referenced by skn_display_manager_do_work().
int skn_display_manager_do_work | ( | char * | client_request_message | ) |
Definition at line 531 of file skn_rpi_helpers.c.
References _DISPLAY_LINE::active, _DISPLAY_MANAGER::current_line, _DISPLAY_MANAGER::dsp_rows, gd_pch_device_name, generate_datetime_info(), generate_loadavg_info(), generate_rpi_model_info(), generate_uname_info(), gi_exit_flag, _DISPLAY_MANAGER::lcd_handle, _DISPLAY_LINE::next, _DISPLAY_MANAGER::pdsp_collection, PLATFORM_ERROR, SD_ERR, SD_NOTICE, skn_device_manager_LCD_setup(), skn_device_manager_LCD_shutdown(), skn_display_manager_add_line(), skn_display_manager_create(), skn_display_manager_destroy(), skn_display_manager_message_consumer_shutdown(), skn_display_manager_message_consumer_startup(), SKN_RUN_MODE_RUN, SKN_RUN_MODE_STOP, skn_scroller_scroll_lines(), skn_time_delay(), and SZ_INFO_BUFF.
Referenced by main().
void skn_display_manager_message_consumer_shutdown | ( | PDisplayManager | pdm | ) |
skn_display_manager_message_consumer(PDisplayManager pdm)
Definition at line 654 of file skn_rpi_helpers.c.
References _DISPLAY_MANAGER::dm_thread, _DISPLAY_MANAGER::i_socket, SD_NOTICE, SD_WARNING, and _DISPLAY_MANAGER::thread_complete.
Referenced by skn_display_manager_do_work().
int skn_display_manager_message_consumer_startup | ( | PDisplayManager | pdm | ) |
skn_display_manager_message_consumer(PDisplayManager pdm)
Definition at line 629 of file skn_rpi_helpers.c.
References _DISPLAY_MANAGER::dm_thread, _DISPLAY_MANAGER::i_socket, SD_EMERG, SD_NOTICE, SD_WARNING, skn_display_manager_message_consumer_thread(), SKN_RPI_DISPLAY_SERVICE_PORT, and skn_udp_host_create_regular_socket().
Referenced by skn_display_manager_do_work().
|
static |
skn_display_manager_message_consumer_thread(PDisplayManager pdm)
Definition at line 673 of file skn_rpi_helpers.c.
References get_broadcast_ip_array(), gi_exit_flag, _DISPLAY_MANAGER::i_socket, SD_ERR, SD_NOTICE, skn_display_manager_add_line(), SKN_RPI_DISPLAY_SERVICE_PORT, SKN_RUN_MODE_RUN, SKN_RUN_MODE_STOP, skn_time_delay(), SZ_INFO_BUFF, and _DISPLAY_MANAGER::thread_complete.
Referenced by skn_display_manager_message_consumer_startup().
|
static |
Definition at line 764 of file skn_rpi_helpers.c.
References gd_ch_program_desc, and gd_ch_program_name.
Referenced by skn_handle_display_command_line().
PDisplayManager skn_get_display_manager_ref | ( | ) |
Definition at line 528 of file skn_rpi_helpers.c.
References gp_structure_pdm.
Referenced by skn_display_manager_add_line().
int skn_handle_display_command_line | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 785 of file skn_rpi_helpers.c.
References gd_ch_program_name, gd_i_cols, gd_i_debug, gd_i_i2c_address, gd_i_rows, gd_pch_device_name, gd_pch_message, gd_pch_serial_port, PACKAGE_VERSION, SD_ERR, SD_WARNING, and skn_display_print_usage().
Referenced by main().
char* skn_scroller_pad_right | ( | char * | buffer | ) |
skn_scroller_pad_right
Definition at line 367 of file skn_rpi_helpers.c.
References gd_i_cols.
Referenced by skn_scroller_scroll_lines().
int skn_scroller_scroll_lines | ( | PDisplayLine | pdl, |
int | lcd_handle, | ||
int | line | ||
) |
Scrolls a single line across the lcd display
Definition at line 402 of file skn_rpi_helpers.c.
References _DISPLAY_LINE::ch_display_msg, _DISPLAY_LINE::display_pos, gd_i_cols, gd_pch_device_name, _DISPLAY_LINE::msg_len, skn_scroller_pad_right(), and skn_time_delay().
Referenced by skn_display_manager_do_work().
char* skn_scroller_wrap_blanks | ( | char * | buffer | ) |
skn_scroller_wrap_blanks
Definition at line 382 of file skn_rpi_helpers.c.
References gd_i_cols, and SZ_INFO_BUFF.
Referenced by skn_display_manager_add_line(), and skn_display_manager_create().
int gd_i_cols = 20 |
Definition at line 12 of file skn_rpi_helpers.c.
Referenced by skn_display_manager_add_line(), skn_display_manager_create(), skn_handle_display_command_line(), skn_scroller_pad_right(), skn_scroller_scroll_lines(), and skn_scroller_wrap_blanks().
int gd_i_rows = 4 |
Definition at line 11 of file skn_rpi_helpers.c.
Referenced by skn_display_manager_create(), and skn_handle_display_command_line().
char* gd_pch_device_name = "pcf" |
Definition at line 14 of file skn_rpi_helpers.c.
Referenced by skn_device_manager_init_i2c(), skn_device_manager_LCD_shutdown(), skn_display_manager_do_work(), skn_handle_display_command_line(), and skn_scroller_scroll_lines().
char* gd_pch_serial_port |
Definition at line 13 of file skn_rpi_helpers.c.
Referenced by skn_device_manager_SerialPort(), and skn_handle_display_command_line().
PDisplayManager gp_structure_pdm = NULL |
Definition at line 15 of file skn_rpi_helpers.c.
Referenced by skn_get_display_manager_ref().