CTRE Phoenix C++ 5.33.1
Unmanaged.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3namespace ctre {
4namespace phoenix {
5/** unmanaged namespace */
6namespace unmanaged {
7
8/**
9 * Handles enabling when used in a non-FRC manner
10 */
11class Unmanaged {
12public:
13 /**
14 * Feed the enable frame.
15 * This function does nothing on a roborio during FRC use.
16 *
17 * If running an application in simulation, creating a WPI_*
18 * object automatically enables actuators.
19 * Otherwise, call this to enable actuators.
20 *
21 * @param timeoutMs Timeout before disabling
22 */
23 static void FeedEnable(int timeoutMs);
24 /**
25 * @return true if enabled
26 */
27 static bool GetEnableState();
28 /**
29 * @return Phoenix version
30 */
31 static int GetPhoenixVersion();
32 /**
33 * Calling this function will load and start
34 * the Phoenix background tasks.
35 *
36 * This can be useful if you need the
37 * Enable/Disable functionality for CAN devices
38 * but aren't using any of the CAN device classes.
39 *
40 * This function does NOT need to be called if
41 * you are using any of the Phoenix CAN device classes.
42 */
43 static void LoadPhoenix();
44
45 /**
46 * Sets the duration of the delay before starting
47 * the Phoenix diagnostics server.
48 *
49 * @param startTime Magnitude of the delay (in seconds) before
50 * starting the server.
51 * A value of 0 will start the server immediately.
52 * A negative value will signal the server
53 * to shutdown or never start.
54 */
55 static void SetPhoenixDiagnosticsStartTime(int startTimeSeconds);
56};
57
58}
59}
60}
Handles enabling when used in a non-FRC manner.
Definition: Unmanaged.h:11
static void FeedEnable(int timeoutMs)
Feed the enable frame.
static void SetPhoenixDiagnosticsStartTime(int startTimeSeconds)
Sets the duration of the delay before starting the Phoenix diagnostics server.
static void LoadPhoenix()
Calling this function will load and start the Phoenix background tasks.
namespace ctre
Definition: paramEnum.h:5