SocketCanTransport class

Implemented types

Constructors

SocketCanTransport({required String interfaceName, SocketCanBindings? bindings, Duration pollInterval = const Duration(milliseconds: 1), bool enableFd = false})

Properties

enableFd bool
When true, configure the socket via setsockopt(SOL_CAN_RAW, CAN_RAW_FD_FRAMES, 1) so the kernel exchanges 72-byte struct canfd_frame. Outbound CanFrame instances with fd: true are encoded via CanFrame.encodeFd; inbound buffers are sized for the FD frame.
final
hashCode int
The hash code for this object.
no setterinherited
incoming Stream<CanFrame>
Stream of received frames. Broadcast so multiple subscribers can consume the same bus traffic.
no setteroverride
interfaceName String
Linux network interface name — e.g. vcan0, can0.
final
isOpen bool
no setter
pollInterval Duration
How often to poll the socket. 1 ms is appropriate for industrial 1 Mbps CAN traffic; raise it to amortise overhead on quieter buses.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Close the transport.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open() Future<void>
Open the transport (idempotent).
override
send(CanFrame frame) Future<void>
Transmit a frame. Completes when the frame is handed off to the bus.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited