Interface ICanDevice
- Namespace
- Suucha.Can.Core.Abstractions
- Assembly
- Suucha.Can.Core.dll
Represents a CAN device that can have multiple channels
public interface ICanDevice : IDisposable
- Inherited Members
Properties
DeviceIndex
Device index (for multiple devices of same type)
uint DeviceIndex { get; }
Property Value
DeviceInfo
Device information (hardware version, serial number, etc.)
DeviceInfo? DeviceInfo { get; }
Property Value
IsOpen
Whether the device is currently open
bool IsOpen { get; }
Property Value
Methods
Close()
Closes the device and all its channels
void Close()
GetDeviceInfo()
Gets device information
DeviceInfo GetDeviceInfo()
Returns
- DeviceInfo
Device information
IsDeviceOnline()
Checks if the device is online
bool IsDeviceOnline()
Returns
- bool
True if device is online, false otherwise
Open()
Opens the device
void Open()
Exceptions
- DeviceOpenException
Thrown when device cannot be opened
OpenChannel(int, ChannelConfig)
Opens a CAN channel with the specified configuration
ICanChannel OpenChannel(int channelIndex, ChannelConfig config)
Parameters
channelIndexintChannel index (0-based)
configChannelConfigChannel configuration
Returns
- ICanChannel
The opened channel
Exceptions
- ChannelInitException
Thrown when channel cannot be initialized