WPILibC++ 2025.3.2
Loading...
Searching...
No Matches
ntcore_cpp_types.h File Reference
#include <stdint.h>
#include <span>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "ntcore_c.h"

Go to the source code of this file.

Classes

struct  nt::Timestamped< T >
 Timestamped value. More...
 

Namespaces

namespace  wpi
 Foonathan namespace.
 
namespace  nt
 NetworkTables (ntcore) namespace.
 

Typedefs

using nt::TimestampedBoolean = Timestamped<bool>
 Timestamped Boolean.
 
using nt::TimestampedInteger = Timestamped<int64_t>
 Timestamped Integer.
 
using nt::TimestampedFloat = Timestamped<float>
 Timestamped Float.
 
using nt::TimestampedDouble = Timestamped<double>
 Timestamped Double.
 
using nt::TimestampedString = Timestamped<std::string>
 Timestamped String.
 
using nt::TimestampedStringView = Timestamped<std::string_view>
 Timestamped String view (for SmallVector-taking functions).
 
using nt::TimestampedRaw = Timestamped<std::vector<uint8_t>>
 Timestamped Raw.
 
using nt::TimestampedRawView = Timestamped<std::span<uint8_t>>
 Timestamped Raw view (for SmallVector-taking functions).
 
using nt::TimestampedBooleanArray = Timestamped<std::vector<int>>
 Timestamped BooleanArray.
 
using nt::TimestampedBooleanArrayView = Timestamped<std::span<int>>
 Timestamped BooleanArray view (for SmallVector-taking functions).
 
using nt::TimestampedIntegerArray = Timestamped<std::vector<int64_t>>
 Timestamped IntegerArray.
 
using nt::TimestampedIntegerArrayView = Timestamped<std::span<int64_t>>
 Timestamped IntegerArray view (for SmallVector-taking functions).
 
using nt::TimestampedFloatArray = Timestamped<std::vector<float>>
 Timestamped FloatArray.
 
using nt::TimestampedFloatArrayView = Timestamped<std::span<float>>
 Timestamped FloatArray view (for SmallVector-taking functions).
 
using nt::TimestampedDoubleArray = Timestamped<std::vector<double>>
 Timestamped DoubleArray.
 
using nt::TimestampedDoubleArrayView = Timestamped<std::span<double>>
 Timestamped DoubleArray view (for SmallVector-taking functions).
 
using nt::TimestampedStringArray = Timestamped<std::vector<std::string>>
 Timestamped StringArray.
 

Functions

bool nt::SetBoolean (NT_Handle pubentry, bool value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultBoolean (NT_Handle pubentry, bool defaultValue)
 Publish a default value.
 
bool nt::GetBoolean (NT_Handle subentry, bool defaultValue)
 Get the last published value.
 
TimestampedBoolean nt::GetAtomicBoolean (NT_Handle subentry, bool defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedBooleannt::ReadQueueBoolean (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< int > nt::ReadQueueValuesBoolean (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
bool nt::SetInteger (NT_Handle pubentry, int64_t value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultInteger (NT_Handle pubentry, int64_t defaultValue)
 Publish a default value.
 
int64_t nt::GetInteger (NT_Handle subentry, int64_t defaultValue)
 Get the last published value.
 
TimestampedInteger nt::GetAtomicInteger (NT_Handle subentry, int64_t defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedIntegernt::ReadQueueInteger (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< int64_t > nt::ReadQueueValuesInteger (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
bool nt::SetFloat (NT_Handle pubentry, float value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultFloat (NT_Handle pubentry, float defaultValue)
 Publish a default value.
 
float nt::GetFloat (NT_Handle subentry, float defaultValue)
 Get the last published value.
 
TimestampedFloat nt::GetAtomicFloat (NT_Handle subentry, float defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedFloatnt::ReadQueueFloat (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< float > nt::ReadQueueValuesFloat (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
bool nt::SetDouble (NT_Handle pubentry, double value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultDouble (NT_Handle pubentry, double defaultValue)
 Publish a default value.
 
double nt::GetDouble (NT_Handle subentry, double defaultValue)
 Get the last published value.
 
TimestampedDouble nt::GetAtomicDouble (NT_Handle subentry, double defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedDoublent::ReadQueueDouble (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< double > nt::ReadQueueValuesDouble (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
bool nt::SetString (NT_Handle pubentry, std::string_view value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultString (NT_Handle pubentry, std::string_view defaultValue)
 Publish a default value.
 
std::string nt::GetString (NT_Handle subentry, std::string_view defaultValue)
 Get the last published value.
 
TimestampedString nt::GetAtomicString (NT_Handle subentry, std::string_view defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedStringnt::ReadQueueString (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< std::string > nt::ReadQueueValuesString (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
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)
 
bool nt::SetRaw (NT_Handle pubentry, std::span< const uint8_t > value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultRaw (NT_Handle pubentry, std::span< const uint8_t > defaultValue)
 Publish a default value.
 
std::vector< uint8_t > nt::GetRaw (NT_Handle subentry, std::span< const uint8_t > defaultValue)
 Get the last published value.
 
TimestampedRaw nt::GetAtomicRaw (NT_Handle subentry, std::span< const uint8_t > defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedRawnt::ReadQueueRaw (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< std::vector< uint8_t > > nt::ReadQueueValuesRaw (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::span< uint8_t > nt::GetRaw (NT_Handle subentry, wpi::SmallVectorImpl< uint8_t > &buf, std::span< const uint8_t > defaultValue)
 
TimestampedRawView nt::GetAtomicRaw (NT_Handle subentry, wpi::SmallVectorImpl< uint8_t > &buf, std::span< const uint8_t > defaultValue)
 
bool nt::SetBooleanArray (NT_Handle pubentry, std::span< const int > value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultBooleanArray (NT_Handle pubentry, std::span< const int > defaultValue)
 Publish a default value.
 
std::vector< int > nt::GetBooleanArray (NT_Handle subentry, std::span< const int > defaultValue)
 Get the last published value.
 
TimestampedBooleanArray nt::GetAtomicBooleanArray (NT_Handle subentry, std::span< const int > defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedBooleanArraynt::ReadQueueBooleanArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< std::vector< int > > nt::ReadQueueValuesBooleanArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::span< int > nt::GetBooleanArray (NT_Handle subentry, wpi::SmallVectorImpl< int > &buf, std::span< const int > defaultValue)
 
TimestampedBooleanArrayView nt::GetAtomicBooleanArray (NT_Handle subentry, wpi::SmallVectorImpl< int > &buf, std::span< const int > defaultValue)
 
bool nt::SetIntegerArray (NT_Handle pubentry, std::span< const int64_t > value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultIntegerArray (NT_Handle pubentry, std::span< const int64_t > defaultValue)
 Publish a default value.
 
std::vector< int64_t > nt::GetIntegerArray (NT_Handle subentry, std::span< const int64_t > defaultValue)
 Get the last published value.
 
TimestampedIntegerArray nt::GetAtomicIntegerArray (NT_Handle subentry, std::span< const int64_t > defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedIntegerArraynt::ReadQueueIntegerArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< std::vector< int64_t > > nt::ReadQueueValuesIntegerArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::span< int64_t > nt::GetIntegerArray (NT_Handle subentry, wpi::SmallVectorImpl< int64_t > &buf, std::span< const int64_t > defaultValue)
 
TimestampedIntegerArrayView nt::GetAtomicIntegerArray (NT_Handle subentry, wpi::SmallVectorImpl< int64_t > &buf, std::span< const int64_t > defaultValue)
 
bool nt::SetFloatArray (NT_Handle pubentry, std::span< const float > value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultFloatArray (NT_Handle pubentry, std::span< const float > defaultValue)
 Publish a default value.
 
std::vector< float > nt::GetFloatArray (NT_Handle subentry, std::span< const float > defaultValue)
 Get the last published value.
 
TimestampedFloatArray nt::GetAtomicFloatArray (NT_Handle subentry, std::span< const float > defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedFloatArraynt::ReadQueueFloatArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< std::vector< float > > nt::ReadQueueValuesFloatArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::span< float > nt::GetFloatArray (NT_Handle subentry, wpi::SmallVectorImpl< float > &buf, std::span< const float > defaultValue)
 
TimestampedFloatArrayView nt::GetAtomicFloatArray (NT_Handle subentry, wpi::SmallVectorImpl< float > &buf, std::span< const float > defaultValue)
 
bool nt::SetDoubleArray (NT_Handle pubentry, std::span< const double > value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultDoubleArray (NT_Handle pubentry, std::span< const double > defaultValue)
 Publish a default value.
 
std::vector< double > nt::GetDoubleArray (NT_Handle subentry, std::span< const double > defaultValue)
 Get the last published value.
 
TimestampedDoubleArray nt::GetAtomicDoubleArray (NT_Handle subentry, std::span< const double > defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedDoubleArraynt::ReadQueueDoubleArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< std::vector< double > > nt::ReadQueueValuesDoubleArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::span< double > nt::GetDoubleArray (NT_Handle subentry, wpi::SmallVectorImpl< double > &buf, std::span< const double > defaultValue)
 
TimestampedDoubleArrayView nt::GetAtomicDoubleArray (NT_Handle subentry, wpi::SmallVectorImpl< double > &buf, std::span< const double > defaultValue)
 
bool nt::SetStringArray (NT_Handle pubentry, std::span< const std::string > value, int64_t time=0)
 Publish a new value.
 
bool nt::SetDefaultStringArray (NT_Handle pubentry, std::span< const std::string > defaultValue)
 Publish a default value.
 
std::vector< std::string > nt::GetStringArray (NT_Handle subentry, std::span< const std::string > defaultValue)
 Get the last published value.
 
TimestampedStringArray nt::GetAtomicStringArray (NT_Handle subentry, std::span< const std::string > defaultValue)
 Get the last published value along with its timestamp.
 
std::vector< TimestampedStringArraynt::ReadQueueStringArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.
 
std::vector< std::vector< std::string > > nt::ReadQueueValuesStringArray (NT_Handle subentry)
 Get an array of all value changes since the last call to ReadQueue.