Skip to main content

Class BiDirectionalPort

Represents a bi-directional port.

Assembly: Meadow.dll​
View Source​
Declaration
public class BiDirectionalPort : BiDirectionalPortBase, IBiDirectionalPort, IDigitalInputPort, IDigitalOutputPort, IDigitalPort, IPort<IDigitalChannelInfo>, IDisposable

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

Implements:
Meadow.Hardware.IBiDirectionalPort, System.IDisposable

Properties​

IOController​

Gets or sets the port's IOController

View Source​
Declaration
protected IMeadowIOController IOController { get; }

LastEventTime​

Gets or sets the last event time for the port.

View Source​
Declaration
protected DateTime LastEventTime { get; set; }

Direction​

Gets or sets the current direction of the port

View Source​
Declaration
public override PortDirectionType Direction { get; set; }

State​

Gets or sets the current state of the port

View Source​
Declaration
public override bool State { get; set; }

Methods​

From(IPin, IMeadowIOController, bool, ResistorMode, PortDirectionType)​

Creates a new instance of Meadow.Hardware.BiDirectionalPort with the specified parameters.

View Source​
Declaration
public static BiDirectionalPort From(IPin pin, IMeadowIOController ioController, bool initialState = false, ResistorMode resistorMode = ResistorMode.Disabled, PortDirectionType initialDirection = PortDirectionType.Input)
Returns​

Meadow.Hardware.BiDirectionalPort.

Parameters​
TypeNameDescription
Meadow.Hardware.IPinpinThe pin associated with the bi-directional port.
Meadow.Hardware.IMeadowIOControllerioControllerThe Meadow I/O controller.
System.BooleaninitialStateThe initial state of the port.
Meadow.Hardware.ResistorModeresistorModeThe resistor mode for the port.
Meadow.Hardware.PortDirectionTypeinitialDirectionThe initial direction of the port.

From(IPin, IMeadowIOController, bool, ResistorMode, PortDirectionType, OutputType)​

Creates a new instance of Meadow.Hardware.BiDirectionalPort with the specified parameters.

View Source​
Declaration
public static BiDirectionalPort From(IPin pin, IMeadowIOController ioController, bool initialState, ResistorMode resistorMode, PortDirectionType initialDirection, OutputType outputType)
Returns​

Meadow.Hardware.BiDirectionalPort.

Parameters​
TypeNameDescription
Meadow.Hardware.IPinpinThe pin associated with the bi-directional port.
Meadow.Hardware.IMeadowIOControllerioControllerThe Meadow I/O controller.
System.BooleaninitialStateThe initial state of the port.
Meadow.Hardware.ResistorModeresistorModeThe resistor mode for the port.
Meadow.Hardware.PortDirectionTypeinitialDirectionThe initial direction of the port.
Meadow.Hardware.OutputTypeoutputTypeThe output type for the port.

~BiDirectionalPort()​

Finalizes the Port instance

View Source​
Declaration
protected ~BiDirectionalPort()

Dispose(bool)​

Releases the resources used by the port.

View Source​
Declaration
protected override void Dispose(bool disposing)
Parameters​
TypeNameDescription
System.BooleandisposingA boolean value indicating whether the port is being disposed.

Implements​