eCos接口文档
eCos文件系统
int (*fo_getinfo) (struct CYG_FILE_TAG *fp, int key, char *buf, int len );
第 3 页 共 19 页
作者:tito
int (*fo_setinfo) (struct CYG_FILE_TAG *fp, int key, char *buf, int len ); };
const char *name, cyg_file *fte );
第 1 页 共 19 页
int (*chdir) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name, cyg_dir *dir_out );
不透明的句柄,它应该封装成在一个文件系统内对一个特定目录的引用。比如它可能是一个 指向描述目录的数据结构的指针或指向一个目录的路径的指针。
使用一个安装表入口指针和一个目录指针来指定当前目录。
__externC cyg_mtab_entry *cdir_mtab_entry; __externC cyg_dir cdir_dir;
int (*stat) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name, struct stat *buf);
int (*getinfo) ( cyg_mtab_entry *mte, cyg_dir dir, const char *name, int key, char *buf, int len );
/*一次可读写多个数据块,目前为 1 */
off_t
uio_offset; /* offset into file this uio corresponds to */
ECOS
© 2004 OTE S.p.A. The Copyright in this document belongs to OTE S.p.A. and no part of this document should be used or copied without their prior written permission.
Index
4bb-pr000245e_4 OTE general presentation
EEOS
EEOS内核分析报告(线程与调度部分)——工程实践总结计73班魏小亮971290一、EEOS概况Easy Embedded OS (EEOS )嵌入式操作系统是中科院计算所组织开发的开放源码的嵌入式操作系统。
该嵌入式操作系统重点支持p-Java,要求一方面小型化,一方面能复用Linux的驱动和其他模块。
EEOS的系统功能结构如下图所示:中科院在EEOS的开发上利用CYGNUS公司的RTOS(Real Time Operating System实时操作系统)eCos作为蓝本,并利用Utah大学的可重用OS工具OS-Kit作为开发基础,在此之上建立自己的驱动程序、API、Java虚拟机和相应软件开发工具和调试器,同时把Mini GUI纳入EEOS体系,最后形成了上图EEOS构架。
(该项目持续两三年,现在仍在发展。
)EEOS的目标是重点支持机顶盒产品的网络传输和多媒体浏览功能,同时具有非常灵活的可移植性。
二、内核总览[内核特点]我们研究的RTOS内核来自eCos实时内核。
作为EEOS的底层,eCos内核具有以下特征:1、实时性。
内核从调度器内部支持线程的实时特征,实现了真正意义上的实时性。
而通过Linux裁减的RTOS一般是在内核的外部添加一层外壳(Shell)来解决实时性的问题,并不能真正意义支持的实时功能。
2、可配置性。
内核的大小和功能非常灵活。
整个内核小于50K,核心源代码(C++程序)约17000行。
但实际应用的时候,配置非常灵活,eCos支持实时性/非实时性进程,BitMap/多级队列/彩票调度三种线程调度方式,单链表/多链表两种Alarm组织方式,固定大小内存/可变大小内存……用户可以根据实际应用生成自己需要的系统。
eCos 提供了可视化的系统配置工具,可以在windows上对系统(包括内核)进行各种配置。
3、支持uItron核心服务界面标准。
uItron是专门为实时系统制定的专用标准。
适用于代码尺寸限制严格的场合。
泛微ecology系统接口培训文档
版 本
文档简要信息:
文档主题(Title) 作者(Author) 审批者(To Be Approved By) 说明(Comments) 文件名称(File Name) 泛微协同办公应用平台 e-cology 接口培训文档.doc 泛微协同办公应用平台 e-cology 接口培训文档 陈文建
文档版本历史:
仅限阅读Biblioteka 请勿传播当您阅读本方案时,即表示您 同意不传播本方案的所有内容
泛微协同办公应用平台 e-cology 接口培训文档
Integration Manuals of Weaver e-cology™
Submitted By Weaver
泛微软件有限公司 中国上海浦东软件园陆家嘴分园 峨山路 91 弄 101 号 3 层 邮政编码:200127 电话:+86 21 50942228 传真:+86 21 50942278
序号 1. 2. 3. 4. 5. 日期 2011-9-30 版本 V1.0 变更说明 修改人 陈文建 注释
目录
版 本 .............................................................................................................................................. 2 第一部分 数据源配置............................................................................................................... 5 一. 接口说明...........................................
eCos用户指南之手动配置_翻译
要增加一个新包或者删除一个已存在的包应该用合适的工具,例如:
$ ecosconfig remove CYGPKG_LIBM
有 两 个 地 方 可 以 编 辑 。 配 置 有 个 名 字 , 这 里 是 eCos ; 有 一 个 描 述
跟着头段的段定义配置的整体。一个典型的例子是:
# ---- toplevel -------------------------------------------------------# This section defines the toplevel configuration object. The only # values that can be changed are the name of the configuration and # the description field. It is not possible to modify the target, # the template or the set of packages simply by editing the lines # below because these changes have wide-ranging effects. Instead # the appropriate tools should be used to make such modifications.
eCos User Guide(Chapter 28.manual Configuration)
eCos 用户指南之手动配置_翻译
翻译:JARI TOOL
1. 编辑一个 eCos 存档文件
eCos 配置信息存放在一个存档文件(savefile)中,典型的是 ecos.ecc, 这个文件既可以通过 GUI 界面配置工具产生,也可以通过命令行 ecosconfig 配 置工具产生。这个文件通常存在于编译树(build tree)的顶层。它是一个文本 文件,允许通过文本编辑器、其它程序或脚本来编辑各种配置选项,也可以在 GUI 配置工具里编辑。
Ecology系统接口指南---单点登录篇
Ecology系统集成接口指南—单点登录篇(V0.1)SUBMITED BY WEA VER1、集成登陆 (3)1.1使用说明 (3)1、集成登陆企业在信息化的过程中不可避免的会购置各种各样的业务系统,为了登陆不同的系统,用户需要频繁的打开不同的窗口、输入各自的帐号密码,费时费力。
但是通过ecology系统的自定义菜单功能和集成登陆接口,可以比较方便的实现登陆ecology系统后直接到达其他业务系统的功能,省去了繁琐的登陆过程。
1.1使用说明1.系统管理员维护待集成系统的登陆页面地址,如图所示:(图一,继承登陆菜单入口)(图二,点“集成登陆”菜单后的显示页面,我们可以通过“新建”来维护需要集成的系统。
本文以集成网易163邮箱为例。
注意:标识很重要,不能重复,在后面的步骤中会用到标识值)(图三,新建页面。
内网地址为局域网访问,外网地址为internet访问。
账号参数名和密码参数名通过查看该系统登录页面的html源码获得,如果登陆页面还有其他输入项的话则添加其他参数)页面说明标示:通过自定义菜单搭建其他系统入口时的唯一标志,下文会说明(不可重复)内网地址,外网地址:其他系统的访问地址,通常情况下保持一致就可以,某些特殊的客户同一个系统可能内网访问和外网访问用的是不同的地址,那么这里要分别设置帐号参数名:登陆其他系统的的用户名的参数名称,其值可以直接选择直接用ECOLOGY 的帐号登陆(如果其他系统的帐号和ECOLOGY帐号一致)或者由客户在使用的时候先输入一次帐号,以后只要在其他系统帐号改变的时候再输入就可以!密码参数名:登陆其他系统的的口令的参数名称,其值可以直接选择直接用ECOLOGY的密码登陆(如果其他系统的帐号和ECOLOGY密码一致)或者由客户在使用的时候先输入一次密码,以后只要在其他系统密码帐号改变的时候再输入就可以!其他参数:有些系统登陆的时候可能还需要一些其他的参数,在这里可以自由添加;参数名为实际登陆到其他系统的时候所需要的参数的名称,标签是客户在设置参数值时的一个说明,参数值可以从部门(ECOLOGY 中的部门ID),分部(ECOLOGY系统中的分部ID),固定值(如果选择固定值,必须在后面输入一个值),用户录入(客户在使用的时候先输入一次)中选择(图四,给待集成的系统添加左侧菜单)(图五)(图六,链接地址必须设为/interface/Entrance.jsp?id=待集成系统的标识值)(图七,这个菜单用来给系统用户维护集成系统的帐号信息。
eCos在基于ARM7硬件平台上的应用
ecos 在基于AR M 7硬件平台上的应用北京航空航天大学钱问发满庆丰耿春明摘要简单介绍e Cos 的体系结构!详细论述e Cos 的可配置机制的实现原理!重点介绍e Cos 在以AT 9l M 55800为核心的AR M 7硬件平台上的移植步骤!结合本系统简要介绍内核的配置方法"最后给出了基于e Cos 应用软件的编写方法"关键词e Cos 可配置机制AR M 7移植硬件平台e Cos (Embedded Confi g urabl e O p erati n g S y st e m >最初是由C yg nus Sol uti ons 公司为面向嵌入式领域而开发的源码公开\具有很强的可移植性和可配置性的9适合于深度嵌入式开发的实时操作系统o 现在e Cos 主要由e Cos-Centri c 公司和e Cos 开源社区共同开发维护o e Cos 的特性9特别是它的可配置性9能有效缩短嵌入式产品的开发周期并降低成本o1eCos 的体系结构及可配置性1.1eCos 体系结构e Cos 采用模块化设计9将不同功能的软件分成不同的组件9使其分别位于系统的不同层次o 这种层次结构实现了e Cos 的可配置性\可移植性\兼容性和可扩展性o 图l 是e Cos 系统的层次结构框图o 硬件抽象层(HAL >使其上层次结构不必关心具体的硬件结构9因此只需对HAL 进行修改就可以使整个e Cos 的应用移植到新的硬件平台上o图1eCos 的层次结构框图内核是e Cos 的一个核心组件9也是系统的一个可选组件9一些较为复杂的应用需要内核的支持o 内核提供了多个可供选择的调度算法9可以很好地支持多任务处理o e Cos 内核提供了一组丰富的同步源语9完全能满足各种嵌入式应用的需求o 内核还负责对中断和例外进行处理9它的中断滞后处理机制保证了系统的实时性o 此外9内核还具有内存分配机制和定时机制9并提供多线程GDB 调试支持o 内核为上层软件和应用软件提供了丰富的AP I 接口函数oRedBoot 是一个无内核的系统引导程序9是e Cos 的一个特殊应用o RedBoot 可以加载e Cos 应用程序9并提供D ebu g 支持9是开发e Cos 系统时非常有用的工具o 设备驱动程序负责对硬件设备进行控制和管理9并完成设备数据的读/写操作o 设备驱动程序自身也采用层次结构9上层驱动程序(相当于一个虚设备>可以调用下层驱动程序(物理设备>o 驱动程序为上层软件提供标准的AP I 函数9应用程序可以使用这些AP I 函数对设备进行访问oe Cos 包含的网络支持包支持完整的TCP /I P 网络协议栈o e Cos 还提供了标准库(ANS I C 库和数学库>\兼容层(POS I X 兼容和uI TRON 兼容>\文件系统等o 作为一种开放软件9e Cos 还可以很方便地容纳第三方软件o1.2可配置性原理e Cos 的一个主要特性就是其可配置特性o 可配置性最终是靠代码中的条件编译来完成的9条件编译是编程语言的特点9并不是e Cos 的原创o 当一个软件工程中的条件编译项的数目和复杂性达到一定程度时9其中有一些条件编译项就会因为存在逻辑上的依赖关系而使条件编译产生冲突o 而如何发现并有效解决这种冲突才是e Cos 可配置性的特点9如图Z 所示9其可配置特性的实现主要由图2可配置机制组件定义语言CDL (C o m p onent D efi n iti on L an g ua g e )\组件仓库ecos .db \图形配置工具confi g too l 三者共同完成O!1"组件定义语言CDL CDL 是e Cos 组件框架中的一个关键部分9e Cos 所有模块的程序包中都包含一个CDL 脚本对该包进行描述并提供配置选项O 以本系统中的串口驱动程序包为例9在该包对应的CDL 中定义了一个名为CYGPKG _I O _SER I AL _AR M _AT 9l 的cdl _p acka g e O 在这个cdl _p acka g e 中详细列出了该包的一些属性9如该包必须在工程已经包含了硬件抽象层包CYGPKG _HAL _AR M _AT 9l 和上层串口I O 包CYGPKG _I O _SER I AL 的情况下才会被使能O 另外9串口的一些常用特性9如波特率\设备名\缓冲区大小等配置选项也是必不可少的O 在一些复杂的CDL 中还会包含对该包中的源程序进行编译时的一些编译选项O 在进行配置的时候9该包还会产生一个包含了各个可配置参数数值的头文件O 当其他包使用由CYGPKG _I O _SER I AL _AR M _AT 9l 包提供的可配置参数时9这个新产生的头文件就会被相关的源文件通过#i ncl ude 语法包含O !2"组件仓库ecos .dbecos .db 是一个包含了所有可用程序包和配置模版的文本文件O 在该文件中9需要注册所有的CDL 包O 在注册时以p acka g e 关键字提供相应包的名称\CDL 脚本文件的文件路径以及对该包的一个简单描述O 在ecos .db 中还会以tar g et 关键字生成配置模版9从而提供目标平台的一些基本组成结构9使目标平台包括所需要的已经注册了的CDL 配置包O !3"图形配置工具confi 9t oo lconfi g t ool 是利用MFC 编写的W i ndo Ws 程序9是e Cos 可配置性的执行者9也可以理解成是CDL 脚本的解释器O 一方面它读取ecos .db 文件中的目标平台和已注册的配置包信息9根据配置包的路径找到相应的CDL 脚本9然后根据脚本中给出的属性向程序员提供图形化的配置信息;另一方面9它还可以接受用户的输入9包括单选按钮\复选框\下拉列表\文本输入等O 当用户保存一个配置时9confi g t ool 会根据CDL 语言的提示生成相应的头文件9也会将指定的头文件从配置包中复制到配置文件所在的工作目录O 无论是生成的头文件还是拷贝的头文件9都会在编译时被源程序所引用O 对于内核源程序9confi g t ool 又可以理解成编译器O 当用户的配置选项被保存并且对工程进行编译时9confi g t ool 会在后台调用真正的编译器GCC 9根据配置包CDL 中的编译选项控制GCC 对所有需要的内核源文件进行编译并生成库文件和对应的链接脚本O 当然confi g t ool 只是对e Cos 内核进行编译9用户的应用程序只需在编译时和由confi g t ool 编译生成的库文件进行链接就可以得到最终的可执行映像文件O2系统硬件框架本系统是一个以AR M 7为核心构成的测控系统9通过对传感器的脉冲信号进行处理而得到待测物料的流量9并通过控制给料器的给料速度达到流量控制的目的O 对于一个有实用价值的测控系统9必须具有人机交互\闭环控制\数据通信和存储等功能O 本课题所研制的流量测控系统的硬件框图如图S 所示O图3流量测控系统硬件框图图S 中9处理器为AR M 7内核的工业级芯片AT 9l M 558009其强大的功能保证了系统的实时性和稳定性的要求O Z MB 的F l ash SST S9VFl 60用来保存程序代码\测量所需的一些参数以及测量结果的简单统计信息O 在工业生产中9经常需要对一次测量中的数据进行历史再现9以便对一些事故或故障进行排查O 本系统通过采用l MB 的大容量RA M 来实现这一功能C 除了用来作为程序运行时的内存外9RA M 还用来实时保存每一时刻的测量数据O USB 总线的通信口用来和现场计算机进行通信9以实现一些更加完善的处理9如数据打印\结果分析\实时数据的硬盘保存等O 分辨率为SZ 0>Z 40的LCD 用来作为系统的显示终端配合4>5的键盘来完成系统的人机交互操作O 对变频器的控制和对温度信号的采集通过485总线完成O 6路脉冲信号是本系统测量功能的核心9通过对这6路脉冲进行处理可以得到流量相关的所有信息O 4~Z 0mA 电流信号用来控制给料系统9以实现闭环控制O 由于在工业环境中使用9对于一些长线连接必须采取隔离措施O 本系统对测量脉冲\485通信信号和4~Z 0mA 电流信号都采取了光电隔离措施O3eCos 在系统上的移植与应用软件编写3.1eCos 内核的移植由于e Cos 内核采用了可配置的模块化设计思想9因此只要修改硬件抽象层HAL的代码和CDL脚本并且在ecos.db中注册就可以应用于新的目标系统HAL又可以细分为S个层次①体系结构抽象层e Cos是可以应用于多种体系结构平台上的操作系统如AR M M I PS PO WERPC等在e Cos发布时已经将这些体系结构层的移植包一同发布了出来本系统的体系结构抽象层是AR M7体系结构抽象层②变体抽象层对于同一种体系结构的处理器各生产厂家会有不同的系列和型号如A t m el的AT9l系列Phili p s的LPC系列等虽然它们都采用AR M7体系结构但是不同的寄存器配置模式和中断处理方法也会影响到e Cos的移植本系统所使用的处理器AT9l M55800使用较为普遍在e Cos开源社区已经有移植好的AT9l M55800变体抽象层的代码和CDL 脚本只需作系统启动后对I O口的赋值情况等少许的改动即可完成对变体抽象层的移植③平台抽象层平台抽象层是对目标系统的整个硬件平台进行抽象包括平台的启动芯片配置定时I O寄存器及中断寄存等等系统需要进行的移植工作主要是平台抽象层的移植而平台抽象层中最重要的是F l ash驱动包和内存布局文件的移植主要的步骤为①安装AT9l M55800变体抽象层包从e Cos开源社区下载好的变体抽象层包在一个名为eb55的文件夹中在这个文件夹中还有cdl i ncl ude src等子文件夹分别包含了CDL脚本头文件源文件由于e Cos的软件包有严格的层次结构所以在安装软件包时应遵循这一结构以便于维护AT9l M55800属于AR M7的一个变体同AT9l系列的其他CP U处于同一层次所以变体抽象层软件包文件夹eb55的具体路径应为hal ar m at9l eb55接下来还应在ecos.db中注册变体抽象层包以p acka g e 关键字注册名为CYGPKG_HAL_AR M_AT9l_EB55的包这个名字必须和包中CDL文件hal_ar m_at9l_eb55.cdl中的所定义的包名完全一致在包名后面的花括号中登记hal_ar m_at9l_eb55.cdl文件的路径及文件名以及对该包的简单文字说明②编写F l ash的底层驱动软件包以便能够操作目标系统的F l ash存储器由于本系统在前期调试和代码固化时利用了RedBoot而RedBoot通过F l ash驱动程序操作目标F l ash所以必须先移植好F l ash驱动程序才能进行更进一步的开发工作首先需要编写底层驱动程序源文件不同的F l ash 的块空间大小以及写操作一般是不一样的本系统所用的F l ash SST S9VFl60是Z MB的l6位NOR F l ash共有5l Z0XZ00个块空间其块大小为4K0Xl000写操作的命令码符合J EDEC标准这些特点与A t m el公司AT49系列F l ash比较类似因此F l ash驱动程序可以从e Cos发布时自带的AT49系列F l ash的驱动程序修改得到最重要的地方是修改描述F l ash特性的结构体fl ash_dev_i n-f o_t变量中成员bl ock_siZe和bl ock_count的值使其分别为0Xl000和0XZ00接下来需要编写与F l ash底层驱动对应CDL脚本使配置工具confi g t ool能够正确配置编译F l ash驱动程序这个CDL文件完全可以参照AT49驱动包中的CDL 文件编写以cdl_p acka g e关键字定义名为CYGPKG_DEVS_F l ash_SST_S9VFl60的包在命令体中给出具体的配置参数由于底层驱动包必须结合上层驱动才能工作所以在命令体中用acti ve_if CYGPKG_I O_F l ash命令告诉confi g t ool必须在上层驱动包CYGPKG_I O_F l ash 已经被包含的情况下底层驱动包才会使能最后需要在ecos.db中注册底层驱动软件包具体做法和变体抽象层包的注册方法相同③修改内存布局文件使confi g t ool能够正确定位程序在系统存储器中的位置e Cos提供S种不同的运行方式即ROM方式RA M方式ROMRA M方式每种模式都有两个相应的布局文件如RA M方式的m lt_ar m_at9l_eb55_ra m.l di和m lt_ar m_at9l_eb55_ra m.h%.l di 和常见的AR M开发环境ADS中scatt ered链接方式下的%.scf文件的作用类似即用来对不同段分别指定不同的链接地址在%.l di中需要修改ME MORY和SECT I ONS两部分对于代码在RA M中运行的内核及应用程序需要根据系统RA M的实际情况修改内存布局文件中相关参数的值本系统具有l MB的RA M但有一半用来存放测量数据根据系统实际的硬件情况其起始地址为0X0Z000000大小为0X80000所以这个内存块定义为ra m OR I G I N=0X0Z000000LENGTH= 0X80000处理器内部集成了8KB SRA M其起始地址为0大小为0XZ000所以这个内存块定义为sra m OR I G I N =0X00000000LENGTH=0XZ000这样系统的ME MO-RY部分就由名为ra m和sra m的两个内存块构成系统比较重要的两处SECT I ONS部分的修改为SECT I ON_fi Xed_vect ors sra m0XZ0L MA_E@_V MA和SEC-T I ON_r o m_vect ors ra m0X0Z008000L MA_E@_V MA第一处表示fi Xed_vect ors段分配在从0XZ0开始的sra m中且L MA_E@_V MA指定其加载地址等于虚拟地址由于RedBoot运行时需要占用从0X0Z000000开始的一定空间的RA M所以第二处使程序代码从0X0Z008000开始的ra m中运行%.l di文件修改完毕后需要相应地修改%.h文件中的宏如#defi ne CYG ME M_REG I ON_ra m0X0Z000000④在组件仓库ecos.db中为以关键字t ar g et添加名为F l o W55的新目标平台在这个目标平台中还必须用关键字p acka g es 包括AR M 7体系结构层包和AT 9l M 55800变体抽象层包,同时为了实现调试还必须包括串口驱动包和F l ash 驱动包及其上层驱动包 除了这些被包含的软件包外,根据不同的选择confi g t ool 还会为目标平台包添加一些默认的包,如内核包 数学库包等 另外,还应加入一些对该平台的简单描述3.2内核的配置移植完成以后,一个最基本的目标平台就产生了 在confi g t ool 中可以看到T e m p l at es 菜单的硬件平台列表中新增了F l o W55目标平台模版,以def ault 方式打开这个模版 各个软件包的CDL 脚本中都给出了默认的配置值,有些值需要根据具体的应用要求重新配置 本系统一些重要的配置情况如下①由于系统线程数量较少<小于l 0>,所以选择效率更高的位图调度器B it m a p schedul er ,并将线程数nu mbers of p ri orit y l evels 限定为l 6,以提高任务切换的速度 当点击位图调度器的单选按钮时,confi g t ool 会检测到一个配置冲突 由于时间片轮转是默认使能的,而时间片轮转仅仅对应于多级队列调度器,所以出现配置冲突 Confi g t ool 会给出一个推荐的解决冲突的方法,即禁止时间片轮转,按照这个推荐的解决方法可以安全地解决这个冲突 这个地方可以充分体现出e Cos 强大的可配置性②由于配合RedBoot 一起使用,所以内核配置为RA M 启动方式 这样,系统上电后程序将由RedBoot 复制到RA M 中运行,以提高速度③系统的晶振频率为l6MH Z ,经PLL 倍频后为SZ MH Z ,所以需将C lock s p eed 配置为SZ000000~RTC 是系统的时钟节拍发生器,本系统的时钟节拍时间选为Z0m s ,所以也需要对RTC 相关项进行配置 具体参数为R eal-ti m e clock nu m erator 配置为Z000000000,R eal-ti m e clock deno m i nator 配置为l00,R eal-ti m e clock p eri od 配置为Z0000其余的配置选项使用默认的配置值即可 完成配置工作后,对内核进行编译可以产生内核库文件和链接脚本以及相关头文件 这些生成的文件再同应用程序一起编译 链接,生成最终的可执行映像文件图4应用软件结构3.3基于eCos 操作系统的应用软件的编写e Cos 是一个单进程多线程的操作系统,多个线程在宏观上可以认为是并发运行的,而且各线程之间耦合低,便于软件的编写和维护 针对这一特点,本系统的软件结构如图4所示本系统主要有两种程序运行方式,分别称为方式A 和方式B 方式A 中,硬件中断产生后,相应的I SR <I n-t err u p t S er vi ce Routi ne >程序运行,由于I SR 中是禁止中断的,所以在I SR 中只进行最简单的操作,I SR 退出后内核调用相应的DSR <D ef erred S er vi ce Routi ne > DSR 中中断是使能的,所以可以进行一些稍复杂的处理,如简单的数据运算 内核调用<发送信号量和邮箱等> 在得到相应的信号量或消息邮箱后,相应的线程进入就绪态被内核调度运行 本系统中对键盘的处理就是基于这种方式 按键产生硬件中断 I SR 执行,接着在DSR 中进行相应的运算得到具体的键值后以消息邮箱的方式通知并唤醒键盘处理线程,键盘处理线程在完成任务后进入休眠直到再次有按键发生而被唤醒 方式B 中,各线程只是周期性地被内核调度运行,如测量数据显示线程,在显示一次数据后调用延时函数进入休眠,直到延时完毕后再次进入就绪态被内核调用根据测控系统的实际情况,具体的线程编写如下 方式A 为流量计算线程 温度测量线程 键盘处理线程 USB 通信处理线程 方式B 为测量数据显示和曲线绘制线程 流量控制线程 初始标定线程4结论经过实践,本系统运行稳定,实时性能良好 由于e Cos 的强大可配置性使得系统的软硬件可维护性强,在进行硬件改动或应用要求改动后可方便地进行升级参考文献l M assa A J .嵌入式可配置实时操作系统e Cos 软件开发M .颜若麟,等译.北京 北京航空航天大学出版社,Z 006. Z 蒋句平.嵌入式可配置实时操作系统e Cos 开发与应用 M .北京 机械工业出版社,Z 004.S 王京起,等.嵌入式可配置实时操作系统e COS 技术及实现机制 M .北京 电子工业出版社,Z 005.4 马忠梅,等.AT 9l 系列AR M 核微控制器结构与开发 M .北京 北京航空航天大学出版社,Z 00S .5 Red Hat I nc &e Cos Centric L t d .e Cos U ser s Gui de .Z 00S .6 聂慧萍.新型固体科里奥利流量计测控系统研究 D .北京 北京航空航天大学,Z 005.钱问发<硕士研究生> 主要研究方向为工业测控网络与嵌入式系统应用;满庆丰<教授>.耿春明<副教授> 主要研究方向为工业测控网络与现场总线.嵌入式系统应用等<收稿日期:Z 006-l l-l 5>。
ECos系统驱动程序的编写
ECos系统驱动程序的编写介绍Ecos的驱动程序分为两个部分:1./dev目录下,该部分程序同硬件相关2./io目录下,该部分程序同系统相关在IO包中的元件,可以增加当一个驱动程序被认为是静止的时候,她们必须通过一个透明的“handle”来访问。
每一个设备都有一个独特的名字,函数cyg_io_lookup()被用来寻找设备名字和设备号的对应。
而且,cyg_io_lookup()函数为设备驱动程序在使用该设备时进行设备的初始化提供了方便。
所有设备都有一个名字,如:/dev/console、/dev/serial0,等等所有的驱动程序,在Ecos中都是有c写成的设备驱动程序的基本功能是提供对设备的接收和发送数据。
而详细的实现方法有设备类自己实现。
例如:向块设备读写数据同向串口读写数据不同附加的函数为操作设备或硬件设备的状态提供了接口。
不同的设备有不同的附加函数。
Ecos的设备模块支持分层(layering),也就是说,一个设备驱动程序可以创建在另一个设备驱动程序上。
例如:tty就建立在简单的串口驱动上。
上层模块相对底层模块而言,有更好的可塑性,可以增加更多的功能和特征。
如tty设备驱动还提供了队列缓冲和编辑。
有些设备驱动还提供了它们所依赖的下一级驱动的特性。
Tty设备允许通过get/set config 调用来操作实际串口的的信息,并下达到实际串口。
用户API所有相关函数,除了cyg_io_lookup()以外,都需要io句柄。
所有函数都返回一个Cyg_ErrNo值。
若一个错误发生时,该值为负数,且其绝对值代表相应的错误号。
该值在cyg/error/codes.h有定义。
正确返回ENOERR。
任何的函数参数都为指针。
它允许驱动传递效率高。
最应引起注意的是参数length,他将传递给读写函数。
他包含有一个期待返回的数据长度而返回实际长度。
Cyg_ErrNo cyg_io_lookup( const char *name, cyg_io_handle_t *handle )上述函数将设备名字转换成句柄。
ecos技术白皮书
ECOS技术白皮书上海商派网络科技有限公司目录背景 (2)目标客户 (2)基础架构 (2)技术特性 (2)1.业务与底层实现技术分离,增加灵活性 (2)2.强大的业务集成能力,消除信息孤岛 (2)3.前后端特性支持兼备,降低企业运营成本 (2)4.安全性 (2)5.可扩展性 (2)6.可维护性 (2)7.多语言支持 (2)8.URL路由功能支持下高品质搜索引擎优化 (2)9.多级智能缓存机制 (2)应用案例 (2)技术指标 (2)背景随着电子商务近年来突飞猛进的发展,相关的技术也在不断的发展与成熟。
对于一个完整的B2C电子商务解决方案,应同时包括前端和后端两个部分,前端即销售平台,即B2C网站,后端则包括呼叫中心、电商订单处理中心、电商仓库管理系统等部分。
作为中国电子商务解决方案的先行者,商派网络通过八年的实践,积累了大量的电商前后端的架构模式和中间件,正是通过这些积累,保证了商派网络在国内电商业界的领先地位。
从ShopEx4。
8系列开始,商派网络一直在探索一种行之有效的方式,既能够降低研发成本和研发工作的复杂性,又能够快速地跟进业务的发展,在这种方式下,可以省去很多基础性的研发工作,复用八年来获得的经验,同时使研发周期大幅缩短,提高研发效率。
自2009年立项开始,商派网络投入了30余名工程师,用将近一年的时间打造出了开源的电子商务业务架构平台,并将其命名为ECOS,寓意电子商务操作系统,该系统借鉴OSGI体系,为实现复杂的电子商务应用提供了一个基础的应用化开发和运维框架,其中封装了大量的电子商务相关、网站优化相关的应用与组件,它同时为系统间互联提供底层服务。
商派网络的新一代B2C系统、电商订单处理中心OME等前后端系统都采用了ECOS为基础进行架构,实践表明,ECOS有效地降低了开发工作量,使开发出的软件即使在投入运行后,也能通过编写应用的方式快速地跟进业务的发展。
目标客户ECOS适合具备以下特征的几类从事电子商务的客户:1.业务在高速的发展过程中,需要不断地根据市场情况进行调整,对系统变更的响应及时性要求很高;2.希望自己的信息系统能较好进行整合,系统间配合良好,同时能快速的接入各大集市型交易平台,如淘宝等;3.希望降低自己的开发成本,同时吸取业内的成功经验;4.希望信息化统一规划,实现统一业务架构和开发平台;5.希望随着业务的发展,系统具备扩展的能力;基础架构ECOS是Rails风格的PHP快速开发框架,EC意味着电子商务,OS意味着操作系统,操作平台。
泛微Ecology外部门户接口说明
Ecology门户接口说明SUBMITTED BY WEA VER SOFTWARE 仅限阅读请勿传播当您阅读本方案时,即表示您同意不传播本方案的所有内容文档版本变更日期版本更改章节更改说明修改人序号1 2007-2-1 V1.0 无新文件曾东平2 2010-3-9 V1.1 加入了参数HostUrl 曾东科目录一、概述: (4)二、接口 (4)1.新闻列表 (4)2.文档内容 (5)3.部分样例 (6)一、概述:此文档仅提供用户从外网访问Ecology 时所需的接口,标准和部分样例,如果有新的接口的产生将会更新这个文件 实现原理: 相关的参数XML (RSS )数据二、接口 1.新闻列表参数名称 解释 是否必填 默认值 npid 新闻页的ID是 ni 是否仅得到新闻页信息(0:不是 1:是) 否 0 ps 返回的条数 否 5 pi 返回的当前页数否 1 st 排序类型(0:升序 1:降序)否1 hostUrlOa 的访问地址 如: 是说明:1) 访问方式: http://oa 服务器域名/join/NewsList.jsp?npid=新闻页的ID (后面还可以跟其它参数)2) npid 是必填项,它指的是在Ecology 系统中新闻设置时的新闻页的ID<?xml version="1.0" encoding="gb2312" ?> <rss version="2.0"> <channel><title><![CDATA[ 泛微外部门户访问新闻页]]></title> 表示新闻页名称<description><![CDATA[ 外部访问新闻页]]> </description> 表此新闻页的描述 <language>zh-cn</language><generator><![CDA TA[ Ecology System]]></generator> <count>16</count> 表此新闻页中的记录总数外部网站 OA 系统</channel><item> 以下表示的是第一条新闻的数据<newsid>100020</newsid> 新闻ID<title><![CDATA[ 测试用外部新闻]]></title> 新闻标题<link><![CDATA[ /join/News.jsp?nid=100020]]></link> 新闻链接<pubDate><![CDA TA[ 20061207 10:13:51]]> </pubDate> 新闻的发布日期<description><![CDATA[ 测试用外部新闻]]></description> 新闻的摘要说明<author><![CDA TA[ 方观生]]></author> 新闻的创建者</item><item> 以下是第2到n条新闻...</item></rss>4)用户在得到此XML文件后就可以根据文件内标红的解释来解析XML代码,然后可以组织成所需要的数据格式5)错误信息:没有指定新闻页或新闻页不能为负数此新闻页不是外部新闻不能通过此接口浏览6)对新闻的排序是以最后修改日期与最后修改时间进行排序的2.文档内容参数名称解释是否必填默认值nid 新闻ID 是hostUrl Oa的访问地址如: 是说明:1)访问方式: http://oa服务器域名/join/News.jsp?nid=新闻ID<?xml version="1.0" encoding="gb2312" ?><rss version="2.0"><channel><title><![CDATA[]]></title><description><![CDATA[]]></description><language>zhcn</language><generator><![CDA TA[ Ecology System]]></generator></channel><item><newsid>100020</newsid><title><![CDATA[ 测试用外部新闻]]></title><link><![CDATA[ /join/News.jsp?nid=100020]]></link><pubDate><![CDA TA[ 20061207 10:13:51]]></pubDate><description> <![CDA TA[ 测试用外部新闻]]></description><content><![CDATA[<!DOCTYPE HTML PUBLIC "//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META httpequiv=ContentType content="text/html; charset=unicode"><META content="MSHTML 6.00.2900.2995" name=GENERATOR></HEAD><BODY><P><FONT face=宋体><IMG alt=imgCompetencyWeb.jpg src="/weaver/weaver.homepage.HomepageCreateImage?fileid=100078"></FONT></P><P><FONT face=宋体>继续努力</FONT></P></BODY></HTML>]]></content><author><![CDA TA[ 方观生]]></author></item></rss>3)用户在得到此XML文件后就可以根据文件内标红的解释来解析XML代码,可以组织成所需要的数据格式。
ecosystem移植简介
一、修改内存布局文件。
以ROM方式为例,修改mlt_arm_****_rom.ldi和mlt_arm_****_rom.h。
根据RAM 和ROM的实际布局,修改起始地址和大小,特别地,在*.ldi里面需要修改MEMORY 和SECTIONS两部分。
其中,SECTION修改部分:SECTION_rom_vectors(rom,0x0,LMA_EQ_VMA),表示从ROM的0x0开始铺陈向量表(此处亦是映象文件的开始部分),LMA_EQ_VMA可以解释为该内存段不需要在程序运行后重新分配加载(虚拟内存域等于加载内存域);SECTION_fixed_vectors (ram, 0x81000400, LMA_EQ_VMA),表示fixed_vectors 段铺陈在从0x81000400开始的地址(属于外部RAM)。
二、修改vectors.S:1、设置BCFG,参照周立功程序添加到硬件初始化之前;2、在PLATFORM_SETUP1中对PLL、系统各部分的时钟(实质上设置的是分频器)、remap方式(此处由于从内部flash开始启动,因此不需要remap,将MEMMAP设为1)、存储器加速模块进行设置。
(所有设置参数参照周立功例程)3、如果采用img调试方式,将vectors.S中的将.rom_data拷贝到.ram_data的代码注释掉。
4、由于是从0x0开始下载文件,所以将所有从0地址开始的数据段内容拷贝到文件下载偏移地址(对0地址而言)的代码注释掉。
三、添加flash驱动包:采用ecos自带的SST39VFXXX驱动,添加/修改几个cdl文件并且在configtool 里面进行配置,具体做法是在/dev/flash/arm下面添加一个smartARM的文件夹,里面写入arm_smartARM_flash.c以及cdl等文件(可以参考使用SST39VFXXX的其他目标板的.c文件和cdl文件),按照板上的flash型号,define CYGPKG_DEVS_FLASH_SST_39VF1601,并且配置基地址等参数;最后将cyg/io/flash_sst_39vfxxx.inl包含进去。
NIOS2和eCos的串口通信程序开发
现在 nof u i o m论 坛上的 e o sr C s已经 : l 发到 5 1 . 版了。 完 成 eo C s的安装 后 ,就 可以配 置 e o 『,打开 “ C s_ 开始
一
信 程序 是 容 易实 现 的 ,但 是程 序 要保 存 一 些 数据 到 F A H LS 中 ,No ei r es i I dv edi r 虽然 提供 了 H sI c v AL和 C库 ,但 是 没有 提供 叮读写 的文件 系统 ,所 以笔 者选 了提供 文件 系统支 持的 e o 嵌入式 操作系统来实现所 需要 的功 能 。那 么 e o 怎么移 Cs Cs 植到 n s 处 理器上 ,又怎样在这样 一个平 台 j开发串 口通信 iI oI 二 程序 呢!笔者把设计 的过程分为三部分 :硬件平 台设计 ,eo Cs 库 的编译 ,串口通信程序开发和调试。
_ _
一
一
c ou = c ou
参数 n s _. t是 设计应用 工程 时生 成的文件 ,c u是使 i icpf oi p
用 Sp ule 定 制接 口时添 加 n s ocB i r d i 2处理 器 的名字 。接着 出 o
现 如 图 1 示 的 图形 配 置 界 面 。 所
二 二、硬 件平台
维普资讯
NO 2 ∞ 审口堋僖锂髑 iS 懿 l 期 e C
黄 学仁
摘
要
讲 述 了 N O 2和 e o 的 嵌入 式应 用软件 的开 发过 程 ,并详 细 分析 了 串口通信 IS Cs
程序 的设 计 。 关键 词 no2 C s i ,eo ,嵌入 式 开发 , 串口通信 s
一
、
概 述
N O I处理器支持片上调 试 ,通过 JA ISI T G调试 通道 ,可以
ecology oa webservice接口
webServic接口开发:
WebService接口在本地创建jar包
1.首先在eclipse上创建java web项目名称为weaverdeve
一、使用eclipse向导生成Web Service客户端
2.Service definition的地址,就是webserver服务器端的地址,地址为http://192.168.6.50/services/
3.
4.点击完成之后生成对应的项目,项目格式如
5.为当前项目生成jar包,右键项目Export ->Export 搜索jar,点击jar file 点击next,呈现下二图,点击browse,为jar填写名称,点击确定,返回到下图二界面,点击finish完成导入jar包。
6.测试webservice过程,首先新建java项目,需要的jar如下所示
Java测试代码如下
1.webservice地址为:
b.运行结果,返回requestid值,表明成功。
c.oa端测试地址为http://192.168.6.50,未操作之前显示如下
d.操作之后结果
二、往oa上上传附件
1.地址为
2.操作如上生成jar,往oa上传附件。
ESU 04908-07064 ECoSLink 控制器连接器安装手册说明书
1st Edition, July 2009Translated from P/N 04908-07064PLEASE NOTE:This document has been prepared by translating the german version of the Manual using Google Translate. It has not been authorised or approved by ESU. If you use this translation, it isentirely at your own risk.1. Declaration of ConformityWe, ESU electronic solutions ulm GmbH &Co KG, Industriestraße 5, D-89081 Ulm,declare in sole responsibility that the productTo which this declaration relates is in conformity with the following standards:EN 71 1-3: 1988 / 6: 1994 - EN 50088: 1996- EN 55014, Part 1 + Part 2: 1993EN 61000-3-2: 1995 - EN 60742: 1995 - EN 61558-2-7: 1998Under the provisions of Directive88/378/EEC -89/336/EEC -73/23/EEC2. WEEE DeclarationDisposal of old electrical and electronic equipment (valid in the European Union and other European countries with separate collection systems)This symbol on the product, its packaging or its literature indicates that this product may not be treated as household waste.Instead, take this product to the appropriate disposal point for recycling of electrical and electronic equipment. If the product is disposed of correctly, you will help prevent negative effects to the environment and health that could be caused by improper disposal. The recycling of materials will preserve our natural resources. For more information about recycling this product, please contact your local Citizen's Advice Bureau, your household waste disposal service or the shop where you purchased this product.3. Important - Please read this firstCongratulations on your purchase of a ESU ECoSlink terminal. This manual will guide you step by step through the possibilities offered by, and the use of the device in detail.Please read this manual thouroughly before installing or using the device.Although the board is very robust, an incorrect connection may result in the destruction of the ECoSLink Terminal.Avoid "costly" experiments.• 4. ECoSLink Bus StructureThe ECoSLink Bus is based on the CAN (Controller Area Network) protocol. This was originally designed for use in the automobile industry where robustness and the capacity to handle high data flow rates is essential. CAN allows all data to be transmitted at 250 kbit/second over the ECoSLink bus. The ECoSLink cable carries both data as well as the power supply for the ECoSLink Terminals themselves.An ECoSLink Bus can be up to 100metres long. All units must be wired up in series,with the first Terminal only being connected to your Master Controller. The last module in the chain will automatically configure itself to terminate the Bus electronically. This prevents false signals being generated within the Bus.ECoSLink Terminals automatically recognise the two different types of equipment that can be connected to them, namely:• Bus Connection Modules (such as the ECoSLink Terminal or Märklin® Terminal)• Equipment using the Bus (such as hand throttles, boosters (e.g. ECoSBoost), and feedback modules (e,g, ECoSDetector or EcoSDetector Standard).Bus Connection Modules extend the bus and add extra connection points. The first Bus Connection Module must always be connected directly to the Master Controller. Each additional Module must be connected to the previous Module,forming a single chain of Modules.By using different connectors and appropriate cables incorrect wiring is not possible.Each ECoSLink Terminal has an input and an output socket for the ECoSLink Bus itself. A 9-pin plug connector is used for the input socket and a 9-pin mini-DIN connector for the output socket. The ECoS and CS1 each has only one output jack (labeled "ECoSLink Extend"), as this is always the beginning of the bus.Equipment such as hand throttles, boosters etc, are connected to the bus via ECoSLink 7-pin mini-DIN connectors. These connectors are also installed on the ECoS and CS1. The connection cable between the ECoS or CS1 and the first Terminal must not exceed 1.8m (6 feet).These cables are virtually "stubs" fromthe main bus terminal.The cable connecting the first Terminal to the Master Controller must not be lengthened or it will upset the signal timing. If the cable supplied with equipment to be connected to the bus is too short, the bus must be extended with extra ECoSLink Terminal modules as necessary.5. OverviewIf your layout is growing and you want to connect additional ECoSBoost boosters or ECoSDetector feedback modules or more than 3 Märklin ® mobile station 60652 hand controllers, then you need one or more ECoSLink terminals. The ECoSLink module is intended for permanent installation on your layout and connection to the ECoSLink Extend socket on your ECoS or Märklin ® central station connected. Each Terminal has two ECoSLink connection sockets on the front and four sockets on the back for connecting devices. The Terminals themselves are either powered through the ECoSLink bus by the ECoS or CS1 or via an (optional) external power supply. The individual ECoSLink Terminals are connected togetherwith standard computer Cat 5e ethernet network cables (sometimes called"patch cable"with RJ45 connectors). Thus, a total run of up to 100m is possible with the appropriate cabling.Making the correct connections is made easier by the use of different connector types. Wrong connections are almost impossible.a) ECoSLink connectors b) Bus input RJ45 socket c) Bus input white pin plug d) Bus output RJ45 sockete) Bus output mini-DIN connector f) DIP Switchesg) External power supply input h) Status LEDBefore making any connections the front panel must first be fitted to the circuit board. To do this, first remove the two fixing screws as arrowed. Then align the front panel to the circuit board and fix the panel to the board with the two screws provided in the holes as indicated on Figure 4. To avoid damage to the retaining bushes take care that you do notovertighten the screws.Make sure that you have the circuit board the right way round. The connectors must be on the underside of the board when the printing on the faceplate is the right way up.The items using the bus are connected to the ECoSLink Connect sockets. ECoSLink Connect sockets can be recognized by their 7-pin mini-DIN connector Devices suitable for connection are, for example:• ECoSBoost boosters• ECoSDetector and ECoSDetector Standard feedback modules• Märklin ® mobile station 60651 or 60652 (An adapter cable for the mobile stations is required which can be obtained from Maerklin spares, item number 610479)• ESU Navigator Base Units• Bachmann Dynamis Pro Box UnitsAs shown in Figure 3 the ECoSLink Terminal has two sockets on the front and four sockets at the rear. The front sockets are primarily intended for hand throttles or controllers. The hand controller can always be unplugged and plugged in at another location as the ECoSLink bus is "hot plug" capable. The rear jacks are provided for Booster and feedback modules.Only one Bus input and one Bus output can be used at any one time on a Terminal. The signals are routed through each Terminal in turn, as described in Section 4. It is possible to use different connections at each end of the cable connecting two ECoSLink Terminals together.Each ECoSLink Terminal can only have one bus input and one bus output in use at any one time.To make the wiring as flexible as possible, use computer ethernet network cable with 8-pin RJ45 connectors. These pre-assembled cables are available in all lengths from computer shops. They need to be fully wired (with eight wires in the cable). We recommend using CAT5 cable or better.NevercablesLoconet ®, XPressNet ®, s88-N which also use 8-pin Ethernet cable. Never connect these The first ECoSLink Terminal must be connected to the Master Controller with the supplied supplied for this purpose. An second Terminal can be connected as required to the first ECoSLinkTerminal.ECoSLink cables carry both the data signals and a power supply from the Master Controller. The ECoS/CS1 can deliver up to 1A at 12V to the connected devices. Once the ECoSLink bus is activated by turning on the power, the status LEDs light up.The LED shows only the general bus status. It does not show when data is being transmitted.6. Suitable Master ControllersThe ECoSLink Terminal is suitable for connection to the following Master Controllers:• ESU ECoS 50000 with monochrome display• ESU ECoS 50200 with colour display• Märklin® central station 60212 withMärklin® Firmware• Märklin® central station 60212 with ESU Firmware 3.0.0. "Reloaded“• Märklin® central station 60213 with colour displayUse your ECoSLink Terminal only with a suitable Master Controlles. A list of ESU retailers is available on our Web site.7. Connection to the ControllerThe first ECoSLink Terminal must be connected as shown in Figure 5 to the Master Controller with the 0.9m longcable supplied with the Terminal.ECoSLinkExtendSocket WhitePin Plug• First insert the white plug on the cable into the white socket on the Terminal.Ensure the plug is the right way round.The cable can only be used one way round.• Next, insert the mini-Din plug into the ECoSLink Extend socket on the Master Controller, again making sure that you have properly aligned the pins on the plug with the holes in the socket.Do not use excessive force to insert the plug. The plug only fits one way into the socket. If the plug does not go in easily,then the pins on the plug are not properly aligned with the socket. Make sure any external power to the ECoSLink Terminal is turned off, and that the power supply to your Master Controller is also turned off.8. Adding More ECoSLink TerminalsIf you need to to add more ECoSLink Terminals, connect each new one to the one you added most recently. In this way a chain of modules is built up.If you want to connect two Terminals that are far apart, use normal ethernet network cable with RJ45 connectors.short damage cablesIf the distance between the Terminals that you want to connect is short, use the cable supplied with the ECoSLink Terminal.• Connect one end of the cable to the bus output RJ45 socket ofthe first ECoSLink Terminal, see Figure 3, item d, and then,• Connect the other end of the cable to the bus input RJ45 socket of the second ECoSLink Terminal, see Figure 3, item b.Take great care not to confuse the input and output sockets.Never connect two outputs or two inputs together. This could result in damage to your Master Controller!Do not mix ECoSLink cables with other cables used for model railways. 8-pin Ethernet cable is also used to connect up Loconet ®, XPressNet ®, s88-N systems.Never connect these systems directly to the ECoSLink bus as this would cause a• Insert the Mini-DIN plug into the mini-DIN outlet socket on the first ECoSLink Terminal Module, aligning it correctly.• Then push the white trailing socket onto the white pin plug on the second module.Make sure that you have the socket connector the right way round as it can only be inserted one way one way on to the pin plug.9. Adding an External Power SupplyFor larger layouts, the number of hand throttles, boosters and feedback modules may require more power than the ECoS/CS1 can supply. Typical power An ESU ECoS can typically provide about 1A current. It will therefore be necessary only very rarely to add an external power supply unit (PSU) for the ECoSLink bus.If you do use an external PSU, then mostof the usual model railway PSUs, whether DC or AC, can be used provided the following requirements are met:• DC: Voltage Range 16-22 Volts DC • AC: Voltage Range 14-16 Volts AC • Current: Minimum Output of 1 AmpDo not use a traditional 12 Volt DC output PSU, the voltage is too low.The PSU must only be connected to the ECoSLink Terminal!The operating temperature of the ECoSLink Terminal will depend on the output voltage of the PSU. The higher the voltage, the warmer the Terminal will become during use.The PSU is connected to the external power supply input, see Figure 3, item g,on the ECoSLink Terminal. Removable terminal blocks make wiring easier. The polarity of the connecting wires does not matter. Once the PSU is turned on, this is recognised by the Terminal. The remaining bus sections are then supplied with power from this PSU. All devices on the bus BEFORE the Terminal connected to the PSU are still supplied by the Master Controller. Figure 8 shows this relationship.The status LEDs light up on the ECoSLink Terminals only when the bus has been turned on by the Master Controller.10. DIP Switch SettingsOccasionally it is necessary to change the settings of the DIP Switch on an ECoSLink Terminal. The factory default settings are:1 Off/Aus 2 Off/Aus 3 On/An 4 On/An 5 On/An6 On/AnThe necessary controllines for external ECoSBoost boosters are built into the ECoSLink bus cable. Very long cable lengths can sometimes cause problems if many ECoSBoost units are used. We recommend that all ECoSBoost units are connected within the first 15-25m (49-82feet) of the ECoSLlink bus. The start of the bus is always the Master Controller itself.The Booster control lines are terminated separately with DIP switches 1 to 4 thus:1 2 3 4 ResultOn On Off Off Booster control lines areterminated. Do not attach a booster after this point in the chain as control lines have been disconnected at this ECoSLink Terminal.Off Off On On Booster control lines arenot terminated. You can connect more boosters to ECoSLink Terminals after this one as the control lines are still connected through.11. Installing ECoSLink TerminalsThe ECoSLink Terminal should be installed on the fascia panel of your layout. The maximum thickness of the fascia must not exceed 20mm. To help you install the EcoSLink Terminal a mounting template has been provided on page 9. Cut out a rectangular hole 63mm x 40mm as marked on the template and drill four holes in the positions shown on the mounting template.The ECoSLink Terminal must be installed so that the circuit board does not touch any wood panels or come into contact with exposed wires or metallic objects below the baseboard.14. NotesCongratulations on your purchase of this ESU product. This high tech quality product hasbeen manufactured according to the latest production processes and has passed stringent quality checks and tests.Therefore ESU electronic solutions ulm GmbH & Co KG offers you in addition to the national warranty rights as governed by law, a specialWarranty conditions:• This warranty is valid for all ESU products, purchased from an ESU dealer.• Any repair or replacement under this warranty is subject to proof of purchase. The warranty certificate completed by your ESU dealer together with the receipt serve as the proof of purchase. We recommend that you keep the receipt together with the certificate.• In the event of a warranty claim, please fill in the goods return note on page 9 and return it with the item for repairScope of warranty / exemptions:The warranty of ESU electronic solutions ulm GmbH & Co KG comprises the free of charge repair or replacement of any faulty part due to faulty design, manufacturing or material or transport damage.Any futher claims are excluded.This warranty expires:1. In case of failure due to wear and tear.2. If ESU products have been modified with parts not approved by ESU.3. If parts have been altered, especially missing shrink sleeves, or wires soldered directly to the decoder.4. If the product is used for a different purpose to the one intended by the manufacturer.5. If recommendations issued by ESU electronic solutions ulm GmbH & Co. KG are not adhered to.For reasons of liability no examination or repairs can be carried out on parts built into locos or coaches.The warranty period will not be extended due to repairs or replacement.You may submit your claim by either returning the faulty product to your dealer or by shipping it directly to ESU electronic solutions ulm GmbH & Co KG together with the warranty certificate, the receipt and a detailed description of the fault to:11Translated from ESU P/N 04908-07064 by Keith Montgomery, August 2011。
ECOS基础
ECOS介绍
[ECOS introduce]
app 机制
[app mechanism]
目录结构
[directory structure]
整体流程图
[Overall flow chart]
安装相关
[install]
dev开发者工具
[ dev Developer Tools]
1、ECOS介绍
开发背景
·电子商务新技术和新需求 ·代码粘合度过高 ·程序员专注于代码实现
1、ECOS介绍
ECOS介绍
ECOS全称:电子商务操作框架。类似ROR(ruby on rails) 框架。开发模式是基于ORM(Object/Relation Mapping)。
ECOS基于OSGI模型,我们称之为APP机制,所有业务需 求都可以转化称一个相对独立较小的APP动态的集成到整 个ECOS中,使得整个业务系统随需而建,随需而扩。
• 使用开发者工具(维护) 站点
应用中心
站点下的维护一般用在模板 挂件的修改
xml,dbschema文件修改后可以使用此 维护
The End Thanks
‘/setup’ => array(‘app’=>‘setup’),
//安装目录
‘/admin’=> array(‘app’=>‘desktop’),
//后台目录
‘/’=> array(‘app’=>‘site’), //前台目录,'/'代表路由路径, value:‘site'代表, 提供路由类的app
配置文件-config.php
#修改kvstore存储引擎—实例为mongodb #具体操纵参考文档:/read.php?tid=12 define('KVSTORE_STORAGE', 'base_kvstore_mongodb'); #开启mongodb define('MONGODB_SERVER_CONFIG', '[url]mongodb://192.168.100.5:27017'[/url]); #mongodb的地址和端口
eCos系统
eCos嵌入式系統的安裝與實作步驟 嵌入式系統的安裝與實作步驟(cont.) 嵌入式系統的安裝與實作步驟
– 接下來選擇選擇platform和 RedBoot template, 之後就可以開始建立Redboot
嵌入式系統設計~以ARM處理器為 基礎之SOC平台
嵌入式系統設計~以ARM處理器為 基礎之SOC平台
eCos vs. uClinux
• code size :
– 所產生出最小的uClinux大約為600Kbytes – eCos大約為60Kbytes
• 發展新的嵌入式系統之BSP
– eCos提供強而有力的packages管理工具 – uClinux要由經驗老道的人將BSP加入uClinux中
• 下圖為layer of eCos packages
嵌入式系統設計~以ARM處理器為 基礎之SOC平台
eCos基本介紹 基本介紹(cont.) 基本介紹
嵌入式系統設計~以ARM處理器為 基礎之SOC平台
eCos基本介紹 基本介紹(cont.) 基本介紹
• eCos的“可組態(Configurable)”:
• 實例三: 實例三:
– 同樣以 ARM+eCos的軟硬體平台還有I-JAM的I-Jam Multimedia L.L.C系列的播放器,像IIJ-888 DVD/MP3 Player、Win-Jam II 等。
• 實例四: 實例四:
– 像本土英業達公司所出產的OKWAP手機系列,其產品就是以功能 豐富、強大著稱,在市場上佔有很高的比率,OKWAP手機所使用 的嵌入式作業系統即是eCos
嵌入式系統設計~以ARM處理器為 基礎之SOC平台
基于ECOS的串口无线网络服务器的设计
无 线 电 ; 低 功 耗 和 能 源 概 况 ; 进 的服 务 质 量 , 全 功 能 1eWMM Q S和 li E , A WP 2 C X 4 V I 先 进 的 能 源 管 超 先 安 l o l A S wP , A , C v ; oP时
理; WMM— P D省 电 ; 度 紧凑 和低 成 本 的 设计 集 成 度 ; 种 扩 展 接 口。 AS 高 多
12无线 基 带 芯 片 .
无 线 芯 片选 用 了 A hrs 司 的 R C R 1 1 A hrs R 1 1 以下 特 点 : IE 0 .l teo 公 O m A 6 0 。 teo 6 0 有 A 在 E E 821g中兼 容 WL N; 821g中数 A 在 0 .1 据 速 率 为 6 5 p 、 8 21b中速 率 为 1 1 M p 。10MH — 4Mb s在 0 .1 — 1 b s 5 z的 M P 4 E 处理 器 : 成 支 持 8 21bgM C基 带 处 理 器 和 ISR K m 集 0 .1/ A /
1硬 件 设 计
本 系 统 微 处 理器 采 用 的是 A h rs 司生 产 的 MI S 2 无 线 基 带 teo 公 P3 。 芯 片是 A h r te s公 司 的 R C 它们 被集 成 在 同一个 芯 片上 。 储 器 芯 o O m, 存 片是 S M U G公 司 生产 的 K L 3 1 A — 2 0 A S N 5 6 3 C A D 7 。主 要 芯 片 都 是 高 度 集成 , 线简 洁 , 理 清 晰 。 接 原
C m u r n weg n e ho g o p t K o l ea dTc nl y电脑 知 识 与技术 e d o
Vo . , . Ma c 0 0, P 1 9 -1 9 1 No7, r h 2 1 P . 5 6 5 7 6
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
These files document the internal implementation of eCos which may or may not change in later revisions. The interface presented here has no guarantee of being supported in future releases of eCos. Copyright (c) 2002 by Navosha Inc.. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at /openpub/).Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder. The holder my be contacted atstaff@. This document may be reproduced in all or part electronically as well as modified provided that the Navosha logo is incorporated in the resulting document and all copyright notices are included.NOTE: this is an ALPHA document currently. There may be errors as well as omissions in this document. Your feedback is welcome and appreciated.Table of ContentsCyg_Alarm AlarmsCyg_Binary_Semaphore Binary SemaphoresCyg_Clock ClocksCyg_Condition_Variable Conditional VariablesCyg_Counter CountersCyg_Counting_Semaphore Counting SemaphoresCyg_Flag FlagsCyg_Interrupt InterruptsCyg_Mbox MailboxesCyg_Mempool_Fixed Fixed Sized Memory AllocationCyg_Mempool_Variable Variable Sized Memory AllocationCyg_Mutex Mutual ExclusionCyg_Alarm::Cyg_AlarmName:Cyg_Alarm::Cyg_Alarm ( ) - create an alarmSynopsis:Cyg_Alarm::Cyg_Alarm(Cyg_Counter *counter, /* Attached to this counter */cyg_alarm_fn *alarm, /* Call-back function */CYG_ADDRWORD data /* Call-back data */)Description:This creates a new alarm and attaches it to the specified counter. When the alarm expires the call-back function "alarm" will be called. The callback function takes one argument "data".The callback is of the form: void cyg_alarm_fn(Cyg_Alarm *alarm, CYG_ADDRWORD data). Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Alarm::~Cyg_AlarmCyg_Alarm::~Cyg_AlarmName:Cyg_Alarm::~Cyg_Alarm ( ) - destroy an alarmSynopsis:Cyg_Alarm::~Cyg_Alarm(void)Description:This disables and destroys an alarm.Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Alarm::Cyg_AlarmCyg_Alarm::initializeName:Cyg_Alarm::initialize ( ) - initialize an alarmSynopsis:void Cyg_Alarm::initialize(cyg_tick_count trigger, /* Absolute trigger time */cyg_tick_count interval=0 /* Relative retrigger interval */)Description:This initializes an alarm. The trigger time is an absolute value of the associated counter. If the interval is set to 0, the alarm will not retrigger. If the interval is non 0, this alarm will resetautomatically to fire again at trigger+interval, then trigger+(2*interval), etc.The alarm will be enabled automatically after this callInclude:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Alarm::enable, Cyg_Alarm::disable, Cyg_Alarm::get_timesCyg_Alarm::enableName:Cyg_Alarm::enable ( ) - enable an alarmSynopsis:void Cyg_Alarm::enable(void)Description:This enables an alarm. This is most often used when a periodic alarm has been disabled.A periodic alarm that has been disabled and later re-enabled will fire at the same intervals it didpreviously. For example, a periodic alarm that fired every 10 seconds at time T0, T10, T20,T30... etc that was disabled for 15 seconds at time T31 and then renabled would then start firingagain at T50, T60, T70 etc.If this behavior is not desired, use Cyg_Alarm::initialize to reset the intervals.Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Alarm::initialize, Cyg_Alarm::disable, Cyg_Alarm::get_timesCyg_Alarm::disableName:Cyg_Alarm::disable ( ) - disable an alarmSynopsis:void Cyg_Alarm::disable(void)Description:Disables an alarm. Most often used to stop a periodic alarm. This can also be used to cancel an alarm, although using the destructor to do that might be more logical.Cyg_Alarm::initialize or Cyg_Alarm::enable can be used to re-enable the alarm once it's beendisabled.Include:#include <cyg/kernel/clock.hxx>#include <cyg/kernel/clock.inl>Returns:nothingSee Also:Cyg_Alarm::initialize, Cyg_Alarm::enableCyg_Alarm::get_timesName:Cyg_Alarm::get_times ( ) - get trigger and interval valuesSynopsis:void Cyg_Alarm::get_times(cyg_tick_count *trigger, /* pointer to the next trigger time */cyg_tick_count *interval /* pointer to the current interval */)Description:Get through pointers the next trigger time and the periodic retrigger interval. The function itself returns nothing.It is legal to pass NULL as the "trigger" and "interval" pointers if those values are not needed. Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Alarm::initializeCyg_Binary_Semaphore::Cyg_Binary_Semaphore Name:Cyg_Binary_Semaphore::Cyg_Binary_Semaphore ( ) - create a binary semaphore Synopsis:Cyg_Binary_Semaphore::Cyg_Binary_Semaphore(cyg_bool init_state = false /* initial state */)Description:Creates a binary semaphore. Posting a binary semaphore that is already available will remain available, it will not affect its count.An initial state of "true" means the binary semaphore was created as not taken (free to be takenby any thread) and a state of "false" means the binary semaphore was created as being taken. Include:#include <cyg/kernel/sema.hxx>Returns:nothingSee Also:Cyg_Binary_Semaphore::~Cyg_Binary_SemaphoreCyg_Binary_Semaphore::~Cyg_Binary_Semaphore Name:Cyg_Binary_Semaphore::~Cyg_Binary_Semaphore ( ) - destroy a binary semaphore Synopsis:Cyg_Binary_Semaphore::~Cyg_Binary_Semaphore(void)Description:Destroys a binary semaphore. This will NOT release threads waiting on the binary semaphore, it will simply call the destructor which essentially does nothing but free the memory. Becertain that the semaphore is available before destroying it.Include:#include <cyg/kernel/sema.hxx>Returns:nothingSee Also:Cyg_Binary_Semaphore::Cyg_Binary_SemaphoreCyg_Binary_Semaphore::waitName:Cyg_Binary_Semaphore::wait ( ) - get a binary semaphoreSynopsis:cyg_bool Cyg_Binary_Semaphore::wait(void)Description:Takes a binary semaphore. If the binary semaphore is not available this will block until the binary semaphore is available.Include:#include <cyg/kernel/sema.hxx>Returns:"true" is the binary semaphore was taken, "false" if the binary semaphore could not be taken.The value of "false" will be returned if the thread is awaken. See the thread api.See Also:Cyg_Binary_Semaphore::trywait, Cyg_Binary_Semaphore::post,Cyg_Binary_Semaphore::postedCyg_Binary_Semaphore::trywaitName:Cyg_Binary_Semaphore::trywait ( ) - get a binary semaphore, don't blockSynopsis:cyg_bool Cyg_Binary_Semaphore::trywait(void)Description:Takes a binary semaphore but only if it is currently available. If the binary semaphore has already been taken by another thread this will return "false".Include:#include <cyg/kernel/sema.hxx>Returns:"true" if the semaphore was taken by the calling thread, "false" if the semaphore was already taken by a thread.See Also:Cyg_Binary_Semaphore::wait, Cyg_Binary_Semaphore::post,Cyg_Binary_Semaphore::postedCyg_Binary_Semaphore::postName:Cyg_Binary_Semaphore::post ( ) - release a binary semaphoreSynopsis:void Cyg_Binary_Semaphore::post(void)Description:This will release a binary semaphore. If the binary semaphore is already released, calling this will have no affect on the binary semaphore. Unlike a mutex, a binary semaphore can bereleased by any thread, not just the thread that allocated it.Include:#include <cyg/kernel/sema.hxx>Returns:nothingSee Also:Cyg_Binary_Semaphore::wait, Cyg_Binary_Semaphore::trywait,Cyg_Binary_Semaphore::postedCyg_Binary_Semaphore::postedName:Cyg_Binary_Semaphore::posted ( ) - check availability of a binary semaphore Synopsis:cyg_bool Cyg_Binary_Semaphore::posted(void)Description:This reports the status of a binary semaphore.Include:#include <cyg/kernel/sema.hxx>Returns:"true" if the binary semaphore is available "false" if a thread has allocated it already.See Also:Cyg_Binary_Semaphore::wait, Cyg_Binary_Semaphore::trywait,Cyg_Binary_Semaphore::postCyg_Clock::Cyg_ClockName:Cyg_Clock::Cyg_Clock ( ) - create a clockSynopsis:Cyg_Clock::Cyg_Clock(cyg_resolution resolution /* resolution */)Description:Creates a clock with an associated resolution.All a clock is is a counter with an associated resolution. It's a class derived from Cyg_Counter. All youuse it for is to store and save resolutions of the clock.Since this is a derived class, study the "counter" documentation for more information on counters. Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Clock::~Cyg_ClockCyg_Clock::~Cyg_ClockName:Cyg_Clock::~Cyg_Clock ( ) - destroy a clockSynopsis:Cyg_Clock::~Cyg_Clock(void)Description:This destroys a clock and the counter it's associated withInclude:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Clock::Cyg_ClockCyg_Clock::get_resolutionName:Cyg_Clock::get_resolution ( ) - get the resolution of the clockSynopsis:cyg_resolution Cyg_Clock::get_resolution(void)Description:Gets the resolution of this clockInclude:#include <cyg/kernel/clock.hxx>#include <cyg/kernel/clock.inl>Returns:the resolution of this clock.See Also:Cyg_Clock::set_resolutionCyg_Clock::set_resolutionName:Cyg_Clock::set_resolution ( ) - set clock resolutionSynopsis:void Cyg_Clock::set_resolution(cyg_resolution resolution /* new resolution */)Description:This sets the resolution of the clockInclude:#include <cyg/kernel/clock.hxx>#include <cyg/kernel/clock.inl>Returns:nothingSee Also:Cyg_Clock::get_resolutionCyg_Clock::get_other_to_clock_converterName:Cyg_Clock::get_other_to_clock_converter ( ) - setup clock conversionSynopsis:void Cyg_Clock::get_other_to_clock_converter(cyg_uint64 ns_per_other_tick, /* ns/tick of the other clock */struct converter *pcc /* conversion struct */)Description:THIS DESCRIPTION MAY BE WRONGThis, as far as I can tell, sets up a conversion from one clock to another. This must be used inconjunction with Cyg_Clock::convert to be of any use. This is so you can relate one clock (or counter)to another.This converts from the other clock to this clock.the struct converter is: struct converter {cyg_uint64 mul1, div1, mul2, div2;}. Clock ticks =(((otherticks*mul1)/div1)*mul2/div2)Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Clock::get_clock_to_other_converter, Cyg_Clock::convertCyg_Clock::get_clock_to_other_converterName:Cyg_Clock::get_clock_to_other_converter ( ) - setup clock conversionSynopsis:void Cyg_Clock::get_clock_to_other_converter(cyg_uint64 ns_per_other_tick, /* ns/tick of the other clock */struct converter *pcc /* conversion struct */)Description:THIS DESCRIPTION MAY BE WRONGThis, as far as I can tell, sets up a conversion from one clock to another. This must be used inconjunction with Cyg_Clock::convert to be of any use. This is so you can relate one clock (or counter)to another.This converts from this clock to the other clock.the struct converter is: struct converter {cyg_uint64 mul1, div1, mul2, div2;}. Clock ticks =(((otherticks*mul1)/div1)*mul2/div2)Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Clock::get_other_to_clock_converter, Cyg_Clock::convertCyg_Clock::convertName:Cyg_Clock::convert ( ) - convert from one clock to anotherSynopsis:static cyg_tick_count Cyg_Clock::convert(cyg_tick_count value, /* ns/tick of this clock */struct converter *pcc /* conversion struct */)Description:THIS DESCRIPTION MAY BE WRONGI think this does a conversion from this clock value to another. I need help with this. It's not obviouswhy these are broken up into 3 seperate function calls. I don't see many people needing thisfunctionality.Include:#include <cyg/kernel/clock.hxx>#include <cyg/kernel/clock.inl>Returns:The converted clock ticks.See Also:Cyg_Clock::get_other_to_clock_converter, Cyg_Clock::get_clock_to_other_converterCyg_Condition_Variable::Cyg_Condition_Variable Name:Cyg_Condition_Variable::Cyg_Condition_Variable ( ) - create a condition variable Synopsis:Cyg_Condition_Variable::Cyg_Condition_Variable(Cyg_Mutex &mutex /* associated mutex */)Description:Creates a condition variable.Include:#include <cyg/kernel/mutex.hxx>Returns:nothingSee Also:Cyg_Condition_Variable::~Cyg_Condition_VariableCyg_Condition_Variable::~Cyg_Condition_Variable Name:Cyg_Condition_Variable::~Cyg_Condition_Variable ( ) - destroy condition variable Synopsis:Cyg_Condition_Variable::~Cyg_Condition_Variable(void)Description:This destroys a condition variable. Be careful not do destroy a condition variable that is currently in use. The mutex associated with the condition variable needs to be destroyedseperately.Include:#include <cyg/kernel/mutex.hxx>Returns:nothingSee Also:Cyg_Condition_Variable::Cyg_Condition_VariableCyg_Condition_Variable::signalName:Cyg_Condition_Variable::signal ( ) - wake one thread waiting on condition variableSynopsis:void Cyg_Condition_Variable::signal(void)Description:Wakes a thread waiting on a condition variable. If multiple threads are waiting on the thread, which one wakes up depends on which scheduler is being used. The mlqueue scheduler is themost often, this would mean that the thread with the highest priority will wake.Include:#include <cyg/kernel/mutex.hxx>Returns:nothingSee Also:Cyg_Condition_Variable::broadcast, Cyg_Condition_Variable::waitCyg_Condition_Variable::broadcastName:Cyg_Condition_Variable::broadcast ( ) - wake all threads waiting on condition variable Synopsis:void Cyg_Condition_Variable::broadcast(void)Description:This wakes all threads waiting on the condition variable.Include:#include <cyg/kernel/mutex.hxx>Returns:nothingSee Also:Cyg_Condition_Variable::signal, Cyg_Condition_Variable::waitCyg_Condition_Variable::waitName:Cyg_Condition_Variable::wait ( ) - wait on a condition variableSynopsis:cyg_bool Cyg_Condition_Variable::wait(void)Description:This causes the calling thread to wait on a condition variable. It will wait forever. Include:#include <cyg/kernel/mutex.hxx>Returns:"true" if the thread was awakened normally, "false" if the thread was awakened by a Cyg_Thread::BREAK or Cyg_Thread::DESTRUCT signal.See Also:Cyg_Condition_Variable::signal, Cyg_Condition_Variable::broadcastCyg_Condition_Variable::waitName:Cyg_Condition_Variable::wait ( ) - wait until an absolute time on a condition variable Synopsis:cyg_bool Cyg_Condition_Variable::wait(cyg_tick_count absolute_time /* absolute time */)Description:This causes the calling thread to wait on a condition variable for until the system reaches the absolute time specified or until the condition variable is available, whichever comes first. Include:#include <cyg/kernel/mutex.hxx>Returns:"true" if the thread was awakened normally, "false" if the thread timed out waiting on the condition variable or if the thread was awakened by a Cyg_Thread::BREAK orCyg_Thread::DESTRUCT signal.See Also:Cyg_Condition_Variable::signal, Cyg_Condition_Variable::broadcastCyg_Condition_Variable::waitName:Cyg_Condition_Variable::wait ( ) - wait on a condition variableSynopsis:cyg_bool Cyg_Condition_Variable::wait(Cyg_Mutex &mx /* other mutex to use */)Description:This causes the calling thread to wait on a condition variable but uses another mutex instead of the mutex that was associated with this condition variable on creation.It is probably not a good idea to use thisInclude:#include <cyg/kernel/mutex.hxx>Returns:"true" if the thread was awakened normally, "false" if the thread was awakened by a Cyg_Thread::BREAK or Cyg_Thread::DESTRUCT signal.See Also:Cyg_Condition_Variable::signal, Cyg_Condition_Variable::broadcastCyg_Condition_Variable::waitName:Cyg_Condition_Variable::wait ( ) - wait until an absolute time on a condition variable Synopsis:cyg_bool Cyg_Condition_Variable::wait(Cyg_Mutex &mx, /* other mutex to use */cyg_tick_count absolute_time /* absolute time */)Description:This causes the calling thread to wait on a condition variable for until the system reaches the absolute time specified or until the condition variable is available, whichever comes first. Thisuses another mutex instead of the mutex that was associated with this condition variable oncreation.It is probably not a good idea to use thisInclude:#include <cyg/kernel/mutex.hxx>Returns:"true" if the thread was awakened normally, "false" if the thread timed out waiting on the condition variable or if the thread was awakened by a Cyg_Thread::BREAK orCyg_Thread::DESTRUCT signal.See Also:Cyg_Condition_Variable::signal, Cyg_Condition_Variable::broadcastCyg_Counter::Cyg_CounterName:Cyg_Counter::Cyg_Counter ( ) - create a counterSynopsis:Cyg_Counter::Cyg_Counter(cyg_uint32 increment=1 /* number of ticks to increment counter by */)Description:This creates a new counter. Counters can increment any arbitrary amount but usually only by 1. The value of the counter is always initialized to 0. Counters are 64 bit.Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Counter::~Cyg_CounterCyg_Counter::~Cyg_CounterName:Cyg_Counter::~Cyg_Counter ( ) - destroys a counterSynopsis:Cyg_Counter::~Cyg_Counter(void)Description:This destroys a counter.Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Counter::Cyg_CounterCyg_Counter::current_valueName:Cyg_Counter::current_value ( ) - get the current value of the counterSynopsis:cyg_tick_count Cyg_Counter::current_value(void)Description:Gets the current value of the counter.Include:#include <cyg/kernel/clock.hxx>#include <cyg/kernel/clock.inl>Returns:the current value of the counter.See Also:Cyg_Counter::current_value_lo, Cyg_Counter::current_value_hi, Cyg_Counter::set_value, Cyg_Counter::tickCyg_Counter::current_value_loName:Cyg_Counter::current_value_lo ( ) - get lower 32 bits of counterSynopsis:cyg_uint32 Cyg_Counter::current_value_lo(void)Description:Gets the lower 32 bits of the current value of the counter.Include:#include <cyg/kernel/clock.hxx>#include <cyg/kernel/clock.inl>Returns:the lower 32 bits of the current value of the counter.See Also:Cyg_Counter::current_value, Cyg_Counter::current_value_hi, Cyg_Counter::set_value, Cyg_Counter::tickCyg_Counter::current_value_hiName:Cyg_Counter::current_value_hi ( ) - get upper 32 bits of counterSynopsis:cyg_uint32 Cyg_Counter::current_value_hi(void)Description:Gets the upper 32 bits of the current value of the counter.Include:#include <cyg/kernel/clock.hxx>#include <cyg/kernel/clock.inl>Returns:the upper 32 bits of the current value of the counter.See Also:Cyg_Counter::current_value, Cyg_Counter::current_value_lo, Cyg_Counter::set_value, Cyg_Counter::tickCyg_Counter::set_valueName:Cyg_Counter::set_value ( ) - set counter value directlySynopsis:void Cyg_Counter::set_value(cyg_tick_count new_value /* new value of counter */)Description:Sets the value of the counter. Note that the value is a 64 bit value not a 32 bit value.Include:#include <cyg/kernel/clock.hxx>#include <cyg/kernel/clock.inl>Returns:nothingSee Also:Cyg_Counter::current_value, Cyg_Counter::current_value_lo, Cyg_Counter::current_value_hi, Cyg_Counter::tickCyg_Counter::tickName:Cyg_Counter::tick ( ) - increment counter by some number of ticksSynopsis:void Cyg_Counter::tick(cyg_uint32 ticks=1 /* number of ticks to increment counter */)Description:Increments the counter by some number of ticks. Doing this can trigger alarms that are attached to this counter if the alarms have expired.Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Counter::current_value, Cyg_Counter::current_value_lo, Cyg_Counter::current_value_hi, Cyg_Counter::set_valueCyg_Counter::add_alarmName:Cyg_Counter::add_alarm ( ) - attach an alarm to counterSynopsis:void Cyg_Counter::add_alarm(Cyg_Alarm *alarm /* alarm to attach to counter */)Description:This attaches an alarm to the counter.Include:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Counter::tick, Cyg_Counter::rem_alarmCyg_Counter::rem_alarmName:Cyg_Counter::rem_alarm ( ) - detach alarm from counterSynopsis:void Cyg_Counter::rem_alarm(Cyg_Alarm *alarm /* alarm to remove from counter */)Description:This detaches an alarm from a counterInclude:#include <cyg/kernel/clock.hxx>Returns:nothingSee Also:Cyg_Counter::tick, Cyg_Counter::add_alarmCyg_Counting_Semaphore::Cyg_Counting_Semaphore Name:Cyg_Counting_Semaphore::Cyg_Counting_Semaphore ( ) - create counting semaphore Synopsis:Cyg_Counting_Semaphore::Cyg_Counting_Semaphore(cyg_count32 init_count = 0 /* inital count */)Description:This creates a counting semaphore.Include:#include <cyg/kernel/sema.hxx>Returns:nothingSee Also:Cyg_Counting_Semaphore::~Cyg_Counting_SemaphoreCyg_Counting_Semaphore::~Cyg_Counting_Semaphore Name:Cyg_Counting_Semaphore::~Cyg_Counting_Semaphore ( ) - destroy a counting semaphore Synopsis:Cyg_Counting_Semaphore::~Cyg_Counting_Semaphore(void)Description:This destroys a counting semaphore. This will NOT release threads waiting on the counting semaphore, it will simply call the destructor which essentially does nothing but free the memory. Be certain that notthreads are waiting on this semaphore before destroying.Include:#include <cyg/kernel/sema.hxx>Returns:nothingSee Also:Cyg_Counting_Semaphore::Cyg_Counting_SemaphoreCyg_Counting_Semaphore::waitName:Cyg_Counting_Semaphore::wait ( ) - get a counting semaphoreSynopsis:cyg_bool Cyg_Counting_Semaphore::wait(void)Description:Takes a counting semaphore. If the counting semaphore is not available this will block until the counting semaphore is available.Include:#include <cyg/kernel/sema.hxx>Returns:"true" is the counting semaphore was taken, "false" if the counting semaphore could not be taken. The value of "false" will be returned if the thread is awaken. See the thread api.See Also:Cyg_Counting_Semaphore::trywait, Cyg_Counting_Semaphore::post,Cyg_Counting_Semaphore::peekCyg_Counting_Semaphore::waitName:Cyg_Counting_Semaphore::wait ( ) - wait until an absolute time for a counting semaphore Synopsis:cyg_bool Cyg_Counting_Semaphore::wait(cyg_tick_count timeout /* absolute timeout */)Description:This grabs a counting semaphore. If the semaphore is not available it will block the allocating thread until "timeout". Timeout is an absolute value, not a relative value. It's a 64 value. You can get the valueof the real time clock with Cyg_Clock::real_time_clock->current_value().Include:#include <cyg/kernel/sema.hxx>Returns:"true" if the semaphore was allocated, "false" is the thread was awaken for another reason. The value of "false" will be returned if the thread is awaken. See the thread api.See Also:Cyg_Counting_Semaphore::trywait, Cyg_Counting_Semaphore::post,Cyg_Counting_Semaphore::peekCyg_Counting_Semaphore::trywaitName:Cyg_Counting_Semaphore::trywait ( ) - get a counting semaphore, don't blockSynopsis:cyg_bool Cyg_Counting_Semaphore::trywait(void)Description:Takes a counting semaphore but only if it is currently available. If the counting semaphore has already been taken by another thread this will return "false".Include:#include <cyg/kernel/sema.hxx>Returns:"true" if the semaphore was taken "false" if it wasn't.See Also:Cyg_Counting_Semaphore::wait, Cyg_Counting_Semaphore::post, Cyg_Counting_Semaphore::peekCyg_Counting_Semaphore::postName:Cyg_Counting_Semaphore::post ( ) - release a counting semaphoreSynopsis:void Cyg_Counting_Semaphore::post(void)Description:This will increment the count of a counting semaphore so it may be allocated by other threads. Include:#include <cyg/kernel/sema.hxx>Returns:nothingSee Also:Cyg_Counting_Semaphore::wait, Cyg_Counting_Semaphore::trywait,Cyg_Counting_Semaphore::peekCyg_Counting_Semaphore::peekName:Cyg_Counting_Semaphore::peek ( ) - get the count of a counting semaphoreSynopsis:cyg_count32 Cyg_Counting_Semaphore::peek(void)Description:This just gets the count of a counting semaphore. If any threads are waiting on the counting semaphore, this will of course return 0.Include:#include <cyg/kernel/sema.hxx>Returns:the count of the counting semaphore.See Also:Cyg_Counting_Semaphore::wait, Cyg_Counting_Semaphore::trywait, Cyg_Counting_Semaphore::postCyg_Flag::Cyg_FlagName:Cyg_Flag::Cyg_Flag ( ) - create flagSynopsis:Cyg_Flag::Cyg_Flag(Cyg_FlagValue init=0 /* intial conditions */)Description:This creates a flag. Flags allow a thread to wait on a condition or a set of conditions.Each condition is represented by a bit. You can control which conditions are set oncreation with "init".Include:#include <cyg/kernel/flag.hxx>Returns:nothingSee Also:Cyg_Flag::~Cyg_FlagCyg_Flag::~Cyg_FlagName:Cyg_Flag::~Cyg_Flag ( ) - destroy flagSynopsis:Cyg_Flag::~Cyg_Flag(void)Description:Destroy a flag. Be careful not to destroy a flag still in use. If you destroy a flag with threads waiting on it, they will be awaken with a signal of Cyg_Thread::DESTRUCT,but this is bad programming practice. Avoid doing this.Include:#include <cyg/kernel/flag.hxx>Returns:nothingSee Also:Cyg_Flag::Cyg_FlagCyg_Flag::setbitsName:Cyg_Flag::setbits ( ) - set bits in a flagSynopsis:void Cyg_Flag::setbits(Cyg_FlagValue arg=~0 /* bits (conditions) to set */);Description:Sets bits (conditions) in the flag. Each bit represents a single condition. Include:#include <cyg/kernel/flag.hxx>Returns:nothingSee Also:Cyg_Flag::maskbits, Cyg_Flag::wait, Cyg_Flag::poll, Cyg_Flag::peek,Cyg_Flag::waitingCyg_Flag::maskbitsName:Cyg_Flag::maskbits ( ) - clear bits in flagSynopsis:void Cyg_Flag::maskbits(Cyg_FlagValue arg=0 /* bits (conditions) to clear */)Description:This clears bit (conditions) of the flag. Any bit that is set to 1 will not be cleared. Include:#include <cyg/kernel/flag.hxx>Returns:nothingSee Also:Cyg_Flag::setbits, Cyg_Flag::wait, Cyg_Flag::poll, Cyg_Flag::peek,Cyg_Flag::waitingCyg_Flag::waitName:Cyg_Flag::wait ( ) - wait on a a condition or set of conditionsSynopsis:Cyg_FlagValue Cyg_Flag::wait(Cyg_FlagValue pattern, /* bit pattern */WaitMode mode /* mode */)。