Unosquare
    Show / Hide Table of Contents

    Class GpioPinServiceBase

    Provides a base implementation of a GPIO Pin Service.

    Inheritance
    Object
    GpioPinServiceBase
    GpioPinAlertService
    GpioPinClockService
    GpioPinInterruptService
    GpioPinPwmService
    GpioPinServoService
    GpioPinSoftPwmService
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unosquare.PiGpio.ManagedModel
    Syntax
    public abstract class GpioPinServiceBase

    Constructors

    GpioPinServiceBase(GpioPin)

    Initializes a new instance of the GpioPinServiceBase class.

    Declaration
    protected GpioPinServiceBase(GpioPin pin)
    Parameters
    Type Name Description
    GpioPin pin

    The pin.

    Properties

    IsAvailable

    Gets a value indicating whether this service is available on the associated pin.

    Declaration
    public bool IsAvailable { get; }
    Property Value
    Type Description
    Boolean

    Pin

    Gets the associated pin.

    Declaration
    protected GpioPin Pin { get; }
    Property Value
    Type Description
    GpioPin

    Methods

    ResolveAvailable()

    Resolves the availability of this service for the associated pin.

    Declaration
    protected abstract bool ResolveAvailable()
    Returns
    Type Description
    Boolean

    True when the service is deemed as available.

    ValidateAvailable()

    Validates that this service is available. Otherwise, a NotSupportedException is thrown.

    Declaration
    protected void ValidateAvailable()
    Exceptions
    Type Condition
    NotSupportedException

    Only pins marked as IsUserGpio support this service.

    Comments

    Back to top Copyright © 2017-2019 Unosquare