pacman.model.tags package

Module contents

class pacman.model.tags.Tags

Bases: object

Represents assigned IP Tag and Reverse IP Tags.

add_ip_tag(ip_tag: IPTag, vertex: MachineVertex)[source]

Add an IP tag.

Parameters:
  • ip_tag (IPTag) – The tag to add

  • vertex (MachineVertex) – The machine vertex by which the tag is to be used

Raises:

PacmanInvalidParameterException

  • If the combination of (board-address, tag) has already been assigned to an IP tag with different properties

  • If the combination of (board-address, tag) has already been assigned to a reverse IP tag

add_reverse_ip_tag(reverse_ip_tag: ReverseIPTag, vertex: MachineVertex)[source]

Add a reverse IP tag.

Parameters:
Raises:

PacmanInvalidParameterException

  • If the combination of (board-address, tag) has already been assigned to an IP tag or Reverse IP tag

  • If the port of the tag has already been assigned on the given board-address

get_ip_tags_for_vertex(vertex: MachineVertex) List[IPTag] | None[source]

Get the IP Tags assigned to a given machine vertex.

Parameters:

vertex (MachineVertex) – The vertex to get the tags for

Returns:

An iterable of IPTag, or None if the vertex has no tags

Return type:

iterable(IPTag) or None

get_reverse_ip_tags_for_vertex(vertex: MachineVertex) Iterable[ReverseIPTag] | None[source]

Get the Reverse IP Tags assigned to a given machine vertex.

Parameters:

vertex (MachineVertex) – The vertex to get the tags for

Returns:

An iterable of ReverseIPTag, or None if the vertex has no tags

Return type:

iterable(ReverseIPTag) or None

property ip_tags: Iterator[IPTag]

The IP tags assigned.

Return type:

iterable(IPTag)

property ip_tags_vertices: Iterable[Tuple[IPTag, MachineVertex]]

The list of (IPTag, vertex) pairs stored.

Return type:

iterable(tuple(IPTag, MachineVertex))

property reverse_ip_tags: Iterator[ReverseIPTag]

The reverse IP tags assigned.

Return type:

iterable(ReverseIPTag)