CTRE Phoenix C++ 5.33.1
PlatformCAN.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
3
4namespace ctre {
5namespace phoenix {
6/** platform namespace */
7namespace platform {
8/** platform-can namespace */
9namespace can {
10
11/**
12 * Configures the can interface for API
13 */
15public:
16 /**
17 * Set CAN interface
18 * @param canInterface Can interface to set. Linux example: "can0".
19 * @return ErrorCode generated by function
20 * @deprecated pass the CAN interface to device constructors instead,
21 * or call RegisterCANbus
22 */
23 static int32_t SetCANInterface(const char * canInterface);
24
25 /**
26 * Registers a non-compliant CANbus
27 * @param canbus CANbus to register. Linux example: "can0".
28 * @return ErrorCode generated by function
29 */
30 static int32_t RegisterCANbus(char const *canbus);
31
32 /**
33 * Starts all items in interface
34 */
35 static int32_t StartAll();
36
37 /**
38 * Destroys all items in interface
39 */
40 static int32_t DestroyAll();
41
42 /**
43 * Set Autocache state
44 * @param state state of autocache
45 */
47};
48
49}
50}
51}
52}
Configures the can interface for API.
Definition: PlatformCAN.h:14
static int32_t DestroyAll()
Destroys all items in interface.
static void SetAutocacheLevel(ctre::phoenix::AutocacheState state)
Set Autocache state.
static int32_t RegisterCANbus(char const *canbus)
Registers a non-compliant CANbus.
static int32_t SetCANInterface(const char *canInterface)
Set CAN interface.
static int32_t StartAll()
Starts all items in interface.
AutocacheState
Keeps track of cache state.
Definition: autocache.h:9
namespace ctre
Definition: paramEnum.h:5