Skip to main content

CanController Class

Package: GHIElectronics.Endpoint.Core
Namespace: GHIElectronics.Endpoint.Core

Chip-neutral entry point for CAN-bus setup. Call once before using the CAN device package: it muxes the TX/RX pins and brings the canN network interface up at the chosen bitrate.

class CanController {};

Methods​

Initialize(string port, int bitrate)​

static void Initialize(const std::string& port, int32_t bitrate);

Muxes the CAN pins and configures the bitrate.

ParameterTypeDescription
portstringA CAN port name (for example EPN256.Can.Can0).
bitrateintBus bitrate in bits per second (default 500 kbit/s).

UnInitialize(string port)​

static void UnInitialize(const std::string& port);

Takes the interface down and releases its pins.