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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 20aefc95bf5f001d1289bbda6de18a35

?? Vxworks環境下
??
字號:

/*
$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 "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 CurrentFileToRun[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 : 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(CurrentFileToRun,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,CurrentFileToRun,
			NULL);
	
		error=Ncs_Fsr_logout("root",0); 
}

/*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);			   
			   }
		   } 
	   }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产久精国产爱| 久久97超碰国产精品超碰| 老司机精品视频一区二区三区| 91在线观看成人| 中文字幕精品一区二区三区精品| 日韩国产一二三区| 欧洲视频一区二区| 亚洲一线二线三线视频| 在线一区二区三区四区五区| 中文字幕欧美激情| 丁香婷婷综合色啪| 亚洲国产视频a| 欧美网站一区二区| 偷窥国产亚洲免费视频| 91精品在线免费| 日产国产欧美视频一区精品| 日韩精品一区二区三区三区免费 | 欧美变态tickle挠乳网站| 日韩精品视频网站| 在线成人免费观看| 一区二区三区 在线观看视频| 欧美午夜精品久久久久久孕妇| 亚洲成人免费视| 91精品午夜视频| 韩国av一区二区| 最新中文字幕一区二区三区| 一本色道a无线码一区v| 亚洲成人av免费| 在线观看成人小视频| 午夜av一区二区三区| 日韩精品一区二区三区四区| 成人黄色国产精品网站大全在线免费观看| 欧美激情综合在线| 色狠狠色狠狠综合| 另类成人小视频在线| 国产精品污www在线观看| 国产精品伊人色| 亚洲人成影院在线观看| 91精品国产综合久久久久久久久久| 国产在线一区二区| 亚洲免费成人av| 精品日韩一区二区三区免费视频| 成人夜色视频网站在线观看| 亚洲最大成人综合| xvideos.蜜桃一区二区| 成人h版在线观看| 舔着乳尖日韩一区| 国产精品毛片大码女人| 91在线免费播放| 麻豆免费精品视频| 亚洲精品少妇30p| 欧美一区二区视频网站| 99久久久精品免费观看国产蜜| 人妖欧美一区二区| 亚洲一区二区影院| 亚洲摸摸操操av| 欧美国产精品v| 久久久亚洲精品石原莉奈| 欧美疯狂性受xxxxx喷水图片| 色婷婷亚洲婷婷| 91一区二区三区在线观看| 国产乱码精品一区二区三区av| 蜜桃精品视频在线| 日日摸夜夜添夜夜添亚洲女人| 亚洲香蕉伊在人在线观| 亚洲精品国产视频| 亚洲精品中文字幕乱码三区| 自拍偷拍欧美精品| ㊣最新国产の精品bt伙计久久| 国产欧美一区二区三区鸳鸯浴 | 26uuu欧美日本| 精品久久久久久久久久久久久久久 | 日韩精品最新网址| 日韩午夜在线观看| 日韩欧美国产午夜精品| 日韩一区二区不卡| 日韩欧美成人激情| 久久亚洲一区二区三区明星换脸| 欧美精品一区二区三区久久久 | 欧美日本韩国一区| 欧美日韩不卡一区二区| 欧美剧情电影在线观看完整版免费励志电影 | 国产高清在线精品| 成人精品视频一区二区三区尤物| 粉嫩aⅴ一区二区三区四区五区| 国产成人av一区二区三区在线| 国产成人免费在线视频| 成人一区在线看| 91欧美一区二区| 欧美熟乱第一页| 欧美一区二区精品| wwww国产精品欧美| 国产精品乱人伦| 亚洲综合色网站| 青青草国产精品亚洲专区无| 国产真实乱偷精品视频免| 成人激情动漫在线观看| 欧美性xxxxxx少妇| 精品国产污污免费网站入口| 国产三级精品三级| 一区二区三区久久久| 蜜臀av亚洲一区中文字幕| 国产成人精品影视| 欧美在线观看视频一区二区| 日韩一级免费观看| 久久久精品免费免费| 亚洲日本在线视频观看| 日日摸夜夜添夜夜添精品视频| 韩日欧美一区二区三区| 91免费看`日韩一区二区| 在线不卡一区二区| 国产精品国产三级国产普通话蜜臀 | 国产精品一级在线| 91亚洲精华国产精华精华液| 制服丝袜亚洲色图| 国产精品私人影院| 日韩二区三区四区| 91在线国内视频| 欧美刺激午夜性久久久久久久| 中文字幕佐山爱一区二区免费| 日韩精品亚洲一区二区三区免费| 国产91在线看| 91精品国产乱| 一二三区精品福利视频| 国产精品一区免费在线观看| 欧美日韩一区二区三区不卡| 中文在线一区二区| 免费在线视频一区| 欧美主播一区二区三区| 国产日韩成人精品| 婷婷国产v国产偷v亚洲高清| 99久久免费精品| 久久久久久日产精品| 男男视频亚洲欧美| 欧美年轻男男videosbes| 国产精品国产三级国产a| 免费观看日韩av| 欧美日韩激情一区| 亚洲欧美在线观看| 福利电影一区二区| 精品久久国产老人久久综合| 亚洲午夜成aⅴ人片| 成人91在线观看| 国产日本一区二区| 国产一区二区在线视频| 日韩午夜在线观看| 日本中文一区二区三区| 欧美视频在线观看一区| 成人免费视频在线观看| 成人免费观看av| 久久久亚洲精品石原莉奈| 美女一区二区久久| 欧美一区二区大片| 日韩 欧美一区二区三区| 欧美精品一卡两卡| 日韩高清不卡一区二区三区| 欧美美女一区二区三区| 亚洲国产成人高清精品| 欧美三级乱人伦电影| 亚洲精品国产a| 欧美无乱码久久久免费午夜一区| 亚洲激情综合网| 欧美最猛性xxxxx直播| 一区二区三区高清| 欧美一a一片一级一片| 一区二区高清免费观看影视大全| 91小视频在线| 一区二区三区不卡在线观看| 在线观看国产日韩| 天天免费综合色| 91精品国产一区二区三区香蕉| 日韩经典中文字幕一区| 337p亚洲精品色噜噜噜| 精品一区二区日韩| 久久久蜜桃精品| 懂色av中文字幕一区二区三区| 欧美韩国日本综合| 91麻豆国产香蕉久久精品| 一区二区三区四区蜜桃| 欧美四级电影网| 日韩中文字幕一区二区三区| 日韩三级中文字幕| 国产精品系列在线播放| 中文字幕亚洲欧美在线不卡| 91女神在线视频| 午夜精品国产更新| 久久久一区二区三区捆绑**| 成人精品在线视频观看| 亚洲一区在线播放| 欧美一区二区三区影视| 国产乱人伦偷精品视频不卡| 日韩理论片一区二区| 欧美久久久久久久久| 精品中文字幕一区二区| 中文av字幕一区| 在线观看av一区| 国产中文字幕一区| 一区二区三区在线视频免费| 欧美一区中文字幕| 国产成人亚洲综合色影视|