大家新年好!新的一年开始了,我们又投入了紧张而又充满挑战与机遇的日常工作当中,在此我预祝大家在新的一年里个个都有新发展,人人都有新收获!
2007年2月28日星期三
2007年2月25日星期日
2007年2月24日星期六
什么是MMS-EASE Lite?
SISCO的MMS-EASE Lite(Embedded Application Service Element嵌入应用服务元件)是制造业报文协议(MMS)的C语言API。包括源于MMS-EASE产品线的源程序模块,也包括了为小系统应用的优化新文件集。他们独立于编译器和操作系统。它提供了一种为应用软件编码和解码MMS PDU(MMS协议数据单元)的机制,它共享了MMS-EASE数据结构和完整的MMS-EASE API修改子集,另外,有一易用的高级应用架构(MVL)去加速开发过程。
2007年2月14日星期三
All Rise
歌手:blue
Your honour please,
Gotta believe me what I say,
What I will tell,
Happened just the other day.
I must confess,
Cause I've had about enough,
I need your help,
Gotta make this here thing stop.
Baby I swear I'll tell the truth,
About all the things you used to do,
And if you thought you had me fooled.
I'm telling you now, objection overruled.
One for the money and the, free rides,
It's two for the lie that you, denied,
All rise, All rise.
Three for the calls that you've, been making,
It's four all the times you've been faking,
All rise, All rise.
You're on the stand,
With your back against the wall,
Nowhere to run,
And nobody you can call. (oh no)
I just can't wait,
Now the case is open wide,
You'll try to pray,
But the jury will decide.
Baby I swear I'll tell the truth,
About all the things you used to do,
And if you thought you had me fooled,
I'm telling you now, objection overruled.
Oh baby.
One for the money and the, free rides,
It's two for the lie that you, denied,
All rise, All rise.
Three for the calls that you've, been making,
It's four all the times you've been faking,
All rise, All rise.
So step back,
Cos you don't know this cat.
I know deep down that,
You don't want me to react.
I'll lay low,
Leaving all my options open,
The decision of the jury,
Has not been spoken.
Step in my house,
You find that your stuff has gone,
But in reality,
To whom does the stuff belong.
I bring you into court,
To preach my order,
Any you know that,
You overstepped the border.
One for the money and the, free rides,
It's two for the lie that you, denied,
All rise, All rise.
Three for the calls that you've, been making,
It's four all the times you've been faking,
All rise, All rise.
What you say,(One for the money and the, free rides)
Games you play,(It's two for the lie that you, denied)
What you've done.(All rise, All rise)
What you say,(Three for the calls that you've, been making)
Games you play,(It's four all the times you've been faking)
What you've done,(All rise, All rise)
When you're gone
One for the money and the, free rides,
It's two for the lie that you, denied,
All rise, All rise.
Three for the calls that you've, been making,
It's four all the times you've been faking,
All rise, All rise.
I rest my case
2007年2月12日星期一
2007年2月11日星期日
函数指针数组
理解函数指针的概念:
1 int funtion( int x, int y );
2 void main ( void )
{
3 int (*fun) ( int x, int y );
4 int a = 10, b = 20;
5 function( a, b );
6 fun = function;
7 (*fun)( a, b );
8 ……
}正确使用函数指针数组的前提条件是,这若干个需要通过函数指针数组保存的函数必须有相同的输入、输出值。
首先定义256个处理函数(及其实现)。
void funtion0( void );
……..
void funtion255(void );
其次定义函数指针数组,并给数组赋值。
void (*fun[256])(void);
fun[0] = function0;
…….
fun[255] = function();
最后,MyFunction()函数可以修改如下:void MyFuntion( char* buffer, int length )
{
__int8 nStreamType = buffer[0];
(*fun[nStreamType])();
}
HASH算法
在61850规约处理中,可能会有大量的字符串需要处理,为了提高字符串的检索速度,建议采用一些经典算法,下面是网路上的HASH算法。
Hash,一般翻译做"散列",也有直接音译为"哈希"的,就是把任意长度的输入(又叫做预映射, pre-image),通过散列算法,变换成固定长度的输出,该输出就是散列值。这种转换是一种压缩映射,也就是,散列值的空间通常远小于输入的空间,不同的输入可能会散列成相同的输出,而不可能从散列值来唯一的确定输入值。 数学表述为:h = H(M) ,其中H( )--单向散列函数,M--任意长度明文,h--固定长度散列值。 在信息安全领域中应用的Hash算法,还需要满足其他关键特性,需要知道更多?google呀!baidu.
61850.PACKET HEADER
8 位位组1 | 8 位位组2 | 8 位位组3~4 | 8位位组4~n |
版本=3 (vrsn) | 保留 | 报文长度,ISO传输 (packet length) | ISO传输层报文 (data) |
where:
vrsn 8 bits,This field is always 3 for the version of the protocol described inthis memo.packet length 16 bits (min=7, max=65535),This field contains the length of entire packet in octets,including packet-header. This permits a maximum TPDU size of 65531 octets. Based on the size of the data transfer (DT) TPDU,this permits a maximum TSDU size of 65524 octets.The format of the TPDU is defined in [ISO8073]. Note that onlyTPDUs formatted for transport class 0 are exchanged (different transport classes may use slightly different formats).
61850.TPDU
header length | code credit | TPDU-NR and EOT | user data |
一个字节 | 一个字节,code占高四位,credit占低四位 | 一个字节 | n个字节 |
After the credit field (which is always ZERO on output and ignored
on input), there is one additional field prior to the user data.TPDU-NR and EOT 8 bits Bit 7 (the high-order bit, bit mask 1000 0000) indicates the end of a TSDU. All other bits should be ZERO on output and ignored on input.Note that the TP specification limits the size of an expedited
transport service data unit (XSDU) to 16 octets.
交叉网线
以上是标准做法,简易做法很easy:不看颜色,直接1和3对调,2和6对调,搞定!
1,2是发送线;3,6是接受线
需要了解WinPcap
Happy New Year
If you have any questions, please contact with me freely.
2007年2月10日星期六
No blog, no sex
In an effort to encourage me to revive this blog, my wife has imposed this “No blog, No sex” rule. The rule is simple: I am supposed to blog at least once a week in exchange for love-making. The hornier I get, the more blog entries I get to post. I don’t know where the hell she got this idea (but I think it must have been from one of her blogger friends: Abe, Noemi, Javyee, Rico.) I’ve always wanted to become a blogger ever since Gail, my wife, has introduced me to this sport a couple of years ago. I just did not have the time and I guess proper motivation to keep going. Attending the Blog Parteeh (wherein our web design company Sheero Media was one of the sponsors), made me realize how amazing Pinoy bloggers are and that blogging is by itself a worthwhile venture. This is the end of this blog entry, bye for now. Time for me to claim my prize. Arrrghh!! Meeowww!!
钱哪
下次?BYEBYE了您哪!
IEC61850,One World,One Technology,One Standard
RTU560 2.0 Add New Protocal
添加一个新的规约的步骤:
(一)、C:\Tornado\RTU560\protlnch.c 文件中添加;
(二)、C:\Tornado\RTU560\DBConfig\cfconval.c 文件中添加;
(三)、C:\Tornado\target\config\comps\vxWorks\50rtuprotocols.c 文件中添加;
(四)、:\Tornado\FirmwareVersion\SLI\WBLV2C000R4xxx\prjParams.c 文件中添加(自动加入);
RTU560 1.0 Add New Protocal
1、在路径 \USERS\ligenyuan\RTU560\incmod.mk下增加相关配置;在路径 \USERS\ligenyuan\RTU560\incmod.h 下增加相关配置;在路径 \USERS\ligenyuan\RTU560\protlnch.c 下增加相关配置;
2、在路径 \tornado1.0\host\resource\tcl\app-config\Tornado\01Project.win32.tcl 下增加相关配置;
3、在路径 \Archiv\RTU560\Develop\dv00.21_bf\rules.version 下增加相关文件配置
RTU560 1.0 MainBoard
1、用RTU560/OPEN MAKEFILE FOR RTU560 查看规约的路径配置用RTU560/OPEN MODULE CONFIGFILE 用来裁减规约(也就是USERS/LIGENYUAN/RTU560/INCMOD.MK中的内容)裁减时同时可裁减USERS/LIGENYUAN/RTU560/INCMOD.H中的内容
2、用RTU560/PROTOCOLS/"PTL"/CLEAR 清除规约老的编译结果;用RTU560/PROTOCOLS/"PTL"/BUILD 编译每个规约;
3、用RTU560/ALL/CLEAR 清除各个规约的联结结果;用RTU560/ALL/LINK RELATIVE 联结所有的定义中的规约;
4、联结后的结果在路径 USERS\ligenyuan\RTU560\rtu560_SLI_bf.o 下将rtu560_SLI_bf.o 拷贝到tornado\target\config\560.ReleaseSLI\User_app下执行 make 560 releasesli/common target/clean;然后make 560 releasesli/common target/vxWorks_low,会在tornado1.0\target\config\560.ReleaseSLI 下生成vxWorks_low文件,将其拷贝成wbloxx.bin; tgtsvr.exe 启动时时间限制2000.6.5--2000.7.5/user/ligenyuan/Rtu560 下有一个批处理文件叫 buildSLI.bat 可能和编译有很大关系









