Skip to content

Assembly Automation

This section covers how to control the hardware of a booked Assembly programmatically — during a test run or as part of a larger automation flow. There are three complementary approaches:

  • Assembly Manager — a C# library for switching devices on and off directly from CANoe test cases, without dealing with access handling or REST specifics.
  • Device Sequences — ordered lists of device operations that you save and replay on an Assembly through the vHaaS UI or API.
  • Direct HAI REST API — low-level control of the HAI extension boards (multiplexer and relay cards), described below.

Direct hardware control via the HAI REST API

The optional extension boards of an Assembly are controlled by its HAI. Where the hardware itself is described under Fundamentals, the endpoints to drive it are collected here.

Multiplexer boards

See the Assembly page for what the multiplexer board does.

Caution

The multiplexing devices have to be initialized by deactivating all channels (activate_channel: null).

Configuration body

The configuration endpoint takes a single activate_channel field: a capital character from A to D to activate that channel, or null to deactivate all channels.

  1. Status endpoint — get the current state of the multiplexer hardware.

    GET http://{hai_ip}/v1/multiplexers/{i2c-address}
    
  2. Configuration endpoint — configure the Multiplexer-Board hardware.

    PATCH http://{hai_ip}/v1/multiplexers/{i2c-address}
    Content-Type: application/json
    
    # Example: activate channel A on the Multiplexer-Board at address 0x38
    {"activate_channel": "A"}
    
    # Example: deactivate all channels
    {"activate_channel": null}
    

Relay cards

See the Assembly page for what the relay card does.

Configuration body

Both endpoints address a specific card via the i2c-address path parameter (a two-digit hexadecimal string, e.g. 0x27). The configuration body is an array of channel entries, each with a channel (AG) and a status ("on" or "off"). Multiple entries can be sent in one request.

  1. Status endpoint — get the current state of the relay-card hardware.

    GET http://{hai_ip}/v1/relay-cards/{i2c-address}
    
  2. Configuration endpoint — configure the relay-card hardware.

    PATCH http://{hai_ip}/v1/relay-cards/{i2c-address}
    Content-Type: application/json
    
    # Example: switch channel B on the card at address 0x27 on
    [{"channel": "B", "status": "on"}]