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


C++ do_stop函数代码示例

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


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

示例1: bluetooth

/*
void bluetooth(void) {
  unsigned int redata,Ddata,choice;
  if(identityset==1)
  {
    redatah=LPLD_UART_GetChar(UART4);
    if(redatah==255)
    {
      identityset=0;
    }
  }
  
  if(identityset==2)
  {
    identityset=0;
    redata=LPLD_UART_GetChar(UART4)+redatah*256;
    choice=redata/4096;
    redata=redata%4096;
    Ddata=redata/256*100+redata/16%16*10+redata%16;
    
    switch(choice)
    {        
    case 0:  turnleft_time_set=Ddata*10;break;
    case 1:  testvalue1=Ddata;break;//将想要实时修改的全局变量替换掉null 在串口调试助手中  
    case 2:  PID_KP=Ddata;break;//输入四位的十六进制字符串 当做十进制的输入就可以了
    case 3:  testvalue3=Ddata;break;//第一个数位你想要改变的变量对应编号
    case 4:  testvalue4=Ddata;break;
    case 5:  testvalue5=Ddata;break;
    case 6:  haoswitch=Ddata;break;
    //case 7:  kd1=Ddata;break;
    //case 8:  kd2=Ddata;break;
    //case 9:  kd3=Ddata;break;
    //case 10:  kd4=Ddata;break;
    //case 11:  kd5=Ddata;break;
    //case 12:  kd6=Ddata;break;
    //case 13:  jiuzheng=Ddata;break;
    //case 14:  null=Ddata;break;
    //case 15:  null=Ddata;break;
    default : break;
    }
    
  }
  identityset++;
}

void sendblue(int a,int b)
{
  char sendbluedata[2];
  
  sendbluedata[0]=a*16+b/256;
  
  sendbluedata[1]=b%256;  
  LPLD_UART_PutCharArr(UART4,(char*)sendbluedata,2);
}

*/
void do_control(void)
{
	switch (routechoice) {
	case C_AHEAD:
		do_goahead();		break;
	case C_GETCORNER:
		do_getcorner();		break;
	case C_LEFT:
		do_turnleft();		break;
	case C_RIGHT:
		do_turnright();		break;
	case C_STOP:
		do_stop();			break;
	case C_AROUND:
		do_turnaround();	break;
	case C_BREAK:
		do_break();			break;
	case C_START:
		do_start(); 		break;
	case C_LETSWIN:
		do_letswin(); 		break;
	default:
		do_stop();
  }
}
开发者ID:ShangxuanWu,项目名称:RoboCup,代码行数:81,代码来源:control.c

示例2: do_control

void do_control()
{
         
	switch(control_action)
	{
        case TURN_LEFT:
			do_turn_left();
            break;
		case TURN_RIGHT:
			do_turn_right();
            break;
		case TURN_BACK:
			do_turn_back();
            break;
		case GO_AHEAD:
			do_go_ahead();
            break;
        case STOP:
			do_stop();
            break;
		case GET_CROSS:
			do_get_cross();
                        break;
		default:
			do_stop();
            break;
	}
	
	#ifdef STOP_DEBUG
	car_set_left_speed(0);
	car_set_right_speed(0);
	#endif
}
开发者ID:ShangxuanWu,项目名称:RoboCup,代码行数:33,代码来源:control.c

示例3: do_cue

// Prepare deck to go into 'READY' state
void do_cue(float cuepoint)
{
	if (verbose) printf("-> do_cue(%f)\n", cuepoint);

	// Stop first
	if (get_state() == MADJACK_STATE_PLAYING ||
	    get_state() == MADJACK_STATE_PAUSED)
	{
		do_stop();
	}
	
	// Had cue-point changed?
	if (get_state() == MADJACK_STATE_READY &&
	    input_file->position != cuepoint)
	{
		if (verbose) printf("Stopping because cuepoint changed.\n");
		do_stop();
	}
	
	// Start the new thread
	if (get_state() == MADJACK_STATE_LOADING ||
	    get_state() == MADJACK_STATE_STOPPED )
	{

		// Set the decoder running
		start_decoder_thread( input_file, cuepoint );
		
	}
	else if (get_state() != MADJACK_STATE_READY)
	{
		fprintf(stderr, "Warning: Can't change from %s to state READY.\n", get_state_name(get_state()) );
	}

}
开发者ID:egasimus,项目名称:madjack,代码行数:35,代码来源:control.c

示例4: test_syscall

void test_syscall(int syscall) {

	//clear_log();
	do_intercept(syscall, 0);
	do_as_guest("./test_full nonroot %d", syscall, 0);
	do_start(syscall, -2, -EINVAL);
	do_start(syscall, 0, 0);
	do_stop(syscall, 0, 0);
	do_start(syscall, 1, 0);
	do_as_guest("./test_full stop %d 1 %d", syscall, -EPERM);
	do_stop(syscall, 1, 0);
	do_as_guest("./test_full start %d -1 %d", syscall, 0);
	do_stop(syscall, last_child, -EINVAL);
	do_release(syscall, 0);

	puts("----- START OF test_PASS -----");
	test_PASS(syscall);
	puts("----- END OF test_PASS -----");
	puts("----- START OF test_A -----");
	test_A(syscall);
	puts("----- END OF test_A -----");
	puts("----- START OF test_B -----");
	test_B(syscall, TRUE);
	puts("----- END OF test_B -----");
	puts("----- START OF test_CDE ----");
	test_CDE(syscall);
	puts("----- END OF test_CDE ----");
}
开发者ID:MeowsterEric,项目名称:CSCB09-Winter_2016,代码行数:28,代码来源:test_full.c

示例5: flush_data

static int
flush_data(ProfilerObject *self)
{
    /* Need to dump data to the log file... */
    size_t written = fwrite(self->buffer, 1, self->index, self->logfp);
    if (written == (size_t)self->index)
        self->index = 0;
    else {
        memmove(self->buffer, &self->buffer[written],
                self->index - written);
        self->index -= written;
        if (written == 0) {
            char *s = PyString_AsString(self->logfilename);
            PyErr_SetFromErrnoWithFilename(PyExc_IOError, s);
            do_stop(self);
            return -1;
        }
    }
    if (written > 0) {
        if (fflush(self->logfp)) {
            char *s = PyString_AsString(self->logfilename);
            PyErr_SetFromErrnoWithFilename(PyExc_IOError, s);
            do_stop(self);
            return -1;
        }
    }
    return 0;
}
开发者ID:xen0n,项目名称:cpython64-64,代码行数:28,代码来源:_hotshot.c

示例6: DlgProc

LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
        switch (Msg) {
	case WM_USER:
		switch (lParam) {
		case WM_LBUTTONDBLCLK:
			ShowWindow(hWndDlg, SW_SHOW);
			return TRUE;
		}
		break;
		
	case WM_TERM:
		do_stop(hWndDlg);
		break;

	case WM_INITDIALOG:
		_hwnd = hWndDlg;
		do_init();
		do_stop(_hwnd);

		start_stop(hWndDlg); /* didn't we say on by default? ;D */
		break;

	case WM_SYSCOMMAND:
		if ((wParam & 0xfff0) == SC_MINIMIZE) {
			minimize(hWndDlg);
			return TRUE;
		}
		break;

        case WM_CLOSE:
		minimize(hWndDlg);
                return TRUE;

        case WM_COMMAND:
                switch(wParam) {
		case IDOK:
			start_stop(hWndDlg);
			return TRUE;
		case IDCANCEL:
			netstat();
			return TRUE;

		case IDC_BUTTON1:
			EndDialog(hWndDlg, 0);
			return TRUE;

		case IDC_BUTTON2:
			hof();
			return TRUE;
		}
		break;
	}

	return FALSE;
}
开发者ID:Hasimir,项目名称:tcpcrypt,代码行数:56,代码来源:tcpcrypt.c

示例7: do_nonroot

int do_nonroot(int syscall) {
	do_intercept(syscall, -EPERM);
	do_release(syscall, -EPERM);
	do_start(syscall, 0, -EPERM);
	do_stop(syscall, 0, -EPERM);
	do_start(syscall, 1, -EPERM);
	do_stop(syscall, 1, -EPERM);
	do_start(syscall, getpid(), 0);
	do_start(syscall, getpid(), -EBUSY);
	do_monitor(syscall);
	do_stop(syscall, getpid(), 0);
	do_stop(syscall, getpid(), -EINVAL);
	return 0;
}
开发者ID:hugosc,项目名称:a1_CSC369,代码行数:14,代码来源:test_full.c

示例8: moving

static void moving(Info * info) {
    if (checkDone()) {
        mylogfd(SCHFD, "[sche]checkDone moving\n");
		info->state = FACE_DOOR;
		return;
	}
	if (!IsBallCatch(info)) {
		do_stop(info);
		info->state = SEARCH_BALL;
		return;
	}
    mylogfd(SCHFD,"MOVING");
    /*static int step = 0;
    if (step == 1 && checkDone()) {
        step = 0;
        info->state = BALL_CATCHED;
        do_rota_with_ball(info, 360, 1);
        return;    
    }    
    if (step == 0 && checkDone()) {
        step = 1;
        info->destP.y = 70;
        info->destP.x = 0;  
        do_catch_ball(info);
        return;
    }*/
}
开发者ID:hewr1993,项目名称:robocup,代码行数:27,代码来源:sched.c

示例9: stop_handler

static
int stop_handler(const char *path, const char *types, lo_arg **argv, int argc,
		 lo_message msg, void *user_data)
{
	do_stop();
    return 0;
}
开发者ID:egasimus,项目名称:madjack,代码行数:7,代码来源:mjosc.c

示例10: do_depend

/*
 * This is an in-fix recursive function called before s is started to
 * stop every service that depends on s, in reverse order *or* after s
 * was started to start again every service that depends on s. The
 * action parametere controls if this function should start or stop
 * the procceses that depends on s.
 * @param s A Service_T object
 * @param action An action to do on the dependant services
 */
static void do_depend(Service_T s, const char *action) {

  Service_T child;
  
  ASSERT(s);

  for(child= servicelist; child; child= child->next) {
    
    if(child->dependantlist) {

      Dependant_T d;
    
      for(d= child->dependantlist; d; d= d->next) {

	if(IS(d->dependant, s->name)) {
	
	  if(IS(action, "start"))
	    do_start(child);
          else if(IS(action, "monitor"))
	    do_monitor(child);
	
	  do_depend(child, action);
	
	  if(IS(action, "stop"))
	    do_stop(child);
          else if(IS(action, "unmonitor"))
	    do_unmonitor(child);

	  break;

	}
      }
    }
  }
}
开发者ID:bumper-app,项目名称:nicad,代码行数:44,代码来源:control.c

示例11: pit_isr0

void pit_isr0() //电机控制5ms
{  
  //读脉冲
	pulsecount = LPLD_LPTMR_GetPulseAcc();
	pulseaccu += pulsecount;
  //pulsetotal+=pulsecount;
	LPLD_LPTMR_Reset();       
	LPLD_LPTMR_Init(MODE_PLACC, 0, LPTMR_ALT1, IRQ_DISABLE, NULL);
  
  
  //分析
  //  analyse();
  //控制
	scan_infrared(r1, r2, r3, r4);
  //fisrthongwaierror();
  //secondhongwaierror();//边沿跳变获得误差
	calculate_infrared_error(r1, INFRARED_LINE1_NUM, &r1_error);
	calculate_infrared_error(r2, INFRARED_LINE2_NUM, &r2_error);
  
	if (is_enabled) do_control();
	else do_stop();
  
	static int __scan_infront_counter = 0;
	
	if (__adc > SCAN_INFRONT_THRESHOLE_SMALL 
		&& abs(r1_error - r2_error) < 2) __scan_infront_counter ++;
	else {
		__scan_infront_counter = 0;
	}
	is_car_infront = __scan_infront_counter > 5;
}
开发者ID:ShangxuanWu,项目名称:RoboCup,代码行数:31,代码来源:control.c

示例12: do_depend

/*
 * This is an in-fix recursive function called before s is started to
 * stop every service that depends on s, in reverse order *or* after s
 * was started to start again every service that depends on s. The
 * action parametere controls if this function should start or stop
 * the procceses that depends on s.
 * @param s A Service_T object
 * @param action An action to do on the dependant services
 */
static void do_depend(Service_T s, int action) {
  Service_T child;
  
  ASSERT(s);

  for (child = servicelist; child; child = child->next) {
    if (child->dependantlist) {
      Dependant_T d;
    
      for (d = child->dependantlist; d; d = d->next) {
	if (IS(d->dependant, s->name)) {
	  if (action == ACTION_START)
	    do_start(child);
          else if (action == ACTION_MONITOR)
	    do_monitor(child);
	  do_depend(child, action);
	  if (action == ACTION_STOP)
	    do_stop(child);
          else if (action == ACTION_UNMONITOR)
	    do_unmonitor(child);
	  break;
	}
      }
    }
  }
}
开发者ID:hafiz,项目名称:yoke,代码行数:35,代码来源:control.c

示例13: test_syscall

void test_syscall(int syscall) {

	//clear_log();
	do_intercept(syscall, 0);
	do_intercept(syscall, -EBUSY);
	do_as_guest("./test_full nonroot %d", syscall, 0);
	do_start(syscall, -2, -EINVAL);
	do_start(syscall, 0, 0);
	do_stop(syscall, 0, 0);
	do_start(syscall, 1, 0);
	do_as_guest("./test_full stop %d 1 %d", syscall, -EPERM);
	do_stop(syscall, 1, 0);
	do_as_guest("./test_full start %d -1 %d", syscall, 0);
	do_stop(syscall, last_child, -EINVAL);
	do_release(syscall, 0);
}
开发者ID:hugosc,项目名称:a1_CSC369,代码行数:16,代码来源:test_full.c

示例14: do_stop

void
gtk_gui::do_load_settings() {
	if (m_mainloop && m_mainloop->is_open())
		do_stop();

	m_settings_chooser = GTK_FILE_CHOOSER (gtk_file_chooser_dialog_new(gettext("Please, select a settings file"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN,"Cancel", GTK_RESPONSE_CANCEL, "Open", GTK_RESPONSE_ACCEPT, NULL));

	GtkFileFilter *filter_xml = gtk_file_filter_new();
	gtk_file_filter_set_name(filter_xml, gettext("XML files"));
	gtk_file_filter_add_pattern(filter_xml, "*.xml");
	gtk_file_chooser_add_filter(m_settings_chooser, filter_xml);

	gint result = gtk_dialog_run (GTK_DIALOG (m_settings_chooser));
	if (result == GTK_RESPONSE_ACCEPT) {
		do_settings_selected();
	}
	gtk_widget_hide(GTK_WIDGET (m_settings_chooser));

	/* Ensure that the dialog box is hidden when the user clicks a button.
	We don't need anymore the callbacks, because they can be embedded in this part of the code */
/*
	g_signal_connect_swapped (GTK_FILE_SELECTION (m_settings_selector)->ok_button,
		"clicked",
		G_CALLBACK (gtk_widget_hide),
		m_settings_selector);

	g_signal_connect_swapped (GTK_FILE_SELECTION (m_settings_selector)->cancel_button,
		"clicked",
		G_CALLBACK (gtk_widget_hide),
		m_settings_selector);
	g_signal_connect_swapped (G_OBJECT ((m_settings_selector)->ok_button),"clicked", G_CALLBACK (gtk_C_callback_settings_selected),(void*) this);
*/
}
开发者ID:InfowareConsulting,项目名称:Signage-Ambulant-Study,代码行数:33,代码来源:gtk_gui.cpp

示例15: RServerCSLtr_Stop

RIOTRtnE RServerCSLtr_Stop(RServerCSLtr * csLtr) {

	RC_ASSERT(csLtr);

	do_stop(csLtr);

	return RC_SUCCESS;
}
开发者ID:yenpai,项目名称:RIOT,代码行数:8,代码来源:RServerCSLtr.c


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