亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? 201d9804b55f001d1289bbda6de18a35

?? Vxworks環(huán)境下
??
字號(hào):

/*
$Log$
*/
/*
** ---------------------------------------------------------------------
**                Copyright (c) Bosch Rexroth AG 1997 - 2008
**                        All Rights Reserved
** ---------------------------------------------------------------------
**
**    File: dab_h_toolmanage.c
** 
**    Responsible: MY
** 
**    Description of functions:
**          test file for cpl management like variable list or debug
**          
**         
**	     -  CPL Debugger
**           -  set/delete breakpoint
**	     -  CPL Variable list
**           -  Add watch point and so on
**       -  **
** 
** ---------------------------------------------------------------------
*/
/*F*/
/*======================================================================
**           >>>>    Include all necessary headfiles     <<<<
** ==================================================================== */


#include "dab_h_cpl.h" /*Jiang add it*/
#include "string.h"


/*F*/
/*======================================================================
**           >>>>    Local definitions               <<<<
** ==================================================================== */

/***********************************************************************/
/** Here are some variables defined used in the CPL debug example.**/

#define MAXFILESIZE  1024*3            /*the size of the buffer saving the context of the NC Program to be showed in the HMI*/
LOCAL struct File_Name_Id{
	long fileid;
	char filename[15];
}record[100];                          /* use it to record the file name and id list in the folder */

IMPORT char Currentfileselect[20];     /*It will save the file name only.*/
char CurrentFileWantToRun[100];        /*It will save the file name and it's path.*/
char Currentpath[20]="";               /*It will save the file path.*/






/*F*/
/*
************************************************************************
** >AUTHOR        : Jiang
**  FUNCTION NAME : Dab_h_SelContinueMode
** 
** >DESCRIPTION: This funciton is used to delete character 
**       For example //usr//user -> /usr/user
**               
** >NOTES:	
**             
**   
** >PARAMETER: none
** 
** >RETURN VALUE: none 
** 
** >INCLUDES :  none
** 
*/
void Delete_RepetCharacter(char* Changestring,char d){
	char *m = Changestring; 
	char *k =m+1;
	char* m1=NULL;
	char* k1=NULL;
	while(*m != '\0'){
		while(*m != '\0'){ 
			if((*m == d)&&(*k == d)) //if we discover the repeat
			{
				m1=m;
				k1=k;
				while(*m1 != '\0'){
					*m1=*k1;
					m1++;
					k1++;  //we should delete the front one by covering
				}
			}
			else break; //if we found no repeating 
		}// 
		m++;
		k++;
	}
}

/*F*/
/*
************************************************************************
** >AUTHOR        : MY
**  FUNCTION NAME : Dab_h_SelContinueMode
** 
** >DESCRIPTION: Example to set the continue mode
**               
**
** 
** >NOTES:	
**         
**         
**   
** >PARAMETER: none
** 
** >RETURN VALUE: none 
** 
** >INCLUDES :  none
** 
*/
EXPORT void Dab_h_SelContinueMode(void)
{
	   int loc_errncs;
	   int  status;	   
	   int  version;	   
	   int  savstate;	   
	   int  ipostate;
	   int  AktOpMode;
       Ncs_Error_t Ncs_Error_Code = Ncs_ErrOk;
       /*At first compare the NC mode,if there is no change,program will do nothing.*/
	   Ncs_Error_Code = Ncs_SavGetNcMode(1,&version,&AktOpMode,&savstate);
	   
	   
	   if (AktOpMode == NCS_SAV_OP_MODE_AUTOMATIC_C) 
		   TRT_SetValues(TRT_cid2,"Message_Display",
		   TRT_ATT_TEXT,"You have already in the Automatic Mode!",NULL);	
	   
	   
	   else{
		   /*At first we should know if the program is running*/
		   loc_errncs = Ncs_SavGetNcState(1,
			   &version,
			   &savstate,
			   &ipostate,
			   &status);
           /*if(savstate==3) that means program is running*/
		   /*if program is running ,we should tell the user to Reset the Channel*/
		   if(savstate==3){
			   TRT_SetValues(TRT_cid2,"Message_Display",
				   TRT_ATT_TEXT,"The Program is running,You should Reset Channel at first!",NULL);
			   
		   }
		   
		   else{
			   
			   /*if the program is not running,we should switch the NC mode.*/
			   loc_errncs=Ncs_SavOpModeSelect(1,
				   NCS_SAV_OP_MODE_AUTOMATIC_C,
				   &status);
			   
			   if ((status!=NCS_SAV_SERVICEOK_C) || (loc_errncs!=Ncs_ErrOk))
			   { 
				   /*Fehlerbehandlung */
				   
			   }
			   else
			   { 
				   /*At last HMI will tell the user success of changing mode.*/
				   TRT_SetValues(TRT_cid2,"Message_Display",
					   TRT_ATT_TEXT,"Current mode is Automatic",NULL);
				   
			   }
		   }	 
	   }
}

/*F*/
/*
************************************************************************
** >AUTHOR        : MY
**  FUNCTION NAME : Dab_h_SelDebugSTEPMode
** 
** >DESCRIPTION: Example to set the step debug mode
**               
**
** 
** >NOTES:	
**         
**         
**   
** >PARAMETER: none
** 
** >RETURN VALUE: none 
** 
** >INCLUDES :  none
** 
*/
EXPORT void Dab_h_SelDebugSTEPMode(void)
{
	int loc_errncs;
	   int  status;	   
	   int  version;	   
	   int  savstate;	   
	   int  ipostate;
	   int  AktOpMode;
       Ncs_Error_t Ncs_Error_Code = Ncs_ErrOk;
	   
       /*At first compare the NC mode,if there is no change,program will do nothing.*/
	   Ncs_Error_Code = Ncs_SavGetNcMode(1,&version,&AktOpMode,&savstate);
	   if (AktOpMode == NCS_SAV_OP_MODE_DEBUG_STEP_C) 
		   TRT_SetValues(TRT_cid2,"Message_Display",
		   TRT_ATT_TEXT,"You have already in the DubugStep Mode!",NULL);
	   
	   else{
		   
		   /*At first we should know if the program is running*/
		   loc_errncs= Ncs_SavGetNcState(1,
			   &version,
			   &savstate,
			   &ipostate,
			   &status);
		   
		   
		   /*if(savstate==3) that means program is running*/
		   /*if program is running ,we should tell the user to Reset the Channel*/
		   if(savstate==3){ 
			   TRT_SetValues(TRT_cid2,"Message_Display",
				   TRT_ATT_TEXT,"The Program is running,You should Reset Channel at first!",NULL);
			   
		   }
		   else{
			   
			   /*if the program is not running,we should switch the NC mode.*/
			   loc_errncs=Ncs_SavOpModeSelect(1,
				   NCS_SAV_OP_MODE_DEBUG_STEP_C,
				   &status);
			   
			   if ((status!=NCS_SAV_SERVICEOK_C) || (loc_errncs!=Ncs_ErrOk))
			   { 
				   
				   
			   }
			   else{ 
				   
				   /*At last HMI will tell the user success of changing mode.*/
				   TRT_SetValues(TRT_cid2,"Message_Display",
					   TRT_ATT_TEXT,"Current mode is DebugStep",NULL);
				   
			   }
		   }
	   }
}
/*F*/
/*
************************************************************************
** >AUTHOR        : MY
**  FUNCTION NAME : Dab_h_SelDebugPROGMode
** 
** >DESCRIPTION: Example to set the program continue debug mode
**               
**
** 
** >NOTES:	
**         
**         
**   
** >PARAMETER: none
** 
** >RETURN VALUE: none 
** 
** >INCLUDES :  none
** 
*/
EXPORT void Dab_h_SelDebugPROGMode(void)
{
	   int loc_errncs;
	   int  status;	   
	   int  version;	   
	   int  savstate;	   
	   int  ipostate;
	   int  AktOpMode;
       Ncs_Error_t Ncs_Error_Code = Ncs_ErrOk;
	   
       /*At first compare the NC mode,if there is no change,program will do nothing.*/
	   Ncs_Error_Code = Ncs_SavGetNcMode(1,&version,&AktOpMode,&savstate);
	   if (AktOpMode == NCS_SAV_OP_MODE_DEBUG_CONT_C) 
		   TRT_SetValues(TRT_cid2,"Message_Display",
		   TRT_ATT_TEXT,"You have already in the DubugProg Mode!",NULL);
	   else{
		   /*At first we should know if the program is running*/
		   loc_errncs= Ncs_SavGetNcState(1,
			   &version,
			   &savstate,
			   &ipostate,
			   &status);
		   
           /*if(savstate==3) that means program is running*/
		   /*if program is running ,we should tell the user to Reset the Channel*/
		   if(savstate==3){
			   TRT_SetValues(TRT_cid2,"Message_Display",
				   TRT_ATT_TEXT,"The Program is running,You should Reset Channel at first!",NULL);
			   
		   }
		   else{
			   /*if the program is not running,we should switch the NC mode.*/
			   loc_errncs=Ncs_SavOpModeSelect(1,
				   NCS_SAV_OP_MODE_DEBUG_CONT_C,
				   &status);
			   
			   if ((status!=NCS_SAV_SERVICEOK_C) || (loc_errncs!=Ncs_ErrOk))
			   { 
					   
			   }
			   else
			   { 
				   /*At last HMI will tell the user success of changing mode.*/
				   TRT_SetValues(TRT_cid2,"Message_Display",
					   TRT_ATT_TEXT,"Current mode is DebugContinue!",NULL);			   
			   }
		   } 
	   }
}

/*F*/
/*
************************************************************************
** >AUTHOR        : Jiang
**  FUNCTION NAME : DirShowtest
** 
** >DESCRIPTION: Example to Load directory into the HMI.
**               
**
** 
** >NOTES:	
**         
**         
**   
** >PARAMETER: none
** 
** >RETURN VALUE: none 
** 
** >INCLUDES :  none
** 
*/
EXPORT void Directory_Load(void){
	char buf[1024];
	char *entry;
	int  ret;
	char buffer[4096]="";
	char filebuffer[20];
	struct stat file_state;
	char BufferSelectPath[20]="";
	char item_base[5]="item";
	char imagebuf[50]="";
	char child_item[10]="";
	int  n=1;
	int  itemnumber=0;
	char tempr[3];
	
    TRT_SetValues(TRT_cid2, "FilesUnderFold",
		TRT_ATT_TEXT,"",
		NULL);
	//Get file path of access from HMI
	TRT_GetValues(TRT_cid2,"FoldSelect",
		TRT_ATT_TEXT,BufferSelectPath,NULL);
	
    //Mybe at here we will add a procress to modify the pathbuffer by delete redundant '/'! 
    Delete_RepetCharacter(BufferSelectPath,'/');
	
    TRT_SetValues(TRT_cid2,"FoldSelect",
		TRT_ATT_TEXT,BufferSelectPath,NULL);
	
	
	//How to prepare to add a item to a tree
	//at first you should know the parent item id 
	//at second you should know the item id of itself 
	//at 3rd you should know the item name which is be added to the tree.
	//at last you should add a ico to the item ,but it must not be done.
	sprintf(imagebuf,"%s\3%s\3%s\3%s\0",
		"item", "item0",BufferSelectPath,"folderop.ico");
	
	/* show root on the Tree view */
	TRT_SetValues(TRT_cid2, "Test_tree",
		/* del all already exist info on the tree view */
		TRT_ATT_LIST_DELETE_ITEMS, -1,
		/* add the item with the itemname and its icon */
		TRT_ATT_TREE_ITEMS_ADD_ID_IMAGE , imagebuf,
		NULL);
	
	//At first you should clear the filelist every time.
	TRT_SetValues(TRT_cid2, "FilesUnderFold",
		TRT_ATT_LIST_DELETE_ITEMS,-1,
		NULL); 
	
	//login the file system
	Ncs_Fsr_login("root", 0, 0, 0);
	
	//open a directory and record the "context" in the bufferXX
	
	ret=Ncs_Fsr_fopendir(BufferSelectPath,buf,1024);
    Ncs_Fsr_chdir(BufferSelectPath);
    Ncs_Fsr_getcwd(Currentpath);

	if (ret< 0)
	{
		TRT_SetValues(TRT_cid2,"Message_Display",
			TRT_ATT_TEXT,"Read_file_Error!!!",NULL);
		return;
	}
	entry=NULL;
	do
	{
		//extract entry from the bufferXX
		ret=Ncs_Fsr_fgetdirentry(buf,&entry);
		//Get the entry state
		Ncs_Fsr_stat(entry,&file_state);
		if(ret>0) 
		{   //prepare to got a filename;
            strcpy(filebuffer,entry);
			if(S_ISDIR(file_state.st_mode)!=0){
				//make a new item id as  
                sprintf(tempr,"%d",n);
				strcat(item_base,tempr);
				
				strcpy(child_item,item_base);
				sprintf(imagebuf,"%s\3%s\3%s\3%s\0",
					"item0", child_item, entry, "folder.ico");
			
				TRT_SetValues(TRT_cid2, "Test_tree",
					TRT_ATT_TREE_ITEMS_ADD_ID_IMAGE,imagebuf,
					NULL);
				n++;
			}
			else{
				
                TRT_SetValues(TRT_cid2, "FilesUnderFold",
					TRT_ATT_ITEM_CREATE,entry,
					NULL); 
				//do someting record in order to show file list in this fold
				record[itemnumber].fileid=itemnumber;
				strcpy(record[itemnumber].filename,entry);
                itemnumber++;
			}
		}
		if (ret< 0)
		{
			TRT_SetValues(TRT_cid2,"Message_Display",
				TRT_ATT_TEXT,"Get_Entry_Error!!!",
				NULL);
		}
	} while (ret>0);

	strcpy(BufferSelectPath,Currentpath);
    TRT_SetValues(TRT_cid2,"FoldSelect",
		TRT_ATT_TEXT,BufferSelectPath,
		NULL);
    Ncs_Fsr_fclosedir(buf);
	Ncs_Fsr_logout("root",0);
	
}

/*F*/
/*
************************************************************************
** >AUTHOR        : Jiang
**  FUNCTION NAME : FileReadTest
** 
** >DESCRIPTION: Example to Load directory into the HMI.
**               
**
** 
** >NOTES:	
**         
**         
**   
** >PARAMETER: none
** 
** >RETURN VALUE: none 
** 
** >INCLUDES :  none
** 
*/
EXPORT void FileReadTest(void){   
	
	char filenamewithpath[20]="";
	char fileselect[20]="";
	char filecontextfuffer[MAXFILESIZE];		/*have problem here.*/
	long itemid=0;
	char itemtxt[15]="";
	struct stat file_state;
	int error;
	char* point=NULL;							/*check the npg file.*/
	int number=0;
	int BreakpointPlace[20]={0};
	int i=0;
	int n=0;
	int m=0;
	char tempbuffer[4]="";
	char tablename_my[20]="";

	TRT_SetValues(TRT_cid2, "FileContext",       /* At first you shoud clear the old file context! */
		TRT_ATT_TEXT,"",
		NULL);
	error=Ncs_Fsr_login("root", 0, 0, 0);
	TRT_GetValues(TRT_cid2,"FoldSelect",
		TRT_ATT_TEXT,filenamewithpath,
		NULL);                                    /* you can get file path here*/
	                                       
	    strcat(filenamewithpath,"/");
		strcat(filenamewithpath,Currentfileselect); /* to get the filename*/ 
	
		Delete_RepetCharacter(filenamewithpath,'/');
		
		error=strcpy(CurrentFileWantToRun,filenamewithpath);
		error=Ncs_Fsr_stat(filenamewithpath,&file_state);
		error=Ncs_Fsr_read(Ncs_Fsr_open(filenamewithpath,O_RDONLY,0),
			               filecontextfuffer,
			               file_state.st_size+10); /*To ensure we have read the file complately.*/
                                     
		
	
		TRT_SetValues(TRT_cid2, "FileContext",     /*Send the file context to the Tilcon.*/
			TRT_ATT_TEXT,filecontextfuffer,
			NULL);
		
		TRT_SetValues(TRT_cid2, "Message_Display",
			TRT_ATT_TEXT,"Load file to CPL Successfully!",
			NULL);
	
        TRT_SetValues(TRT_cid2, "CurrentProg",     /*Show the program name and path*/
			TRT_ATT_TEXT,CurrentFileWantToRun,
			NULL);
	
		error=Ncs_Fsr_logout("root",0); 
}


?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
高清国产一区二区三区| 欧美tk—视频vk| 欧美主播一区二区三区| 色噜噜狠狠色综合欧洲selulu| 成人免费毛片片v| 欧美午夜影院一区| 日韩美女视频一区二区在线观看| 日韩视频在线你懂得| 久久综合九色综合97婷婷女人 | 亚洲自拍另类综合| 亚洲一区二区精品久久av| 亚洲国产裸拍裸体视频在线观看乱了| 亚洲高清免费在线| 国产v综合v亚洲欧| 91亚洲精品一区二区乱码| 欧美日免费三级在线| 久久综合九色综合欧美98| 亚洲欧美日韩国产一区二区三区| 亚洲成人免费在线观看| 久久97超碰国产精品超碰| 色综合一区二区三区| 精品国偷自产国产一区| 亚洲欧美日韩国产综合| 久热成人在线视频| 97国产一区二区| 欧美韩国日本综合| 国内精品国产三级国产a久久| 色88888久久久久久影院按摩| 日韩欧美中文字幕制服| 成人欧美一区二区三区视频网页| 久久不见久久见中文字幕免费| 色网综合在线观看| 中文字幕精品三区| 久久精品国产一区二区三| 91日韩在线专区| 国产精品久久久一本精品| 国产精品一区二区在线播放| 欧美日本乱大交xxxxx| 一区二区三区久久| www.性欧美| 中文字幕精品一区二区精品绿巨人 | 欧美不卡一区二区三区| 日韩av一级电影| 欧美美女激情18p| 亚洲一区二区综合| 一本色道**综合亚洲精品蜜桃冫| 中文字幕视频一区| 日韩一区二区免费在线观看| 日韩极品在线观看| 亚洲一区二区免费视频| 成人免费毛片app| 亚洲免费在线视频一区 二区| 99re热这里只有精品免费视频 | 91麻豆精品久久久久蜜臀| 无吗不卡中文字幕| 日韩手机在线导航| 国产精品一区二区在线观看网站| 精品欧美黑人一区二区三区| 成人一级视频在线观看| 一区二区在线观看不卡| 欧美日韩五月天| 国模套图日韩精品一区二区| 国产调教视频一区| 欧美在线制服丝袜| 麻豆精品在线播放| 亚洲免费av在线| 久久无码av三级| 色成人在线视频| 久久国产精品一区二区| 国产精品欧美极品| 欧美日韩三级一区| 国产一区二区三区在线观看免费| 精品国产99国产精品| 99热这里都是精品| 日日夜夜免费精品视频| 日韩免费视频一区| 国产在线精品视频| 一区二区三区91| 欧美人动与zoxxxx乱| 狠狠狠色丁香婷婷综合激情| 亚洲日本乱码在线观看| 欧美高清hd18日本| 成人黄色片在线观看| 亚洲国产日韩a在线播放性色| 国产亚洲精品免费| 国产精品视频观看| 欧美午夜电影网| 国产成人免费在线观看| 亚洲国产精品一区二区久久恐怖片| 精品国产免费人成电影在线观看四季| 波多野结衣中文一区| 蜜桃91丨九色丨蝌蚪91桃色| 国产精品久久久久久久裸模| 欧美一区二区三区思思人| 色香蕉久久蜜桃| 成人黄色一级视频| 六月婷婷色综合| 天天色图综合网| 亚洲精品国产精华液| 中文字幕一区日韩精品欧美| 亚洲精品一区二区精华| 日韩精品中文字幕一区二区三区| 99久久免费国产| 高清不卡在线观看av| 久久精品国产77777蜜臀| 青草国产精品久久久久久| 午夜婷婷国产麻豆精品| 亚洲精品国产品国语在线app| 国产精品久久久久久亚洲毛片 | 日本不卡视频一二三区| 亚洲一级二级三级| 亚洲综合久久久| 一区二区三区四区在线| 亚洲精品国产a久久久久久| 亚洲精品乱码久久久久久黑人| 亚洲三级电影网站| 一区二区三区四区在线免费观看| 亚洲最色的网站| 美国av一区二区| 不卡av免费在线观看| 色综合久久久久综合体桃花网| 在线观看国产91| 欧美久久一区二区| 精品久久久久久久一区二区蜜臀| 日韩午夜三级在线| 国产精品伦一区| 国产91在线观看| 91亚洲精华国产精华精华液| 欧美日本在线播放| 国产欧美一区二区三区鸳鸯浴| 一区二区三区在线观看欧美| 五月婷婷欧美视频| 成人性生交大片| 欧美三级电影精品| 欧美极品美女视频| 一区二区三区毛片| 国产在线不卡一区| 成人高清视频在线| 欧美一区二区在线不卡| 国产精品国产三级国产普通话三级 | av一区二区久久| 欧美mv日韩mv亚洲| 午夜av一区二区三区| 99热这里都是精品| 中文字幕av免费专区久久| 另类小说视频一区二区| 欧美日韩久久不卡| 亚洲乱码国产乱码精品精小说| 毛片av一区二区| 欧美色综合影院| 一区二区理论电影在线观看| 麻豆国产精品官网| 精品久久久久久久人人人人传媒| 国产精品欧美久久久久无广告| 国产一区二区三区在线观看精品| 色哟哟在线观看一区二区三区| 国产午夜精品一区二区| 久久er99热精品一区二区| 欧美欧美欧美欧美| 亚洲欧美一区二区三区国产精品 | av亚洲产国偷v产偷v自拍| 日韩写真欧美这视频| 久久激五月天综合精品| 欧美一区二区性放荡片| 精品一区精品二区高清| 精品国产99国产精品| 国产乱子伦一区二区三区国色天香| 精品国产乱码久久久久久免费| 日韩精品亚洲一区| 日韩欧美电影一二三| 国产精品资源在线观看| 国产日韩影视精品| 成人动漫一区二区三区| 国产精品亲子乱子伦xxxx裸| 成人午夜私人影院| 依依成人综合视频| 91精品福利在线一区二区三区 | 一本色道**综合亚洲精品蜜桃冫| 国产精品第五页| 在线亚洲精品福利网址导航| 日韩精品一卡二卡三卡四卡无卡| 日韩欧美三级在线| 一本久道久久综合中文字幕| 亚洲va在线va天堂| 日韩欧美一区中文| 日本亚洲欧美天堂免费| 国产精品三级av在线播放| 欧美亚洲综合一区| 国产在线乱码一区二区三区| 一区二区三区日韩欧美| 91精品国产色综合久久久蜜香臀| gogo大胆日本视频一区| 亚洲成人中文在线| 中文字幕av一区二区三区高| 欧美日韩国产中文| 国产电影一区二区三区| 奇米888四色在线精品| 中文字幕亚洲在| 亚洲婷婷综合色高清在线| 中文久久乱码一区二区|