Skip to main content

Binding Service Instances to the Connector

What You Will Do​

In this chapter you bind the three service instances created in SOME/IP Deployment and Service Instances to the Ethernet connector eth0 created in Topology — Ethernet Connector and Endpoints. In the System editor you select the connector eth0, press the + button in the SERVICE INSTANCES section of the ETHERNET CONNECTOR panel, and open the modal Select Service Instance. You check all three instances and Bind them, pick the UDP PORT of each instance card from the UDP endpoints created in chapter 3, and save.

When you finish this chapter, the connector eth0 in design/IVC.io.model holds three bindings — Provider_Sensor on UDP 20003, Actuator_Sensor on UDP 20001 and Fusion_Sensor on UDP 20002. In ARXML Export these bindings become the three SOMEIP-SERVICE-INSTANCE-TO-MACHINE-MAPPING elements of the reference design.

Before You Begin​

  • Start from the state at the end of SOME/IP Deployment and Service Instances. The design/ folder contains IVC.io.model (connector eth0 with the UDP endpoints 20001, 20002 and 20003) and SERVICE.io.model (provider Provider_Sensor, consumers Actuator_Sensor and Fusion_Sensor). No service instance is bound to the connector eth0 yet.
  • The VALIDATION panel shows No validation issues.. Right after Bind it shows one error for each binding that has no UDP port yet; each port you pick removes one, so the chapter ends with No validation issues. again.
  • You may close the AADesign:Interface tab left open in chapter 6. This chapter starts by opening System from DESIGN in the EDITOR view.

Nothing is typed on the keyboard in this chapter. The instances to bind and their ports are all picked from lists by clicking.

InstanceRoleUDP PORT to pickTCP PORT
Provider_SensorProvider (badge P)20003leave empty
Actuator_SensorConsumer (badge C)20001leave empty
Fusion_SensorConsumer (badge C)20002leave empty

Opening the SERVICE INSTANCES of the Connector eth0​

Opening the System Editor and Selecting the Connector​

  1. In the EDITOR view on the left, click System under DESIGN. The tab AADesign:System opens, and the canvas shows what you built in chapter 3: the HPC node Ecu [HPC], the green square inside it (the controller), the square on the border of the node (the connector eth0) and, joined to it by a blue line, the small blue square with the name EthernetCluster under it (the cluster).

  2. Click the connector eth0 on the node border. The ETHERNET CONNECTOR panel opens on the right and shows NAME eth0, CONTROLLER Ecu_EthernetController and CONNECTED CHANNEL EthernetCluster / PhysicalChannel. Below are the sections NETWORK ENDPOINT, APPLICATION ENDPOINTS, SERVICE INSTANCES, SOCKET CONNECTIONS, PARTIAL NETWORK, TX PDUS and RX PDUS.

  3. Click the NETWORK ENDPOINT header to collapse it. APPLICATION ENDPOINTS is already collapsed; if it is expanded, collapse it the same way. This is optional and only tidies the screen.

  4. Click the SERVICE INSTANCES header to expand it. The body shows No service instances defined, and at the right end of the header is the + button (tooltip Add Service Instance).

    The System editor with the connector eth0 selected. The SERVICE INSTANCES section is empty

    Figure 7-1. The System editor with the connector eth0 selected. ① The connector eth0 on the border of the node Ecu [HPC] (selected), ② the expanded SERVICE INSTANCES header, ③ the + button at the right of the header (tooltip Add Service Instance). The body shows No service instances defined.

Binding the Three Service Instances​

Picking the Instances in the Modal​

  1. Click the + button in the SERVICE INSTANCES header. The modal Select Service Instance opens. The first column holds each row's checkbox and has no header; the other column headers are PROTOCOL, ROLE, INSTANCE, SERVICE, SERVICE ID and INSTANCE ID, and there are three rows.

    • SOME/IP PROVIDER Provider_Sensor Sensor 11 1
    • SOME/IP CONSUMER Actuator_Sensor Sensor 11 ANY
    • SOME/IP CONSUMER Fusion_Sensor Sensor 11 ANY
  2. Check the checkboxes of all three rows. Clicking anywhere in a row also toggles its checkbox.

  3. Click the Bind button at the bottom right of the modal. Do not press Cancel on its left.

    The Select Service Instance modal with all three rows checked

    Figure 7-2. The modal Select Service Instance. ① The three rows, all checked — Provider_Sensor (PROVIDER, INSTANCE ID 1), Actuator_Sensor and Fusion_Sensor (CONSUMER, INSTANCE ID ANY), ② the Bind button to click. The SERVICE column shows the deployment name Sensor and the SERVICE ID column shows 11.

The modal lists the instances of design/SERVICE.io.model with the provider first and the consumers after it. The consumers' INSTANCE ID ANY is the REQUIRED INSTANCE ID ANY (model value 65535) you left unchanged in chapter 6. When you Bind all three rows at once, the cards are created in this same order.

Checking the Binding Result​

  1. The modal closes and three cards appear in the SERVICE INSTANCES section. Each summary line shows the badge SOME/IP, the role badge P (provider) or C (consumer), the instance name and the delete ×; the port slot at the right of the summary line is still empty.

  2. The tab AADesign:System gets the modified mark ●, and the V icon in the footer gets a red badge 3.

    The SERVICE INSTANCES section right after binding. The three cards have no port

    Figure 7-3. The SERVICE INSTANCES section right after binding. ① The card SOME/IP P Provider_Sensor, ② the card SOME/IP C Actuator_Sensor, ③ the card SOME/IP C Fusion_Sensor. None of the three cards has a port at the right of its summary line.

The badge 3 counts three validation errors, one for each binding that has no UDP port yet. The VALIDATION panel (click the V icon if it is closed) shows the badge 3 next to its title and three rows, one per instance: ELEMENT TYPE SomeipServiceInstanceToMachineMapping, NAME the instance name, an empty CONSTR, and a DESCRIPTION such as Service "Sensor" uses UDP, but the mapping of "Provider_Sensor" on "Ecu/eth0" defines no UDP port.. At the default column widths ELEMENT TYPE and DESCRIPTION are cut off with …. Each port you pick in the next sections removes one of these errors.

Note. Bind binds the checked rows in a single edit. A provider instance can be bound to only one Ethernet connector in the project, while a consumer instance can be bound to each connector. An instance already bound to this connector is not listed in the modal again.

Assigning the UDP Port of the Provider Provider_Sensor​

Of the three instances, the provider is shown as a procedure. The port is picked in the UDP PORT field of the card, from the list of endpoints created in chapter 3.

Expanding the Card and Opening the Port List​

  1. Click the summary line of the card SOME/IP P Provider_Sensor to expand it. Three fields appear: IP ADDRESS 127.0.0.1 (read-only), TCP PORT (empty, hint Unsigned Integer (0..65535)) and UDP PORT (empty, same hint). Below them are the rows TLS (TCP) and TLS (UDP), each with a + button (tooltip Add TLS).

  2. Click the ▾ button to the right of the UDP PORT field (tooltip Select from Application Endpoints). A list 20001, 20002, 20003 opens below the field.

    The Provider_Sensor card expanded with the UDP PORT list open

    Figure 7-4. The expanded Provider_Sensor card with the UDP PORT list open. ① IP ADDRESS = 127.0.0.1 (read-only), ② the ▾ button to the right of the UDP PORT field, ③ the item 20003 to click in the list. The TCP PORT field has no ▾ button, and the open list covers the + buttons of the rows TLS (TCP) and TLS (UDP).

IP ADDRESS is filled with the unicast address of the connector eth0 and cannot be changed. The three items in the list are the ports of the UDP endpoints in the APPLICATION ENDPOINTS of this connector. Since no TCP endpoint was created, the TCP PORT field gets no ▾ button. The rows TLS (TCP) and TLS (UDP) hold this binding's TLS settings for TCP and for UDP; the reference design has none, so this chapter leaves them empty.

Picking the Port 20003​

  1. Click 20003 in the list. The UDP PORT field now holds 20003, and the card stays expanded. The badge on the V icon in the footer changes to 2.

  2. Click the connector eth0 on the canvas again to redraw the panel, then click the summary line of the card Provider_Sensor to expand it again. The right of the summary line shows UDP:20003, and the UDP PORT field is 20003.

  3. Leave TCP PORT and the rows TLS (TCP) and TLS (UDP) empty.

    The Provider_Sensor card with UDP port 20003 assigned

    Figure 7-5. The Provider_Sensor card after picking the port. ① UDP:20003 at the right of the summary line, ② IP ADDRESS = 127.0.0.1, ③ the TCP PORT left empty, ④ UDP PORT = 20003. Below them the rows TLS (TCP) and TLS (UDP) stay empty, each showing only its + button. The two cards below, Actuator_Sensor and Fusion_Sensor, are collapsed and have no port yet.

Note. Right after you pick a port, the summary line does not change yet; only the UDP PORT field receives the value. Once you click the connector again and the panel is redrawn, UDP:20003 is appended to the summary line. Instead of picking from the list you may also type a number into the UDP PORT field, but this chapter only uses the list.

Assigning the Ports of the Consumers Actuator_Sensor and Fusion_Sensor​

Pick the ports of the two consumers the same way. Only the item to pick differs.

CardItem to click in the UDP PORT listSummary line
SOME/IP C Actuator_Sensor20001UDP:20001
SOME/IP C Fusion_Sensor20002UDP:20002
  1. Click the summary line of the card Actuator_Sensor to expand it, click the ▾ button of the UDP PORT field, and click 20001 in the list. The badge on the V icon changes to 1.

  2. Click the summary line of the card Fusion_Sensor to expand it, click the ▾ button of the UDP PORT field, and click 20002 in the list. The badge on the V icon disappears.

  3. Click the connector eth0 again. The three cards are shown collapsed with Provider_Sensor UDP:20003, Actuator_Sensor UDP:20001 and Fusion_Sensor UDP:20002 in their summary lines.

  4. Click the APPLICATION ENDPOINTS header to expand it. The three cards from chapter 3, UDP eth0, 127.0.0.1:20001, UDP eth0, 127.0.0.1:20002 and UDP eth0, 127.0.0.1:20003, are still there and no new endpoint has appeared.

    The panel after assigning ports to all three instances. APPLICATION ENDPOINTS is unchanged from chapter 3

    Figure 7-6. The panel after all ports are assigned. ① Provider_Sensor UDP:20003, ② Actuator_Sensor UDP:20001, ③ Fusion_Sensor UDP:20002, ④ the expanded APPLICATION ENDPOINTS — the three cards UDP eth0, 127.0.0.1:20001 / :20002 / :20003 are unchanged from chapter 3.

A port picked from the list references the UDP endpoint with the same number as it is. That is why the number of cards in APPLICATION ENDPOINTS stays at three.

Saving​

  1. Click an empty spot on the canvas to deselect the connector.

  2. Press Ctrl+S. The modified mark ● on the tab AADesign:System disappears and design/IVC.io.model is saved.

  3. Click the connector eth0 again. SERVICE INSTANCES shows the cards Provider_Sensor UDP:20003, Actuator_Sensor UDP:20001 and Fusion_Sensor UDP:20002. If you expand the TX PDUS and RX PDUS headers, both show No PDUs referenced.

    The System editor with the connector eth0 selected again after saving. The three bindings have ports

    Figure 7-7. The System editor after saving. ① The connector eth0 selected again, ② the three cards in the SERVICE INSTANCES section — Provider_Sensor UDP:20003, Actuator_Sensor UDP:20001, Fusion_Sensor UDP:20002. The tab AADesign:System has no modified mark ●, and the V icon in the footer carries no badge.

The following entry is added to the connector eth0 in the saved design/IVC.io.model. Everything else (NETWORK ENDPOINT, APPLICATION ENDPOINTS and so on) stays as saved in chapter 3.

"service-instances": [
{ "instance-type": "someip", "instance-ref": "Provider_Sensor", "role": "provider", "udp-port": 20003 },
{ "instance-type": "someip", "instance-ref": "Actuator_Sensor", "role": "consumer", "udp-port": 20001 },
{ "instance-type": "someip", "instance-ref": "Fusion_Sensor", "role": "consumer", "udp-port": 20002 }
]

For the TCP PORT left empty, no tcp-port key is written at all, and the empty rows TLS (TCP) and TLS (UDP) write nothing either. design/SERVICE.io.model does not change.

Viewing the Validation Result​

  1. Look at the V icon in the footer at the bottom of the window, the fifth icon from the left. It carries no badge, but its tooltip still reads Validation: 1 error(s), 0 warning(s), 0 info(s), the last non-zero count; the VALIDATION panel shows the current result.

  2. Look at the VALIDATION panel. If it is closed, click the V icon in the footer.

    The Validation panel showing No validation issues.

    Figure 7-8. The VALIDATION panel after saving. The header carries no badge, and under the column headers ELEMENT TYPE, NAME, DESCRIPTION and CONSTR there is the single line No validation issues..

Note. The three errors that appeared right after Bind are gone; each one left when its binding got its UDP port. There is no row for the three bindings created in this chapter, the connector eth0, the endpoints Ecu_eth0_UDP_20001, Ecu_eth0_UDP_20002 and Ecu_eth0_UDP_20003, or the PDUs of the automatically derived signals. Even if you skip chapter 6 and start from this chapter, the same automatic derivation runs the moment you press Bind, and it adds no finding either.

Why Is It Designed This Way?​

  • The three bindings are the three SOMEIP-SERVICE-INSTANCE-TO-MACHINE-MAPPING elements of the reference design. The reference design has the mappings Ecu_ProviderMapping_Provider_Sensor (SERVICE-INSTANCE-REF Provider_Sensor, UDP-PORT-REF Ecu_eth0_UDP_20003), Ecu_ConsumerMapping_Actuator_Sensor (Actuator_Sensor, Ecu_eth0_UDP_20001) and Ecu_ConsumerMapping_Fusion_Sensor (Fusion_Sensor, Ecu_eth0_UDP_20002), and all three point to Ecu/eth0 through COMMUNICATION-CONNECTOR-REF. The instance and port combinations of this chapter are those values.
  • The mapping names are not entered. The names {HPC}_{Provider|Consumer}Mapping_{instance} are assigned by the exporter in ARXML Export. The screen shows only the instance name and the port.
  • The ports are picked from the endpoints of chapter 3. The reference design has only the three AP-APPLICATION-ENDPOINT elements Ecu_eth0_UDP_20001, Ecu_eth0_UDP_20002 and Ecu_eth0_UDP_20003, and the mappings reference these three. Picking from the list references the endpoint with the same number as it is, so no endpoint is added.
  • TCP PORT is left empty. The reference design has no TCP endpoint and no TCP-PORT-REF in the mappings. Leaving the field empty means no tcp-port key is written.
  • The provider gets 20003, the consumers 20001 and 20002. That is how the UDP-PORT-REF of the reference design is set. Because the TRANSPORT of the event SensorData and the method Calculation in the chapter 6 deployment is UDP, only UDP ports are needed.

Checklist​

  • The SERVICE INSTANCES of the connector eth0 has the three cards SOME/IP P Provider_Sensor, SOME/IP C Actuator_Sensor and SOME/IP C Fusion_Sensor, in this order.
  • The right of the summary lines shows UDP:20003, UDP:20001 and UDP:20002 respectively.
  • When a card is expanded, IP ADDRESS is 127.0.0.1, TCP PORT is empty, UDP PORT is 20003, 20001 and 20002 respectively, and the rows TLS (TCP) and TLS (UDP) are empty.
  • APPLICATION ENDPOINTS has only the three cards from chapter 3, UDP eth0, 127.0.0.1:20001 / :20002 / :20003.
  • TX PDUS and RX PDUS show No PDUs referenced.
  • The tab AADesign:System has no modified mark ●.
  • The VALIDATION panel shows No validation issues. and the header carries no badge.

Next Step​

In Adaptive Applications and Ports, you create the five Adaptive Applications Sensor, Fusion, Actuator, CM and EM and attach ports of the service interface Sensor to them.