addStructMap method

void addStructMap(
  1. String structFieldFullName,
  2. PortReference reference
)

Creates a mapping from structFieldFullName to a PortReference, so that each time port receives structFieldFullName, it will actually return the specified reference.

This is intended for mapping struct members to their corresponding slices of actual ports on a BridgeModule. The structFieldFullName must be a hierarchical name liked "myStruct.myField" and contain at least one ..

Implementation

void addStructMap(String structFieldFullName, PortReference reference) {
  if (!structFieldFullName.contains('.')) {
    throw RohdBridgeException(
        'Struct field name $structFieldFullName must contain a `.`');
  }

  _structMap[structFieldFullName] = reference;
}