AGA 12 IS A STANDARD TO PROTECT SCADA FROM CYBER ATTACK
AGA 12 is a suite of 4 documents, designated Parts 1 through 4. The four documents address different aspects of SCADA communication protection.
AGA 12, Part 1 (AGA 12-1) summarizes cyber security policies, the background of the cyber security problem, and a procedure for testing cryptographic protection systems. This document educates SCADA operators on the need to do a risk assessment and recommends an approach for those utilities whose risk assessment reveals a need to protect their systems with cryptography.
AGA 12-2 is a detailed technical specification for building interoperable cryptographic modules to protect SCADA communications for low-speed legacy SCADA systems and dial-up maintenance ports.
AGA 12-3 will describe how to protect high speed communication SCADA systems.
AGA 12-4 will describe how to build next generation SCADA systems so that their cryptography will be compatible with the legacy systems; this will ease the transition to the newer designs.
Parts 1 and 2 are close to completion. Parts 3 and 4 are in the planning stage.
其中:AGA 12 – American Gas Association Report No. 12, “Cryptographic Protection of SCADA Communications” 有空研究一下,正需要这方面的密码学知识。
------------------------- 一个同事选择离开了,在香港呆了好长时间,也许在那选择了另外的工作,也许是定居,也许有更好的职位、薪水.... 但是,英语好是前提,才能有更好的发展,得加紧学习英语,写作,口语... ...
下星期,机器到位,要忙了,哎Vxworks就是贵,bsp包也贵,不知Kd2000上跑得如何? 最好代码的移植准备... ...
哎,眼睛累,如果眼睛不累多好,可以一直看下去,世间上何时才有此发明.....
IEC 60870-5-601 Ed. 1.0 (2006-06) Telecontrol equipment and systems - Part 5-601: Conformance test cases for the IEC 60870-5-101 companion standard
IEC 60870-5-104 Ed. 2.0 (2006-06) Telecontrol equipment and systems - Part 5-104: Transmission protocols - Network access for IEC 60870-5-101 using standard transport profiles
IEC 60870-5-6 Ed. 1.0 (2006-03) Telecontrol equipment and systems - Part 5-6: Guidelines for conformance testing for the IEC 60870-5 companion standards
------------------------------------------------------------------------------------- 偶然,发现自己原来已经有IEC 60870-5-101 2003 edit 2.0. 哎,罪过,罪过!都是看不懂法文,我以为是法文文档呢,一直没看。
If the links from a central control station (controlling station) to several outstations (controlled stations) share a common physical channel, then these links must be operated in an unbalanced mode to avoid the possibility of more than one outstation attempting to transmit on the channel at the same time. The sequence in which the various outstations are granted access to transmit on the channel is then determined by an application layer procedure in the controlling station, see 6.2 in IEC 60870-5-5.
哎,能看原版就是不一样,有些问题一看知道,解析的比较到位。Edit 2.0比1.0解析的也清楚。 Polling方式下master必须等待slave的回答或超时,才能进行下轮通讯。无论下轮通讯是针对同一slave,还是另一个slave,必须等待上轮通讯的完结,完结的依据时slave回答获超时。规约明白规定,很清楚!!以前老是想找到证据,虽然这样想,但没人给我十分确定的回答,只是"可能"。
FCB位针对每个slave的,一个slave一FCB,考虑翻转的问题就比较清楚了。
简单说SCADA跟DCS的区别类似于 RTU跟PLC的区别。 SCADA: 1. is event drivent, a SCADA system in process events,一个状态的改变系统会产生报警、数据更新、相应的处理 2. 主要是考虑状态的改变,包括状态点,模拟量的改变, DCS: 1. is process state driven, primarily interested inprocess trends. 2. DCS software tasks are generally run sequentially, rather than event driven. Therefore alarms or events are not generated when a point changes state, but when that particular process is run. 3. DCS系统一般是直接跟I/O打交道,即硬接点。 These underlying differences prompt a series of design decisions that require a great deal more complexity in a SCADA system database and data-gathering system than is usually found in DCS. DCS systems typically have correspondingly more complexity in their process-control functionality. Modbus是DCS的一种协议,报告每次被扫描的数据点状态,不报告两次扫描之间的变化,是属于报告“当前状态"的一种系统。 IEC 60870-5-101 变电站的一种SCADA procotol。报告被监控点的变化和这些变化的时标,而且有优先级,能优先报告数据。
Interrupt-Driven or Polled I/O?
When designing an embedded system, a fundamental decision is the type of I/O scheme. Should we use interrupt-driven or polled I/O? We'll explore how this important decision has an impact not only on the firmware but on the hardware as well.
Fishing for I/O
Polled I/O is much like fishing: there is a lot of waiting. In a polled I/O scheme, software is written to check the status of an I/O device. If there is no data to be received (Rx) or if the device is not ready to transmit (Tx), the software must wait. This technique is called busy-waiting. After waiting for some time, eventually the software can receive or transmit some data, and the rest of the software can execute (see Diagram 1).
Diagram 1: Flowchart for polled I/O
If this sounds inefficient, that's because it is. It's a very simple way of dealing with I/O with no surprises for the developer, but a lot of CPU time is spent waiting for data to transfer.
Interrupt-driven I/O uses a little hardware to aid in efficiency. When the I/O device has already received some data or the I/O device is ready to transmit, an interrupt is generated, and the appropriate interrupt service routine (ISR) handles reading or writing some data. Interrupts add a level of complexity, and can be very difficult to debug, but the resulting system wastes no time waiting for data to transfer (see Diagram 2).
Diagram 2: Flowchart for interrupt-driven I/O
Yes, ISRs can be this simple. The above diagram shows separate ISRs for the receiver and transmitter if there are two separate interrupts. Sometimes there is only one interrupt for both functions, so the ISR is a little more complicated.
Development Time
From the simple example above, it may appear that interrupts and ISRs are very easy to implement. In many cases they are, but they can also be very complicated. The development cost of ISRs is generally higher than polled I/O. Consider that you're not only developing the functionality of the polled I/O routines, but you've also got to deal with how interrupts work in your particular system. Polled I/O occurs at very specific points in the firmware (i.e. whenever the polled I/O routines are called). Interrupts can happen at anytime. An interrupt bug can cause anything from simple system crashes to really frustrating intermittent data loss and unreliable system performance.
Which Is Best?
The decision to use polled or interrupt-driven I/O is usually pretty easy. If you've got the interrupt, use it! In the long run, even though it may take more time to develop, interrupt-driven I/O leads to a solid design, predictable performance, and holds up well to modifications of application code. However, if you've got a very simple design, using a straightforward polled I/O scheme may be preferable. There are a few factors which can influence your design.
Throughput. If your system throughput requirements are very high, you must use interrupt-driven I/O. Polled I/O won't work because the CPU efficiency won't be high enough to move the data and do everything else. However, if you've got a specialized system with extremely high data rate requirements, it may actually be faster to use polled I/O. That's because polled I/O doesn't incur any interrupt overhead or interrupt latency (see below).
Interrupt latency. Interrupt latency is the time it takes for the processor to respond to an interrupt event. These times range from 100's of nanoseconds to 10's of microseconds. In very rare cases, if interrupt latency is long or unpredictable, it may be preferable to poll for an event in very controlled conditions to ensure quick capture of an event.
Interrupt availability. Most of today's microcontrollers have several external interrupts. If a hardware interrupt is not available, you will have no choice but to poll for I/O (see Simulating Interrupt-Driven I/O below). It's best to work with the electrical engineers to make sure that the microcontroller you choose works for both the electrical and firmware designs.
By the way, there is no reason that you can't incorporate both types of I/O in a system. For example, perhaps your Ethernet driver uses interrupts and your serial port driver doesn't. It's all a matter of using a suitable technique for each situation.
Simulating Interrupt-Driven I/O
So what if you've got a system where there are no more external interrupts and you want some interrupt-driven I/O? You can simulate interrupt-driven I/O by using a dedicated task in an RTOS. While you can't really address interrupt latency with this technique, it gives CPU time to other tasks when there is no data to receive or transmit. An example task is shown below which handles receiving and transmitting characters on a UART.
Diagram 3: Flowchart of UARTTask
Conclusion
Both polling and interrupt-driven techniques should be in the embedded designer's toolbox. While we recommend using interrupt-driven I/O whenever possible, it doesn't really matter which technique you use as long as the final design meets product requirements, is easy to understand, and is easy to maintain.
Advanced C Programming for Microcontrollers
The course is for experienced C programmers, working on embedded systems, who would like to learn structured programming techniques, fill in gaps in their knowledge, and learn about more advanced data structures and algorithms.
It will also cover object oriented programming techniques as implemented in C, useful in projects where a UML design is to be realised in C and assembler.
Coverage of the MISRA programming guidelines for developing safety critical code are included, and the tools available for checking conformance to these guidelines are reviewed
Extensions to ANSI C that are provided by various compilers targeted at micro-controller based systems - such as pragmas, keywords for specifying a function as an interrupt handler, keywords for specifying special function registers, and addressable bits are critically discussed.
Code profiling, tuning and optimisation techniques are discussed, including discussion of situations where it might be better to implement modules in assembler that can be accessed via C function calls.
A considerable part of the course is devoted to detailed coverage of interrupt handling, multi-tasking via polled,interrupt driven and hybrid approaches, timer driven multi-tasking scheduler implementation, control of access to critical resources, memory and buffer management,and the implementation of device driver software.
|
Course Outline
C syntax - intensive overview
- Base data types, operators, functions, if .. else, switch, for loops, while and do - while loops
- structures, arrays of structures and pointers to structures
- function pointers
- C Macro pre-processor
Finite State Machines (FSMs)
- Event driven systems
- FSM diagrams
- Switch statement implementation of an FSM
- Table driven implementation of an FSM
- Push Down Automata
- Extending FSMs via Statecharts
- Implementing Statechart designs in C
Modular code - Components and Object Oriented Coding in C
|
Principles of Object Oriented thinking
Software components and interfaces
Singly and doubly linked lists
Queues - Stacks (LIFOs), Buffers (FIFOs)
Relationships and Indexes- Representing relationships and associations in C
- One to one, one to many and many to many relationships
- Binary trees
- Balanced binary trees (AVL Trees, Red-Black trees)
- Hufmann encoding
- Heaps
- Priority Queues
- Hash tables
- Cyclic redundancy checksums
I/O, Interrupts,Timers and Device Drivers- Working with micro-controller I/O ports
- On chip peripherals and alternate I/O port functions
- How interrupts are implemented on different architectures
- Timers and timer interrupts
- Capture/Compare timer functions
- UARTs and USARTs
- I2C and SPI
- A/D converters, sampling, data smoothing
- Pulse Width Modulation (PWM)
- Reset functions
- Watchdog timers
- Display devices - LCDs, 7 segment LEDs, Graphics display devices
- Keypad and keyboard input
- mixed C and assembly language programming
Multitasking Paradigms
Polled loop
State driven polled loop
Interrupt driven
Hybrid interrupt and polled driven systems
Timer interrupt driven co-operative multi-tasking
Master-slave multi-processor systems
Simple RTOS implementations
Intended Audience
The course is aimed at experienced programmers, who have a good understanding of embedded systems hardware. It is designed for programmers and engineers who will be embarking on advanced projects involving many 1000's of lines of code.
The course covers both hardware and software aspects of developing embedded systems applications, and assumes a reasonable degree of understanding of the hardware and electronics aspects of developing embedded systems applications.
This is a tough and challenging course and is not suitable for "casual programmers". To get the most benefit from this course you must love and enjoy solving challenging problems of a programming nature and like working "close to the hardware".
|
Key Skills
- Implementing component oriented and object oriented code in C
- Realising Finite State Machine and Statechart designs in C
- Exploiting dynamic data structure programming techniques in embedded systems applications
- Developing appropriate multi-tasking solutions
- Writing device drivers and interrupt handlers
- Implementing multi-processor data acquisition and control applications
|
Practical Work
The course will cover use of the GNU and IAR compilers (and other compilers such as the Keil and Tasking compilers when required) The prinicpal target controllers will be higher end micro-controllers such as PIC18, Mitsubishi M16C, and the ARM and ARM9 micro-controllers. (Higher end 8051 and C167 microcontrollers when required)
The major practical activities
- Testing and debugging substantial programs
- Infrastructure development using modular (component and object oriented) programming techniques
- Implementing and modifying major algorithms for working with dynamic data structures that are used in embedded systems applications
- Implementing efficient memory management schemes
- Implementing device driver code for RS232
- Implementing multi-tasking applications directly
- Implementing Unix style pipes
- Implementing a multi processor I2C based master-slave application
- Implementing a multi processor CAN based master-slave application
|
发现Triangle MicroWorks, Inc公司不愧为专门写60870-5规约的公司,最近在看他们写的IEC 104 Master /Slave,写的确实精致。 回调函数,定时器用得很不错,层次,C中应用C++类的实现很清晰啊。
偷一下懒,上来发点信息。看C代码真是枯燥,歇会。
C中书写class风格,实现封装: strcut a{ ListMember memb; InterfaceStruct context; }
InterfaceStruct{ CallFuction A; CallFuction B; .... }
通讯的分层: physical, link, transmit,application
内存池的实现:动态分配,固定分配......
英语缩写:
http://www.newbie.org/reference/spellndx.html
英语常用表示法: X室 Room X X号 No. X X单元 Unit X X号楼 Building No. X X街 X Street X路 X Road X区 X District X县 X County X镇 X Town X市 X City X省 X Province 请注意:翻译人名、路名、街道名等,最好用拼音。
中文地址翻译范例:
宝山区示范新村37号403室 Room 403, No. 37, SiFang Residential Quarter, BaoShan District
虹口区西康南路125弄34号201室 Room 201, No. 34, Lane 125, XiKang Road(South), HongKou District 473004河南省南阳市中州路42号 李有财
Li Youcai Room 42 Zhongzhou Road, Nanyang City Henan Prov. China 473004 434000湖北省荆州市红苑大酒店 李有财
Li Youcai Hongyuan Hotel Jingzhou city Hubei Prov. China 434000 473000河南南阳市八一路272号特钢公司 李有财
Li Youcai Special Steel Corp. No. 272, Bayi Road, Nanyang City Henan Prov. China 473000 528400广东中山市东区亨达花园7栋702 李有财
Li Youcai Room 702, 7th Building Hengda Garden, East District Zhongshan, China 528400
361012福建省厦门市莲花五村龙昌里34号601室 李有财
Li Youcai Room 601, No. 34 Long Chang Li Xiamen, Fujian, China 361012
361004厦门公交总公司承诺办 李有财
Mr. Li Youcai Cheng Nuo Ban, Gong Jiao Zong Gong Si Xiamen, Fujian, China 361004 266042山东省青岛市开平路53号国棉四厂二宿舍1号楼2单元204户甲 李有财
Mr. Li Youcai NO. 204, A, Building NO. 1 The 2nd Dormitory of the NO. 4 State-owned Textile Factory 53 Kaiping Road, Qingdao, Shandong, China 266042
浅谈英文地址的批译
http://www.chinapostnews.com.cn/048/ywzn05.htm
进口国际信件,收件人地址的书写顺序是:门牌号码、街道名称、寄达城市、我国国名,同汉语的书写顺序正相反。为便于投递员投递,应按照汉语书写顺序,即我国国名、寄达城市、街道名称、门牌号码译成中文。下面谈谈批译方法: 一、寄达城市名的批译 我国城市有用英文等书写的,也有用汉语拼音书写的。例如“北京”英文写为“Peking”,汉语拼音写为“Beijing”二者虽然都是用拉丁字母,但拼读方法不同,前者是以音标相拼,而后者则是用声母和韵母相拼的,批译时要注意识别,以免错译。 二、街道地址及单位名称的批译 常见有英文书写、汉语拼音书写、英文和汉语拼音混合书写三种。1、英文书写的,例如Address:6 East Changan Avenue PeKing译为北京市东长安街6号;2、汉语拼音书写的,例如:105 niujie Beijing译为北京市牛街105号;3、英文、汉语拼音混合书写的,例如:NO.70 dong feng dong Rd.Guangzhou译为广州东风东路70号。 三、机关、企业等单位的批译 收件人为机关、企业等单位的,应先译收件人地址,再译单位名称。批译方法为: 1、按中文语序书写的要顺译。例如:SHANGHAI FOODSTUFFS IMP AND EXP CO.译为上海食品进出口公司; 2、以英文介词短语充当定语,一般位于被修饰的名词之后,译在该名词之前。例如:Civil Aviation Administration Of China译为中国民航局; 3、机关、企业单位的分支机构一般用英文“branch”(分部、分公司等)表示。例如:Beijing Electron Co. Ltd Xian branch译为北京电子有限公司西安分公司。(者明中)
-
name 姓名,名称
-
first name (欧美人姓名的第一个字)名
-
last name (欧美人放在名字后面)姓
-
Account Name 帐户名称
-
contact name 注册名称
-
Business Name 商业名称
-
Email address 电子邮件地址
-
Verify Email address 核实电子邮件地址(再输入一遍)
-
password 口令,密码
-
retype password 核实口令,密码(再输入一遍)
-
address 住址
-
city 城市
-
(Residents)state/province (居住的)州(美国),省(中国)
-
Country 国家
-
Zip or postal code 邮政编码
-
Phone Number 电话号码
-
Daytime phone 日间电话
-
Evening phone 夜间电话
-
Fax 传真
-
gender 性别
-
sign up ,signin 注册
-
Birth Date,Year of Birth 出生年月日
-
Age 年龄
-
Family status 家庭状况
-
Marital Status 婚姻状况
-
Religion 宗教信仰
-
Language 语言
-
Industry 产品
-
Job Category 工作类型
-
Employment status 雇佣状况
-
Education 教育状况
-
Referral Code 推荐识别代码
-
Referral No. 推荐识别号(介绍人号码)
-
Annual Income 年收入
-
How did you hear about us 你是如何知道我们的
-
Suite or apartment
-
Company Name 公司名称
-
Login,LOG ON 登录
-
Advertising banner(banner ads) 网页广告,在网页中显示的一个Gif格式的图片,通常是链接到另外一个网站,是网上广告的常见形式之一
-
Above the fold 明显位置,在网页的靠上方位置,当网页广告显示的时候,访问者不需要移动浏览器的滚动条就可以显示出来的位置
-
CPM(Cost Per thousand impression )千印象费用,网上广告产生每1000个广告印象(显示)数的费用
-
CPC(Cost Per thousand click )千点击费用,网上广告产生每1000个广告点击数的费用
-
Click Throughs 点击次数,网上广告被用户打开、浏览的次数
-
Click-through Rate 点击率,网上广告被点击的次数与被显示次数之比
-
Terms And Conditions 条件和协议(需要遵守的规则)
-
Organization 单位名称
-
Credit cards 信用卡(号码)
-
service 服务(内容)
-
sites 网站
-
register 登记,注册
-
membership 成员
-
Application Form 申请表格
-
Payee on Check 支票收款人
-
Ethnicity 种族
-
Social Security Number or TAXID(Tax ID Number) (美国)社会保险号,付税ID号
-
pay-per-click 每点击支付额
-
pay-per-impression 每印象(显示)支付额
-
application guidelines 申请指导
-
rules 规则
-
Minimum payment to send 支付时的最小数额
-
Site Title 网站标题
-
Site URL 网址
-
daily visitors 每日访问人数
-
Site Content 网站内容
-
Site Description 网站说明
-
Keywords 关键词
-
Make Checks Payable To 支票支付给谁
-
Contact Information 联系信息
-
Site Information 网站信息
-
Payment Information 付款信息
-
submit applications 提交申请
-
HTML code 超链接代码
-
Sponsor 赞助商
-
homepage district 网站类别
-
FAQ 疑问解答
-
user policy 用户规则
--------------------------------------------------------
. 34, Lane 125, XiKang Road(South)/XiKang Nan Lu, HongKou District
3.电话的表示法 中国的国家代码是86。区号前第一个零去掉,如上海021,要写成21 如86-21-45681230(Office);86-21-38796849(Home) 分机:86-21-45681230 extension 7396,extension可缩写为ext. 手机: 86-136xxxxxxxx
4.DOB是Date of Birth的缩写。
5.N/A 是什么意思? 指"not applicable"或者"not available"。
2)在地址中间可直接插入邮编。
我国的通行写法是将邮政编码另起一行,前面标上"邮编(Postal Code; Zip; P.C.)"两字,但英美各国的惯例却是将邮编直接写在州或城市的后面,如:美国:1120 Lincoln Street, Denver, CO 80203,USA(中译:美国科罗拉多州丹佛市林肯街第1120号,邮编:80203)注:CO是美国Colorado州的缩写,在跟邮政编码合用时,州名一般均以缩写形式出现,有关美国各州缩写详见3.2.2.3小节。
英国:60 Queen Victoria Street, London EC4N 4TW(中译:伦敦维多利亚女王大街60号,邮编:EC4N 4TW)由此,笔者提议,我们的地名如果也参照英美各国的方法,将邮编插入到地址中间,可以节省大量空间。
如:中国浙江省台州市黄椒路102号,邮编:318020à102 Huangjiao Road, Taizhou, Zhejiang 318020,China。
|
|
|
| 日 | 一 | 二 | 三 | 四 | 五 | 六 |
---|
31 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|
公告
我创建的群:21159852,欢迎大家加入!
( Scada,DCS,PLC,
RTU,VxWorks,
Linux,104,101,
DNP,MODBUS
......
)
导航
统计
- 随笔: 137
- 文章: 3
- 评论: 97
- 引用: 0
常用链接
留言簿(9)
随笔分类(141)
随笔档案(137)
文章分类(2)
文章档案(3)
相册
上传
最新随笔
搜索
积分与排名
最新评论
阅读排行榜
评论排行榜
|
|