Search Results for

    Show / Hide Table of Contents

    Class SysPin

    System-side implementation of the abstract base class Pin, which declares the API for the developer.

    Inheritance
    object
    Pin
    SysPin
    Namespace: AS2.Sim
    Assembly: .dll
    Syntax
    public class SysPin : Pin

    Constructors

    | Edit this page View Source

    SysPin(SysPartitionSet, int, Direction, int, bool, int, int)

    Declaration
    public SysPin(SysPartitionSet partitionSet, int id, Direction localDir, int globalLabel, bool head, int localEdgeOffset, int globalEdgeOffset)
    Parameters
    Type Name Description
    SysPartitionSet partitionSet
    int id
    Direction localDir
    int globalLabel
    bool head
    int localEdgeOffset
    int globalEdgeOffset

    Fields

    | Edit this page View Source

    globalEdgeOffset

    The index of the pin on its edge relative to the global counter-clockwise direction.

    Declaration
    public int globalEdgeOffset
    Field Value
    Type Description
    int
    | Edit this page View Source

    globalLabel

    The global label of the edge on which this pin lies.

    Declaration
    public int globalLabel
    Field Value
    Type Description
    int
    | Edit this page View Source

    head

    Indicates whether the pin lies on the particle's head.

    Declaration
    public bool head
    Field Value
    Type Description
    bool
    | Edit this page View Source

    id

    The unique ID within the pin configuration.

    Declaration
    public int id
    Field Value
    Type Description
    int
    | Edit this page View Source

    localDir

    The local direction of the edge on which this pin lies.

    Declaration
    public Direction localDir
    Field Value
    Type Description
    Direction
    | Edit this page View Source

    localEdgeOffset

    The index of the pin on its edge relative to the particle's chirality.

    Declaration
    public int localEdgeOffset
    Field Value
    Type Description
    int
    | Edit this page View Source

    partitionSet

    The partition set to which this pin belongs.

    Declaration
    public SysPartitionSet partitionSet
    Field Value
    Type Description
    SysPartitionSet

    Properties

    | Edit this page View Source

    Direction

    The local direction of the edge on which this pin is located.

    Declaration
    public override Direction Direction { get; }
    Property Value
    Type Description
    Direction
    Overrides
    Pin.Direction
    | Edit this page View Source

    Id

    The ID of this pin.

    Declaration
    public override int Id { get; }
    Property Value
    Type Description
    int
    Overrides
    Pin.Id
    | Edit this page View Source

    IsOnHead

    Whether the edge this pin belongs to is on the particle's head.

    See also IsOnTail.

    Declaration
    public override bool IsOnHead { get; }
    Property Value
    Type Description
    bool
    Overrides
    Pin.IsOnHead
    | Edit this page View Source

    IsOnTail

    Whether the edge this pin belongs to is on the particle's tail.

    See also IsOnHead.

    Declaration
    public override bool IsOnTail { get; }
    Property Value
    Type Description
    bool
    Overrides
    Pin.IsOnTail
    | Edit this page View Source

    Offset

    The offset of this pin on its edge.

    The pins on an edge are ordered according to the chirality of the particle. Their offsets range from 0 to PinsPerEdge - 1.

    Declaration
    public override int Offset { get; }
    Property Value
    Type Description
    int
    Overrides
    Pin.Offset
    | Edit this page View Source

    PartitionSet

    The partition set to which this pin currently belongs.

    Declaration
    public override PartitionSet PartitionSet { get; }
    Property Value
    Type Description
    PartitionSet
    Overrides
    Pin.PartitionSet

    Methods

    | Edit this page View Source

    GetReceivedMessage()

    Returns the message this pin has received in the last round, if it has received one and it belongs to the current pin configuration.

    Declaration
    public override Message GetReceivedMessage()
    Returns
    Type Description
    Message

    The message received by this pin in the last round, if it exists, otherwise null.

    Overrides
    Pin.GetReceivedMessage()
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if this pin does not belong to the current pin configuration.

    | Edit this page View Source

    HasReceivedMessage()

    Checks whether this pin has received a message in the last round, if the pin configuration it belongs to is the current one.

    Declaration
    public override bool HasReceivedMessage()
    Returns
    Type Description
    bool

    true if and only if this pin has received a message in the last round.

    Overrides
    Pin.HasReceivedMessage()
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if this pin does not belong to the current pin configuration.

    | Edit this page View Source

    Print()

    Declaration
    public string Print()
    Returns
    Type Description
    string
    | Edit this page View Source

    ReceivedBeep()

    Checks whether this pin has received a beep in the last round, if the pin configuration it belongs to is the current one.

    Declaration
    public override bool ReceivedBeep()
    Returns
    Type Description
    bool

    true if and only if this pin has received a beep in the last round.

    Overrides
    Pin.ReceivedBeep()
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if this pin does not belong to the current pin configuration.

    | Edit this page View Source

    SendBeep()

    Sends a beep on this pin if the pin configuration it belongs to is the next one.

    Declaration
    public override void SendBeep()
    Overrides
    Pin.SendBeep()
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if this pin does not belong to the next pin configuration.

    | Edit this page View Source

    SendMessage(Message)

    Sends a message on this pin if the pin configuration it belongs to is the next one.

    Declaration
    public override void SendMessage(Message msg)
    Parameters
    Type Name Description
    Message msg

    The message to be sent.

    Overrides
    Pin.SendMessage(Message)
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if this pin does not belong to the next pin configuration.

    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX