CTRE Phoenix C++ 5.33.1
CANBusAddressable.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3#include <stdint.h>
4namespace ctre {
5 namespace phoenix {
6 /**
7 * Simple address holder.
8 */
10
11 public:
12 /**
13 * Constructor for a CANBusAddressable device
14 * @param deviceNumber CAN Device ID of device
15 */
16 CANBusAddressable(int deviceNumber) {
17 _deviceNum = deviceNumber;
18 }
19
20 /**
21 * @return CAN device number of device
22 */
24 return _deviceNum;
25 }
26 protected:
27 private:
28 int _deviceNum;
29 };
30 }
31}
Simple address holder.
Definition: CANBusAddressable.h:9
CANBusAddressable(int deviceNumber)
Constructor for a CANBusAddressable device.
Definition: CANBusAddressable.h:16
int GetDeviceNumber()
Definition: CANBusAddressable.h:23
namespace ctre
Definition: paramEnum.h:5