# fuchsia.hardware.interconnect

<br />

Added: HEAD

## **PROTOCOLS**

## Device

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=85)*

### GetNodeGraph

Returns a list of all nodes and edges between those nodes.
Edges are directional, so if an interconnect allows bidirectional traffic,
it should be listed twice, once for each direction of traffic flow.
Edges must only be specified for directly adjacent nodes.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Device_GetNodeGraph_Result` |

### GetPathEndpoints

The paths within the interconnect node graph which see bus traffic
and need to have constraints applied to by drivers. Each path will have
a device node instantiated for it.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Device_GetPathEndpoints_Result` |

### SetNodesBandwidth

#### Request

| Name | Type |
|---|---|
| `nodes` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#NodeBandwidth>` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Device_SetNodesBandwidth_Result` |

## Path

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=117)*

Represents a path from a node in one interconnect to another.

<br />

### SetBandwidth

Sets the bandwidth interconnect path.

#### Request

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#BandwidthRequest` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Path_SetBandwidth_Result` |

## **STRUCTS**

### Device_GetNodeGraph_Response

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=96)*

| Field | Type | Description | Default |
|---|---|---|---|
| `nodes` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Node>` |   | No default |
| `edges` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Edge>` |   | No default |

### Device_GetPathEndpoints_Response

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=104)*

| Field | Type | Description | Default |
|---|---|---|---|
| `paths` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#PathEndpoints>` | Paths need not be between adjacent nodes, but a valid path from source node to destination node must exist in the node graph. | No default |

### Device_SetNodesBandwidth_Response

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=88)*

| Field | Type | Description | Default |
|---|---|---|---|
| `aggregated_bandwidth` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#AggregatedBandwidth>` |   | No default |

### Path_SetBandwidth_Response

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=119)*

\<EMPTY\>

## **TABLES**

### AggregatedBandwidth

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=28)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `node_id` | `uint32` | Unique ID that refers to the node this bandwidth is requested for. |
| ### 2 | `average_bandwidth_bps` | `uint64` | The computed aggregate average bandwidth value, derived from requests. |
| ### 3 | `peak_bandwidth_bps` | `uint64` | The computed aggregate peak bandwidth value, derived from requests. |

### BandwidthRequest

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=14)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `average_bandwidth_bps` | `uint64` |   |
| ### 2 | `peak_bandwidth_bps` | `uint64` |   |
| ### 3 | `tag` | `uint32` | Optional tag to be associated with the request. |

### Edge

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=50)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `src_node_id` | `uint32` | Source where bus traffic may originate. |
| ### 2 | `dst_node_id` | `uint32` | Destination where bus traffic may travel to. |
| ### 3 | `weight` | `uint32` | An optional weight to apply to the edge. Used for calculating the optimal path from between two nodes. If there are multiple paths from one node to another, the path will be calculated by optimizing for the smallest sum of all edge weights along the path. If not provided, the weight is assumed to be 1. |

### Metadata

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=78)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `paths` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#PathEndpoints>` | Paths need not be between adjacent nodes, but a valid path from source node to destination node must exist in the node graph. |

### Node

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=37)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `id` | `uint32` | Unique ID that refers to this node in other structs. |
| ### 2 | `name` | `string:64` | The name of the node. |
| ### 3 | `interconnect_name` | `string:64` | An optional name of the interconnect the node lives on. |
| ### 4 | `initial_avg_bandwidth_bps` | `uint64` | Optional average bandwidth value to start with. If not provided, defaults to 0. |
| ### 5 | `initial_peak_bandwidth_bps` | `uint64` | Optional peak bandwidth value to start with. If not provided, defaults to 0. |

### NodeBandwidth

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=21)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `node_id` | `uint32` | Unique ID that refers to the node this bandwidth is requested for. |
| ### 2 | `requests` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#BandwidthRequest>:64` | Set of requests for all edges to this node. |

### PathEndpoints

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=63)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `string:64` | Name for the path which is used for binding. |
| ### 2 | `id` | `uint32` | Id for the path which is used for binding. |
| ### 3 | `src_node_id` | `uint32` | Source where bus traffic may originate. |
| ### 4 | `dst_node_id` | `uint32` | Destination where bus traffic may travel to. |
| ### 5 | `tag` | `uint32` | Optional tag associated with the path. Will be attached to bandwidth requests from the client of the path automatically. |

## **UNIONS**

### Device_GetNodeGraph_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=96)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Device_GetNodeGraph_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Device_GetPathEndpoints_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=104)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Device_GetPathEndpoints_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Device_SetNodesBandwidth_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=88)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Device_SetNodesBandwidth_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Status` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Path_SetBandwidth_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=119)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.interconnect#Path_SetBandwidth_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Status` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [EDGES_MAX](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=12) | `64` | `uint32` | The largest allowed number of edges from one node to another. |
| [NAME_MAX_LENGTH](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=10) | `64` | `uint32` | The longest allowed length for an interconnect or node name. |

## **SERVICES**

### PathService

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=122)*

| Name | Type | Transport |
|---|---|---|
| [path](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=123) | `fuchsia.hardware.interconnect/Path` | Channel |

<br />

### Service

*Defined in [fuchsia.hardware.interconnect/interconnect.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=111)*

| Name | Type | Transport |
|---|---|---|
| [device](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.interconnect/interconnect.fidl;l=112) | `fuchsia.hardware.interconnect/Device` | Channel |

<br />