.NET SDK Documentation

    Show / Hide Table of Contents

    Class ReserveBehaviorControl

    A ReserveBehaviorControl object can be used to suppress the ordinary idle behaviors of the Robot and keep Vector still between SDK control instances.

    Care must be taken when blocking background behaviors, as this may make Vector appear non-responsive.

    As long as this object is not disposed, background behaviors will not activate, keeping Vector still while other SDK scripts may take control. Highest-level behaviors like returning to the charger due to low battery will still activate.

    If there is a need to keep background behaviors from activating in a single script, the class may be used to reserve behavior control while in scope.

    Inheritance
    Object
    ReserveBehaviorControl
    Implements
    IDisposable
    Namespace: Anki.Vector
    Assembly: Anki.Vector.dll
    Syntax
    public class ReserveBehaviorControl : IDisposable

    Constructors

    | Improve this Doc View Source

    ReserveBehaviorControl(RobotConfiguration, Boolean)

    Initializes a new instance of the ReserveBehaviorControl class.

    public ReserveBehaviorControl(RobotConfiguration robotConfiguration, bool reserveControl = true)
    Parameters
    Type Name Description
    RobotConfiguration robotConfiguration

    The robot configuration.

    Boolean reserveControl

    if set to true to reserve control on construction.

    Exceptions
    Type Condition
    VectorControlException

    Unable to reserve behavior control

    | Improve this Doc View Source

    ReserveBehaviorControl(Boolean)

    Initializes a new instance of the ReserveBehaviorControl class.

    public ReserveBehaviorControl(bool reserveControl = true)
    Parameters
    Type Name Description
    Boolean reserveControl

    if set to true to reserve control on construction.

    Exceptions
    Type Condition
    VectorConfigurationException

    No Robot Configuration found; please run the configuration tool to setup the robot connection.

    Methods

    | Improve this Doc View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    Releases unmanaged and - optionally - managed resources.

    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    | Improve this Doc View Source

    ReleaseControl()

    Releases control of Vector

    public Task ReleaseControl()
    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    | Improve this Doc View Source

    ReserveControl()

    Reserves control of Vector

    public Task ReserveControl()
    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    Exceptions
    Type Condition
    VectorControlException

    Unable to reserve behavior control

    Implements

    System.IDisposable

    See Also

    IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2019 by Wayne Venables