ETSI Generic Naming Conventions

TTCN-3 can be considered a programming language where users should consider best programming practices when developing code. The selection of common naming conventions for identifiers are for example one simple and often used mechanism to implement test suites which are consistent, maintainable, and understandable to multiple users involved in a project.
 
ETSI has investigated this issue and developed the naming conventions which are shown here in the context of the IP testing project. The use of these particular naming conventions is not binding when using TTCN-3. They are just intended to give visitors of this site an idea of how they could develop their own naming conventions. Next to such general naming conventions it is also wise to develop more project specific naming conventions for, e.g., application or protocol specific identifiers, etc.

ETSI Generic Naming Conventions

Language element Naming convention Prefix Example identifier
Module Use upper-case initial letter none IPv6Templates
Group within a module Use lower-case initial letter none messageGroup
Data type Use upper-case initial letter none SetupContents
Message template * Use lower-case initial letter m_ m_setupInit
Message template with wildcard or matching expression ** Use lower-case initial letters mw_ mw_anyUserReply
Modifying message template * Use lower-case initial letter md_ md_setupInit
Modifying message template with wildcard or matching expression ** Use lower-case initial letters mdw_ mdw_anyUserReply
Signature template Use lower-case initial letter s_ s_callSignature
Port instance Use lower-case initial letter none signallingPort
Test component instance Use lower-case initial letter none userTerminal
Constant Use lower-case initial letter c_ c_maxRetransmission
Constant (defined within component type) Use lower-case initial letter cc_ cc_minDuration
External constant Use lower-case initial letter cx_ cx_macId
Function Use lower-case initial letter f_ f_authentication()
External function Use lower-case initial letter fx_ fx_calculateLength()
Altstep  (incl. Default) Use lower-case initial letter a_ a_receiveSetup()
Test case *** Use ETSI numbering TC_ TC_COR_0009_47_ND
Variable (local) Use lower-case initial letter v_ v_macId
Variable (defined within a component type) Use lower-case initial letters vc_ vc_systemName
Timer (local) Use lower-case initial letter t_ t_wait
Timer (defined within a component) Use lower-case initial letters tc_ tc_authMin
Module parameters *** Use all upper case letters none PX_MAC_ID
Formal Parameters Use lower-case initial letter p_ p_macId
Enumerated Values Use lower-case initial letter e_ e_syncOk

*:    This prefix must be used for all template definitions which do not assign or refer to templates with wildcards or matching expressions, e.g. templates specifying a constant value, parameterized templates without matching expressions, etc.

**:    This prefix must be used in identifiers for templates which either assign a wildcard or matching expression ( e.g., ?, *, value list, ifpresent, pattern, etc) or reference another template which assigns a wildcard or matching expression.

***:    In this case it is acceptable to use underscore within an identifier.

 

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin