WPILibC++ 2023.4.3-108-ge5452e3
nt::BooleanArrayPublisher Class Reference

NetworkTables BooleanArray publisher. More...

#include <networktables/BooleanArrayTopic.h>

Inheritance diagram for nt::BooleanArrayPublisher:
nt::Publisher nt::BooleanArrayEntry

Public Types

using TopicType = BooleanArrayTopic
 
using ValueType = std::vector< int >
 
using ParamType = std::span< const int >
 
using SmallRetType = std::span< int >
 
using SmallElemType = int
 
using TimestampedValueType = TimestampedBooleanArray
 

Public Member Functions

 BooleanArrayPublisher ()=default
 
 BooleanArrayPublisher (NT_Publisher handle)
 Construct from a publisher handle; recommended to use BooleanArrayTopic::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}
 

Detailed Description

NetworkTables BooleanArray publisher.

Member Typedef Documentation

◆ ParamType

using nt::BooleanArrayPublisher::ParamType = std::span<const int>

◆ SmallElemType

◆ SmallRetType

◆ TimestampedValueType

◆ TopicType

◆ ValueType

using nt::BooleanArrayPublisher::ValueType = std::vector<int>

Constructor & Destructor Documentation

◆ BooleanArrayPublisher() [1/2]

nt::BooleanArrayPublisher::BooleanArrayPublisher ( )
default

◆ BooleanArrayPublisher() [2/2]

nt::BooleanArrayPublisher::BooleanArrayPublisher ( NT_Publisher  handle)
inlineexplicit

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

Parameters
handleNative handle

Member Function Documentation

◆ GetTopic()

BooleanArrayTopic nt::BooleanArrayPublisher::GetTopic ( ) const
inline

Get the corresponding topic.

Returns
Topic

◆ Set()

void nt::BooleanArrayPublisher::Set ( ParamType  value,
int64_t  time = 0 
)
inline

Publish a new value.

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

◆ SetDefault()

void nt::BooleanArrayPublisher::SetDefault ( ParamType  value)
inline

Publish a default value.

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

Parameters
valuevalue

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