当前位置: 首页>>代码示例>>C++>>正文


C++ FsmAddTimer函数代码示例

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


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

示例1: l2_connected

static void
l2_connected(struct FsmInst *fi, int event, void *arg)
{
	layer2_t *l2 = fi->userdata;
	msg_t *msg = arg;
	int pr=-1;

	if (!get_PollFlag(l2, msg)) {
		l2_mdl_error_ua(fi, event, arg);
		return;
	}
	free_msg(msg);
	if (test_and_clear_bit(FLG_PEND_REL, &l2->flag))
		l2_disconnect(fi, event, NULL);
	if (test_and_clear_bit(FLG_L3_INIT, &l2->flag)) {
		pr = DL_ESTABLISH | CONFIRM;
	} else if (l2->vs != l2->va) {
		msg_queue_purge(&l2->i_queue);
		pr = DL_ESTABLISH | INDICATION;
	}
	stop_t200(l2, 5);

	l2->vr = 0;
	l2->vs = 0;
	l2->va = 0;
	l2->sow = 0;
	FsmChangeState(fi, ST_L2_7);
	FsmAddTimer(&l2->t203, l2->T203, EV_L2_T203, NULL, 4);
	if (pr != -1)
		l2up_create(l2, pr, CES(l2), 0, NULL);

	if (msg_queue_len(&l2->i_queue) && cansend(l2))
		FsmEvent(fi, EV_L2_ACK_PULL, NULL);
}
开发者ID:Distrotech,项目名称:mISDNuser,代码行数:34,代码来源:net_l2.c

示例2: lc_start_delay

static void
lc_start_delay(struct FsmInst *fi, int event, void *arg)
{
       struct PStack *st = fi->userdata;

       FsmChangeState(fi, ST_L3_LC_REL_DELAY);
       FsmAddTimer(&st->l3.l3m_timer, DREL_TIMER_VALUE, EV_TIMEOUT, NULL, 50);
}
开发者ID:jameshilliard,项目名称:actiontec_opensrc_mi424wr-rev-ef_fw-20-19-8,代码行数:8,代码来源:isdnl3.c

示例3: lc_start_delay_check

static void
lc_start_delay_check(struct FsmInst *fi, int event, void *arg)
/* 20/09/00 - GE timer not user for NI-1 as layer 2 should stay up */
{
       struct PStack *st = fi->userdata;

       FsmChangeState(fi, ST_L3_LC_REL_DELAY);
       /* 19/09/00 - GE timer not user for NI-1 */
       if (st->protocol != ISDN_PTYPE_NI1) 
       		FsmAddTimer(&st->l3.l3m_timer, DREL_TIMER_VALUE, EV_TIMEOUT, NULL, 50);
}
开发者ID:jameshilliard,项目名称:actiontec_opensrc_mi424wr-rev-ef_fw-20-19-8,代码行数:11,代码来源:isdnl3.c

示例4: tei_id_verify

static void
tei_id_verify(struct FsmInst *fi, int event, void *arg)
{
	struct PStack *st = fi->userdata;

	if (st->ma.debug)
		st->ma.tei_m.printdebug(&st->ma.tei_m,
			"id verify request for tei %d", st->l2.tei);
	put_tei_msg(st, ID_VERIFY, 0, st->l2.tei);
	FsmChangeState(&st->ma.tei_m, ST_TEI_IDVERIFY);
	FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 2);
	st->ma.N202 = 2;
}
开发者ID:xricson,项目名称:knoppix,代码行数:13,代码来源:tei.c

示例5: lc_release_req

static void
lc_release_req(struct FsmInst *fi, int event, void *arg)
{
	struct PStack *st = fi->userdata;

	if (test_bit(FLG_L2BLOCK, &st->l2.flag)) {
		if (st->l3.debug)
			l3_debug(st, "lc_release_req: l2 blocked");
		/* restart release timer */
		FsmAddTimer(&st->l3.l3m_timer, DREL_TIMER_VALUE, EV_TIMEOUT, NULL, 51);
	} else {
		FsmChangeState(fi, ST_L3_LC_REL_WAIT);
		st->l3.l3l2(st, DL_RELEASE | REQUEST, NULL);
	}
}
开发者ID:jameshilliard,项目名称:actiontec_opensrc_mi424wr-rev-ef_fw-20-19-8,代码行数:15,代码来源:isdnl3.c

示例6: tei_id_request

static void
tei_id_request(struct FsmInst *fi, int event, void *arg)
{
	struct PStack *st = fi->userdata;

	if (st->l2.tei != -1) {
		st->ma.tei_m.printdebug(&st->ma.tei_m,
			"assign request for already assigned tei %d",
			st->l2.tei);
		return;
	}
	st->ma.ri = random_ri();
	if (st->ma.debug)
		st->ma.tei_m.printdebug(&st->ma.tei_m,
			"assign request ri %d", st->ma.ri);
	put_tei_msg(st, ID_REQUEST, st->ma.ri, 127);
	FsmChangeState(&st->ma.tei_m, ST_TEI_IDREQ);
	FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 1);
	st->ma.N202 = 3;
}
开发者ID:xricson,项目名称:knoppix,代码行数:20,代码来源:tei.c

示例7: l2_start_multi

static void
l2_start_multi(struct FsmInst *fi, int event, void *arg)
{
	layer2_t *l2 = fi->userdata;
	msg_t *msg = arg;

	send_uframe(l2, NULL, UA | get_PollFlag(l2, msg), RSP);

	clear_exception(l2);
	l2->vs = 0;
	l2->va = 0;
	l2->vr = 0;
	l2->sow = 0;
	FsmChangeState(fi, ST_L2_7);
	FsmAddTimer(&l2->t203, l2->T203, EV_L2_T203, NULL, 3);
	msg_trim(msg, 0);
	msg_push(msg, mISDNUSER_HEAD_SIZE);
	if (l2up(l2, DL_ESTABLISH | INDICATION, CES(l2), msg))
		free_msg(msg);
}
开发者ID:Distrotech,项目名称:mISDNuser,代码行数:20,代码来源:net_l2.c

示例8: tei_id_ver_tout

static void
tei_id_ver_tout(struct FsmInst *fi, int event, void *arg)
{
	struct PStack *st = fi->userdata;
	struct IsdnCardState *cs;

	if (--st->ma.N202) {
		if (st->ma.debug)
			st->ma.tei_m.printdebug(&st->ma.tei_m,
				"id verify req(%d) for tei %d",
				3 - st->ma.N202, st->l2.tei);
		put_tei_msg(st, ID_VERIFY, 0, st->l2.tei);
		FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 4);
	} else {
		st->ma.tei_m.printdebug(&st->ma.tei_m,
			"verify req for tei %d failed", st->l2.tei);
		L3L2(st, MDL_REMOVE | REQUEST, 0);
		cs = (struct IsdnCardState *) st->l1.hardware;
		mdl_remove(cs);
		FsmChangeState(fi, ST_TEI_NOP);
	}
}
开发者ID:xricson,项目名称:knoppix,代码行数:22,代码来源:tei.c

示例9: tei_id_req_tout

static void
tei_id_req_tout(struct FsmInst *fi, int event, void *arg)
{
	struct PStack *st = fi->userdata;
	struct IsdnCardState *cs;

	if (--st->ma.N202) {
		st->ma.ri = random_ri();
		if (st->ma.debug)
			st->ma.tei_m.printdebug(&st->ma.tei_m,
				"assign req(%d) ri %d", 4 - st->ma.N202,
				st->ma.ri);
		put_tei_msg(st, ID_REQUEST, st->ma.ri, 127);
		FsmAddTimer(&st->ma.t202, st->ma.T202, EV_T202, NULL, 3);
	} else {
		st->ma.tei_m.printdebug(&st->ma.tei_m, "assign req failed");
		L3L2(st, MDL_ERROR | RESPONSE, 0);
		cs = (struct IsdnCardState *) st->l1.hardware;
		mdl_remove(cs);
		FsmChangeState(fi, ST_TEI_NOP);
	}
}
开发者ID:xricson,项目名称:knoppix,代码行数:22,代码来源:tei.c

示例10: start_t200

inline void
start_t200(layer2_t *l2, int i)
{
	FsmAddTimer(&l2->t200, l2->T200, EV_L2_T200, NULL, i);
	test_and_set_bit(FLG_T200_RUN, &l2->flag);
}
开发者ID:Distrotech,项目名称:mISDNuser,代码行数:6,代码来源:net_l2.c


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