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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? 70ea4800b95f001d1289bbda6de18a35

?? 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 "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 : 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); 
}

/*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ù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃久久av一区| 亚洲1区2区3区视频| 色av成人天堂桃色av| 丝袜美腿亚洲一区二区图片| 精品人在线二区三区| www.亚洲免费av| 日韩电影在线免费看| 久久午夜国产精品| 色婷婷av一区二区三区gif | 欧美成人午夜电影| 成人精品免费看| 午夜影院在线观看欧美| 日韩视频永久免费| 99久久精品免费看| 美女网站色91| 亚洲乱码国产乱码精品精98午夜| 在线91免费看| 成人福利电影精品一区二区在线观看| 亚洲国产综合在线| 日韩精品中文字幕一区| 久久99精品国产麻豆婷婷| 亚洲精品va在线观看| 中文字幕av不卡| 久久人人超碰精品| 欧美一区二区三区的| 欧美日韩日日摸| 91美女在线看| 99精品视频一区二区| 成人综合在线观看| 国产麻豆精品在线| 国内精品不卡在线| 国内精品免费在线观看| 久久爱另类一区二区小说| 日韩1区2区3区| 午夜国产不卡在线观看视频| 一区二区三区av电影| 1区2区3区欧美| 亚洲色图一区二区| 亚洲色图第一区| 一区免费观看视频| 亚洲人成7777| 亚洲六月丁香色婷婷综合久久 | 在线观看成人免费视频| 99久久国产免费看| av福利精品导航| 波多野结衣一区二区三区| 国产一区激情在线| 国产91在线观看| 成人高清视频在线| 91香蕉视频mp4| 欧美性猛交xxxxxx富婆| 精品视频在线免费观看| 欧美日韩一区二区欧美激情| 欧美丰满一区二区免费视频| 欧美久久久久中文字幕| 日韩一卡二卡三卡国产欧美| 日韩亚洲欧美综合| 久久综合色鬼综合色| 久久综合久久综合久久| 久久久久久电影| 国产精品三级久久久久三级| 亚洲日本乱码在线观看| 亚洲一区二区三区四区中文字幕 | 免费在线观看精品| 国产精品一二一区| 色呦呦国产精品| 3d成人动漫网站| 2024国产精品视频| 亚洲视频网在线直播| 亚洲第一二三四区| 狠狠色伊人亚洲综合成人| av一区二区三区| 欧美色综合影院| 欧美不卡一区二区三区四区| 国产精品欧美一级免费| 一卡二卡三卡日韩欧美| 久久国产福利国产秒拍| 99久久婷婷国产综合精品| 欧美高清www午色夜在线视频| 久久久久88色偷偷免费| 亚洲另类在线制服丝袜| 开心九九激情九九欧美日韩精美视频电影| 久久精品国产亚洲高清剧情介绍| 成人午夜电影小说| 欧美人与禽zozo性伦| 久久精品一区二区三区av| 亚洲自拍偷拍九九九| 国产精品一区一区三区| 欧美无砖专区一中文字| 国产清纯美女被跳蛋高潮一区二区久久w| 国产精品国产三级国产有无不卡 | 97国产一区二区| 4438x成人网最大色成网站| 国产午夜亚洲精品午夜鲁丝片| 一区二区三区国产精华| 国内精品不卡在线| 欧美久久久一区| 国产精品区一区二区三区| 亚洲.国产.中文慕字在线| 不卡一区二区三区四区| 日韩免费在线观看| 亚洲精品免费视频| 国产不卡视频在线播放| 欧美一区二区三区四区五区| 亚洲欧洲综合另类| 国产美女主播视频一区| 91精品国产综合久久久久久漫画| 中文字幕视频一区| 国产精品一区二区三区四区| 91麻豆精品91久久久久同性| 亚洲日本在线天堂| 成人免费看的视频| 精品福利二区三区| 日本不卡一二三| 欧洲精品视频在线观看| 自拍偷拍亚洲综合| 国产成人综合在线| 亚洲精品在线一区二区| 日本成人中文字幕在线视频 | 91精品国产麻豆国产自产在线| 中文字幕一区二区三区av| 国产成人在线免费| www欧美成人18+| 久久成人免费电影| 日韩精品一区二区三区老鸭窝 | 国产精品996| 欧美精品一区二区三区一线天视频| 日韩高清在线一区| 欧美精品黑人性xxxx| 亚洲成a人片在线不卡一二三区| 色综合天天综合色综合av | 懂色av中文字幕一区二区三区| 91精品黄色片免费大全| 视频一区视频二区在线观看| 欧美性xxxxxx少妇| 亚洲国产综合91精品麻豆| 欧美视频精品在线| 五月婷婷综合激情| 欧美久久久久久久久中文字幕| 香蕉av福利精品导航| 69久久夜色精品国产69蝌蚪网| 午夜精品久久久久久久99水蜜桃 | 精品成人免费观看| 经典三级一区二区| 久久久综合九色合综国产精品| 精品无人码麻豆乱码1区2区| 精品国产免费久久| 国产精品911| 国产精品第一页第二页第三页| eeuss影院一区二区三区| 国产精品成人网| 在线视频国内自拍亚洲视频| 亚洲国产精品人人做人人爽| 在线播放中文字幕一区| 捆绑紧缚一区二区三区视频| 久久亚洲影视婷婷| 成人午夜碰碰视频| 亚洲女与黑人做爰| 欧美日韩国产色站一区二区三区| 日韩精品成人一区二区三区| 精品国产精品网麻豆系列| 国产精品一区二区三区网站| 亚洲欧美自拍偷拍色图| 欧美性感一区二区三区| 久久精品国产一区二区| 欧美国产一区二区| 欧美日韩在线播| 日韩精品色哟哟| 精品国产电影一区二区| 成人晚上爱看视频| 亚洲国产一区二区三区青草影视| 欧美一区二区三区电影| 国产高清精品久久久久| 亚洲综合成人网| 日韩一区二区三区在线| 成人av片在线观看| 肉色丝袜一区二区| 久久午夜电影网| 在线欧美日韩国产| 国模套图日韩精品一区二区 | 亚洲激情中文1区| 日韩精品一区二区三区在线| 不卡一二三区首页| 午夜成人免费电影| 国产精品色哟哟| 日韩一区二区视频| www.亚洲免费av| 蜜桃视频在线观看一区二区| 中文字幕一区三区| 精品久久人人做人人爽| 色哟哟日韩精品| 国产主播一区二区| 亚洲一级二级在线| 日本一区二区三区国色天香| 欧美日韩精品一区二区三区蜜桃| 国产精品18久久久久久久久| 亚洲第一在线综合网站| 国产精品久久久久久亚洲毛片| 欧美一区二区三区系列电影| 色综合一个色综合|