Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

(warning) 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.

Revisions

VersionDateAuthorChangeStatus
0.12013-06-13Marco ResidoriDocument createdDraft
1.02013-07-01Marco ResidoriReviewed during SAT F2FFinal
1.12014-08-07Manfred BatheltUpdated after discussion during SAT F2F 2014-3Review
1.22014-08-13Marco ResidoriUpdated first line of the guidelines table as discussed during the SAT teleconference held on the 13th Aug 14Review
1.32014-08-20Sriram GopalanUpdated to fix sentence formation and also to clarify specific elementsReview
2.02014-08-20Gunnar AnderssonReviewed and approved during SAT Telco.Released
2.0.12015-01-23Harald HacksteinFixed regular expression for package namesBugfix

Naming Conventions

Franca ElementNotationRegular Expression (*)ExampleComment
Franca IDL filesCamelCase 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".
InterfacesCamelCase notation starting with capital letter.[A-Z][a-zA-Z0-9]*TrafficIncidents 
Interface versioningFranca 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.
 2.0
PackagesAll 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.navigationIt is mandatory that package name and directory structures match in case and content.

org
  +-genivi
    +-navigation
      +-MapMatchedPosition.fidl
AttributesCamelCase notation starting with lowercase letter.[a-z][a-zA-Z0-9]*timeFormatCode generators will turn the initial letter into a capital letter for getters and setters. Example: timeFormat -> getTimeFormat()
MethodsCamelCase 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 
BroadcastsCamelCase notation starting with lowercase letter.[a-z][a-zA-Z0-9]*routeDeleted 
Data TypesCamelCase notation starting with capital letter.[A-Z][a-zA-Z0-9]*RoutePreferencesThis rule applies equally to all data types including:
- Enumerators
- Typedefs
- Structures
- Maps
- Arrays
- Unions
- Strings
TypeCollectionsCamelCase notation starting with capital letter.[A-Z][a-zA-Z0-9]*PositioningTypes 
Variables/ArgumentsCamelCase notation starting with lowercase letter.[a-z][a-zA-Z0-9]*String name
Coordinate coordinate
 
ErrorsCamelCase notation starting with capital letter.[A-Z][a-zA-Z0-9]*FatalErrorErrors are enumerators and follow the naming conventions defined for enumerators
EnumerationsUppercase 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.francareserved namespace for Franca specific definitions
org.geniviPackages which are created and maintained by GENIVI expert groups shall use "org.genivi" as prefix.

Additional Notes

  • 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.

Regular Expressions

  • 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.

Resources

 

 

  • No labels