IsoTp Class¶
Factory entry point for opening IIsoTpChannel and IsoTpFunctionalClient instances. Non-instantiable.
Inheritance Object → IsoTp
Remarks¶
Physical (1:1) channel overloads reflect two ownership patterns:
- Open(ICanBus, IsoTpEndpoint, IsoTpChannelOptions) — the
channel owns a private ICanBusService that wraps the supplied bus and disposes
it when the channel is disposed. Convenient for single-protocol callers.
- Open(ICanBusService, IsoTpEndpoint, IsoTpChannelOptions, bool)
— the caller supplies an already-existing service (e.g. shared by multiple protocol instances
on the same bus per FR-TP-018); with leaveOpen=true (the default) the service outlives
the channel.
Functional (1:N) overloads open an IsoTpFunctionalClient for broadcast requests; see OpenFunctional(ICanBus, uint, uint, uint, IsoTpFunctionalOptions) and OpenFunctional(ICanBusService, uint, uint, uint, IsoTpFunctionalOptions, bool).
Methods¶
IsoTp.Open(ICanBus, IsoTpEndpoint, IsoTpChannelOptions) Method¶
Opens a channel that owns a private CanBusService around bus. Disposing the returned channel disposes that service and detaches from bus; the bus itself is not disposed.
public static CanKit.Pro.IsoTp.IIsoTpChannel Open(CanKit.Abstractions.API.Can.ICanBus bus, CanKit.Pro.IsoTp.IsoTpEndpoint endpoint, CanKit.Pro.IsoTp.IsoTpChannelOptions? options=null);
Parameters¶
bus ICanBus
endpoint IsoTpEndpoint
options IsoTpChannelOptions
Returns¶
IsoTp.Open(ICanBusService, IsoTpEndpoint, IsoTpChannelOptions, bool) Method¶
Opens a channel bound to an already-existing service. Multiple channels with disjoint endpoints may share the same service to multiplex several ISO-TP sessions over one physical bus (FR-TP-018).
public static CanKit.Pro.IsoTp.IIsoTpChannel Open(CanKit.Pro.RawCan.ICanBusService service, CanKit.Pro.IsoTp.IsoTpEndpoint endpoint, CanKit.Pro.IsoTp.IsoTpChannelOptions? options=null, bool leaveOpen=true);
Parameters¶
service ICanBusService
The demux service. Must not be null.
endpoint IsoTpEndpoint
Endpoint the channel is bound to.
options IsoTpChannelOptions
Channel options; defaults to a fresh IsoTpChannelOptions.
leaveOpen Boolean
When true (default) disposing the channel does not dispose
service; the caller retains ownership. When false the channel
takes ownership and disposes the service on its own IDisposable.Dispose.
Returns¶
IsoTp.OpenFunctional(ICanBus, uint, uint, uint, IsoTpFunctionalOptions) Method¶
Opens a functional (1:N broadcast) client that owns a private CanBusService around bus.
public static CanKit.Pro.IsoTp.IsoTpFunctionalClient OpenFunctional(CanKit.Abstractions.API.Can.ICanBus bus, uint functionalTxCanId, uint responseRxCanIdRangeStart, uint responseRxCanIdRangeEnd, CanKit.Pro.IsoTp.IsoTpFunctionalOptions? options=null);
Parameters¶
bus ICanBus
The CAN bus to attach to. Must not be null.
functionalTxCanId UInt32
The shared functional/broadcast CAN identifier used for outbound Single Frames
(e.g. 0x7DF for UDS 11-bit functional addressing).
responseRxCanIdRangeStart UInt32
Inclusive start of the CAN-ID range on which ECU responses are expected
(e.g. 0x7E8).
responseRxCanIdRangeEnd UInt32
Inclusive end of the CAN-ID range on which ECU responses are expected
(e.g. 0x7EF). Must be ≥ responseRxCanIdRangeStart.
options IsoTpFunctionalOptions
Functional client options; defaults to a fresh IsoTpFunctionalOptions.
Returns¶
IsoTp.OpenFunctional(ICanBusService, uint, uint, uint, IsoTpFunctionalOptions, bool) Method¶
Opens a functional (1:N broadcast) client bound to an already-existing service. The service may be shared with physical IIsoTpChannel instances on the same bus as long as the functional response range and any physical RxCanId values are disjoint (FR-TP-018).
public static CanKit.Pro.IsoTp.IsoTpFunctionalClient OpenFunctional(CanKit.Pro.RawCan.ICanBusService service, uint functionalTxCanId, uint responseRxCanIdRangeStart, uint responseRxCanIdRangeEnd, CanKit.Pro.IsoTp.IsoTpFunctionalOptions? options=null, bool leaveOpen=true);
Parameters¶
service ICanBusService
The demux service. Must not be null.
functionalTxCanId UInt32
Functional/broadcast TX CAN identifier.
responseRxCanIdRangeStart UInt32
Inclusive start of the ECU response CAN-ID range.
responseRxCanIdRangeEnd UInt32
Inclusive end of the ECU response CAN-ID range. Must be ≥ responseRxCanIdRangeStart.
options IsoTpFunctionalOptions
Functional client options; defaults to a fresh IsoTpFunctionalOptions.
leaveOpen Boolean
When true (default) disposing the client does not dispose service.
When false the client takes ownership and disposes the service on its own
IDisposable.Dispose.