资源简介
linux下基于client/server的通用LCD驱动程序,支持很多流行的LCD控制器。
代码片段和文件信息
/* \file clients/lcdexec/lcdexec.c
* Main file for \lcdexec the program starter in the LCDproc suite.
*/
/* This file is part of lcdexec an LCDproc client.
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
* Copyright (c) 2002 Joris Robijn
* 2006-2008 Peter Marschall
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include “getopt.h“
#include “shared/str.h“
#include “shared/report.h“
#include “shared/configfile.h“
#include “shared/sockets.h“
#include “menu.h“
#if !defined(SYSCONFDIR)
# define SYSCONFDIR “/etc“
#endif
#if !defined(PIDFILEDIR)
# define PIDFILEDIR “/var/run“
#endif
#define DEFAULT_CONFIGFILE SYSCONFDIR “/lcdexec.conf“
#define DEFAULT_PIDFILE PIDFILEDIR “/lcdexec.pid“
/** information about a process started by lcdexec */
typedef struct ProcInfo {
struct ProcInfo *next; /**< pointer to the next ProcInfo entry */
const MenuEntry *cmd; /**< pointer to the corresponding menu entry */
pid_t pid; /**< PID the process was started with */
time_t starttime; /**< start time of the process */
time_t endtime; /**< finishing time of the process */
int status; /**< exit status of the process */
int feedback; /**< what info to show to the user */
int shown; /**< tell if the info has been shown to the user */
} ProcInfo;
char * help_text =
“lcdexec - LCDproc client to execute commands from the LCDd menu\n“
“\n“
“Copyright (c) 2002 Joris Robijn 2006-2008 Peter Marschall.\n“
“This program is released under the terms of the GNU General Public License.\n“
“\n“
“Usage: lcdexec []\n“
“ where are:\n“
“ -c Specify configuration file [“DEFAULT_CONFIGFILE“]\n“
“ -a DNS name or IP address of the LCDd server [localhost]\n“
“ -p port of the LCDd server [13666]\n“
“ -f Run in foreground\n“
“ -r Set reporting level (0-5) [2: errors and warnings]\n“
“ -s <0|1> Report to syslog (1) or stderr (0 default)\n“
“ -h Show this help\n“;
char *progname = “lcdexec“;
/* Variables set by config */
#define UNSET_INT -1
#define UNSET_STR “\01“
char *configfile = NULL;
char *address = NULL;
int port = UNSET_INT;
int foreground = FALSE;
static int report_level = UNSET_INT;
static int report_dest = UNSET_INT;
char *pidfile = NULL;
int pidfile_written = FALSE;
char *displayname = NULL;
char *default_shell = NULL;
/* Other global variables */
MenuEntry *main_menu = NULL; /**< pointer to the main menu */
ProcInfo *proc_queue = NULL; /**< pointer to the list of executed processes */
int lcd_wid = 0; /**< LCD display width reported by the server */
int lcd_hgt = 0; /**< LCD display height reported by the server */
int sock = -1; /**< socket to connect to server
- 上一篇:打砖块(flash)
- 下一篇:标准粒子群算法求解非线性方程
相关资源
- STM32F103RC+ADC+DMA多通道采样LCD显示
- uboot到linux logo显示不间断 补丁
- Uninstall_Cortana_WINCLIENT.CN.rar
- LCD显示温度+串口接收温度.rar
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- Img2Lcd(将图片转换为数组的工具)
- 基于c8051f020的AD转换程序及LCD显示程序
- ubuntu9.10 可加载内核模块和字符设备驱
- [免费]msp430f149控制PS2键盘并用1602显示
- arm触摸屏与LCD校准程序三点校准法
- vhdl与lcd1602实现的多控制电子钟
- MP3文件ID3v2ID3v2APEv2标签读取
- 操作系统实验——虚存管理实验
- pctolcd2002完美版460701
- linux下的发包工具sendip
- ADC0809数字电压表 LCD1602显示 汇编程序
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- SOCKET 网络编程 计算机网络 作业 客户
- lcd12684显示程序
- Linux 操作系统实验(全)
- lcd12864的VHDL程序
- Linux From Scratch 中文手册
- linux 网络实验 ftp程序
- LCD12864滚动显示
评论
共有 条评论