WPILibC++ 2024.3.2
Advanced Subscriber Functions

Functions

NT_MultiSubscriber nt::SubscribeMultiple (NT_Inst inst, std::span< const std::string_view > prefixes, const PubSubOptions &options=kDefaultPubSubOptions)
 Subscribes to multiple topics based on one or more topic name prefixes. More...
 
void nt::UnsubscribeMultiple (NT_MultiSubscriber sub)
 Unsubscribes a multi-subscriber. More...
 

Detailed Description

Function Documentation

◆ SubscribeMultiple()

NT_MultiSubscriber nt::SubscribeMultiple ( NT_Inst  inst,
std::span< const std::string_view prefixes,
const PubSubOptions options = kDefaultPubSubOptions 
)

Subscribes to multiple topics based on one or more topic name prefixes.

Can be used in combination with a Value Listener or ReadQueueValue() to get value changes across all matching topics.

Parameters
instinstance handle
prefixestopic name prefixes
optionssubscriber options
Returns
subscriber handle

◆ UnsubscribeMultiple()

void nt::UnsubscribeMultiple ( NT_MultiSubscriber  sub)

Unsubscribes a multi-subscriber.

Parameters
submulti-subscriber handle