Table of Contents

Class CanNative

Namespace
CTRE.Phoenix6.Native
Assembly
Phoenix6.Hardware.dll

Static class holding the methods for interfacing to the native CAN API

public static class CanNative
Inheritance
CanNative
Inherited Members

Methods

CanReceive(uint, out byte[], string, bool)

Receive a CAN frame from the specified message id

public static StatusCode CanReceive(uint messageId, out byte[] data, string canbus, bool printErr = true)

Parameters

messageId uint

ArbID to get CAN frame

data byte[]

Data from the CAN frame

canbus string

Network to send frame over

printErr bool

True to print errors to console output

Returns

StatusCode

Status of the receive

CanSend(uint, byte[], string, bool)

Send arbitrary CAN frames over our platform.

public static void CanSend(uint messageId, byte[] data, string canbus, bool printErr = true)

Parameters

messageId uint

ArbId of the CAN frame to send

data byte[]

Data to send over CAN

canbus string

Network to send frame over

printErr bool

True to print errors to console output