These are the guidelines for GENIVI components to follow.
It has been approved by GENIVI SAT - therefore please notify the SAT if making / suggesting updates to this page. Thanks in advance.
|0.1||2013-06-13||Marco Residori||Document created||Draft|
|1.0||2013-07-01||Marco Residori||Reviewed during SAT F2F||Final|
|1.1||2014-08-07||Manfred Bathelt||Updated after discussion during SAT F2F 2014-3||Review|
|1.2||2014-08-13||Marco Residori||Updated first line of the guidelines table as discussed during the SAT teleconference held on the 13th Aug 14||Review|
|1.3||2014-08-20||Sriram Gopalan||Updated to fix sentence formation and also to clarify specific elements||Review|
|2.0||2014-08-20||Gunnar Andersson||Reviewed and approved during SAT Telco.||Released|
|2.0.1||2015-01-23||Harald Hackstein||Fixed regular expression for package names||Bugfix|
|Franca Element||Notation||Regular Expression (*)||Example||Comment|
|Franca IDL files||CamelCase notation starting with capital letter.||[A-Z][a-zA-Z0-9]*\.fidl ||- TrafficIncidents.fidl |
- CommonTypes.fidl //scope: system
- NavigationTypes.fidl //scope: group of components
- MapViewerTypes.fidl //scope: component
- RoutingTypes.fidl //scope: interface
|- Fidl files should be named after the interfaces they define. |
- If a fidl file contains more than one interface, an appropriate name representative of all the interfaces such as the common domain should be used instead.
- Data types that are shared between different components/interfaces shall be defined in fidl files whose name ends with the word "Types".
|Interfaces||CamelCase notation starting with capital letter.||[A-Z][a-zA-Z0-9]*||TrafficIncidents|
|Interface versioning||Franca interface versioning scheme must follow semantic versioning 2.0 rules. |
Franca interfaces should not define any custom method/property to pass interface version information to implementations, because the IPC CommonAPI C++ language binding provides the specified Franca interface versions at API level automatically.
|Packages||All lower case letters. The package name prefix must contain the proposer´s domain name and may be followed by a topic or component name. The expert group name must not be part of the package name. See chapter predefined package names below. A character must follow each dot.||[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)*||org.genivi.navigation||It is mandatory that package name and directory structures match in case and content. |
|Attributes||CamelCase notation starting with lowercase letter.||[a-z][a-zA-Z0-9]*||timeFormat||Code generators will turn the initial letter into a capital letter for getters and setters. Example: timeFormat -> getTimeFormat()|
|Methods||CamelCase notation starting with lowercase letter. It is recommended to use Franca attributes instead of defining Franca get/set methods - CommonAPI will provide get/set methods and notification mechanisms automatically.||[a-z][a-zA-Z0-9]*||startGuidance|
|Broadcasts||CamelCase notation starting with lowercase letter.||[a-z][a-zA-Z0-9]*||routeDeleted|
|Data Types||CamelCase notation starting with capital letter.||[A-Z][a-zA-Z0-9]*||RoutePreferences||This rule applies equally to all data types including: |
|TypeCollections||CamelCase notation starting with capital letter.||[A-Z][a-zA-Z0-9]*||PositioningTypes|
|Variables/Arguments||CamelCase notation starting with lowercase letter.||[a-z][a-zA-Z0-9]*||String name |
|Errors||CamelCase notation starting with capital letter.||[A-Z][a-zA-Z0-9]*||FatalError||Errors are enumerators and follow the naming conventions defined for enumerators|
|Enumerations||Uppercase characters separated by underscores. Enumerator values are optional. Only integer values are allowed. It is recommended not to specify values.||[A-Z][A-Z0-9_]*||PAUSED, STARTED, NOT_AVAILABLE|
Predefined Package Names
|org.franca||reserved namespace for Franca specific definitions|
|org.genivi||Packages which are created and maintained by GENIVI expert groups shall use "org.genivi" as prefix.|
- The expert group name shall not be used in the name of any Franca elements indicated above.
- Underscores shall only be used in the names of enumerators' items. They shall not be used in the name of any other Franca elements.
- It is recommended to use Franca attributes instead of defining get/set methods in the Franca interface - CommonAPI will provide get/set methods and notification mechanisms automatically.
- The Regular Expressions listed here are meant as guidance, not as a formal test for a valid identifier. These expressions will not reject every non-valid identifier and fixing that would make them too complex so that they lose their guidance value.