pacman.model.tags package

Module contents

class pacman.model.tags.Tags[source]

Bases: object

Represents assigned IP Tag and Reverse IP Tags.

add_ip_tag(ip_tag, vertex)[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, vertex)[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)[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)[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
ip_tags

The IP tags assigned

Return type:iterable(IPTag)
reverse_ip_tags

The reverse IP tags assigned

Return type:iterable(ReverseIPTag)