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
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The pin associated with the bi-directional port. |
Meadow.Hardware.IMeadowIOController | ioController | The Meadow I/O controller. |
System.Boolean | initialState | The initial state of the port. |
Meadow.Hardware.ResistorMode | resistorMode | The resistor mode for the port. |
Meadow.Hardware.PortDirectionType | initialDirection | The 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
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The pin associated with the bi-directional port. |
Meadow.Hardware.IMeadowIOController | ioController | The Meadow I/O controller. |
System.Boolean | initialState | The initial state of the port. |
Meadow.Hardware.ResistorMode | resistorMode | The resistor mode for the port. |
Meadow.Hardware.PortDirectionType | initialDirection | The initial direction of the port. |
Meadow.Hardware.OutputType | outputType | The 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
Type | Name | Description |
---|---|---|
System.Boolean | disposing | A boolean value indicating whether the port is being disposed. |