Service bundle naming conventions

Service bundle names are defined in a hierarchy.

  • Each VM (identified by a VM name) is a single deployment of the SDV Core profile operating system.

  • Each package (identified by a package name) can contain multiple service bundles.

  • Each service bundle (identified by a service bundle name) can be instantiated multiple times on the same VM.

  • Each service bundle instance is identified by a service bundle instance name assigned at load time.

SDV VM name

VM name is a unique name identifier attached to each deployment of an SDV Core profile as specified in the Vehicle VM Config (vvmconfig). The VM name is used in the naming as a logical separation of services along the VM boundaries in a vehicle. Examples include:

  • cdc
  • mechatronics
  • pcu
  • telematics-unit

These naming restrictions apply.

  • VM name must start with a letter [a-z]
  • VM name must not end with a hyphen
  • VM name must not exceed than 31 characters
  • All characters must be lower alphanumeric or a hyphen [a-z0-9\-]
  • Hyphens in the name must not appear consecutively more than once

The VM name is verified to be unique during compile time (static-analysis) and system boot when the vvmconfig is loaded.

A boot-level error occurs when validation at boot time fails.

SDV package name

Similar to standard Android, the SDV package name uniquely identifies a package deployed on the system. A unique APEX must be provided for each package name. For example:

  • com.android.sdv.datatunnel
  • com.android.sdv.sample.datatunnel
  • com.yourcompany.sdv.adas

The following restrictions apply:

  • All partner-owned SDV APEXes should be prefixed with com.<companyname>.sdv. (com.android.sdv. is reserved for Google-owned SDV APEXes).
  • All characters must be alphanumeric or an underscore, [a-z0-9_].
  • Package name must contain at least four segments delimited by period.
  • Package name must not end with a period.
  • Package name must not exceed 127 characters.
  • Each segment must start with a letter.
  • No segment can have consecutive underscores, __.
  • No segment can end with an underscore, _.
  • Segments must not be empty (no consecutive periods).

Service bundle name

Similar to standard Android, each service bundle has a human-readable name, which is namespaced in the package name to which it belongs. For example:

  • SomeService
  • ImportantService

These naming restrictions apply:

  • Service bundle name MUST start with a capital letter
  • Service bundle name MUST NOT be empty
  • Service bundle name MUST NOT exceed 47 characters
  • Service bundle name MUST NOT have consecutive underscores, __
  • Service bundle name MUST NOT start or end with an underscore, _
  • All characters MUST be either alphanumeric or an underscore, [A-Za-z0-9_]

Service bundle instance name

Unlike standard Android applications, service bundles in AAOS SDV can be installed and loaded multiple times on the same VM. As a result, the same service bundle can have multiple instances running within the same AAOS SDV VM. These instances are assigned a human-readable service bundle instance name. For example:

  • front-left
  • front-right
  • main
  • client
  • subscriber

These restrictions apply:

  • Instance name must:

    • Start with a letter [a-z]
    • Not end with a hyphen
    • Not exceed 47 characters
    • Be unique on the same VM for the same service
  • All characters must be lower alphanumeric or a hyphen [a-z0-9\-]

  • Hyphens must not appear consecutively

  • Each service instance must have a unique Instance name (provided or created when the service is started).

Fully qualified service bundle instance name (FQIN)

The SDV VM name, package name, service bundle name, and service bundle instance name are combined into a fully qualified service bundle instance name (FQIN). It uniquely identifies a service bundle instance vehicle-wide.

Some examples:

  • cdc:com.android.sdv.datatunnel.SomeService/instance1
  • cdc:com.android.sdv.datatunnel.SomeService/instance2
  • mechatronics:com.yourcompany.sdv.adas.TirePressure/front-left
  • mechatronics:com.yourcompany.sdv.adas.TirePressure/front-right
  • mechatronics:com.yourcompany.sdv.adas.TirePressure/rear-right
  • pcu:com.android.sdv.cluster.InfoProvider/acceleration

Service bundles in different packages can have the same service bundle name. For example, these two service bundles (identified by their respective FQINs), deployed in the same SDV VM (mechatronics), have the same service bundle name of TirePressure:

  • mechatronics:com.yourcompany1.sdv.adas.TirePressure/default
  • mechatronics:com.yourcompany2.sdv.adas.TirePressure/default

In this example, no naming collision occurs because the two service bundles are in different packages (one in com.yourcompany1.sdv.adas and the other in com.yourcompany2.sdv.adas).

Topic name

Topics are identified by strings that are unique across the vehicle for a given message type.

Example topic names:

  • left-tire
  • front-window
  • engine-coolant-temp

Restrictions:

  • Must be alphanumeric or a hyphen, [a-z0-9\-].
  • Must start with a letter.
  • Must not exceed 127 characters.

Channel name

Channels are identified by a name string.

Example channel names:

  • main-control
  • high-priority
  • background

Restrictions:

  • Must be alphanumeric or a hyphen, [a-z0-9\-].
  • Must start with a letter.
  • Must not exceed 127 characters.

Service unit name

Service bundle developers primarily interact with topics and channels. Service unit names are an underlying implementation detail and are primarily encountered when using debugging tools like dumpsys.

Service units, when registered with SDV Service Discovery, are required to provide a service unit name. This service unit name is available at Service discovery time. These examples show service unit names with FQINs:

  • ( cdc:com.android.sdv.adas.Service1/default-inst , tp-provider )
  • ( cdc:com.yourcompany.sdv.adas.TirePressure/instance1 , tp-provider-1 )
  • ( mech:com.yourcompany.sdv.adas.TirePressure/instance2 , tp-instance )

Unit type names

Unit type names are equal to (fully qualified) Protobuf type names. For example:

  • com.android.sdv.datatunnel.IComponentHandler
  • com.android.sdv.datatunnel.IComponentHandler
  • com.yourcompany.sdv.adas.TirePressure
  • com.android.sdv.cluster.IWheelInfoCallback
  • com.android.sdv.cluster.ISeatAlignmentCallback

Summary

Naming requirements are summarized in the following table:

Item Limit Permitted characters Case type
FQIN 256 characters Comprised of VM name, package name, service bundle name, and service bundle instance name. Lowercase
SDV VM name 30 characters
  • Must start with a letter a-z.
  • Must not end with a hyphen (-).
  • Characters must be lowercase alphanumeric or a hyphen (a-z0-9\-).
  • Hyphens must not appear consecutively more than once.
Lowercase
SDV package name 127 characters
  • Must contain at least four segments.
  • Must start with a letter.
  • No segment can contain consecutive underscores.
  • No segment can end with an underscore.
  • Segments can't be empty.
  • Characters must be lowercase or a hyphen (a-z0-9\-).
Lowercase
Service bundle name 30 characters
  • Must start with a capital letter.
  • Must not be empty.
  • Must not contain consecutive underscores (__).
  • Must not start or end with an underscore (_).
  • Characters must be alphanumeric or underscore (A-Za-z0-9_).
Mixed case
Service bundle instance name 48 characters
  • Must start with a letter (a-z).
  • Must not end with a hyphen (-).
  • Must be unique on the same VM for the same service.
  • Characters must be lowercase or a hyphen (a-z0-9\-).
  • Hyphens must not appear consecutively.
Lowercase
Topic name 127 characters
  • Must start with a letter (a-z).
  • Characters must be lowercase alphanumeric or hyphen (a-z0-9\-).
Lowercase
Channel name 127 characters
  • Must start with a letter (a-z).
  • Characters must be lowercase alphanumeric or hyphen (a-z0-9\-).
Lowercase
Service unit name 48 characters
  • Must start with a letter (a-z).
  • Must not end with a hyphen (-).
  • Characters must be lowercase or a hyphen (a-z0-9\-).
  • Hyphens must not appear consecutively more than once.
Lowercase