CTRE Phoenix C++
5.35.1
Loading...
Searching...
No Matches
WPI_CallbackHelper.h
Go to the documentation of this file.
1
/* Copyright (C) Cross The Road Electronics 2024 */
2
#pragma once
3
4
#include "hal/simulation/SimDeviceData.h"
5
#include "hal/simulation/MockHooks.h"
6
#include "
ctre/phoenix/cci/Platform_CCI.h
"
7
#include <hal/SimDevice.h>
8
9
namespace
ctre
10
{
11
namespace
phoenix
12
{
13
class
WPI_CallbackHelper
{
14
public
:
15
static
double
GetRawValue
(
const
HAL_Value* value) {
16
switch
(value->type) {
17
case
HAL_DOUBLE:
18
return
value->data.v_double;
19
case
HAL_BOOLEAN:
20
return
value->data.v_boolean;
21
case
HAL_INT:
22
return
value->data.v_int;
23
case
HAL_LONG:
24
return
value->data.v_long;
25
case
HAL_ENUM:
26
return
value->data.v_enum;
27
default
:
28
return
0;
29
}
30
}
31
};
32
}
//namespace phoenix
33
}
//namespace ctre
Platform_CCI.h
ctre::phoenix::WPI_CallbackHelper
Definition
WPI_CallbackHelper.h:13
ctre::phoenix::WPI_CallbackHelper::GetRawValue
static double GetRawValue(const HAL_Value *value)
Definition
WPI_CallbackHelper.h:15
ctre
WPI Compliant CANcoder class.
Definition
CANCoderStatusFrame.h:4
ctre
phoenix
WPI_CallbackHelper.h
Generated by
1.12.0