WPILibC++ 2024.3.2
nt::DoubleArrayPublisher Class Reference

NetworkTables DoubleArray publisher. More...

#include </home/runner/work/allwpilib/allwpilib/ntcore/src/generated/main/native/include/networktables/DoubleArrayTopic.h>

Inheritance diagram for nt::DoubleArrayPublisher:
nt::Publisher nt::DoubleArrayEntry

Public Types

using TopicType = DoubleArrayTopic
using ValueType = std::vector< double >
using ParamType = std::span< const double >
using SmallRetType = std::span< double >
using SmallElemType = double
using TimestampedValueType = TimestampedDoubleArray

Public Member Functions

 DoubleArrayPublisher ()=default
 DoubleArrayPublisher (NT_Publisher handle)
 Construct from a publisher handle; recommended to use DoubleArrayTopic::Publish() instead. More...
void Set (ParamType value, int64_t time=0)
 Publish a new value. More...
void SetDefault (ParamType value)
 Publish a default value. More...
TopicType GetTopic () const
 Get the corresponding topic. More...
- Public Member Functions inherited from nt::Publisher
virtual ~Publisher ()
 Publisher (const Publisher &)=delete
Publisheroperator= (const Publisher &)=delete
 Publisher (Publisher &&)
Publisheroperator= (Publisher &&)
 operator bool () const
 Determines if the native handle is valid. More...
NT_Publisher GetHandle () const
 Gets the native handle for the publisher. More...
Topic GetTopic () const
 Gets the published-to topic. More...

Additional Inherited Members

- Protected Member Functions inherited from nt::Publisher
 Publisher ()=default
 Publisher (NT_Publisher handle)
- Protected Attributes inherited from nt::Publisher
NT_Publisher m_pubHandle {0}
 NetworkTables handle. More...

Detailed Description

NetworkTables DoubleArray publisher.

Member Typedef Documentation

◆ ParamType

using nt::DoubleArrayPublisher::ParamType = std::span<const double>

◆ SmallElemType

◆ SmallRetType

using nt::DoubleArrayPublisher::SmallRetType = std::span<double>

◆ TimestampedValueType

◆ TopicType

◆ ValueType

using nt::DoubleArrayPublisher::ValueType = std::vector<double>

Constructor & Destructor Documentation

◆ DoubleArrayPublisher() [1/2]

nt::DoubleArrayPublisher::DoubleArrayPublisher ( )

◆ DoubleArrayPublisher() [2/2]

nt::DoubleArrayPublisher::DoubleArrayPublisher ( NT_Publisher  handle)

Construct from a publisher handle; recommended to use DoubleArrayTopic::Publish() instead.

handleNative handle

Member Function Documentation

◆ GetTopic()

DoubleArrayTopic nt::DoubleArrayPublisher::GetTopic ( ) const

Get the corresponding topic.


◆ Set()

void nt::DoubleArrayPublisher::Set ( ParamType  value,
int64_t  time = 0 

Publish a new value.

valuevalue to publish
timetimestamp; 0 indicates current NT time should be used

◆ SetDefault()

void nt::DoubleArrayPublisher::SetDefault ( ParamType  value)

Publish a default value.

On reconnect, a default value will never be used in preference to a published value.


The documentation for this class was generated from the following files: