Ejemplo n.º 1
0
	  void EDF_READEROBJ::load(HANDLE hFile) 
	  {

		  state=0;
		  loading=1;
	  	  load_object_basics(this);
		  load_property("filename",P_STRING,&filename);
		  load_property("offset",P_INT,&offset);
		  if ((edffile=open_edf_file(&header,channel,filename))==INVALID_HANDLE_VALUE)
		  {	 char st[150];
			 reduce_filepath(st,filename);
			 strcpy(filename,GLOBAL.resourcepath);
			 strcat(filename,"ARCHIVES\\");
			 strcat(filename,st);			 
			 edffile=open_edf_file(&header,channel,filename); 
		  }
		  if (edffile!=INVALID_HANDLE_VALUE)
		  {
			  header.samplingrate=PACKETSPERSECOND;
			  calc_session_length();
			  session_pos(0);
			  outports=header.channels;
			  state=1;
		  } else  { report_error("EDF archive file not found, please open file in EDF-Reader"); sessionlength=0; }

		  height=CON_START+outports*CON_HEIGHT+5;
		  sampos=0;
		  get_captions();
		  loading=0;

	  }
Ejemplo n.º 2
0
	  void TCP_RECEIVEOBJ::load(HANDLE hFile) 
	  {

		  load_object_basics(this);
		  load_property("host",P_STRING,&host);
		  load_property("header",P_STRING,&edfheader);
		  parse_edf_header(&header, channel, edfheader);
		  outports=header.channels;
		  height=CON_START+outports*CON_HEIGHT+5;
		  get_captions();
	  }