CTRE Phoenix C++ 5.33.1
CANCoder_CCI.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
14#include <set>
15#include <cstddef>
16
17
18extern "C" {
19 CCIEXPORT void* c_CANCoder_Create1(int deviceNumber, const char* canbus);
22 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetDescription(void* handle, char* toFill, int toFillByteSz, size_t* numBytesFilled);
23
25 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetLastUnitString(void* handle, char* toFill, int toFillByteSz, int* numBytesFilled);
27
28 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetBusVoltage(void* handle, double* batteryVoltage);
31 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_SetPosition(void* handle, double pos, int timeoutMs);
33 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigSensorDirection(void* handle, int bDirection, int timeoutMs);
39 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigMagnetOffset(void* handle, double offsetDegrees, int timeoutMs);
41 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigFeedbackCoefficient(void* handle, double sensorCoefficient, const char* unitString, ctre::phoenix::sensors::SensorTimeBase sensortimeBase, int timeoutMs);
42 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigSetParameter(void* handle, int param, double value, uint8_t subValue, int ordinal, int timeoutMs);
43 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetParameter(void* handle, int param, double* value, int ordinal, int timeoutMs);
44 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetParameter_6(void* handle, int32_t param, int32_t valueToSend, int32_t* valueRecieved, uint8_t* subValue, int32_t ordinal, int32_t timeoutMs);
45 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigSetCustomParam(void* handle, int newValue, int paramIndex, int timeoutMs);
46 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetCustomParam(void* handle, int* readValue, int paramIndex, int timoutMs);
53 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_SetStatusFramePeriod(void* handle, int frame, uint8_t periodMs, int timeoutMs);
54 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetStatusFramePeriod(void* handle, int frame, int* periodMs, int timeoutMs);
58 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetMagnetOffset(void* handle, double* offsetDegrees, int timeoutMs);
59 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetSensorDirection(void* handle, int* bDirection, int timeoutMs);
61 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetFeedbackCoefficient(void* handle, double* sensorCoefficient, int timeoutMs);
62 CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetFeedbackUnitString(void* handle, char* unitStringToFill, int toFillByteSz, int* numBytesFilled, int timeoutMs);
64}
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetSensorInitializationStrategy(void *handle, ctre::phoenix::sensors::SensorInitializationStrategy *initializationStrategy, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetFeedbackTimeBase(void *handle, ctre::phoenix::sensors::SensorTimeBase *sensortimeBase, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetLastTimestamp(void *handle, double *timestamp)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetMagnetOffset(void *handle, double *offsetDegrees, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigAbsoluteSensorRange(void *handle, ctre::phoenix::sensors::AbsoluteSensorRange absoluteSensorRange, int timeoutMs)
CCIEXPORT void c_CANCoder_DestroyAll()
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetParameter(void *handle, int param, double *value, int ordinal, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetCustomParam(void *handle, int *readValue, int paramIndex, int timoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigFactoryDefault(void *handle, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ClearStickyFaults(void *handle, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetPosition(void *handle, double *pos)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigSetCustomParam(void *handle, int newValue, int paramIndex, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetBusVoltage(void *handle, double *batteryVoltage)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetFeedbackCoefficient(void *handle, double *sensorCoefficient, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetAbsolutePosition(void *handle, double *pos)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigSensorInitializationStrategy(void *handle, ctre::phoenix::sensors::SensorInitializationStrategy initializationStrategy, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetLastError(void *handle)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetFeedbackUnitString(void *handle, char *unitStringToFill, int toFillByteSz, int *numBytesFilled, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetStatusFramePeriod(void *handle, int frame, int *periodMs, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigMagnetOffset(void *handle, double offsetDegrees, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigVelocityMeasurementPeriod(void *handle, int period, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_SetPositionToAbsolute(void *handle, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetLastUnitString(void *handle, char *toFill, int toFillByteSz, int *numBytesFilled)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetStickyFaults(void *handle, int *param)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_SetPosition(void *handle, double pos, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_SetStatusFramePeriod(void *handle, int frame, uint8_t periodMs, int timeoutMs)
CCIEXPORT void * c_CANCoder_Create1(int deviceNumber, const char *canbus)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetDescription(void *handle, char *toFill, int toFillByteSz, size_t *numBytesFilled)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetVelocityMeasurementPeriod(void *handle, ctre::phoenix::sensors::SensorVelocityMeasPeriod *period, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetVelocity(void *handle, double *vel)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigSetParameter(void *handle, int param, double value, uint8_t subValue, int ordinal, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetSensorDirection(void *handle, int *bDirection, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigVelocityMeasurementWindow(void *handle, int window, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetMagnetFieldStrength(void *handle, ctre::phoenix::sensors::MagnetFieldStrength *magnetFieldStrength)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetAbsoluteSensorRange(void *handle, ctre::phoenix::sensors::AbsoluteSensorRange *absoluteSensorRange, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetParameter_6(void *handle, int32_t param, int32_t valueToSend, int32_t *valueRecieved, uint8_t *subValue, int32_t ordinal, int32_t timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_Destroy(void *handle)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigFeedbackCoefficient(void *handle, double sensorCoefficient, const char *unitString, ctre::phoenix::sensors::SensorTimeBase sensortimeBase, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetFirmwareVersion(void *handle, int *firmwareVers)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigGetVelocityMeasurementWindow(void *handle, int *window, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_ConfigSensorDirection(void *handle, int bDirection, int timeoutMs)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_HasResetOccurred(void *handle, bool *hasReset)
CCIEXPORT ctre::phoenix::ErrorCode c_CANCoder_GetFaults(void *handle, int *param)
#define CCIEXPORT
Definition: CCI.h:10
SensorInitializationStrategy
Enum for how CANCoder should initialize its position register on boot.
Definition: SensorInitializationStrategy.h:22
MagnetFieldStrength
Indicates the magnet field strength of a magnet-based sensor.
Definition: MagnetFieldStrength.h:21
SensorTimeBase
Velocity Measurement Periods.
Definition: SensorTimeBase.h:23
SensorVelocityMeasPeriod
Enumerate filter periods for any sensor that measures velocity.
Definition: SensorVelocityMeasPeriod.h:13
AbsoluteSensorRange
Enum for how to range the absolute sensor position.
Definition: AbsoluteSensorRange.h:22
ErrorCode
Definition: ErrorCode.h:13