基于ARM的智能灯光控制系统总结(18-网页CGI进程之区域管理)

本文总结了基于ARM的智能灯光控制系统中,如何通过网页CGI进程实现区域管理功能,允许用户在网页上一键控制特定区域内的所有灯光设备开关。主要涉及area_con.c和area_con_post.c两个关键文件。
摘要由CSDN通过智能技术生成

区域管理cgi程序在网页上设定一个区域内所有灯光设备的开关


area_con.c

#include<unistd.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<sys/types.h>
#include "html.h"
#include "config.h"
#include "ipc.h"

void table_tr(char * name,char sw,int type_id)
{
	int i;

	printf("<tr><td>%s</td>",name);

	if(sw==1){
		printf("<td class=\"center\"><input type=\"radio\" checked=\"checked\" value=\"1\" name=\"sw_sta%d\">开启<input type=\"radio\" value=\"0\" name=\"sw_sta%d\">关闭</td>",type_id,type_id);
	}else{
		printf("<td class=\"center\"><input type=\"radio\" value=\"1\" name=\"sw_sta%d\">开启<input type=
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值