RPi Locator and Display Services
|
#include "skn_common_headers.h"
#include <sys/utsname.h>
#include <wiringPi.h>
#include <pcf8574.h>
#include <mcp23008.h>
#include <mcp23017.h>
#include <wiringSerial.h>
#include <lcd.h>
Go to the source code of this file.
Variables | |
int | gd_i_rows |
int | gd_i_cols |
int | gd_i_i2c_address |
char * | gd_pch_serial_port |
char * | gd_pch_device_name |
PDisplayManager | gp_structure_pdm |
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 49 of file lcd_display_client.c.
References _temps::c, _temps::f, getCpuTemps(), and SZ_INFO_BUFF.
Referenced by main().
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().
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().
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().
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().
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 skn_signal_manager_shutdown | ( | pthread_t | sig_thread, |
sigset_t * | psignal_set, | ||
long * | l_thread_complete | ||
) |
Final step
Definition at line 209 of file skn_signal_manager.c.
References gi_exit_flag, SD_NOTICE, SD_WARNING, and SKN_RUN_MODE_STOP.
Referenced by main().
int skn_signal_manager_startup | ( | pthread_t * | psig_thread, |
sigset_t * | psignal_set, | ||
long * | l_thread_complete | ||
) |
Initialize signal manager
Definition at line 238 of file skn_signal_manager.c.
References PLATFORM_ERROR, SD_ERR, and skn_signal_manager_handler_thread().
Referenced by main().
int gd_i_cols |
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_i2c_address |
Definition at line 27 of file skn_network_helpers.c.
Referenced by main(), skn_device_manager_MCP23008(), skn_device_manager_MCP23017(), skn_device_manager_PCF8574(), skn_handle_display_command_line(), and skn_handle_locator_command_line().
int gd_i_rows |
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 |
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 |
Definition at line 15 of file skn_rpi_helpers.c.
Referenced by skn_get_display_manager_ref().