# map

The operation is used to map the ports of a test component to the ports of the test system interface.

- The operation directly maps one port to another with the in side mapped to the out side and vice versa.;
- a port may be mapped to several ports (map used several times);
- the messages (signatures) defined for both ports must match, i.e., the incoming port must be able to receive all outgoing messages from the mapped port;
- one side of the connection must be the test system interface.

Related keywords:

- create
- mtc
- self
- system

### map (component_referenceA: port_referenceA , component_referenceB: port_referenceB);

- The map keyword introduces the port mapping. The indices A and B refer to the two sides of the mapping (one of them must be the test system interface).

- component_reference is one of the following:

  - a reference returned by the create operation,
  - the keyword self when referring to the component where map is given,
  - the keyword system when referring to the test system interface,
  - the keyword mtc when referring to the main test component.

- port_reference points out the port to be mapped.

Example:

var Komp_CT vc_KompRef := Komp_CT.create;
map(vc_KompRef:Port11_PCO, system:Port2_PCO);

The component of type Komp_CT is created in the first line.
In the second line, its reference (vc_KompRef) is used to point out the port on the side A of the mapping (vc_KompRef:Port11_PCO).
On the side B of the mapping is the port called Port3_PCO of the test system interface.

BNF definition of map