Skip to main content

Class PCanFdBus

Represents a PCAN FD (Flexible Data Rate) CAN bus implementation.

Assembly: Meadow.PCanBasic.dll
View Source
Declaration
public class PCanFdBus : ICanBus

Implements:
Meadow.Hardware.ICanBus

Properties

BitRate

Gets or sets the bitrate for the CAN bus.

View Source
Declaration
public CanBitrate BitRate { get; set; }

AcceptanceFilters

Gets the collection of acceptance filters for the CAN bus.

View Source
Declaration
public CanAcceptanceFilterCollection AcceptanceFilters { get; }

Methods

ClearReceiveBuffers()

Clears all receive buffers on the CAN bus.

View Source
Declaration
public void ClearReceiveBuffers()
Exceptions

System.NotImplementedException
This method is not yet implemented.

IsFrameAvailable()

Checks if a CAN frame is available in the receive buffer.

View Source
Declaration
public bool IsFrameAvailable()
Returns

System.Boolean: true if a frame is available; otherwise, false.

Exceptions

System.NotImplementedException
This method is not yet implemented.

ReadFrame()

Reads a CAN frame from the receive buffer.

View Source
Declaration
public ICanFrame? ReadFrame()
Returns

Meadow.Hardware.ICanFrame: The received Meadow.Hardware.ICanFrame, or null if no frame is available.

Exceptions

System.NotImplementedException
This method is not yet implemented.

SetFilter(int)

Sets a filter for incoming CAN frames.

View Source
Declaration
public void SetFilter(int filter)
Parameters
TypeNameDescription
System.Int32filterThe filter to apply.
Exceptions

System.NotImplementedException
This method is not yet implemented.

SetMask(int)

Sets a mask for filtering incoming CAN frames.

View Source
Declaration
public void SetMask(int filter)
Parameters
TypeNameDescription
System.Int32filterThe mask to apply.
Exceptions

System.NotImplementedException
This method is not yet implemented.

WriteFrame(ICanFrame)

Writes a CAN frame to the bus.

View Source
Declaration
public void WriteFrame(ICanFrame frame)
Parameters
TypeNameDescription
Meadow.Hardware.ICanFrameframeThe Meadow.Hardware.ICanFrame to write to the bus.
Exceptions

System.NotImplementedException
This method is not yet implemented.

Events

FrameReceived

Occurs when a CAN frame is received on the bus.

View Source
Declaration
public event EventHandler<ICanFrame>? FrameReceived
Event Type

System.EventHandler<Meadow.Hardware.ICanFrame>

BusError

Occurs when a bus error is detected.

View Source
Declaration
public event EventHandler<CanErrorInfo>? BusError
Event Type

System.EventHandler<Meadow.Hardware.CanErrorInfo>

Implements

  • Meadow.Hardware.ICanBus