|
OOKwiz
on/off-keying for ESP32 and a variety of supported radio modules
|
RawTimings instances store the time in µs of each interval. More...
#include <RawTimings.h>
Public Member Functions | |
| IRAM_ATTR | operator bool () |
If you try to evaluate the instance as a bool, for instance in if (myRawTimings) ..., it will be true if there's intervals stored. More... | |
| void IRAM_ATTR | zap () |
| empty out the stored intervals More... | |
| String | toString () |
| Get the String representation, which is a comma-separated list of intervals. More... | |
| bool | fromString (const String &in) |
| Read a String representation, which is a comma-separated list of intervals, and store in this instance. More... | |
| bool | fromPulsetrain (Pulsetrain &train) |
| Convert Pulsetrain into RawTimings. Loses stats about bins as well as information about repeats. More... | |
| Pulsetrain | toPulsetrain () |
| RawTimings to Pulsetrain. More... | |
| String | visualizer () |
The visualizer like above, with base taken from visualizer_pixel setting. More... | |
| String | visualizer (int base) |
| Returns the viasualizer (the blocky time-graph) for the pulses in this RawTimings instance. More... | |
Static Public Member Functions | |
| static bool | maybe (String str) |
| Static method to see if String might be a representation of RawTimings. No guarantees until you try to convert it, but silent. More... | |
Public Attributes | |
| std::vector< uint16_t > | intervals |
| std::vector of uint16_t times in µs for each interval More... | |
RawTimings instances store the time in µs of each interval.
Definition at line 11 of file RawTimings.h.
|
static |
Static method to see if String might be a representation of RawTimings. No guarantees until you try to convert it, but silent.
| str | String that we are curious about |
true if it might be a RawTimings String, false if not. Static, so not called on any particular RawTimings instance but instead like: Definition at line 19 of file RawTimings.cpp.
| IRAM_ATTR RawTimings::operator bool | ( | ) |
If you try to evaluate the instance as a bool, for instance in if (myRawTimings) ..., it will be true if there's intervals stored.
Definition at line 37 of file RawTimings.cpp.
| void IRAM_ATTR RawTimings::zap | ( | ) |
empty out the stored intervals
Definition at line 42 of file RawTimings.cpp.
| String RawTimings::toString | ( | ) |
Get the String representation, which is a comma-separated list of intervals.
Definition at line 48 of file RawTimings.cpp.
| bool RawTimings::fromString | ( | const String & | in | ) |
Read a String representation, which is a comma-separated list of intervals, and store in this instance.
true if it worked, false (with error message) if it didn't. Definition at line 61 of file RawTimings.cpp.
| bool RawTimings::fromPulsetrain | ( | Pulsetrain & | train | ) |
Convert Pulsetrain into RawTimings. Loses stats about bins as well as information about repeats.
| train | the Pulsetrain you want to convert from |
true Definition at line 88 of file RawTimings.cpp.
| Pulsetrain RawTimings::toPulsetrain | ( | ) |
| String RawTimings::visualizer | ( | ) |
The visualizer like above, with base taken from visualizer_pixel setting.
Definition at line 137 of file RawTimings.cpp.
| String RawTimings::visualizer | ( | int | base | ) |
Returns the viasualizer (the blocky time-graph) for the pulses in this RawTimings instance.
| base | µs per (half-character) block. Every interval gets at least one block so all pulses are guaranteed visible |
Definition at line 106 of file RawTimings.cpp.
| std::vector<uint16_t> RawTimings::intervals |
std::vector of uint16_t times in µs for each interval
Definition at line 16 of file RawTimings.h.