Class to control a simulated addressable LED.
More...
#include <frc/simulation/AddressableLEDSim.h>
Class to control a simulated addressable LED.
◆ AddressableLEDSim() [1/2]
frc::sim::AddressableLEDSim::AddressableLEDSim |
( |
int | channel | ) |
|
|
explicit |
Constructs an addressable LED for a specific channel.
- Parameters
-
◆ AddressableLEDSim() [2/2]
frc::sim::AddressableLEDSim::AddressableLEDSim |
( |
const AddressableLED & | addressableLED | ) |
|
|
explicit |
◆ GetData()
Get the LED data.
- Parameters
-
data | output parameter to fill with LED data |
- Returns
- the length of the LED data
◆ GetGlobalData()
static int frc::sim::AddressableLEDSim::GetGlobalData |
( |
int | start, |
|
|
int | length, |
|
|
struct HAL_AddressableLEDData * | data ) |
|
static |
Get the global LED data.
- Parameters
-
start | the start of the LED data |
length | the length of the LED data |
data | output parameter to fill with LED data |
- Returns
- the length of the LED data
◆ GetInitialized()
bool frc::sim::AddressableLEDSim::GetInitialized |
( |
| ) |
const |
Check if initialized.
- Returns
- true if initialized
◆ GetLength()
int frc::sim::AddressableLEDSim::GetLength |
( |
| ) |
const |
Get the length of the LED strip.
- Returns
- the length
◆ GetStart()
int frc::sim::AddressableLEDSim::GetStart |
( |
| ) |
const |
Get the start.
- Returns
- the start
◆ RegisterDataCallback()
Register a callback on the LED data.
- Parameters
-
callback | the callback that will be called whenever the LED data is changed |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterInitializedCallback()
std::unique_ptr< CallbackStore > frc::sim::AddressableLEDSim::RegisterInitializedCallback |
( |
NotifyCallback | callback, |
|
|
bool | initialNotify ) |
|
nodiscard |
Register a callback on the Initialized property.
- Parameters
-
callback | the callback that will be called whenever the Initialized property is changed |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object storing this callback
◆ RegisterLengthCallback()
Register a callback on the length.
- Parameters
-
callback | the callback that will be called whenever the length is changed |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterStartCallback()
Register a callback on the start.
- Parameters
-
callback | the callback that will be called whenever the start is changed |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ SetData()
Change the LED data.
- Parameters
-
◆ SetGlobalData()
static void frc::sim::AddressableLEDSim::SetGlobalData |
( |
int | start, |
|
|
int | length, |
|
|
struct HAL_AddressableLEDData * | data ) |
|
static |
Change the global LED data.
- Parameters
-
start | the start of the LED data |
length | the length of the LED data |
data | the new data |
◆ SetInitialized()
void frc::sim::AddressableLEDSim::SetInitialized |
( |
bool | initialized | ) |
|
Change the Initialized value of the LED strip.
- Parameters
-
◆ SetLength()
void frc::sim::AddressableLEDSim::SetLength |
( |
int | length | ) |
|
Change the length of the LED strip.
- Parameters
-
◆ SetStart()
void frc::sim::AddressableLEDSim::SetStart |
( |
int | start | ) |
|
Change the start.
- Parameters
-
The documentation for this class was generated from the following file: