WPILibC++ 2023.4.3
|
Functions | |
bool | nt::SetString (NT_Handle pubentry, std::string_view value, int64_t time=0) |
Publish a new value. More... | |
bool | nt::SetDefaultString (NT_Handle pubentry, std::string_view defaultValue) |
Publish a default value. More... | |
std::string | nt::GetString (NT_Handle subentry, std::string_view defaultValue) |
Get the last published value. More... | |
TimestampedString | nt::GetAtomicString (NT_Handle subentry, std::string_view defaultValue) |
Get the last published value along with its timestamp. More... | |
std::vector< TimestampedString > | nt::ReadQueueString (NT_Handle subentry) |
Get an array of all value changes since the last call to ReadQueue. More... | |
std::vector< std::string > | nt::ReadQueueValuesString (NT_Handle subentry) |
Get an array of all value changes since the last call to ReadQueue. More... | |
std::string_view | nt::GetString (NT_Handle subentry, wpi::SmallVectorImpl< char > &buf, std::string_view defaultValue) |
TimestampedStringView | nt::GetAtomicString (NT_Handle subentry, wpi::SmallVectorImpl< char > &buf, std::string_view defaultValue) |
TimestampedString nt::GetAtomicString | ( | NT_Handle | subentry, |
std::string_view | defaultValue | ||
) |
Get the last published value along with its timestamp.
If no value has been published, returns the passed defaultValue and a timestamp of 0.
subentry | subscriber or entry handle |
defaultValue | default value to return if no value has been published |
TimestampedStringView nt::GetAtomicString | ( | NT_Handle | subentry, |
wpi::SmallVectorImpl< char > & | buf, | ||
std::string_view | defaultValue | ||
) |
std::string nt::GetString | ( | NT_Handle | subentry, |
std::string_view | defaultValue | ||
) |
Get the last published value.
If no value has been published, returns the passed defaultValue.
subentry | subscriber or entry handle |
defaultValue | default value to return if no value has been published |
std::string_view nt::GetString | ( | NT_Handle | subentry, |
wpi::SmallVectorImpl< char > & | buf, | ||
std::string_view | defaultValue | ||
) |
std::vector< TimestampedString > nt::ReadQueueString | ( | NT_Handle | subentry | ) |
Get an array of all value changes since the last call to ReadQueue.
Also provides a timestamp for each value.
subentry | subscriber or entry handle |
std::vector< std::string > nt::ReadQueueValuesString | ( | NT_Handle | subentry | ) |
Get an array of all value changes since the last call to ReadQueue.
subentry | subscriber or entry handle |
bool nt::SetDefaultString | ( | NT_Handle | pubentry, |
std::string_view | defaultValue | ||
) |
Publish a default value.
On reconnect, a default value will never be used in preference to a published value.
pubentry | publisher or entry handle |
defaultValue | default value |
bool nt::SetString | ( | NT_Handle | pubentry, |
std::string_view | value, | ||
int64_t | time = 0 |
||
) |
Publish a new value.
pubentry | publisher or entry handle |
value | value to publish |
time | timestamp; 0 indicates current NT time should be used |