The structure of your service interfaces as well as the consumer and provider ports of your application are configured in JSON format. The path to your JSON config file is set in the generation script.

notice

You will find information on how to organize your configuration file and set the path variable in the provided example applications, see folder Examples.

We recommend the following configuration workflow:

  1. Data Type Configuration
  2. Service Configuration
  3. Executable Configuration
  4. Deployment Configuration

1. Data Type Configuration

Data types will be used by the application through service interfaces. Therefore, your first step is to configure which data types your services should be able to use and which properties they should have.

notice

Only custom data types need to be defined here. Standard C++ data types can be used directly in the services.

Steps:

  1. Open the JSON config file for your application.
  2. Change or add the data types your service interfaces will need.
  3. Proceed with the service configuration.

Example Configuration

"DatatypeConfig": {
  "Enums": [
    {
      "Name": "OverLimitEnum",
      "Literals": [
        {
          "Label": "NOT_OVER",
          "Value": 0
        },
        {
          "Label": "OVER_LOW",
          "Value": 1
        },
        {
          "Label": "OVER_HIGH",
          "Value": 2
        }
      ]
    }
  ]
},

DatatypeConfig Properties

DatatypeConfig Property

Description

Items Property

Items Property Description

Strings

List of strings

Name

Name of the string

Arrays

List of arrays

Name

Name of the Array

Size

Size of the Array

TypeRef

Reference to the data type of items in the array

Vectors

List of dynamic arrays

Name

Name of the vector

Size

Maximum size of the vector

TypeRef

Reference to the data type of items in the vector

Maps

List of key-value pair elements

Name

Name of map

KeyTypeRef

Reference to the data type for the key

ValueTypeRef

Reference to the data type for the value

Structs

List of structs

Name

Name of the struct

SubElements

A list of sub-elements within the struct

SubElemName

Name of the sub-element

SubElemTypeRef

Reference to the data type of the sub-element

Enums

List of enumerations

Name

Name of the enumeration

Literals

A list of literals (labels and values) within the enumeration

TypeRefs

List of type references

Name

Name of the type reference

TypeRef

Reference to another data type

2. Service Configuration

MICROSAR QuickCom employs Service Oriented Architecture (SOA) for the applications. Therefore, each application interacts with other applications by providing or requesting a service.

These services are modelled by service interfaces and use the previously defined data types by referencing them.

Prerequisites and steps:

  1. You have defined the data types for your services.
  1. Change or add the service interfaces your services will need.
  2. Proceed with the executable configuration.
notice

Note: The names of the service interfaces must be unique.

Example Configuration

"ServiceConfig": {
  "ServiceInterfaces": [
    {
      "Name": "ExampleService",
      "Events": [
        {
          "Name": "ExampleOverLimitEvent",
          "TypeRef": "OverLimitEnum"
        }
      ]
    }
  ]
},

ServiceInterfaces Properties

ServiceInterfaces Property

Description

Items Property

Items Property Description

Name

Name of Service Interface

 

 

Events

List of events associated with the service

Name

Name of the event

TypeRef

Reference to the data type of the event

Fields

List of fields of the service

Name

Name of the field

TypeRef

Reference to the data type of the field

HasGetter

Indicates if the field has a getter function

HasSetter

Indicates if the field has a setter function

HasNotifier

Indicates if the field has a notifier event

Methods

List of methods of the service

Name

Name of the method

IsFireAndForget

Indicates if the method is a FireAndForget type

Parameters

List of parameters for the method

 

Methods Parameters Properties

Parameters Items Property

Description

Allowed Values

Name

Name of parameter

 

TypeRef

Reference to the data type of the parameter

 

Direction

Direction of the parameter

IN, OUT, INOUT

3. Executable Configuration

In MICROSAR QuickCom, an executable represents an executable entity.

In other words, it is a binary that can be started as a process by the operating system.

Although the term application is often used to refer to an executable, their relation is 1:n not 1:1.

An application is more of an abstract notion for a high level feature that is implemented by one or many executables (application = 1:n executables).

notice

Note: The name of the executable must be unique.

Prerequisites and steps:

  1. You have defined your services.
  1. Change or add the executables you will need.
  2. Proceed with the deployment configuration.

Example Configuration

"ExecutableConfig": {
  "Executables": [
    {
      "Name": "ExampleConsumerExecutable",
      "ProvidedPorts": [
        {
          "Name": "Example_Provide",
          "ServiceInterfaceRef": "ExampleService"
        }
      ]
    },
    {
      "Name": "ExampleProviderExecutable",
      "RequiredPorts": [
        {
          "Name": " Example_Require",
          "ServiceInterfaceRef": "ExampleService"
        }
      ]
    }
  ]
},

Executable Properties

ExecutableConfig Property

Description

Items Property

Items Property Description

Name

Name of the Executable

 

 

ProvidedPorts

List of Ports that the executable uses to provide Services

Name

Name of the port

ServiceInterfaceRef

Reference to the Service Interface

RequiredPorts

List of Ports that the executable uses to request Services

Name

Name of the port

ServiceInterfaceRef

Reference to the Service Interface

4. Deployment Configuration

The previously defined executables can be deployed locally (in the same machine) or in distributed machines communicating via the network.

Local deployment

You can use IPC or SOME/IP when deploying your application locally. The default is IPC.

Deployment on a network

For network communication you will need to set SOME/IP and the network configuration (e.g. IP address).

 

Prerequisites and steps:

  1. You have defined your executables.
  1. Change or add the deployment configuration.
  2. Save the JSON file.
notice

Note: The choice between IPC and SOME/IP is made universally for the entire project. Therefore, it must be decided at the beginning of the project which one of the two methods will be used. SOME/IP can be used for both local and remote applications.

Example Configuration SOME/IP

"DeploymentConfig": {
  "NetworkConfig": {
    "UnicastIpAddress": "192.168.7.2",
    "ServiceDiscoveryIpAddress": "224.0.0.17"
  },
  "ServiceDeploymentConfig": {
    "DefaultDeploymentType": "SOMEIP"
  }
}

Example Configuration IPC

"DeploymentConfig": {
  "ServiceDeploymentConfig": {
    "DefaultDeploymentType": "IPC"
  }
}

DeploymentConfig Properties

DeploymentConfig Property

Description

Object Property

Object Property Description

ServiceDeploymentConfig

contains the configuration for the deployment of services

DefaultDeploymentType

The default deployment type for Services.

It can be either “SOMEIP” or “IPC”. Default: IPC.

NetworkConfig

contains the network configuration for the services.

Only needed when: DefaultDeploymentType=SOMEIP

UnicastIpAddress

The IPv4 address that will be used by services for communication. Must match the address of the machines network interface.

ServiceDiscoveryIpAddress

The IPv4 Multicast address that will be used for service discovery.