RPi Locator and Display Services
skn_common_headers.h File Reference
#include <sys/types.h>
#include <pwd.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <signal.h>
#include <getopt.h>
#include <pthread.h>
#include <stdint.h>
#include <ctype.h>
#include <stddef.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <ifaddrs.h>
#include <time.h>
#include <stdarg.h>
#include <math.h>
+ Include dependency graph for skn_common_headers.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _IICLCD
 
struct  _ipBroadcastArray
 
struct  _serviceEntry
 
struct  _serviceRegistry
 
struct  _serviceRequest
 
struct  _temps
 
struct  _DISPLAY_LINE
 
struct  _DISPLAY_MANAGER
 

Macros

#define SD_EMERG   "<0>" /* system is unusable */
 
#define SD_ALERT   "<1>" /* action must be taken immediately */
 
#define SD_CRIT   "<2>" /* critical conditions */
 
#define SD_ERR   "<3>" /* error conditions */
 
#define SD_WARNING   "<4>" /* warning conditions */
 
#define SD_NOTICE   "<5>" /* normal but significant condition */
 
#define SD_INFO   "<6>" /* informational */
 
#define SD_DEBUG   "<7>" /* debug-level messages */
 
#define PACKAGE_VERSION   "1.1"
 
#define PACKAGE_NAME   "lcd_display_service"
 
#define PACKAGE_DESCRIPTION   "Locate Raspberry Pi's on the network."
 
#define SKN_FIND_RPI_PORT   48028
 
#define SKN_RPI_DISPLAY_SERVICE_PORT   48029
 
#define SKN_RPI_REGULAR_SERVICE_PORT   48027
 
#define SZ_CHAR_LABEL   48
 
#define SZ_INFO_BUFF   256
 
#define SZ_CHAR_BUFF   128
 
#define SZ_LINE_BUFF   512
 
#define SZ_COMM_BUFF   256
 
#define ARY_MAX_INTF   8
 
#define ARY_MAX_REGISTRY   128
 
#define ARY_MAX_DM_LINES   24
 
#define SKN_RUN_MODE_RUN   0
 
#define SKN_RUN_MODE_STOP   1
 
#define TRUE   (1==1)
 
#define FALSE   (1==2)
 
#define SCROLL_WAIT   1
 
#define SCROLL_NOWAIT   0
 
#define MAX_DISPLAY_ROWS   4
 
#define PLATFORM_ERROR   -1
 
#define TZ_ADJUST   4
 

Typedefs

typedef struct _IICLCD LCDDevice
 
typedef struct _IICLCDPLCDDevice
 
typedef struct _ipBroadcastArray IPBroadcastArray
 
typedef struct _ipBroadcastArrayPIPBroadcastArray
 
typedef struct _serviceEntry RegistryEntry
 
typedef struct _serviceEntryPRegistryEntry
 
typedef struct _serviceRegistry ServiceRegistry
 
typedef struct _serviceRegistryPServiceRegistry
 
typedef struct _serviceRequest ServiceRequest
 
typedef struct _serviceRequestPServiceRequest
 
typedef struct _temps CpuTemps
 
typedef struct _tempsPCpuTemps
 
typedef struct _DISPLAY_LINE DisplayLine
 
typedef struct _DISPLAY_LINEPDisplayLine
 
typedef struct _DISPLAY_MANAGER DisplayManager
 
typedef struct _DISPLAY_MANAGERPDisplayManager
 

Macro Definition Documentation

#define ARY_MAX_DM_LINES   24
#define ARY_MAX_INTF   8

Definition at line 99 of file skn_common_headers.h.

#define ARY_MAX_REGISTRY   128

Definition at line 100 of file skn_common_headers.h.

#define MAX_DISPLAY_ROWS   4

Definition at line 112 of file skn_common_headers.h.

#define PACKAGE_DESCRIPTION   "Locate Raspberry Pi's on the network."

Definition at line 85 of file skn_common_headers.h.

#define PACKAGE_NAME   "lcd_display_service"

Definition at line 82 of file skn_common_headers.h.

#define PACKAGE_VERSION   "1.1"

#include <sysexits.h> $ man 3 sysexits

Program Exit Codes with SystemD in mind ref: http://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

In case of an error while processing any init-script action except for status, the init script shall print an error message and exit with a non-zero status code:

1 generic or unspecified error (current practice) 2 invalid or excess argument(s) 3 unimplemented feature (for example, "reload") 4 user had insufficient privilege 5 program is not installed 6 program is not configured 7 program is not running 8-99 reserved for future LSB use 100-149 reserved for distribution use 150-199 reserved for application use 200-254 reserved

Definition at line 79 of file skn_common_headers.h.

#define PLATFORM_ERROR   -1

Definition at line 113 of file skn_common_headers.h.

#define SCROLL_NOWAIT   0

Definition at line 111 of file skn_common_headers.h.

#define SCROLL_WAIT   1

Definition at line 110 of file skn_common_headers.h.

#define SD_ALERT   "<1>" /* action must be taken immediately */

Definition at line 42 of file skn_common_headers.h.

#define SD_CRIT   "<2>" /* critical conditions */

Definition at line 43 of file skn_common_headers.h.

#define SD_DEBUG   "<7>" /* debug-level messages */
#define SD_INFO   "<6>" /* informational */
#define SKN_FIND_RPI_PORT   48028
#define SKN_RPI_DISPLAY_SERVICE_PORT   48029
#define SKN_RPI_REGULAR_SERVICE_PORT   48027

Definition at line 91 of file skn_common_headers.h.

#define SZ_CHAR_BUFF   128

Definition at line 95 of file skn_common_headers.h.

#define SZ_CHAR_LABEL   48

Definition at line 93 of file skn_common_headers.h.

#define SZ_COMM_BUFF   256

Definition at line 97 of file skn_common_headers.h.

#define SZ_INFO_BUFF   256

Definition at line 94 of file skn_common_headers.h.

#define SZ_LINE_BUFF   512

Definition at line 96 of file skn_common_headers.h.

#define TZ_ADJUST   4

Definition at line 279 of file skn_common_headers.h.

Referenced by generate_datetime_info().

Typedef Documentation

typedef struct _temps CpuTemps
typedef struct _DISPLAY_LINE DisplayLine
typedef struct _IICLCD LCDDevice
typedef struct _temps * PCpuTemps
typedef struct _DISPLAY_LINE * PDisplayLine
typedef struct _IICLCD * PLCDDevice
typedef struct _serviceEntry * PRegistryEntry
typedef struct _serviceRequest * PServiceRequest
typedef struct _serviceEntry RegistryEntry