当前位置:  建站>运营/SEO
本页文章导读:
    ▪crowd在更改IP后无法登录的问题      org.codehaus.xfire.fault.XFireFault: Client with address "192.168.1.222", and hostname "192.168.1.222" is forbidden from making requests to the application, crowd. 进入crowd库 mysql> select * from cwd_application_address; .........
    ▪DSP TMS320C6000基础学习(5)—— gel文件      什么是gel文件?gel文件能干什么? gel全称General Extended Language,即通用扩展语言文件,gel文件中由类似C语言的代码构成,gel语言是一种解释性语言,gel文件扩展名为.gel; gel文件用于(1).........
    ▪DSP TMS320C6000基础学习(6)—— gel文件      什么是gel文件?gel文件能干什么? gel全称General Extended Language,即通用扩展语言文件,gel文件中由类似C语言的代码构成,gel语言是一种解释性语言,gel文件扩展名为.gel; gel文件用于(1).........

[1]crowd在更改IP后无法登录的问题
    来源: 互联网  发布时间: 2013-10-31

org.codehaus.xfire.fault.XFireFault: Client with address "192.168.1.222", and hostname "192.168.1.222" is forbidden from making requests to the application, crowd.


进入crowd库

mysql> select * from cwd_application_address;

+----------------+-----------------------+-----------------------+---------------------+
| application_id | remote_address        | remote_address_binary | remote_address_mask |
+----------------+-----------------------+-----------------------+---------------------+
|              2 | 127.0.0.1             | fwAAAQ==              |                   0 |
|              2 | 192.168.1.111         | wKgBmw==              |                   0 |
|              2 | localhost             | NULL                  |                   0 |
|              2 | localhost.localdomain | NULL                  |                   0 |
|              3 | 127.0.0.1             | fwAAAQ==              |                   0 |
|              3 | localhost             | NULL                  |                   0 |
|              4 | 127.0.0.1             | fwAAAQ==              |                   0 |
|              4 | localhost             | NULL                  |                   0 |
|              5 | 127.0.0.1             | fwAAAQ==              |                   0 |
|              6 | 127.0.0.1             | fwAAAQ==              |                   0 |
|              7 | 127.0.0.1             | fwAAAQ==              |                   0 |
+----------------+-----------------------+-----------------------+---------------------+
11 rows in set (0.00 sec)


将新的IP按下面方式得到一个串,在shell下执行:

# IP=192.168.1.201; printf \\x$(printf "%X %X %X %X" $(echo $IP| tr . ' ')| sed 's/\ /\\x/g')| base64
wKgByQ==


mysql> update cwd_application_address set remote_address="192.168.1.222" , remote_address_binary="wKgByQ==" where application_id=2 and remote_address_binary="wKgBmw==";      
Query OK, 1 row affected (0.00 sec)

Rows matched: 1  Changed: 1  Warnings: 0


重启crowd就可以了。

作者:kenera 发表于2013-7-31 15:12:28 原文链接
阅读:50 评论:0 查看评论

    
[2]DSP TMS320C6000基础学习(5)—— gel文件
    来源: 互联网  发布时间: 2013-10-31

什么是gel文件?gel文件能干什么?

gel全称General Extended Language,即通用扩展语言文件,gel文件中由类似C语言的代码构成,gel语言是一种解释性语言,gel文件扩展名为.gel;

gel文件用于(1)扩展CCS功能,比如菜单选项等,(2)通过gel可以访问目标板的存储器。


1. gel基本语法——类C

gel函数和gel参数不需要在DSP程序中定义。gel具有C语言的很多相似的东西:函数、return语句、if-else语句、while语句、与C一样的注释方式、#define,这些函数或语句的用法也与C中的非常类似。


GEL函数

funcName(param1 "discription" [,param2 "discription", param3 "discription",...])

{

statements;

}

gel函数中不用声明返回类型和参数类型,但函数中可以使用return语句返回;

参数使用“参数+字符串类型的描述”组成,参数不需要定义,可以是以下的任意一种:实际/仿真的DSP目标板的符号值;数字常量(表达式或常值);字符串常量。

GEL函数调用:通常可以在输入C表达式的任意地方调用GEL函数,也可以在另一个GEL函数中调用GEL函数。GEL函数无法递归调用。


GEL语句

返回语句:

return [expression];

条件语句:

if (exp)
	statements 1;
else 
	statements 2;
循环语句:

while (exp) {
	statements;
}


GEL预处理

#define identifier(arguments list)     token-expression

GEL注释

// 注释

/* 注释 */


1. gel特有关键字

menuitem/hotmenu

在CCS v4.2中测试,menuitem添加Scripts菜单下的子菜单项,hotmenu添加menuitem定义菜单项的子菜单项,参考本文后面的例子。

这两个关键字声明的函数都不需要参数,比如

menuitem "Addressing Modes";
hotmenu C27x_Mode()
{
    AMODE = 0;
    OBJMODE = 0;
}

hotmenu C28x_Mode()
{
    AMODE = 0;
    OBJMODE = 1;
}

hotmenu C2xLP_Mode()
{
    AMODE = 1;
    OBJMODE = 1;
}
上面代码将产生如下的菜单结构,

Scripts

    - Addressing Modes

    - C27x_Mode

    - C28x_Mode

    - C2xLP_MODE


dialog

向menuitem定义的菜单中添加一个入口子菜单,并在点击子菜单时弹出对话框。

menuitem "MyFunc"

dialog InitTarget(StartAddr "Starting Address", EndAddr "Ending Address")

{

statements;

}

dialog RefreshTarget()

{

statements;

}


slider

添加滑动条,每次移动滑动条都用滑动条上的新值重新调用GEL文件,定义格式如下,

slider param_def(minVal, maxVal, increment, pageIncrement, paramName)

{

statements;

}


3. gel文件的例子

/* 
 * This GEL file (DSP621x_671x.gel) provides example code on how to 
 * reset the C6x DSP and initialize the External Memory Interface.
 *
 * You will have to edit settings in emif_init() to your own 
 * specifications as the example is applicable to the C6711 DSK.
 *
 * This file is has minimal functionality and is designed to be used
 * as a starting point for custom GEL files.
 *
 * Refer to CCS Help for detailed information on GEL commands.
 *
 */

/*
 * The StartUp() function is called every time you start Code Composer.
 * It should only include functions that do not "touch the hardware" -
 * Hardware initialization should be invoked from the OnTargetConnect() 
 * function or the GEL menu.
 */ 
StartUp()
{

	/* setMemoryMap;  
	this should be a function to initialize the mem map based
	on the particular hardware that is used
	*/
}

/*--------------------------------------------------------------*/
/* OnTargetConnect() -- this function is called after a target  */
/* connect.                                                     */
/*--------------------------------------------------------------*/
OnTargetConnect()
{
	/* 	GEL_Reset is used to deal with the worst case senario of
		unknown target state.  If for some reason a reset is not
		desired upon target connection, GEL_Reset may be removed 
		and replaced with something "less brutal" like a cache
		initialization function
	GEL_Reset();  
	*/
}

OnReset(int nErrorCode){
/*	emif_init();  */
}

/*
 * OnPreFileLoaded()
 * This function is called automatically when the 'Load Program'
 * Menu item is selected  .....
 */
OnPreFileLoaded()
{
	CleanCache();
}

/*
 * CleanCache()
 * Actually Invalidate L1D, L1P, and L2 
 */
CleanCache()   {
	*(int *)0x01845004 = 1;
	}  

emif_init()
{
/*---------------------------------------------------------------------------*/
/* EMIF REGISTERS */
/*---------------------------------------------------------------------------*/

	#define EMIF_GCTL       0x01800000
	#define EMIF_CE1        0x01800004
	#define EMIF_CE0        0x01800008
	#define EMIF_CE2        0x01800010
	#define EMIF_CE3        0x01800014
	#define EMIF_SDRAMCTL   0x01800018
	#define EMIF_SDRAMTIMING  0x0180001C
  	#define EMIF_SDRAMEXT     0x01800020

/*---------------------------------------------------------------------------*/
/* EMIF REGISTER VALUES - these should be modified to match TARGET hardware  */
/*---------------------------------------------------------------------------*/

  	*(int *)EMIF_GCTL = 0x00003040;/* EMIF global control register         */
  	*(int *)EMIF_CE1 = 0xFFFFFF23; /* CE1 - 32-bit asynch access after boot*/
  	*(int *)EMIF_CE0 = 0xFFFFFF30; /* CE0 - SDRAM                          */
  	*(int *)EMIF_CE2 = 0xFFFFFF23; /* CE2 - 32-bit asynch on daughterboard */
  	*(int *)EMIF_CE3 = 0xFFFFFF23; /* CE3 - 32-bit asynch on daughterboard */
  	*(int *)EMIF_SDRAMCTL = 0x07117000; /* SDRAM control register (100 MHz)*/
  	*(int *)EMIF_SDRAMTIMING = 0x0000061A; /* SDRAM Timing register        */
}
上面的gel来自于CCS v4安装目录下ccsv4\emulation\gel\DSP621x_671x.gel文件,上面不仅使用了#define定义寄存器地址,还使用了类似C中的指针对EMIF(外部存储器接口)进行配置。


/******************************************************************/
/* Code Composer Studio supports five reserved GEL functions that */
/* automatically get executed if they are defined. They are:      */
/*             
    
[3]DSP TMS320C6000基础学习(6)—— gel文件
    来源: 互联网  发布时间: 2013-10-31

什么是gel文件?gel文件能干什么?

gel全称General Extended Language,即通用扩展语言文件,gel文件中由类似C语言的代码构成,gel语言是一种解释性语言,gel文件扩展名为.gel;

gel文件用于(1)扩展CCS功能,比如菜单选项等,(2)通过gel可以访问目标板的存储器。


1. gel基本语法——类C

gel函数和gel参数不需要在DSP程序中定义。gel具有C语言的很多相似的东西:函数、return语句、if-else语句、while语句、与C一样的注释方式、#define,这些函数或语句的用法也与C中的非常类似。


GEL函数

funcName(param1 "discription" [,param2 "discription", param3 "discription",...])

{

statements;

}

gel函数中不用声明返回类型和参数类型,但函数中可以使用return语句返回;

参数使用“参数+字符串类型的描述”组成,参数不需要定义,可以是以下的任意一种:实际/仿真的DSP目标板的符号值;数字常量(表达式或常值);字符串常量。

GEL函数调用:通常可以在输入C表达式的任意地方调用GEL函数,也可以在另一个GEL函数中调用GEL函数。GEL函数无法递归调用。


GEL语句

返回语句:

return [expression];

条件语句:

if (exp)
	statements 1;
else 
	statements 2;
循环语句:

while (exp) {
	statements;
}


GEL预处理

#define identifier(arguments list)     token-expression

GEL注释

// 注释

/* 注释 */


1. gel特有关键字

menuitem/hotmenu

在CCS v4.2中测试,menuitem添加Scripts菜单下的子菜单项,hotmenu添加menuitem定义菜单项的子菜单项,参考本文后面的例子。

这两个关键字声明的函数都不需要参数,比如

menuitem "Addressing Modes";
hotmenu C27x_Mode()
{
    AMODE = 0;
    OBJMODE = 0;
}

hotmenu C28x_Mode()
{
    AMODE = 0;
    OBJMODE = 1;
}

hotmenu C2xLP_Mode()
{
    AMODE = 1;
    OBJMODE = 1;
}
上面代码将产生如下的菜单结构,

Scripts

    - Addressing Modes

    - C27x_Mode

    - C28x_Mode

    - C2xLP_MODE


dialog

向menuitem定义的菜单中添加一个入口子菜单,并在点击子菜单时弹出对话框。

menuitem "MyFunc"

dialog InitTarget(StartAddr "Starting Address", EndAddr "Ending Address")

{

statements;

}

dialog RefreshTarget()

{

statements;

}


slider

添加滑动条,每次移动滑动条都用滑动条上的新值重新调用GEL文件,定义格式如下,

slider param_def(minVal, maxVal, increment, pageIncrement, paramName)

{

statements;

}


3. gel文件的例子

/* 
 * This GEL file (DSP621x_671x.gel) provides example code on how to 
 * reset the C6x DSP and initialize the External Memory Interface.
 *
 * You will have to edit settings in emif_init() to your own 
 * specifications as the example is applicable to the C6711 DSK.
 *
 * This file is has minimal functionality and is designed to be used
 * as a starting point for custom GEL files.
 *
 * Refer to CCS Help for detailed information on GEL commands.
 *
 */

/*
 * The StartUp() function is called every time you start Code Composer.
 * It should only include functions that do not "touch the hardware" -
 * Hardware initialization should be invoked from the OnTargetConnect() 
 * function or the GEL menu.
 */ 
StartUp()
{

	/* setMemoryMap;  
	this should be a function to initialize the mem map based
	on the particular hardware that is used
	*/
}

/*--------------------------------------------------------------*/
/* OnTargetConnect() -- this function is called after a target  */
/* connect.                                                     */
/*--------------------------------------------------------------*/
OnTargetConnect()
{
	/* 	GEL_Reset is used to deal with the worst case senario of
		unknown target state.  If for some reason a reset is not
		desired upon target connection, GEL_Reset may be removed 
		and replaced with something "less brutal" like a cache
		initialization function
	GEL_Reset();  
	*/
}

OnReset(int nErrorCode){
/*	emif_init();  */
}

/*
 * OnPreFileLoaded()
 * This function is called automatically when the 'Load Program'
 * Menu item is selected  .....
 */
OnPreFileLoaded()
{
	CleanCache();
}

/*
 * CleanCache()
 * Actually Invalidate L1D, L1P, and L2 
 */
CleanCache()   {
	*(int *)0x01845004 = 1;
	}  

emif_init()
{
/*---------------------------------------------------------------------------*/
/* EMIF REGISTERS */
/*---------------------------------------------------------------------------*/

	#define EMIF_GCTL       0x01800000
	#define EMIF_CE1        0x01800004
	#define EMIF_CE0        0x01800008
	#define EMIF_CE2        0x01800010
	#define EMIF_CE3        0x01800014
	#define EMIF_SDRAMCTL   0x01800018
	#define EMIF_SDRAMTIMING  0x0180001C
  	#define EMIF_SDRAMEXT     0x01800020

/*---------------------------------------------------------------------------*/
/* EMIF REGISTER VALUES - these should be modified to match TARGET hardware  */
/*---------------------------------------------------------------------------*/

  	*(int *)EMIF_GCTL = 0x00003040;/* EMIF global control register         */
  	*(int *)EMIF_CE1 = 0xFFFFFF23; /* CE1 - 32-bit asynch access after boot*/
  	*(int *)EMIF_CE0 = 0xFFFFFF30; /* CE0 - SDRAM                          */
  	*(int *)EMIF_CE2 = 0xFFFFFF23; /* CE2 - 32-bit asynch on daughterboard */
  	*(int *)EMIF_CE3 = 0xFFFFFF23; /* CE3 - 32-bit asynch on daughterboard */
  	*(int *)EMIF_SDRAMCTL = 0x07117000; /* SDRAM control register (100 MHz)*/
  	*(int *)EMIF_SDRAMTIMING = 0x0000061A; /* SDRAM Timing register        */
}
上面的gel来自于CCS v4安装目录下ccsv4\emulation\gel\DSP621x_671x.gel文件,上面不仅使用了#define定义寄存器地址,还使用了类似C中的指针对EMIF(外部存储器接口)进行配置。


/******************************************************************/
/* Code Composer Studio supports five reserved GEL functions that */
/* automatically get executed if they are defined. They are:      */
/*      
    
最新技术文章:
▪SQVI和SAP查询QUERY的区别和使用注意事项    ▪彻底理解Cisco/Linux/Windows的IP路由    ▪Exchange 2010 处于禁止发送用户自动收到来自IT...
▪MB_CHANGE_DOCUMENT使用方法    ▪ALV的html表头    ▪【译】如何精确判断最终用户响应时间过长的...
▪apache2.4.4启用deflate压缩    ▪使用vmware 配置centos 6.0+ 网络出现的各种问题...    ▪十句话教你学会Linux数据流重定向
▪centos6.x已经安装的系统添加图形界面    ▪Linux查看CPU和内存使用情况    ▪win7问题解决,凭据管理器和无法访问,不允...
▪Dynamics CRM 2013 初体验(4):不再被支持的功...    ▪win7下制作ubuntu系统安装启动盘和U盘安装ubuntu...    ▪Linux cp -a用法
▪Windows Server时间服务器配置方法    ▪Tomcat+memcached实现Session共享    ▪Linux修改系统环境变量PATH路径的方法
▪Citrix 服务器虚拟化之二十七 XenApp6.5发布服务...    ▪搭建本地Ubuntu 镜像服务器    ▪Create local metadata resource of yum
▪tsm ANS0326E问题处理    ▪Windows SVN变化邮件通知(Python2.7实现)    ▪linux下的内核测试工具——perf使用简介
▪Nginx TCP Proxy模块的编译安装    ▪OSX: SSH密钥使用日记(2)    ▪OSX: SSH密钥使用日记(1)
▪Manually start and stop Oracle XE in Ubuntu    ▪Disable autostart of Oracle-xe in Ubuntu    ▪tar命令-linux
▪xtrabackup-2.1.2-611安装    ▪无废话ubuntu 13.4文件共享配置    ▪Unix文本处理工具之sed
▪hpux 操作系统 磁带备份与恢复    ▪HP DL360 G7通过iLO部署系统    ▪Redhat 6.0中VNC Server的配置方法
▪hpux 操作系统磁带备份与恢复    ▪用C++编程调用libvirt的API来创建KVM虚拟机    ▪hpux- hp小型机日常硬件故障处理case(一)
▪web集群时session同步的几种方法(统计)    ▪inux常用命令大全    ▪BAT 批处理实现循环备份N天文件夹
▪BIND9私有DNS服务器小环境搭建实验    ▪Exchange2013增量备份    ▪OSSEC Monitor your App log file
▪《深入理解Nginx》阅读与实践(三):使用upstre...    ▪如何给Fedora 15创建磁盘分区    ▪Packet Sniffer Code in C using sockets
▪Error, some other host already uses address    ▪修改uCOS_II以实现“优先级+时间片”联合调度    ▪weblogic开发模式与生产模式介绍
▪Wireshark 高级特性    ▪ubuntu13.04版本下安装RabbitVCS,类似windows的Tortoi...    ▪Apache 一台主机绑定多个域名及虚拟主机
▪linux安全设置    ▪RHEL双网卡绑定    ▪Linux shell if参数
▪Windows配置路由时可以指定源地址啦    ▪centos安装vim7.4    ▪S3C2410 实验三——块拷贝、字拷贝(寄存器的...
▪系统运维——日志处理    ▪ip_conntrack缓存neighbour    ▪关键在封装并发出了帧-IP冲突也无所谓
▪weblogic11g 安装——linux 无图形界面    ▪《数据通信与网络》笔记--SCTP    ▪《数据通信与网络》笔记--TCP中的拥塞控制
▪weblogic11g 安装集群 —— win2003 系统、单台主...    ▪weblogic11g 节点管理器 nodemanager    ▪Citrix 服务器虚拟化之二十六 应用程序虚拟化...
▪如何将windows下的文件夹挂载到linux虚拟机下    ▪在64位AIX6.1下安装SAP JCo    ▪Outlook启动时提示“找不到文件Outlook.pst文件”...
▪weblogic8.1 登陆5 ip 限制    ▪weblogic 内存 及 内存溢出    ▪手把手教你在Windows端搭建Redmine项目管理软件
▪启动及重新启动nginx,重启nginx后丢失nginx.pid问...    ▪Win7实现快速启动栏并实现靠左边的终极操作...    ▪《深入理解Nginx》阅读与实践(二):配置项...
▪显示grub引导菜单    ▪nagios监控主机    ▪linux各种数据流重定向
▪centOS安装chrome浏览器    ▪Slackware 14 安装完全指南    ▪SharePoint 2013的100个新功能之内容管理(三)
▪Citrix 服务器虚拟化之二十一 桌面虚拟化之部...    ▪[问,ask]ubuntu13.04安装vncserver后只显示桌面,不显...    ▪Win7中IIS出现“HTTP 错误 404.17 - Not Found 请求的...
▪CentOS快速安装最新版本的SaltStack    ▪CentOS 6.4 快速安装Nginx笔记    ▪磁盘管理——RAID 0
 


站内导航:


特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

©2012-2021,,E-mail:www_#163.com(请将#改为@)

浙ICP备11055608号-3