CTRE Phoenix C++ 5.33.1
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"
7#include <hal/SimDevice.h>
8
9namespace ctre
10{
11namespace phoenix
12{
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
Definition: WPI_CallbackHelper.h:13
static double GetRawValue(const HAL_Value *value)
Definition: WPI_CallbackHelper.h:15
namespace ctre
Definition: paramEnum.h:5