WPILibC++ 2024.3.2
NetworkTable.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <functional>
8#include <memory>
9#include <span>
10#include <string>
11#include <string_view>
12#include <utility>
13#include <vector>
14
15#include <wpi/StringMap.h>
16#include <wpi/mutex.h>
18#include <wpi/struct/Struct.h>
19
21#include "networktables/Topic.h"
22#include "ntcore_c.h"
23
24namespace nt {
25
26class BooleanArrayTopic;
27class BooleanTopic;
28class DoubleArrayTopic;
29class DoubleTopic;
30class FloatArrayTopic;
31class FloatTopic;
32class IntegerArrayTopic;
33class IntegerTopic;
34class NetworkTableInstance;
35template <wpi::ProtobufSerializable T>
36class ProtobufTopic;
37class RawTopic;
38class StringArrayTopic;
39class StringTopic;
40template <typename T, typename... I>
41 requires wpi::StructSerializable<T, I...>
42class StructArrayTopic;
43template <typename T, typename... I>
44 requires wpi::StructSerializable<T, I...>
45class StructTopic;
46class Topic;
47
48/**
49 * @defgroup ntcore_cpp_api ntcore C++ object-oriented API
50 *
51 * Recommended interface for C++, identical to Java API.
52 */
53
54/**
55 * A network table that knows its subtable path.
56 * @ingroup ntcore_cpp_api
57 */
58class NetworkTable final {
59 private:
60 NT_Inst m_inst;
61 std::string m_path;
62 mutable wpi::mutex m_mutex;
63 mutable wpi::StringMap<NT_Entry> m_entries;
64
65 struct private_init {};
67
68 public:
69 /**
70 * Gets the "base name" of a key. For example, "/foo/bar" becomes "bar".
71 * If the key has a trailing slash, returns an empty string.
72 *
73 * @param key key
74 * @return base name
75 */
77
78 /**
79 * Normalizes an network table key to contain no consecutive slashes and
80 * optionally start with a leading slash. For example:
81 *
82 * <pre><code>
83 * normalizeKey("/foo/bar", true) == "/foo/bar"
84 * normalizeKey("foo/bar", true) == "/foo/bar"
85 * normalizeKey("/foo/bar", false) == "foo/bar"
86 * normalizeKey("foo//bar", false) == "foo/bar"
87 * </code></pre>
88 *
89 * @param key the key to normalize
90 * @param withLeadingSlash whether or not the normalized key should begin
91 * with a leading slash
92 * @return normalized key
93 */
94 static std::string NormalizeKey(std::string_view key,
95 bool withLeadingSlash = true);
96
99 bool withLeadingSlash = true);
100
101 /**
102 * Gets a list of the names of all the super tables of a given key. For
103 * example, the key "/foo/bar/baz" has a hierarchy of "/", "/foo",
104 * "/foo/bar", and "/foo/bar/baz".
105 *
106 * @param key the key
107 * @return List of super tables
108 */
109 static std::vector<std::string> GetHierarchy(std::string_view key);
110
111 /**
112 * Constructor. Use NetworkTableInstance::GetTable() or GetSubTable()
113 * instead.
114 */
115 NetworkTable(NT_Inst inst, std::string_view path, const private_init&);
117
118 /**
119 * Gets the instance for the table.
120 *
121 * @return Instance
122 */
124
125 /**
126 * The path separator for sub-tables and keys
127 */
128 static constexpr char PATH_SEPARATOR_CHAR = '/';
129
130 /**
131 * Gets the entry for a subkey.
132 *
133 * @param key the key name
134 * @return Network table entry.
135 */
137
138 /**
139 * Get (generic) topic.
140 *
141 * @param name topic name
142 * @return Topic
143 */
145
146 /**
147 * Get boolean topic.
148 *
149 * @param name topic name
150 * @return BooleanTopic
151 */
153
154 /**
155 * Get integer topic.
156 *
157 * @param name topic name
158 * @return IntegerTopic
159 */
161
162 /**
163 * Get float topic.
164 *
165 * @param name topic name
166 * @return FloatTopic
167 */
169
170 /**
171 * Get double topic.
172 *
173 * @param name topic name
174 * @return DoubleTopic
175 */
177
178 /**
179 * Get String topic.
180 *
181 * @param name topic name
182 * @return StringTopic
183 */
185
186 /**
187 * Get raw topic.
188 *
189 * @param name topic name
190 * @return BooleanArrayTopic
191 */
193
194 /**
195 * Get boolean[] topic.
196 *
197 * @param name topic name
198 * @return BooleanArrayTopic
199 */
201
202 /**
203 * Get integer[] topic.
204 *
205 * @param name topic name
206 * @return IntegerArrayTopic
207 */
209
210 /**
211 * Get float[] topic.
212 *
213 * @param name topic name
214 * @return FloatArrayTopic
215 */
217
218 /**
219 * Get double[] topic.
220 *
221 * @param name topic name
222 * @return DoubleArrayTopic
223 */
225
226 /**
227 * Get String[] topic.
228 *
229 * @param name topic name
230 * @return StringArrayTopic
231 */
233
234 /**
235 * Gets a protobuf serialized value topic.
236 *
237 * @param name topic name
238 * @return Topic
239 */
240 template <wpi::ProtobufSerializable T>
243 }
244
245 /**
246 * Gets a raw struct serialized value topic.
247 *
248 * @param name topic name
249 * @param info optional struct type info
250 * @return Topic
251 */
252 template <typename T, typename... I>
253 requires wpi::StructSerializable<T, I...>
254 StructTopic<T, I...> GetStructTopic(std::string_view name, I... info) const {
255 return StructTopic<T, I...>{GetTopic(name), std::move(info)...};
256 }
257
258 /**
259 * Gets a raw struct serialized array topic.
260 *
261 * @param name topic name
262 * @param info optional struct type info
263 * @return Topic
264 */
265 template <typename T, typename... I>
266 requires wpi::StructSerializable<T, I...>
268 I... info) const {
269 return StructArrayTopic<T, I...>{GetTopic(name), std::move(info)...};
270 }
271
272 /**
273 * Returns the table at the specified key. If there is no table at the
274 * specified key, it will create a new table
275 *
276 * @param key the key name
277 * @return the networktable to be returned
278 */
279 std::shared_ptr<NetworkTable> GetSubTable(std::string_view key) const;
280
281 /**
282 * Determines whether the given key is in this table.
283 *
284 * @param key the key to search for
285 * @return true if the table as a value assigned to the given key
286 */
288
289 /**
290 * Determines whether there exists a non-empty subtable for this key
291 * in this table.
292 *
293 * @param key the key to search for
294 * @return true if there is a subtable with the key which contains at least
295 * one key/subtable of its own
296 */
298
299 /**
300 * Gets topic information for all keys in the table (not including
301 * sub-tables).
302 *
303 * @param types bitmask of types; 0 is treated as a "don't care".
304 * @return topic information for keys currently in the table
305 */
306 std::vector<TopicInfo> GetTopicInfo(int types = 0) const;
307
308 /**
309 * Gets all topics in the table (not including sub-tables).
310 *
311 * @param types bitmask of types; 0 is treated as a "don't care".
312 * @return topic for keys currently in the table
313 */
314 std::vector<Topic> GetTopics(int types = 0) const;
315
316 /**
317 * Gets all keys in the table (not including sub-tables).
318 *
319 * @param types bitmask of types; 0 is treated as a "don't care".
320 * @return keys currently in the table
321 */
322 std::vector<std::string> GetKeys(int types = 0) const;
323
324 /**
325 * Gets the names of all subtables in the table.
326 *
327 * @return subtables currently in the table
328 */
329 std::vector<std::string> GetSubTables() const;
330
331 /**
332 * Makes a key's value persistent through program restarts.
333 *
334 * @param key the key to make persistent
335 */
337
338 /**
339 * Stop making a key's value persistent through program restarts.
340 * The key cannot be null.
341 *
342 * @param key the key name
343 */
345
346 /**
347 * Returns whether the value is persistent through program restarts.
348 * The key cannot be null.
349 *
350 * @param key the key name
351 */
353
354 /**
355 * Put a number in the table
356 *
357 * @param key the key to be assigned to
358 * @param value the value that will be assigned
359 * @return False if the table key already exists with a different type
360 */
361 bool PutNumber(std::string_view key, double value);
362
363 /**
364 * Gets the current value in the table, setting it if it does not exist.
365 *
366 * @param key the key
367 * @param defaultValue the default value to set if key doesn't exist.
368 * @returns False if the table key exists with a different type
369 */
370 bool SetDefaultNumber(std::string_view key, double defaultValue);
371
372 /**
373 * Gets the number associated with the given name.
374 *
375 * @param key the key to look up
376 * @param defaultValue the value to be returned if no value is found
377 * @return the value associated with the given key or the given default value
378 * if there is no value associated with the key
379 */
380 double GetNumber(std::string_view key, double defaultValue) const;
381
382 /**
383 * Put a string in the table
384 *
385 * @param key the key to be assigned to
386 * @param value the value that will be assigned
387 * @return False if the table key already exists with a different type
388 */
390
391 /**
392 * Gets the current value in the table, setting it if it does not exist.
393 *
394 * @param key the key
395 * @param defaultValue the default value to set if key doesn't exist.
396 * @returns False if the table key exists with a different type
397 */
399
400 /**
401 * Gets the string associated with the given name. If the key does not
402 * exist or is of different type, it will return the default value.
403 *
404 * @param key the key to look up
405 * @param defaultValue the value to be returned if no value is found
406 * @return the value associated with the given key or the given default value
407 * if there is no value associated with the key
408 */
410 std::string_view defaultValue) const;
411
412 /**
413 * Put a boolean in the table
414 *
415 * @param key the key to be assigned to
416 * @param value the value that will be assigned
417 * @return False if the table key already exists with a different type
418 */
419 bool PutBoolean(std::string_view key, bool value);
420
421 /**
422 * Gets the current value in the table, setting it if it does not exist.
423 *
424 * @param key the key
425 * @param defaultValue the default value to set if key doesn't exist.
426 * @returns False if the table key exists with a different type
427 */
428 bool SetDefaultBoolean(std::string_view key, bool defaultValue);
429
430 /**
431 * Gets the boolean associated with the given name. If the key does not
432 * exist or is of different type, it will return the default value.
433 *
434 * @param key the key to look up
435 * @param defaultValue the value to be returned if no value is found
436 * @return the value associated with the given key or the given default value
437 * if there is no value associated with the key
438 */
439 bool GetBoolean(std::string_view key, bool defaultValue) const;
440
441 /**
442 * Put a boolean array in the table
443 *
444 * @param key the key to be assigned to
445 * @param value the value that will be assigned
446 * @return False if the table key already exists with a different type
447 *
448 * @note The array must be of int's rather than of bool's because
449 * std::vector<bool> is special-cased in C++. 0 is false, any
450 * non-zero value is true.
451 */
452 bool PutBooleanArray(std::string_view key, std::span<const int> value);
453
454 /**
455 * Gets the current value in the table, setting it if it does not exist.
456 *
457 * @param key the key
458 * @param defaultValue the default value to set if key doesn't exist.
459 * @return False if the table key exists with a different type
460 */
462 std::span<const int> defaultValue);
463
464 /**
465 * Returns the boolean array the key maps to. If the key does not exist or is
466 * of different type, it will return the default value.
467 *
468 * @param key the key to look up
469 * @param defaultValue the value to be returned if no value is found
470 * @return the value associated with the given key or the given default value
471 * if there is no value associated with the key
472 *
473 * @note This makes a copy of the array. If the overhead of this is a
474 * concern, use GetValue() instead.
475 *
476 * @note The returned array is std::vector<int> instead of std::vector<bool>
477 * because std::vector<bool> is special-cased in C++. 0 is false, any
478 * non-zero value is true.
479 */
480 std::vector<int> GetBooleanArray(std::string_view key,
481 std::span<const int> defaultValue) const;
482
483 /**
484 * Put a number array in the table
485 *
486 * @param key the key to be assigned to
487 * @param value the value that will be assigned
488 * @return False if the table key already exists with a different type
489 */
490 bool PutNumberArray(std::string_view key, std::span<const double> value);
491
492 /**
493 * Gets the current value in the table, setting it if it does not exist.
494 *
495 * @param key the key
496 * @param defaultValue the default value to set if key doesn't exist.
497 * @returns False if the table key exists with a different type
498 */
500 std::span<const double> defaultValue);
501
502 /**
503 * Returns the number array the key maps to. If the key does not exist or is
504 * of different type, it will return the default value.
505 *
506 * @param key the key to look up
507 * @param defaultValue the value to be returned if no value is found
508 * @return the value associated with the given key or the given default value
509 * if there is no value associated with the key
510 *
511 * @note This makes a copy of the array. If the overhead of this is a
512 * concern, use GetValue() instead.
513 */
514 std::vector<double> GetNumberArray(
515 std::string_view key, std::span<const double> defaultValue) const;
516
517 /**
518 * Put a string array in the table
519 *
520 * @param key the key to be assigned to
521 * @param value the value that will be assigned
522 * @return False if the table key already exists with a different type
523 */
524 bool PutStringArray(std::string_view key, std::span<const std::string> value);
525
526 /**
527 * Gets the current value in the table, setting it if it does not exist.
528 *
529 * @param key the key
530 * @param defaultValue the default value to set if key doesn't exist.
531 * @returns False if the table key exists with a different type
532 */
534 std::span<const std::string> defaultValue);
535
536 /**
537 * Returns the string array the key maps to. If the key does not exist or is
538 * of different type, it will return the default value.
539 *
540 * @param key the key to look up
541 * @param defaultValue the value to be returned if no value is found
542 * @return the value associated with the given key or the given default value
543 * if there is no value associated with the key
544 *
545 * @note This makes a copy of the array. If the overhead of this is a
546 * concern, use GetValue() instead.
547 */
548 std::vector<std::string> GetStringArray(
549 std::string_view key, std::span<const std::string> defaultValue) const;
550
551 /**
552 * Put a raw value (byte array) in the table
553 *
554 * @param key the key to be assigned to
555 * @param value the value that will be assigned
556 * @return False if the table key already exists with a different type
557 */
558 bool PutRaw(std::string_view key, std::span<const uint8_t> value);
559
560 /**
561 * Gets the current value in the table, setting it if it does not exist.
562 *
563 * @param key the key
564 * @param defaultValue the default value to set if key doesn't exist.
565 * @return False if the table key exists with a different type
566 */
568 std::span<const uint8_t> defaultValue);
569
570 /**
571 * Returns the raw value (byte array) the key maps to. If the key does not
572 * exist or is of different type, it will return the default value.
573 *
574 * @param key the key to look up
575 * @param defaultValue the value to be returned if no value is found
576 * @return the value associated with the given key or the given default value
577 * if there is no value associated with the key
578 *
579 * @note This makes a copy of the raw contents. If the overhead of this is a
580 * concern, use GetValue() instead.
581 */
582 std::vector<uint8_t> GetRaw(std::string_view key,
583 std::span<const uint8_t> defaultValue) const;
584
585 /**
586 * Put a value in the table
587 *
588 * @param key the key to be assigned to
589 * @param value the value that will be assigned
590 * @return False if the table key already exists with a different type
591 */
592 bool PutValue(std::string_view key, const Value& value);
593
594 /**
595 * Gets the current value in the table, setting it if it does not exist.
596 *
597 * @param key the key
598 * @param defaultValue the default value to set if key doesn't exist.
599 * @return False if the table key exists with a different type
600 */
601 bool SetDefaultValue(std::string_view key, const Value& defaultValue);
602
603 /**
604 * Gets the value associated with a key as an object
605 *
606 * @param key the key of the value to look up
607 * @return the value associated with the given key, or nullptr if the key
608 * does not exist
609 */
611
612 /**
613 * Gets the full path of this table. Does not include the trailing "/".
614 *
615 * @return The path (e.g "", "/foo").
616 */
618
619 /**
620 * Called when an event occurs on a topic in a {@link NetworkTable}.
621 *
622 * @param table the table the topic exists in
623 * @param key the key associated with the topic that changed
624 * @param event the event
625 */
626 using TableEventListener = std::function<void(
627 NetworkTable* table, std::string_view key, const Event& event)>;
628
629 /**
630 * Listen to topics only within this table.
631 *
632 * @param eventMask Bitmask of EventFlags values
633 * @param listener listener to add
634 * @return Listener handle
635 */
637
638 /**
639 * Listen to a single key.
640 *
641 * @param key the key name
642 * @param eventMask Bitmask of EventFlags values
643 * @param listener listener to add
644 * @return Listener handle
645 */
647 TableEventListener listener);
648
649 /**
650 * Called when a new table is created within a NetworkTable.
651 *
652 * @param parent the parent of the table
653 * @param name the name of the new table
654 * @param table the new table
655 */
657 std::function<void(NetworkTable* parent, std::string_view name,
658 std::shared_ptr<NetworkTable> table)>;
659
660 /**
661 * Listen for sub-table creation. This calls the listener once for each newly
662 * created sub-table. It immediately calls the listener for any existing
663 * sub-tables.
664 *
665 * @param listener listener to add
666 * @return Listener handle
667 */
669
670 /**
671 * Remove a listener.
672 *
673 * @param listener listener handle
674 */
676};
677
678} // namespace nt
This file defines the StringMap class.
NetworkTables BooleanArray topic.
Definition: BooleanArrayTopic.h:266
NetworkTables Boolean topic.
Definition: BooleanTopic.h:213
NetworkTables DoubleArray topic.
Definition: DoubleArrayTopic.h:266
NetworkTables Double topic.
Definition: DoubleTopic.h:213
NetworkTables event.
Definition: ntcore_cpp.h:217
NetworkTables FloatArray topic.
Definition: FloatArrayTopic.h:266
NetworkTables Float topic.
Definition: FloatTopic.h:213
NetworkTables IntegerArray topic.
Definition: IntegerArrayTopic.h:266
NetworkTables Integer topic.
Definition: IntegerTopic.h:213
NetworkTables Entry.
Definition: NetworkTableEntry.h:34
A network table that knows its subtable path.
Definition: NetworkTable.h:58
std::vector< Topic > GetTopics(int types=0) const
Gets all topics in the table (not including sub-tables).
bool PutNumber(std::string_view key, double value)
Put a number in the table.
std::vector< double > GetNumberArray(std::string_view key, std::span< const double > defaultValue) const
Returns the number array the key maps to.
Value GetValue(std::string_view key) const
Gets the value associated with a key as an object.
bool SetDefaultBooleanArray(std::string_view key, std::span< const int > defaultValue)
Gets the current value in the table, setting it if it does not exist.
bool SetDefaultValue(std::string_view key, const Value &defaultValue)
Gets the current value in the table, setting it if it does not exist.
FloatTopic GetFloatTopic(std::string_view name) const
Get float topic.
std::vector< uint8_t > GetRaw(std::string_view key, std::span< const uint8_t > defaultValue) const
Returns the raw value (byte array) the key maps to.
static std::vector< std::string > GetHierarchy(std::string_view key)
Gets a list of the names of all the super tables of a given key.
std::vector< int > GetBooleanArray(std::string_view key, std::span< const int > defaultValue) const
Returns the boolean array the key maps to.
bool PutNumberArray(std::string_view key, std::span< const double > value)
Put a number array in the table.
StringTopic GetStringTopic(std::string_view name) const
Get String topic.
std::string_view GetPath() const
Gets the full path of this table.
std::vector< std::string > GetStringArray(std::string_view key, std::span< const std::string > defaultValue) const
Returns the string array the key maps to.
bool SetDefaultBoolean(std::string_view key, bool defaultValue)
Gets the current value in the table, setting it if it does not exist.
static std::string NormalizeKey(std::string_view key, bool withLeadingSlash=true)
Normalizes an network table key to contain no consecutive slashes and optionally start with a leading...
std::vector< TopicInfo > GetTopicInfo(int types=0) const
Gets topic information for all keys in the table (not including sub-tables).
bool SetDefaultRaw(std::string_view key, std::span< const uint8_t > defaultValue)
Gets the current value in the table, setting it if it does not exist.
std::shared_ptr< NetworkTable > GetSubTable(std::string_view key) const
Returns the table at the specified key.
bool ContainsKey(std::string_view key) const
Determines whether the given key is in this table.
BooleanTopic GetBooleanTopic(std::string_view name) const
Get boolean topic.
std::function< void(NetworkTable *parent, std::string_view name, std::shared_ptr< NetworkTable > table)> SubTableListener
Called when a new table is created within a NetworkTable.
Definition: NetworkTable.h:658
bool PutBoolean(std::string_view key, bool value)
Put a boolean in the table.
bool ContainsSubTable(std::string_view key) const
Determines whether there exists a non-empty subtable for this key in this table.
std::function< void(NetworkTable *table, std::string_view key, const Event &event)> TableEventListener
Called when an event occurs on a topic in a NetworkTable.
Definition: NetworkTable.h:627
bool PutString(std::string_view key, std::string_view value)
Put a string in the table.
StructArrayTopic< T, I... > GetStructArrayTopic(std::string_view name, I... info) const
Gets a raw struct serialized array topic.
Definition: NetworkTable.h:267
bool IsPersistent(std::string_view key) const
Returns whether the value is persistent through program restarts.
bool SetDefaultNumber(std::string_view key, double defaultValue)
Gets the current value in the table, setting it if it does not exist.
bool SetDefaultStringArray(std::string_view key, std::span< const std::string > defaultValue)
Gets the current value in the table, setting it if it does not exist.
bool PutRaw(std::string_view key, std::span< const uint8_t > value)
Put a raw value (byte array) in the table.
double GetNumber(std::string_view key, double defaultValue) const
Gets the number associated with the given name.
RawTopic GetRawTopic(std::string_view name) const
Get raw topic.
void RemoveListener(NT_Listener listener)
Remove a listener.
StringArrayTopic GetStringArrayTopic(std::string_view name) const
Get String[] topic.
bool PutStringArray(std::string_view key, std::span< const std::string > value)
Put a string array in the table.
bool PutValue(std::string_view key, const Value &value)
Put a value in the table.
IntegerArrayTopic GetIntegerArrayTopic(std::string_view name) const
Get integer[] topic.
bool PutBooleanArray(std::string_view key, std::span< const int > value)
Put a boolean array in the table.
NetworkTableEntry GetEntry(std::string_view key) const
Gets the entry for a subkey.
BooleanArrayTopic GetBooleanArrayTopic(std::string_view name) const
Get boolean[] topic.
static constexpr char PATH_SEPARATOR_CHAR
The path separator for sub-tables and keys.
Definition: NetworkTable.h:128
NetworkTableInstance GetInstance() const
Gets the instance for the table.
Topic GetTopic(std::string_view name) const
Get (generic) topic.
IntegerTopic GetIntegerTopic(std::string_view name) const
Get integer topic.
bool GetBoolean(std::string_view key, bool defaultValue) const
Gets the boolean associated with the given name.
std::string GetString(std::string_view key, std::string_view defaultValue) const
Gets the string associated with the given name.
DoubleArrayTopic GetDoubleArrayTopic(std::string_view name) const
Get double[] topic.
static std::string_view BasenameKey(std::string_view key)
Gets the "base name" of a key.
std::vector< std::string > GetKeys(int types=0) const
Gets all keys in the table (not including sub-tables).
DoubleTopic GetDoubleTopic(std::string_view name) const
Get double topic.
std::vector< std::string > GetSubTables() const
Gets the names of all subtables in the table.
NT_Listener AddListener(std::string_view key, int eventMask, TableEventListener listener)
Listen to a single key.
NetworkTable(NT_Inst inst, std::string_view path, const private_init &)
Constructor.
void SetPersistent(std::string_view key)
Makes a key's value persistent through program restarts.
NT_Listener AddListener(int eventMask, TableEventListener listener)
Listen to topics only within this table.
NT_Listener AddSubTableListener(SubTableListener listener)
Listen for sub-table creation.
bool SetDefaultString(std::string_view key, std::string_view defaultValue)
Gets the current value in the table, setting it if it does not exist.
ProtobufTopic< T > GetProtobufTopic(std::string_view name) const
Gets a protobuf serialized value topic.
Definition: NetworkTable.h:241
StructTopic< T, I... > GetStructTopic(std::string_view name, I... info) const
Gets a raw struct serialized value topic.
Definition: NetworkTable.h:254
void ClearPersistent(std::string_view key)
Stop making a key's value persistent through program restarts.
bool SetDefaultNumberArray(std::string_view key, std::span< const double > defaultValue)
Gets the current value in the table, setting it if it does not exist.
FloatArrayTopic GetFloatArrayTopic(std::string_view name) const
Get float[] topic.
static std::string_view NormalizeKey(std::string_view key, wpi::SmallVectorImpl< char > &buf, bool withLeadingSlash=true)
NetworkTables Instance.
Definition: NetworkTableInstance.h:70
NetworkTables protobuf-encoded value topic.
Definition: ProtobufTopic.h:337
NetworkTables Raw topic.
Definition: RawTopic.h:266
NetworkTables StringArray topic.
Definition: StringArrayTopic.h:213
NetworkTables String topic.
Definition: StringTopic.h:268
NetworkTables struct-encoded value array topic.
Definition: StructArrayTopic.h:465
NetworkTables struct-encoded value topic.
Definition: StructTopic.h:371
NetworkTables Topic.
Definition: Topic.h:28
A network table entry value.
Definition: NetworkTableValue.h:32
Specifies that a type is capable of raw struct serialization and deserialization.
Definition: Struct.h:68
basic_string_view< char > string_view
Definition: core.h:501
NT_Handle NT_Listener
Definition: ntcore_c.h:37
NT_Handle NT_Inst
Definition: ntcore_c.h:36
NetworkTables (ntcore) namespace.
Definition: ntcore_cpp.h:36
constexpr const char * name(const T &)
::std::mutex mutex
Definition: mutex.h:17