目录 关键词 平台说明 一、背景 二、Component命名约定 2.1Component Type Composition(CtCo) 2.2Component Type Application( CtAp) 2.3Component Type SensorActuator(CtSa) 2.4Component Type Complex Driver( CtCd) 2.5Component Type I/O Hardware Abstraction( CtIo) 2.6Component Type Non_VoatileMemoryBlock( CtNv) 2.7Component Type Service Proxy( CtSp) 2.8Component Type Calibration( CtCa) 2.9Component Prototype( Cp) 三、Data命名约定 3.1Application Data Type ( Adt) 3.2Implementation Data Type ( Idt) 3.3Compu Methods ( Cm) 3.4Data Contraints ( Dc) 3.5Constants ( C) 四、interface命名约定 4.1Applacation S/R Port Interface( Asr) 4.2Applacation C/S Port Interface( Acs) 4.3Server S/R Port Interface( Ssr) 4.4Server C/S Port Interface( Scs) 五、runnable命名约定
关键词
==嵌入式、C语言、autosar、DaVinci Developer、命名规范 ==
平台说明
项目 Value OS autosar OS autosar厂商 vector 芯片厂商 TI 编程语言 C,C++ 编译器 HighTec (GCC)
一、背景
该内容根据Vector 标准文档整理仅作参考,根据项目添加了部分自定义内容,为方便今后开发快速查阅。
二、Component命名约定
2.1Component Type Composition(CtCo)
Convention CtCo[Name] Example CtCOfunction Descr 该类型为多个component集合体,常用于一个component无法实现功能,需要分解为多个component。该类型可以被其他CtCo封装。Name的命名应该考虑到集合下的所有component的总体功能.
2.2Component Type Application( CtAp)
Convention CtAp[Name] Example CtApMySwc Descr 用于创建应用类型component。name 对应具体功能如:信号处理,滤波等
2.3Component Type SensorActuator(CtSa)
Convention CtSa[Name] Example CtSaDoor Descr 用于创建传感器或者执行器类型的component ,例如开门,温度传感器
2.4Component Type Complex Driver( CtCd)
Convention CtCd[Name] Example CtCOfunction Descr 用于创建复杂驱动类型的component
2.5Component Type I/O Hardware Abstraction( CtIo)
Convention CtIo[Name] Example CtIoOIAUC120 Descr 用于创建IO硬件抽象类型的component ,一般用CS端口访问,可直接与其他BSW模块交互
2.6Component Type Non_VoatileMemoryBlock( CtNv)
Convention CtNv[Name] Example CtNvStorage Descr 创建用于操作非易失内存的component,用于SWC直接操作NV
2.7Component Type Service Proxy( CtSp)
Convention CtSp[Name] Example CtSpEcu1 Descr 用于创建ECU之间的代理副本,详情见官方文档:AUTOSAR_EXP_VFB.pdf
2.8Component Type Calibration( CtCa)
Convention CtCa[Name] Example CtCaAngle Descr 创建用于标定类型的component
2.9Component Prototype( Cp)
Convention Cp<Ap/Sa/Cd/Io/Ca >[Name] Example CpCaAngle Descr 用于在software design中的component实现
三、Data命名约定
3.1Application Data Type ( Adt)
Convention Adt<b/v/s/ar/r/>< Module>< Name> Example AdtvDoorAngle Descr b = Boolean;v = Value;s = String;ar = Array;r = Record
3.2Implementation Data Type ( Idt)
Convention Idt<b/v/s/ar/r/>< Name> Example IdtvDoorAngle Descr b = Boolean;v = Value;s = String;ar = Array;r = Record
3.3Compu Methods ( Cm)
Convention Cm< Module>< Name> Example CmDoorAngle Descr
3.4Data Contraints ( Dc)
Convention Dc< Module>< Name> Example Descr
3.5Constants ( C)
Convention C<tc/nc/ac/rc/rec/apc>_< Name> Example Descr tc = Textual Constant;nc = Numeric Constant;ac = Array Constant;rc = Reference Constant;rec = Reference Constant;apc = Application Constant
四、interface命名约定
4.1Applacation S/R Port Interface( Asr)
Convention Asr< Name> Example Descr
4.2Applacation C/S Port Interface( Acs)
Convention Acs< Name> Example Descr
4.3Server S/R Port Interface( Ssr)
Convention Ssr< Name> Example Descr
4.4Server C/S Port Interface( Scs)
Convention Scs< Name> Example Descr
五、runnable命名约定
5.Runnable Entity
Convention Runnable< module name>_<功能描述(init)><周期> Example RunnableDoor_AglDet_10ms Descr