• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ send_cmd函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中send_cmd函数的典型用法代码示例。如果您正苦于以下问题:C++ send_cmd函数的具体用法?C++ send_cmd怎么用?C++ send_cmd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了send_cmd函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: send_cmd

void Client::send_rotate() {
	_vars[0].i = me->id;
	_vars[1].f = me->angle;
	send_cmd( NW_CMD_ROTATE);
}	
开发者ID:torandi,项目名称:omgspaceponnies,代码行数:5,代码来源:client.cpp


示例2: nt35510_init

static int32_t nt35510_init(struct lcd_spec *self)
{
	Send_data send_cmd = self->info.mcu->ops->send_cmd;
	Send_data send_data = self->info.mcu->ops->send_data;

	LCD_PRINT("nt35510_init===\n");	

	mdelay(200);

	//Power setting sequence
	send_cmd(0xF000);
	send_data(0x55);
	send_cmd(0xF001);
	send_data(0xAA);	
	send_cmd(0xF002);
	send_data(0x52);
	send_cmd(0xF003);
	send_data(0x08);
	send_cmd(0xF004);
	send_data(0x01);
	
	send_cmd(0xB000);
	send_data(0x09);
	send_cmd(0xB001);
	send_data(0x09);
	send_cmd(0xB002);
	send_data(0x09);
	
	send_cmd(0xB600);
	send_data(0x34);
	send_cmd(0xB601);
	send_data(0x34);	
	send_cmd(0xB602);
	send_data(0x34);
	
	send_cmd(0xB100);
	send_data(0x09);
	send_cmd(0xB101);
	send_data(0x09);	
	send_cmd(0xB102);
	send_data(0x09);
	
	send_cmd(0xB700);
	send_data(0x24);
	send_cmd(0xB701);
	send_data(0x24);	
	send_cmd(0xB702);
	send_data(0x24);
	
	send_cmd(0xB300);
	send_data(0x05);
	send_cmd(0xB301);
	send_data(0x05);	
	send_cmd(0xB302);
	send_data(0x05);
	
	send_cmd(0xB900);
	send_data(0x24);
	send_cmd(0xB901);
	send_data(0x24);	
	send_cmd(0xB902);
	send_data(0x24);
	
	send_cmd(0xBF00);
	send_data(0x01);
	
	send_cmd(0xB500);
	send_data(0x0B);
	send_cmd(0xB501);
	send_data(0x0B);	
	send_cmd(0xB502);
	send_data(0x0B);
	
	send_cmd(0xBA00);
	send_data(0x24);
	send_cmd(0xBA01);
	send_data(0x24);	
	send_cmd(0xBA02);
	send_data(0x24);
	
	send_cmd(0xBC00);
	send_data(0x00);
	send_cmd(0xBC01);
	send_data(0xA3);	
	send_cmd(0xBC02);
	send_data(0x00);
	
	send_cmd(0xBD00);
	send_data(0x00);
	send_cmd(0xBD01);
	send_data(0xA3);	
	send_cmd(0xBD02);
	send_data(0x00);
	
	mdelay(120);

	//Display parameter setting
	send_cmd(0xF000);
	send_data(0x55);
	send_cmd(0xF001);
//.........这里部分代码省略.........
开发者ID:yourfrienddhruv,项目名称:zen_u105_uboot,代码行数:101,代码来源:lcd_nt35510.c


示例3: sync_error_callback

static void sync_error_callback(DictionaryResult dict_error, AppMessageResult app_message_error, void *context) {
	APP_LOG(APP_LOG_LEVEL_DEBUG, "App Message Sync Error: %d", app_message_error);
	if (app_message_error == 64) {send_cmd();}
}
开发者ID:aclymer,项目名称:skireport_V0_55,代码行数:4,代码来源:SkiReport.c


示例4: ultimate2_cmd_serv_privmsg

void ultimate2_cmd_serv_privmsg(char *source, char *dest, char *msg)
{
    send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
}
开发者ID:danopia,项目名称:denora,代码行数:4,代码来源:ultimate2.c


示例5: ultimate2_cmd_ping

void ultimate2_cmd_ping(char *server)
{
    send_cmd(ServerName, "PING %s :%s", ServerName, server);
}
开发者ID:danopia,项目名称:denora,代码行数:4,代码来源:ultimate2.c


示例6: ultimate2_cmd_squit

/* SQUIT */
void ultimate2_cmd_squit(char *servname, char *message)
{
    send_cmd(NULL, "SQUIT %s :%s", servname, message);
}
开发者ID:danopia,项目名称:denora,代码行数:5,代码来源:ultimate2.c


示例7: ultimate2_cmd_privmsg

void ultimate2_cmd_privmsg(char *source, char *dest, char *buf)
{
    send_cmd(source, "PRIVMSG %s :%s", dest, buf);
}
开发者ID:danopia,项目名称:denora,代码行数:4,代码来源:ultimate2.c


示例8: select_long_click_handler

static void select_long_click_handler(ClickRecognizerRef recognizer, void *context) {
	send_cmd(WATCH_KEY_PRESSED, WATCH_KEY_HELD_SELECT);
}
开发者ID:Neal,项目名称:PebbleActivator,代码行数:3,代码来源:activator.c


示例9: down_long_click_handler

static void down_long_click_handler(ClickRecognizerRef recognizer, void *context) {
	send_cmd(WATCH_KEY_PRESSED, WATCH_KEY_HELD_DOWN);
}
开发者ID:Neal,项目名称:PebbleActivator,代码行数:3,代码来源:activator.c


示例10: client_version_cb

static void
client_version_cb (hashlist_t * v, CONNECTION * con)
{
    ASSERT (validate_connection (con));
    send_cmd (con, MSG_CLIENT_VERSION_STATS, "\"%s\" %d", v->key, v->count);
}
开发者ID:OS2World,项目名称:APP-SERVER-opennap,代码行数:6,代码来源:server_usage.c


示例11: up_single_click_handler

static void up_single_click_handler(ClickRecognizerRef recognizer, void *context) {
	send_cmd(WATCH_KEY_PRESSED, WATCH_KEY_PRESSED_UP);
}
开发者ID:Neal,项目名称:PebbleActivator,代码行数:3,代码来源:activator.c


示例12: send_cmd

void SzbaseProt::on_param_changed( const std::string& pname )
{
    if( sub_params.count( pname ) )
		send_cmd( new NotifySnd( get_client_param_name (pname )) );
}
开发者ID:xiaomailong,项目名称:szarp,代码行数:5,代码来源:szbase.cpp


示例13: ultimate2_cmd_pong

/* PONG */
void ultimate2_cmd_pong(char *servname, char *who)
{
    send_cmd(servname, "PONG %s", who);
}
开发者ID:danopia,项目名称:denora,代码行数:5,代码来源:ultimate2.c


示例14: wait_packets

int wait_packets(int sd)
{
	int flags;
	int ret;
	int recv_len;
	int len;
	int err;
	fd_set rfds;
	struct nlmsgerr *nl_err;
	struct timeval tv;
	struct nlattr *na;
	struct msgtemplate msg;
	char *http_data;
	struct sample_http_info *http_info;
	long xxxx = 0;
	long errcnt = 0;

	unsigned int query_id = 0;
	char url[MAX_URL_LEN] = {0};
	int sec_flag = 0x0f0f;

#ifdef FIRST_SEND
	printf("%s, first send for test !!!\n", __FUNCTION__);
	err = send_cmd(sd, nl_family_id, SAMPLE_NETLINK_CMD_SECURITY_QUERY,
			SAMPLE_NETLINK_ATTR_SECURITY_FLAG, (void*)&sec_flag,
			sizeof(int), NLM_F_REQUEST);
	if (err < 0) {
		printf("Error sending result (%d:%s)\n",
				errno, strerror(errno));
		return -1;
	}
#endif

	flags = fcntl(sd, F_GETFL);
	fcntl(sd, F_SETFL, flags | O_NONBLOCK);

	err = 0;
	do {
		FD_ZERO(&rfds);
		FD_SET(sd, &rfds);

		/* Monitoring, no timeout */
		ret = select(sd+1, &rfds, NULL, NULL, NULL);

		if (ret < 0) {
			if (errno == EINTR)
				continue;
			perror("select()");
			err = ret;
			break;
		} else if (ret == 0) {
			printf("No answer within %lu seconds.\n", tv.tv_sec);
			err = -ETIMEDOUT;
			break;
		}
		if (!FD_ISSET(sd, &rfds))
			continue;

		printf("\n\n========================================\n\n");
		recv_len = recv(nl_sd, &msg, sizeof(msg), 0);
		if (recv_len < 0) {
			printf("nonfatal reply error: errno %d\n", recv_len);
			err = errno;
			errcnt++;
			printf("fail cnt %d\n", errcnt);
			/* TODO check why failed with high pressure. overwrite on rcv buffer? */
			// break;
		}
#ifdef __DEBUG_MSG__
		if (msg.n.nlmsg_type == NLMSG_ERROR ||
				!NLMSG_OK((&msg.n), recv_len)) {
			nl_err = NLMSG_DATA(&msg);
			printf("fatal reply error,  errno %d\n", nl_err->error);
			err = nl_err->error;
			break;
		}
#endif
		recv_len = GENLMSG_PAYLOAD(&msg.n);
		na = (struct nlattr *) GENLMSG_DATA(&msg);

		printf("%s, recv genl msg, cmd=%d\n", __FUNCTION__, msg.g.cmd);
		print_timestamp();
		len = 0;
		while (len < recv_len) {
			len += NLA_ALIGN(na->nla_len);
			switch (na->nla_type) {
				case SAMPLE_NETLINK_TYPE_SEC_QID:
					{
						query_id = *(unsigned int *)NLA_DATA(na);
						printf("HTTP query id:%d\n", query_id);
					}
					break;
				case SAMPLE_NETLINK_TYPE_HTTP_INFO:
					http_info = (struct http_info *)NLA_DATA(na);
#ifdef __DEBUG_MSG__
					printf("%08x(%u) --> %08x(%u)\n",
							ntohl(http_info->sip), ntohs(http_info->sport),
							ntohl(http_info->dip), ntohs(http_info->dport));
#endif
					break;
//.........这里部分代码省略.........
开发者ID:caiyuchao,项目名称:program,代码行数:101,代码来源:netlink.c


示例15: ultimate2_cmd_global

/* GLOBOPS */
void ultimate2_cmd_global(char *source, char *buf)
{
    send_cmd(source, "GLOBOPS :%s", buf);
}
开发者ID:danopia,项目名称:denora,代码行数:5,代码来源:ultimate2.c


示例16: ultimate2_cmd_stats

void ultimate2_cmd_stats(char *sender, const char *letter, char *server)
{
    send_cmd(sender, "STATS %s %s", letter, server);
}
开发者ID:danopia,项目名称:denora,代码行数:4,代码来源:ultimate2.c


示例17: ultimate2_cmd_notice

void ultimate2_cmd_notice(char *source, char *dest, char *buf)
{
    send_cmd(source, "NOTICE %s :%s", dest, buf);
}
开发者ID:danopia,项目名称:denora,代码行数:4,代码来源:ultimate2.c


示例18: ultimate2_cmd_version

void ultimate2_cmd_version(char *server)
{
    send_cmd(s_StatServ, "VERSION %s", server);
}
开发者ID:danopia,项目名称:denora,代码行数:4,代码来源:ultimate2.c


示例19: ultimate2_cmd_serv_notice

void ultimate2_cmd_serv_notice(char *source, char *dest, char *msg)
{
    send_cmd(source, "NOTICE $%s :%s", dest, msg);
}
开发者ID:danopia,项目名称:denora,代码行数:4,代码来源:ultimate2.c


示例20: ultimate2_cmd_motd

void ultimate2_cmd_motd(char *sender, char *server)
{
    send_cmd(sender, "MOTD %s", server);
}
开发者ID:danopia,项目名称:denora,代码行数:4,代码来源:ultimate2.c



注:本文中的send_cmd函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ send_command函数代码示例发布时间:2022-05-30
下一篇:
C++ send_cluster_message函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap