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

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

?? 0065af79b55f001d1289bbda6de18a35

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产一区二区三区忘忧草| 亚洲精品一区二区精华| 美女在线一区二区| 亚洲欧洲av另类| 欧美精品一级二级三级| 成人激情av网| 国产欧美精品一区二区色综合| 欧美日韩在线直播| 99久久精品国产麻豆演员表| 久久国产精品区| 亚洲一区二区三区国产| 久久五月婷婷丁香社区| 色婷婷激情综合| 国产成人综合自拍| 精品一区二区三区视频在线观看 | 日韩三级中文字幕| 91网站在线播放| 成人亚洲精品久久久久软件| 日韩精品1区2区3区| 亚洲bdsm女犯bdsm网站| 国产欧美久久久精品影院| 色狠狠色狠狠综合| 成人av免费在线观看| 亚洲人成精品久久久久久 | 欧美一区二区三区免费观看视频| 成人福利在线看| 岛国精品一区二区| 国内精品国产三级国产a久久| 久久久综合网站| 成人午夜激情视频| 精品久久五月天| 日本亚洲最大的色成网站www| 国产亚洲欧美一级| 五月天丁香久久| 夜夜嗨av一区二区三区四季av| 亚洲欧美在线高清| 亚洲欧洲一区二区在线播放| 亚洲色图一区二区| 欧美日韩成人综合在线一区二区| 欧美日韩高清一区二区不卡| 色菇凉天天综合网| 欧美日韩一本到| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲综合无码一区二区| 一区二区不卡在线播放| 亚洲国产欧美在线| 中文字幕不卡三区| 国产精品大尺度| 国产色一区二区| 国产欧美日韩一区二区三区在线观看| 久久久一区二区三区捆绑**| 久久久久久免费| 国产精品色噜噜| 亚洲免费观看高清在线观看| 国产精品福利在线播放| 一区二区三区日韩欧美精品 | 精品国一区二区三区| 欧美成人aa大片| 国产精品久久久久久亚洲毛片 | 亚洲精品ww久久久久久p站| 亚洲欧洲日本在线| 午夜视频一区二区三区| 视频在线观看一区二区三区| 日本美女一区二区| 粉嫩嫩av羞羞动漫久久久 | 亚洲三级在线观看| 午夜精品久久久久久久99水蜜桃 | 在线欧美日韩国产| 精品国产成人在线影院 | 韩国成人在线视频| 成人免费视频一区二区| 色婷婷精品久久二区二区蜜臀av| 666欧美在线视频| 国产精品久久久久久久久快鸭| 亚洲一区二区在线视频| 水蜜桃久久夜色精品一区的特点| 国产精品亚洲人在线观看| 成人综合在线观看| 日韩欧美黄色影院| 欧美一区二区三区四区视频| **欧美大码日韩| 狠狠狠色丁香婷婷综合激情 | 国产丝袜美腿一区二区三区| 亚洲激情在线播放| 国产风韵犹存在线视精品| 欧美亚洲动漫精品| 国产精品三级久久久久三级| 蜜桃免费网站一区二区三区| 99精品在线免费| 欧美在线视频日韩| 欧美精品国产精品| 欧美精品高清视频| 国产精品乱人伦| 91在线无精精品入口| 欧美性xxxxxxxx| 天天综合色天天| 日韩欧美一级二级三级| 久久超级碰视频| 国产欧美一区二区三区在线看蜜臀 | 日韩免费观看高清完整版在线观看| 亚洲综合色丁香婷婷六月图片| 欧美欧美午夜aⅴ在线观看| 久久精品国产澳门| 中文幕一区二区三区久久蜜桃| 成人在线视频一区| 亚洲国产综合在线| 国产人成一区二区三区影院| 91蝌蚪porny| 精品一区二区三区的国产在线播放| 久久一留热品黄| 在线观看亚洲一区| 国产又粗又猛又爽又黄91精品| 亚洲欧美视频在线观看| 精品日韩一区二区三区| 在线观看国产一区二区| 国产麻豆成人传媒免费观看| 一区二区三区美女| 国产亚洲美州欧州综合国 | 亚洲一区二区3| 欧美激情一区在线| 日韩一区二区三区在线观看| 97久久超碰国产精品| 国产美女在线观看一区| 亚洲 欧美综合在线网络| 国产精品伦一区二区三级视频| 日韩一区二区视频在线观看| 99久久亚洲一区二区三区青草| 久久av资源网| 日韩精品成人一区二区三区 | 欧美亚洲国产一区二区三区 | 欧美三级中文字幕| 99免费精品在线观看| 国产精品一区二区不卡| 麻豆精品新av中文字幕| 亚洲成av人片一区二区三区| 亚洲精品日日夜夜| 国产精品久久久久影院| 久久久久久夜精品精品免费| 亚洲精品在线免费播放| 欧美一卡二卡三卡四卡| 7777精品伊人久久久大香线蕉| 色婷婷亚洲婷婷| 成人免费毛片嘿嘿连载视频| 国产酒店精品激情| 国产福利91精品一区二区三区| 麻豆国产精品官网| 久久成人久久爱| 精品一区二区综合| 国产在线视频精品一区| 久久成人18免费观看| 久久99精品视频| 国产一区二区精品久久| 国产在线麻豆精品观看| 国产麻豆视频精品| 国产成人精品亚洲午夜麻豆| 国产成人综合自拍| 成人国产亚洲欧美成人综合网| heyzo一本久久综合| 99久久久久免费精品国产 | 国产片一区二区| 国产精品视频一二三区| 1000精品久久久久久久久| 亚洲欧洲中文日韩久久av乱码| 成人欧美一区二区三区视频网页| 亚洲欧美自拍偷拍| 亚洲宅男天堂在线观看无病毒| 亚洲图片欧美色图| 美女高潮久久久| 国产精品一区二区在线看| 国产xxx精品视频大全| 波多野结衣亚洲一区| 在线观看区一区二| 91精品国产综合久久久久久久久久| 欧美日韩国产成人在线免费| 精品国产免费久久| 国产欧美一区二区精品忘忧草| 亚洲视频在线观看一区| 亚洲18女电影在线观看| 久草这里只有精品视频| 99国产麻豆精品| 欧美美女喷水视频| 久久精品亚洲精品国产欧美| 国产精品久久久久影院老司| 午夜伊人狠狠久久| 国产乱子伦视频一区二区三区| 91视频国产观看| 精品sm捆绑视频| 亚洲人成网站精品片在线观看| 日韩经典中文字幕一区| 成人午夜大片免费观看| 精品视频一区 二区 三区| 2欧美一区二区三区在线观看视频| 亚洲女同ⅹxx女同tv| 日韩av电影一区| 成人性生交大片免费看视频在线| 欧美亚洲一区二区在线| 国产精品青草久久| 久久精品国产精品亚洲综合| 欧美亚洲综合久久| 久久精品一区二区三区不卡牛牛 |