Skip to main content

Class BiDirectionalInterruptPortBase

A base class for IBiDirectionalInterruptPort implementations

Assembly: Meadow.Contracts.dll​
View Source​
Declaration
public abstract class BiDirectionalInterruptPortBase : BiDirectionalPortBase, IBiDirectionalPort, IBiDirectionalInterruptPort, IDigitalInterruptPort, IDigitalInputPort, IObservable<IChangeResult<DigitalState>>, IDigitalOutputPort, IDigitalPort, IPort<IDigitalChannelInfo>, IDisposable

Inheritance: System.Object -> Meadow.Hardware.PortBase<C>

Derived:
Meadow.Hardware.BiDirectionalInterruptPort

Implements:

Expand

Properties​

Observers​

Gets a list of port State observers

View Source​
Declaration
protected List<IObserver<IChangeResult<DigitalState>>> Observers { get; }

DebounceDuration​

Gets or sets the debounce duration of the port

View Source​
Declaration
public abstract TimeSpan DebounceDuration { get; set; }

GlitchDuration​

Gets or sets the glitch filter duration of the port

View Source​
Declaration
public abstract TimeSpan GlitchDuration { get; set; }

InterruptMode​

Gets or sets a value indicating the type of interrupt monitoring this input.

View Source​
Declaration
public InterruptMode InterruptMode { get; protected set; }

Methods​

RaiseChangedAndNotify(DigitalPortResult)​

Raises the Changed event and notifies all observers of a state change

View Source​
Declaration
protected void RaiseChangedAndNotify(DigitalPortResult changeResult)
Parameters​
TypeName
Meadow.Hardware.DigitalPortResultchangeResult

Subscribe(IObserver<IChangeResult<DigitalState>>)​

Adds a state observer to the port

View Source​
Declaration
public IDisposable Subscribe(IObserver<IChangeResult<DigitalState>> observer)
Returns​

System.IDisposable

Parameters​
TypeName
System.IObserver<Meadow.IChangeResult<Meadow.Hardware.DigitalState>>observer

Dispose(bool)​

Releases allocated port resources

View Source​
Declaration
protected override void Dispose(bool disposing)
Parameters​
TypeName
System.Booleandisposing

Events​

Changed​

Event raised when the port value changes

View Source​
Declaration
public event EventHandler<DigitalPortResult> Changed
Event Type​

System.EventHandler<Meadow.Hardware.DigitalPortResult>

Implements​