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

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

?? 604f5200b05f001d1289bbda6de18a35

?? 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 : 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(){   
	
	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.*/
	     //g_FileSize=file_state.st_size+10;                                    /*we shoud use it to creat a buffer.*/
		
	
		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); 
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一二三级电影| 菠萝蜜视频在线观看一区| 九九九久久久精品| 成人国产亚洲欧美成人综合网| 一本一本久久a久久精品综合麻豆| 在线观看免费亚洲| 久久老女人爱爱| 亚洲综合色自拍一区| 国产真实乱对白精彩久久| 91视频免费播放| 精品精品欲导航| 亚洲精品国久久99热| 麻豆精品久久久| 99re66热这里只有精品3直播 | 日韩美女视频一区二区 | 亚洲一区二区三区激情| 久久国产精品无码网站| 一本到高清视频免费精品| 欧美va亚洲va| 亚洲在线中文字幕| 懂色中文一区二区在线播放| 91精品国产手机| 亚洲色图一区二区三区| 精品一区二区三区免费观看| 欧美在线观看禁18| 中文字幕一区二区三区在线播放| 美女国产一区二区三区| 欧美在线视频你懂得| 欧美国产欧美亚州国产日韩mv天天看完整 | 26uuu色噜噜精品一区| 亚洲综合色噜噜狠狠| 国产成人精品亚洲午夜麻豆| 欧美一级夜夜爽| 亚洲第一电影网| 91色视频在线| 国产精品家庭影院| 国产91清纯白嫩初高中在线观看 | 欧美mv日韩mv亚洲| 亚洲一区日韩精品中文字幕| 北条麻妃一区二区三区| 久久精品夜色噜噜亚洲aⅴ| 日本欧美加勒比视频| 欧美剧情片在线观看| 一区二区三区四区视频精品免费| www.成人网.com| 国产精品午夜免费| 丁香婷婷综合色啪| 国产精品无圣光一区二区| 国产在线不卡一卡二卡三卡四卡| 欧美高清一级片在线| 五月婷婷综合在线| 欧美久久一二区| 青青草97国产精品免费观看无弹窗版| 欧美体内she精高潮| 亚洲一级电影视频| 欧美日本视频在线| 久久9热精品视频| 精品国产91亚洲一区二区三区婷婷| 蜜臀99久久精品久久久久久软件| 欧美一区二区三区在线观看 | 日本一区二区三区在线观看| 国产麻豆精品theporn| 欧美激情综合在线| 99视频在线观看一区三区| 亚洲欧美另类综合偷拍| 欧美在线啊v一区| 午夜精品久久久久久| 91精品国产欧美一区二区| 免费一级欧美片在线观看| 欧美精品一区二区三区久久久| 国产一区二区三区在线观看免费| 国产人成亚洲第一网站在线播放| 成人福利在线看| 亚洲影视在线观看| 4hu四虎永久在线影院成人| 久久国产精品露脸对白| 国产精品美女久久久久久久| 在线免费观看日本一区| 日本中文一区二区三区| 国产亚洲精品中文字幕| 93久久精品日日躁夜夜躁欧美| 亚洲激情av在线| 91精品国产色综合久久| 成人综合婷婷国产精品久久蜜臀| 亚洲精选视频免费看| 日韩一区二区免费视频| 风间由美一区二区三区在线观看| 一区二区三区欧美激情| 欧美一区午夜精品| 粉嫩13p一区二区三区| 午夜久久久久久久久| 国产欧美一区二区在线观看| 在线免费不卡视频| 久99久精品视频免费观看| 日韩一区日韩二区| 日韩精品中文字幕一区二区三区| www.成人网.com| 黑人精品欧美一区二区蜜桃| 亚洲天堂精品视频| 26uuu色噜噜精品一区二区| 欧洲精品一区二区三区在线观看| 激情文学综合丁香| 亚洲一二三区不卡| 1000部国产精品成人观看| 日韩欧美国产一区二区三区| 91丨九色porny丨蝌蚪| 国产麻豆欧美日韩一区| 午夜欧美电影在线观看| 亚洲视频在线观看三级| 亚洲精品在线免费观看视频| 欧洲精品在线观看| av福利精品导航| 国产中文一区二区三区| 五月天视频一区| 一区二区三区四区中文字幕| 国产女同性恋一区二区| 日韩午夜精品视频| 欧美人伦禁忌dvd放荡欲情| 成人av网站免费观看| 久久99国产精品成人| 天堂蜜桃一区二区三区| 亚洲女人****多毛耸耸8| 欧美韩日一区二区三区| 久久美女艺术照精彩视频福利播放| 337p亚洲精品色噜噜狠狠| 在线观看视频一区| 91蜜桃网址入口| 99综合电影在线视频| 99精品欧美一区二区蜜桃免费 | 99国产精品久久久久久久久久久 | 成人国产精品视频| 国产高清一区日本| 国产成人精品影视| 国产福利一区在线观看| 国产乱码字幕精品高清av| 久久99国产精品尤物| 紧缚奴在线一区二区三区| 青青草国产精品97视觉盛宴| 日韩精品高清不卡| 日本午夜一本久久久综合| 日本中文字幕一区二区视频 | 136国产福利精品导航| 国产精品国产三级国产a| 国产精品视频第一区| 一区二区中文字幕在线| 亚洲女人的天堂| 亚洲国产sm捆绑调教视频| 亚洲国产cao| 麻豆一区二区在线| 国产一区二区不卡老阿姨| 成人性生交大片免费看在线播放 | 久久网站热最新地址| 久久综合色综合88| 欧美经典一区二区| 国产精品久久久久久久久久久免费看 | 成人污视频在线观看| 欧美午夜在线观看| 色婷婷综合久久久久中文一区二区| 99精品视频一区| 欧美日本乱大交xxxxx| 日韩免费电影网站| 国产片一区二区三区| 国产精品久久毛片av大全日韩| 国产精品国产三级国产aⅴ原创| 一区二区中文视频| 亚洲精品成人a在线观看| 亚洲高清三级视频| 久久99精品一区二区三区三区| 黄色小说综合网站| 不卡的电影网站| 欧美三日本三级三级在线播放| 欧美高清性hdvideosex| 久久久久久久综合| 一区二区三区欧美| 国内精品国产成人国产三级粉色| 处破女av一区二区| 欧美日韩电影一区| 国产亚洲精品免费| 亚瑟在线精品视频| 国产精品一区专区| 在线观看一区不卡| 久久久久99精品国产片| 亚洲一二三四在线| 国产一区高清在线| 欧美亚洲综合色| 久久久99免费| 天使萌一区二区三区免费观看| 国产精品一级片在线观看| 欧美三级日韩三级国产三级| 久久久无码精品亚洲日韩按摩| 亚洲激情图片一区| 国产成人一区在线| 91麻豆精品91久久久久久清纯 | www.av亚洲| 日韩久久久久久| 亚洲国产视频a| 丁香一区二区三区| 日韩精品一区二区三区在线播放| 中文字幕在线不卡| 国产乱国产乱300精品|