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


C++ PROGRESS函数代码示例

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


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

示例1: main

//main function
int main (int argc, char* argv[]) {
	ENTER();

	PROGRESS("Create the wpa_supplicant mgr");
	wpaHandle mgrHandle = wpa_supplicant_mgr_Init();
	if (!mgrHandle){
		ALLOC_FAIL("mgrHandle");
		EXIT_WITH_ERROR();
		return -1;
	}

	PROGRESS("Start the Manager Operation");
	wpa_supplicant_mgr_Start(mgrHandle);
    //This function will not return until operation is complete


	//Perform needed Cleanup
	//The program enters here before it exits
	PROGRESS("Cleanup: Stop and Destroy the Mgr");
	wpa_supplicant_mgr_Stop(mgrHandle);
	wpa_supplicant_mgr_Destroy (mgrHandle);

	EXIT();
	return 0;
}
开发者ID:aelarabawy,项目名称:software-projects,代码行数:26,代码来源:main.c

示例2: LOOP

void
VideoConsumer::HandleEvent(const media_timed_event* event, bigtime_t lateness,
	bool realTimeEvent)
{
	LOOP("VideoConsumer::HandleEvent\n");
	
	switch (event->type) {
		case BTimedEventQueue::B_START:
			PROGRESS("VideoConsumer::HandleEvent - START\n");
			_SetPerformanceTimeBase(event->event_time);
			break;
		case BTimedEventQueue::B_WARP:
		case BTimedEventQueue::B_SEEK:
			PROGRESS("VideoConsumer::HandleEvent - WARP or SEEK\n");
			_SetPerformanceTimeBase(event->bigdata);
			break;

		case BTimedEventQueue::B_STOP:
			PROGRESS("VideoConsumer::HandleEvent - STOP\n");
			EventQueue()->FlushEvents(event->event_time, BTimedEventQueue::B_ALWAYS, true, BTimedEventQueue::B_HANDLE_BUFFER);
			// unset the target's bitmap
			_UnsetTargetBuffer();
			break;

		case BTimedEventQueue::B_HANDLE_BUFFER:
			LOOP("VideoConsumer::HandleEvent - HANDLE BUFFER\n");
			_HandleBuffer(static_cast<BBuffer*>(event->pointer));
			break;
		default:
			ERROR("VideoConsumer::HandleEvent - BAD EVENT\n");
			break;
	}			
}
开发者ID:mmadia,项目名称:Haiku-services-branch,代码行数:33,代码来源:VideoConsumer.cpp

示例3: hd_scan_sysfs_pci

void hd_scan_sysfs_pci(hd_data_t *hd_data)
{
  if(!hd_probe_feature(hd_data, pr_pci)) return;

  hd_data->module = mod_pci;

  /* some clean-up */
  remove_hd_entries(hd_data);
  hd_data->pci = NULL;

  PROGRESS(1, 0, "sysfs drivers");

  hd_sysfs_driver_list(hd_data);

  PROGRESS(2, 0, "get sysfs pci data");

  hd_pci_read_data(hd_data);
  if(hd_data->debug) dump_pci_data(hd_data);

  add_pci_data(hd_data);

  PROGRESS(3, 0, "macio");

  hd_read_macio(hd_data);

  PROGRESS(3, 0, "vio");

  hd_read_vio(hd_data);
}
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:29,代码来源:pci.c

示例4: hd_scan_mouse

void hd_scan_mouse(hd_data_t *hd_data)
{
  ser_device_t *sm, *sm_next;

  if(!hd_probe_feature(hd_data, pr_mouse)) return;

  hd_data->module = mod_mouse;

  /* some clean-up */
  remove_hd_entries(hd_data);
  hd_data->ser_mouse = NULL;

#if 0
  PROGRESS(1, 0, "ps/2");

  get_ps2_mouse(hd_data);
#endif

  PROGRESS(2, 0, "serial");

  hd_fork(hd_data, 20, 20);

  if(hd_data->flags.forked) {
    get_serial_mouse(hd_data);
    hd_move_to_shm(hd_data);
    if((hd_data->debug & HD_DEB_MOUSE)) dump_ser_mouse_data(hd_data);
  }
  else {
    /* take data from shm */
    hd_data->ser_mouse = ((hd_data_t *) (hd_data->shm.data))->ser_mouse;
    if((hd_data->debug & HD_DEB_MOUSE)) dump_ser_mouse_data(hd_data);
  }

  hd_fork_done(hd_data);

  add_serial_mouse(hd_data);

  hd_shm_clean(hd_data);

  for(sm = hd_data->ser_mouse; sm; sm = sm_next) {
    sm_next = sm->next;

    free_mem(sm->dev_name);
    free_mem(sm);
  }
  hd_data->ser_mouse = NULL;

#if 0
  PROGRESS(3, 0, "sunmouse");

  get_sunmouse(hd_data);
#endif
}
开发者ID:BackupTheBerlios,项目名称:sax-svn,代码行数:53,代码来源:mouse.c

示例5: at_cmd

void at_cmd(hd_data_t *hd_data, char *at, int raw, int log_it)
{
  static unsigned u = 1;
  char *s, *s0;
  ser_device_t *sm;
  str_list_t *sl;
  int modems = 0;

  for(sm = hd_data->ser_modem; sm; sm = sm->next) {
    if(sm->do_io) {
      sm->buf_len = 0;
      modems++;
    }
  }

  if(modems == 0) return;

  PROGRESS(9, u, "write at cmd");
  write_modem(hd_data, at);
  PROGRESS(9, u, "read at resp");
  usleep (200000);
  read_modem(hd_data);
  PROGRESS(9, u, "read ok");
  u++;

  for(sm = hd_data->ser_modem; sm; sm = sm->next) {
    if(sm->do_io) {
      sm->at_resp = free_str_list(sm->at_resp);
      if(sm->buf_len == 0 || raw) continue;
      s0 = sm->buf;
      while((s = strsep(&s0, "\r\n"))) {
        if(*s) add_str_list(&sm->at_resp, s);
      }
    }
  }

  if(!(hd_data->debug & HD_DEB_MODEM) || !log_it) return;

  for(sm = hd_data->ser_modem; sm; sm = sm->next) {
    if(sm->do_io) {
      ADD2LOG("%[email protected]%u: %s\n", sm->dev_name, sm->cur_baud, at);
      if(raw) {
        ADD2LOG("  ");
        hexdump(&hd_data->log, 1, sm->buf_len, sm->buf);
        ADD2LOG("\n");
      }
      else {
        for(sl = sm->at_resp; sl; sl = sl->next) ADD2LOG("  %s\n", sl->str);
      }
    }
  }
}
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:52,代码来源:modem.c

示例6: int_media_check

/*
 * Try to read block 0 for block devices.
 */
void int_media_check(hd_data_t *hd_data)
{
    hd_t *hd;
    int i, j = 0;

    for(hd = hd_data->hd; hd; hd = hd->next) {
        if(!hd_report_this(hd_data, hd)) continue;
        if(
            hd->base_class.id == bc_storage_device &&
            (
                /* hd->sub_class.id == sc_sdev_cdrom || */ /* cf. cdrom.c */
                hd->sub_class.id == sc_sdev_disk ||
                hd->sub_class.id == sc_sdev_floppy
            ) &&
            hd->unix_dev_name &&
            !hd->block0 &&
            !hd->is.notready &&
            hd->status.available != status_no
        ) {
            i = 5;
            PROGRESS(4, ++j, hd->unix_dev_name);
            hd->block0 = read_block0(hd_data, hd->unix_dev_name, &i);
            hd->is.notready = hd->block0 ? 0 : 1;
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:sax-svn,代码行数:29,代码来源:int.c

示例7: loadmix

loadmix(char *fnames[], int nscores, double *weights) {
	if(nscores<2 || nscores>NSCORES) error("Bad number of files\n");
	
	double xty[NSCORES+1];
	if(weights) {
		int j;
		for(j=0;j<=nscores;j++)
			xty[j]=weights[j];
	} else
		computemix(fnames, nscores, xty);
	lg("Mixing coeeficients\n");
	int f;
	for(f=0;f<=nscores;f++)
		lg("-lew %f ",xty[f]);
	lg("\n");
		
	FILE *fp[NSCORES];
	openfiles(fp,fnames,nscores);
	int i;
	for(i=0; i<NENTRIES; i++) {
		PROGRESS(i,NENTRIES);
		int r=(userent[i]>>USER_LMOVIEMASK)&7;
		float s[NSCORES];
		readfiles(fp,s,nscores);
		float stotal=0.;
		int j;
		for(j=0;j<nscores;j++)
			stotal+=xty[j]*(r-s[j]);
		stotal+=xty[nscores];
		err[i]=r-stotal;
	}
	closefiles(fp,nscores);
}
开发者ID:Algozjb,项目名称:nprizeadditions,代码行数:33,代码来源:mix2.c

示例8: write_to_serial

/*---------------------------------------------------------------------------*/
void
write_to_serial(void *inbuf, int len)
{
	u_int8_t *p = inbuf;
	int i; /*, ecode;*/

	/*  printf("Got packet of length %d - write SLIP\n", len);*/
	/*  print_packet(p, len);*/

	/* It would be ``nice'' to send a SLIP_END here but it's not
	* really necessary.
	*/
	/* slip_send(outfd, SLIP_END); */
	PRINTF("Writing to serial  len: %d\n", len);
	for(i = 0; i < len; i++) {
		switch(p[i]) {
	case SLIP_END:
		slip_send(SLIP_ESC);
		slip_send(SLIP_ESC_END);
		break;
	case SLIP_ESC:
		slip_send(SLIP_ESC);
		slip_send(SLIP_ESC_ESC);
		break;
	default:
		slip_send(p[i]);
		break;
		}

	}
	slip_send(SLIP_END);
	PROGRESS("t");
}
开发者ID:1uk3,项目名称:contiki,代码行数:34,代码来源:wpcapslip6.c

示例9: int_media_check

/*
 * Try to read block 0 for block devices.
 */
void int_media_check(hd_data_t *hd_data)
{
  hd_t *hd;
  int i, j = 0;

  for(hd = hd_data->hd; hd; hd = hd->next) {
    if(!hd_report_this(hd_data, hd)) continue;
    if(
      hd->base_class.id == bc_storage_device &&
      (
        /* hd->sub_class.id == sc_sdev_cdrom || */ /* cf. cdrom.c */
        hd->sub_class.id == sc_sdev_disk ||
        hd->sub_class.id == sc_sdev_floppy
      ) &&
      hd->unix_dev_name &&
      !hd->block0 &&
      !hd->is.notready &&
      hd->status.available != status_no
    ) {
      i = 5;
      PROGRESS(4, ++j, hd->unix_dev_name);
      hd->block0 = read_block0(hd_data, hd->unix_dev_name, &i);
      hd->is.notready = hd->block0 ? 0 : 1;
#if defined(__i386__) || defined(__x86_64__)
      if(hd->block0) {
        ADD2LOG("  mbr sig: 0x%08x\n", edd_disk_signature(hd));
      }
#endif
    }
  }
}
开发者ID:openSUSE,项目名称:hwinfo,代码行数:34,代码来源:int.c

示例10: move_default

void move_default(control_t *control) {
		velocity_t velocity = MIDDLE * VELOCITY_MODY;
		angle_t vert_angle = control->vert_angle;
		//pthread_t tid;
		void *ret;

		velocity_t velocitys[2];

		velocitys[0] = velocity * cos(vert_angle) * VXY_MODY;//xy
		velocitys[1] = velocity * sin(vert_angle) * VZ_MODY;//z

		START_MOVE();
#ifdef DEBUG
		printw("moving...\n");
#endif
		//pthread_create(&tid, NULL, move_thread, (void*)&velocitys[0]);
		
		//calcu time!!!!!!!!!
		time_t time = (time_t)(V_T_INDEX * (control->distance/velocity));//V_T_INDEX is used to modify time
		
		if (IF_STOP()) 
				return;

		PROGRESS(DEFAULT_FLAG, DISABLE, FRONT velocitys[0],  UP velocitys[1], DISABLE);

		Sleep(time);
		//END_MOVE();
		
		//pthread_join(tid, &ret);
		SIMPLE_HOVERING();

#ifdef DEBUG
		printw("stop\n");
#endif
}
开发者ID:EricWen229,项目名称:autodrone-fightnview,代码行数:35,代码来源:auto_control_demo.c

示例11: slip_flushbuf

void
slip_flushbuf(int fd)
{
    int n;

    if (slip_empty()) {
        return;
    }

    n = write(fd, slip_buf + slip_begin, (slip_end - slip_begin));

    if (n == -1 && errno != EAGAIN) {
        err(1, "slip_flushbuf write failed");
    }
    else if (n == -1) {
        PROGRESS("Q");      /* Outqueue is full! */
    }
    else {
        slip_begin += n;

        if (slip_begin == slip_end) {
            slip_begin = slip_end = 0;
        }
    }
}
开发者ID:ant9000,项目名称:RIOT,代码行数:25,代码来源:tunslip6.c

示例12: hd_scan_sysfs_pci

void hd_scan_sysfs_pci(hd_data_t *hd_data)
{
  if(!hd_probe_feature(hd_data, pr_pci)) return;

  hd_data->module = mod_pci;

  /* some clean-up */
  remove_hd_entries(hd_data);
  hd_data->pci = NULL;

  PROGRESS(1, 0, "sysfs drivers");

  hd_sysfs_driver_list(hd_data);

  PROGRESS(2, 0, "get sysfs pci data");

  hd_pci_read_data(hd_data);
  if(hd_data->debug) dump_pci_data(hd_data);

  add_pci_data(hd_data);

  PROGRESS(3, 0, "macio");
  hd_read_macio(hd_data);

  PROGRESS(4, 0, "vio");
  hd_read_vio(hd_data);

  PROGRESS(5, 0, "xen");
  hd_read_xen(hd_data);

  PROGRESS(6, 0, "ps3");
  hd_read_ps3_system_bus(hd_data);
  
  PROGRESS(7, 0, "platform");
  hd_read_platform(hd_data);

  PROGRESS(8, 0, "of_platform");
  hd_read_of_platform(hd_data);

  PROGRESS(9, 0, "vm");
  hd_read_vm(hd_data);

  PROGRESS(10, 0, "virtio");
  hd_read_virtio(hd_data);
}
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:45,代码来源:pci.c

示例13: hd_scan_sysfs_usb

void hd_scan_sysfs_usb(hd_data_t *hd_data)
{
  if(!hd_probe_feature(hd_data, pr_usb)) return;

  hd_data->module = mod_usb;

  /* some clean-up */
  remove_hd_entries(hd_data);
  hd_data->proc_usb = free_str_list(hd_data->proc_usb);
  hd_data->usb = NULL;

  PROGRESS(1, 0, "sysfs drivers");
  
  hd_sysfs_driver_list(hd_data);

  PROGRESS(2, 0, "usb");

  get_usb_devs(hd_data);

  PROGRESS(3, 1, "joydev mod");
  load_module(hd_data, "joydev");
    
  PROGRESS(3, 2, "evdev mod");
  load_module(hd_data, "evdev");

  PROGRESS(3, 3, "input");
  get_input_devs(hd_data);

  PROGRESS(3, 4, "lp");
  get_printer_devs(hd_data);

  PROGRESS(3, 5, "serial");
  get_serial_devs(hd_data);

}
开发者ID:BackupTheBerlios,项目名称:openslx-svn,代码行数:35,代码来源:usb.c

示例14: hd_scan_sysfs_block

void hd_scan_sysfs_block(hd_data_t *hd_data)
{
  if(!hd_probe_feature(hd_data, pr_block)) return;

  hd_data->module = mod_block;

  /* some clean-up */
  remove_hd_entries(hd_data);

  hd_data->disks = free_str_list(hd_data->disks);
  hd_data->partitions = free_str_list(hd_data->partitions);
  hd_data->cdroms = free_str_list(hd_data->cdroms);

  if(hd_probe_feature(hd_data, pr_block_mods)) {
    PROGRESS(1, 0, "block modules");
    // load_module(hd_data, "ide-cd");
    load_module(hd_data, "ide-cd_mod");
    load_module(hd_data, "ide-disk");
    load_module(hd_data, "sr_mod");
    load_module(hd_data, "sd_mod");
#if !defined(__s390__) && !defined(__s390x__)
    load_module(hd_data, "st");
#endif
  }

  PROGRESS(2, 0, "sysfs drivers");

  hd_sysfs_driver_list(hd_data);

  PROGRESS(3, 0, "cdrom");

  read_cdroms(hd_data);

  PROGRESS(4, 0, "partition");

  read_partitions(hd_data);

  PROGRESS(5, 0, "get sysfs block dev data");

  get_block_devs(hd_data);

  if(hd_data->cdrom) {
    ADD2LOG("oops: cdrom list not empty\n");
  }
}
开发者ID:doughdemon,项目名称:hwinfo,代码行数:45,代码来源:block.c

示例15: hd_scan_input

void hd_scan_input(hd_data_t *hd_data)
{
  if(!hd_probe_feature(hd_data, pr_input)) return;

  hd_data->module = mod_input;

  /* some clean-up */
  remove_hd_entries(hd_data);

  PROGRESS(1, 0, "joydev mod");
  load_module(hd_data, "joydev");

  PROGRESS(1, 1, "evdev mod");
  load_module(hd_data, "evdev");

  PROGRESS(2, 0, "input");

  get_input_devices(hd_data);
}
开发者ID:dirkmueller,项目名称:hwinfo,代码行数:19,代码来源:input.c


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