ToCanFrame

Trait ToCanFrame 

Source
pub trait ToCanFrame: Sized + Into<Self::Repr> {
    type Repr: CanRepr;

    const ID: Id;
    const LEN: usize;

    // Provided method
    fn to_can_frame<F: Frame>(self) -> F { ... }
}
Expand description

Creates a CAN frame All the users have to do is specify Repr, ID, and LEN

Required Associated Constants§

Source

const ID: Id

Source

const LEN: usize

Required Associated Types§

Provided Methods§

Source

fn to_can_frame<F: Frame>(self) -> F

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ToCanFrame for AcCurrentCommand

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for AlphaCellDataDebug

Source§

const LEN: usize = 7usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for AlphaCellSAdcData

Source§

const LEN: usize = 5usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for AlphaChipADebug

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for AlphaChipBDebug

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BackMsbAccel

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BackMsbEnv

Source§

const LEN: usize = 4usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for BackMsbGyro

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BackMsbOrientation

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BackMsbStrain

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BackRideHeight

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for BackShockpot

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BackWheelTemp

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for BattboxEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BattboxEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for BetaCellDataDebug

Source§

const LEN: usize = 7usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BetaCellSAdcData

Source§

const LEN: usize = 5usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BetaChipADebug

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BetaChipBDebug

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BmsBattboxTempAsReportedByVcu

Source§

const LEN: usize = 4usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for BmsChargeMessageSend

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BmsCriticallyFaulted

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for BmsDebug

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BmsFaultTimers

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BmsImuAccelerometer

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BmsImuGyro

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BmsOnboardTemperature

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for BmsShutdownStatusAsReportedByVcu

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for BmsStatus

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for BrakeCurrentCommand

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BrakeEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for BrakeEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for BrakeStateAsReportedByVcu

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for CarState

Source§

const LEN: usize = 7usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for CellTemperatures

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for CellVoltage

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ChargerBoxStatus

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ConfiguredAndAvailableAcCurrents

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ConfiguredAndAvailableDcCurrents

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ControlModeMotorStatIq

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for CurrentCellBalancingPwmDutyCycle

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for CurrentsStatus

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for DashboardEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for DashboardEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for DigitalOutputCommand

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for DriveEnableCommand

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for DriveLockStates

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for DtiControllerTempAsReportedByVcu

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for DtiMotorTempAsReportedByVcu

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for EnergyMeterMeasurement

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for EnergyMeterStatus

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for EnergyMeterTeamDataOne

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for EnergyMeterTeamDataTwo

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for EnergyMeterTemperature

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ErpmCommand

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ErpmDutyInputVoltageStatus

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for FanDutyCyclePercentage

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for FanbattEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for FanbattEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for FaultStatus

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for Faults

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for FrontMsbAccel

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for FrontMsbEnv

Source§

const LEN: usize = 4usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for FrontMsbGyro

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for FrontMsbOrientation

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for FrontMsbStrain

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for FrontRideHeight

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for FrontShockpot

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for FrontWheelTemp

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for HvPlateDiagnostics

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for HvPlateDiagnosticsSecond

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for HvPlateIsospiCommunicationStatus

Source§

const LEN: usize = 3usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for HvPlatePecErrors

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for HvPlateVoltages

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for HvPlateVoltagesAdbms

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ImdGeneralInformation

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ImdIsolationDetailInformation

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ImdItSystemInfo

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ImdRequest

Source§

const LEN: usize = 5usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ImdResponse

Source§

const LEN: usize = 5usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ImdVoltageInformation

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ImuAccelerometer

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ImuGyro

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for LfiuHighCurrentAdcReadings

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for LfiuLowCurrentAdcReadings

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for LightningBoardImuAccelerationData

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for LightningBoardImuGyroData

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for LightningBoardLightStatus

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for LightningBoardLightningSensorInformation

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for LightningBoardMagnometerSensorInformation

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for LightningPulseMessage

Source§

const LEN: usize = 4usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for LvBoxFanPwm

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for LvEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for LvEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for LvVoltage

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for MaxAcBrakeCurrentCommand

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for MaxAcCurrentCommand

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for MaxDcBrakeCurrentCommand

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for MaxDcCurrentCommand

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for McEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for McEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for McFocAlgorithm

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for McGeneralData

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for OnboardThermTemperatures

Source§

const LEN: usize = 7usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for OverflowNotificationForPercell

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for PackCurrentAndShuntTemp

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for PackCurrentAndShuntTempAdbms

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for PackSocStatus

Source§

const LEN: usize = 4usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for PedalPercentPressedValues

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for PedalSensorVoltages

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for PositionCommand

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for PrechargeStatus

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for PumponeEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for PumponeEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for PumptwoEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for PumptwoEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for RadfanEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for RadfanEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for RelativeBrakeCurrentCommand

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for RelativeCurrentCommand

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ResetLatchingFault

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for RtdsCommandMessage

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for RtdsStateMessage

Source§

const LEN: usize = 4usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for SecondVcuTestMessage

Source§

const LEN: usize = 6usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for SegmentAverageVoltages

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for SegmentDeltaVoltages

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for SegmentIsospiCommunicationStatus

Source§

const LEN: usize = 4usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for SegmentPecErrors

Source§

const LEN: usize = 3usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for SegmentTemperatures

Source§

const LEN: usize = 5usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for SegmentTotalVoltages

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ShepherdBmsFanPercent

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for ShepherdBmsPwmPercent

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for ShepherdVersionHash

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ShepherdVersionTag

Source§

const LEN: usize = 5usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ShutdownAsReadByBms

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for ShutdownEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for ShutdownEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for ShutdownPins

Source§

const LEN: usize = 2usize

Source§

const ID: Id

Source§

type Repr = u16

Source§

impl ToCanFrame for SpareEfuse

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for SpareEfuseState

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for TemperatureSensor

Source§

const LEN: usize = 4usize

Source§

const ID: Id

Source§

type Repr = u32

Source§

impl ToCanFrame for TempsFaultCodeStatus

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for VcuTestMessage

Source§

const LEN: usize = 8usize

Source§

const ID: Id

Source§

type Repr = u64

Source§

impl ToCanFrame for WheelButtons

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8

Source§

impl ToCanFrame for WheelTorqueDial

Source§

const LEN: usize = 1usize

Source§

const ID: Id

Source§

type Repr = u8