WPILibC++ 2024.3.2
NetworkTableValue.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 <stdint.h>
8
9#include <cassert>
10#include <concepts>
11#include <initializer_list>
12#include <memory>
13#include <span>
14#include <string>
15#include <string_view>
16#include <utility>
17#include <vector>
18
19#include "ntcore_c.h"
20
21namespace nt {
22
23#if __GNUC__ >= 13
24#pragma GCC diagnostic push
25#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
26#endif
27
28/**
29 * A network table entry value.
30 * @ingroup ntcore_cpp_api
31 */
32class Value final {
33 struct private_init {};
34
35 public:
37 Value(NT_Type type, size_t size, int64_t time, const private_init&);
38 Value(NT_Type type, size_t size, int64_t time, int64_t serverTime,
39 const private_init&);
40
41 explicit operator bool() const { return m_val.type != NT_UNASSIGNED; }
42
43 /**
44 * Get the data type.
45 *
46 * @return The type.
47 */
48 NT_Type type() const { return m_val.type; }
49
50 /**
51 * Get the data value stored.
52 *
53 * @return The type.
54 */
55 const NT_Value& value() const { return m_val; }
56
57 /**
58 * Get the creation time of the value, in local time.
59 *
60 * @return The time, in the units returned by nt::Now().
61 */
62 int64_t last_change() const { return m_val.last_change; }
63
64 /**
65 * Get the creation time of the value, in local time.
66 *
67 * @return The time, in the units returned by nt::Now().
68 */
69 int64_t time() const { return m_val.last_change; }
70
71 /**
72 * Get the approximate in-memory size of the value in bytes. This is zero for
73 * values that do not require additional memory beyond the memory of the Value
74 * itself.
75 *
76 * @return The size in bytes.
77 */
78 size_t size() const { return m_size; }
79
80 /**
81 * Set the local creation time of the value.
82 *
83 * @param time The time.
84 */
85 void SetTime(int64_t time) { m_val.last_change = time; }
86
87 /**
88 * Get the creation time of the value, in server time.
89 *
90 * @return The server time.
91 */
92 int64_t server_time() const { return m_val.server_time; }
93
94 /**
95 * Set the creation time of the value, in server time.
96 *
97 * @param time The server time.
98 */
99 void SetServerTime(int64_t time) { m_val.server_time = time; }
100
101 /**
102 * @{
103 * @name Type Checkers
104 */
105
106 /**
107 * Determine if entry value contains a value or is unassigned.
108 *
109 * @return True if the entry value contains a value.
110 */
111 bool IsValid() const { return m_val.type != NT_UNASSIGNED; }
112
113 /**
114 * Determine if entry value contains a boolean.
115 *
116 * @return True if the entry value is of boolean type.
117 */
118 bool IsBoolean() const { return m_val.type == NT_BOOLEAN; }
119
120 /**
121 * Determine if entry value contains an integer.
122 *
123 * @return True if the entry value is of integer type.
124 */
125 bool IsInteger() const { return m_val.type == NT_INTEGER; }
126
127 /**
128 * Determine if entry value contains a float.
129 *
130 * @return True if the entry value is of float type.
131 */
132 bool IsFloat() const { return m_val.type == NT_FLOAT; }
133
134 /**
135 * Determine if entry value contains a double.
136 *
137 * @return True if the entry value is of double type.
138 */
139 bool IsDouble() const { return m_val.type == NT_DOUBLE; }
140
141 /**
142 * Determine if entry value contains a string.
143 *
144 * @return True if the entry value is of string type.
145 */
146 bool IsString() const { return m_val.type == NT_STRING; }
147
148 /**
149 * Determine if entry value contains a raw.
150 *
151 * @return True if the entry value is of raw type.
152 */
153 bool IsRaw() const { return m_val.type == NT_RAW; }
154
155 /**
156 * Determine if entry value contains a boolean array.
157 *
158 * @return True if the entry value is of boolean array type.
159 */
160 bool IsBooleanArray() const { return m_val.type == NT_BOOLEAN_ARRAY; }
161
162 /**
163 * Determine if entry value contains an integer array.
164 *
165 * @return True if the entry value is of integer array type.
166 */
167 bool IsIntegerArray() const { return m_val.type == NT_INTEGER_ARRAY; }
168
169 /**
170 * Determine if entry value contains a float array.
171 *
172 * @return True if the entry value is of float array type.
173 */
174 bool IsFloatArray() const { return m_val.type == NT_FLOAT_ARRAY; }
175
176 /**
177 * Determine if entry value contains a double array.
178 *
179 * @return True if the entry value is of double array type.
180 */
181 bool IsDoubleArray() const { return m_val.type == NT_DOUBLE_ARRAY; }
182
183 /**
184 * Determine if entry value contains a string array.
185 *
186 * @return True if the entry value is of string array type.
187 */
188 bool IsStringArray() const { return m_val.type == NT_STRING_ARRAY; }
189
190 /** @} */
191
192 /**
193 * @{
194 * @name Type-Safe Getters
195 */
196
197 /**
198 * Get the entry's boolean value.
199 *
200 * @return The boolean value.
201 */
202 bool GetBoolean() const {
203 assert(m_val.type == NT_BOOLEAN);
204 return m_val.data.v_boolean != 0;
205 }
206
207 /**
208 * Get the entry's integer value.
209 *
210 * @return The integer value.
211 */
212 int64_t GetInteger() const {
213 assert(m_val.type == NT_INTEGER);
214 return m_val.data.v_int;
215 }
216
217 /**
218 * Get the entry's float value.
219 *
220 * @return The float value.
221 */
222 float GetFloat() const {
223 assert(m_val.type == NT_FLOAT);
224 return m_val.data.v_float;
225 }
226
227 /**
228 * Get the entry's double value.
229 *
230 * @return The double value.
231 */
232 double GetDouble() const {
233 assert(m_val.type == NT_DOUBLE);
234 return m_val.data.v_double;
235 }
236
237 /**
238 * Get the entry's string value.
239 *
240 * @return The string value.
241 */
243 assert(m_val.type == NT_STRING);
244 return {m_val.data.v_string.str, m_val.data.v_string.len};
245 }
246
247 /**
248 * Get the entry's raw value.
249 *
250 * @return The raw value.
251 */
252 std::span<const uint8_t> GetRaw() const {
253 assert(m_val.type == NT_RAW);
254 return {m_val.data.v_raw.data, m_val.data.v_raw.size};
255 }
256
257 /**
258 * Get the entry's boolean array value.
259 *
260 * @return The boolean array value.
261 */
262 std::span<const int> GetBooleanArray() const {
263 assert(m_val.type == NT_BOOLEAN_ARRAY);
264 return {m_val.data.arr_boolean.arr, m_val.data.arr_boolean.size};
265 }
266
267 /**
268 * Get the entry's integer array value.
269 *
270 * @return The integer array value.
271 */
272 std::span<const int64_t> GetIntegerArray() const {
273 assert(m_val.type == NT_INTEGER_ARRAY);
274 return {m_val.data.arr_int.arr, m_val.data.arr_int.size};
275 }
276
277 /**
278 * Get the entry's float array value.
279 *
280 * @return The float array value.
281 */
282 std::span<const float> GetFloatArray() const {
283 assert(m_val.type == NT_FLOAT_ARRAY);
284 return {m_val.data.arr_float.arr, m_val.data.arr_float.size};
285 }
286
287 /**
288 * Get the entry's double array value.
289 *
290 * @return The double array value.
291 */
292 std::span<const double> GetDoubleArray() const {
293 assert(m_val.type == NT_DOUBLE_ARRAY);
294 return {m_val.data.arr_double.arr, m_val.data.arr_double.size};
295 }
296
297 /**
298 * Get the entry's string array value.
299 *
300 * @return The string array value.
301 */
302 std::span<const std::string> GetStringArray() const {
303 assert(m_val.type == NT_STRING_ARRAY);
304 return *static_cast<std::vector<std::string>*>(m_storage.get());
305 }
306
307 /** @} */
308
309 /**
310 * @{
311 * @name Factory functions
312 */
313
314 /**
315 * Creates a boolean entry value.
316 *
317 * @param value the value
318 * @param time if nonzero, the creation time to use (instead of the current
319 * time)
320 * @return The entry value
321 */
322 static Value MakeBoolean(bool value, int64_t time = 0) {
323 Value val{NT_BOOLEAN, 0, time, private_init{}};
324 val.m_val.data.v_boolean = value;
325 return val;
326 }
327
328 /**
329 * Creates an integer entry value.
330 *
331 * @param value the value
332 * @param time if nonzero, the creation time to use (instead of the current
333 * time)
334 * @return The entry value
335 */
336 static Value MakeInteger(int64_t value, int64_t time = 0) {
337 Value val{NT_INTEGER, 0, time, private_init{}};
338 val.m_val.data.v_int = value;
339 return val;
340 }
341
342 /**
343 * Creates a float entry value.
344 *
345 * @param value the value
346 * @param time if nonzero, the creation time to use (instead of the current
347 * time)
348 * @return The entry value
349 */
350 static Value MakeFloat(float value, int64_t time = 0) {
351 Value val{NT_FLOAT, 0, time, private_init{}};
352 val.m_val.data.v_float = value;
353 return val;
354 }
355
356 /**
357 * Creates a double entry value.
358 *
359 * @param value the value
360 * @param time if nonzero, the creation time to use (instead of the current
361 * time)
362 * @return The entry value
363 */
364 static Value MakeDouble(double value, int64_t time = 0) {
365 Value val{NT_DOUBLE, 0, time, private_init{}};
366 val.m_val.data.v_double = value;
367 return val;
368 }
369
370 /**
371 * Creates a string entry value.
372 *
373 * @param value the value
374 * @param time if nonzero, the creation time to use (instead of the current
375 * time)
376 * @return The entry value
377 */
379 auto data = std::make_shared<std::string>(value);
380 Value val{NT_STRING, data->capacity(), time, private_init{}};
381 val.m_val.data.v_string.str = const_cast<char*>(data->c_str());
382 val.m_val.data.v_string.len = data->size();
383 val.m_storage = std::move(data);
384 return val;
385 }
386
387 /**
388 * Creates a string entry value.
389 *
390 * @param value the value
391 * @param time if nonzero, the creation time to use (instead of the current
392 * time)
393 * @return The entry value
394 */
395 template <std::same_as<std::string> T>
396 static Value MakeString(T&& value, int64_t time = 0) {
397 auto data = std::make_shared<std::string>(std::forward<T>(value));
398 Value val{NT_STRING, data->capacity(), time, private_init{}};
399 val.m_val.data.v_string.str = const_cast<char*>(data->c_str());
400 val.m_val.data.v_string.len = data->size();
401 val.m_storage = std::move(data);
402 return val;
403 }
404
405 /**
406 * Creates a raw entry value.
407 *
408 * @param value the value
409 * @param time if nonzero, the creation time to use (instead of the current
410 * time)
411 * @return The entry value
412 */
413 static Value MakeRaw(std::span<const uint8_t> value, int64_t time = 0) {
414 auto data =
415 std::make_shared<std::vector<uint8_t>>(value.begin(), value.end());
416 Value val{NT_RAW, data->capacity(), time, private_init{}};
417 val.m_val.data.v_raw.data = const_cast<uint8_t*>(data->data());
418 val.m_val.data.v_raw.size = data->size();
419 val.m_storage = std::move(data);
420 return val;
421 }
422
423 /**
424 * Creates a raw entry value.
425 *
426 * @param value the value
427 * @param time if nonzero, the creation time to use (instead of the current
428 * time)
429 * @return The entry value
430 */
431 template <std::same_as<std::vector<uint8_t>> T>
432 static Value MakeRaw(T&& value, int64_t time = 0) {
433 auto data = std::make_shared<std::vector<uint8_t>>(std::forward<T>(value));
434 Value val{NT_RAW, data->capacity(), time, private_init{}};
435 val.m_val.data.v_raw.data = const_cast<uint8_t*>(data->data());
436 val.m_val.data.v_raw.size = data->size();
437 val.m_storage = std::move(data);
438 return val;
439 }
440
441 /**
442 * Creates a boolean array entry value.
443 *
444 * @param value the value
445 * @param time if nonzero, the creation time to use (instead of the current
446 * time)
447 * @return The entry value
448 */
449 static Value MakeBooleanArray(std::span<const bool> value, int64_t time = 0);
450
451 /**
452 * Creates a boolean array entry value.
453 *
454 * @param value the value
455 * @param time if nonzero, the creation time to use (instead of the current
456 * time)
457 * @return The entry value
458 */
459 static Value MakeBooleanArray(std::initializer_list<bool> value,
460 int64_t time = 0) {
461 return MakeBooleanArray(std::span(value.begin(), value.end()), time);
462 }
463
464 /**
465 * Creates a boolean array entry value.
466 *
467 * @param value the value
468 * @param time if nonzero, the creation time to use (instead of the current
469 * time)
470 * @return The entry value
471 */
472 static Value MakeBooleanArray(std::span<const int> value, int64_t time = 0);
473
474 /**
475 * Creates a boolean array entry value.
476 *
477 * @param value the value
478 * @param time if nonzero, the creation time to use (instead of the current
479 * time)
480 * @return The entry value
481 */
482 static Value MakeBooleanArray(std::initializer_list<int> value,
483 int64_t time = 0) {
484 return MakeBooleanArray(std::span(value.begin(), value.end()), time);
485 }
486
487 /**
488 * Creates a boolean array entry value.
489 *
490 * @param value the value
491 * @param time if nonzero, the creation time to use (instead of the current
492 * time)
493 * @return The entry value
494 *
495 * @note This function moves the values out of the vector.
496 */
497 static Value MakeBooleanArray(std::vector<int>&& value, int64_t time = 0);
498
499 /**
500 * Creates an integer array entry value.
501 *
502 * @param value the value
503 * @param time if nonzero, the creation time to use (instead of the current
504 * time)
505 * @return The entry value
506 */
507 static Value MakeIntegerArray(std::span<const int64_t> value,
508 int64_t time = 0);
509
510 /**
511 * Creates an integer array entry value.
512 *
513 * @param value the value
514 * @param time if nonzero, the creation time to use (instead of the current
515 * time)
516 * @return The entry value
517 */
518 static Value MakeIntegerArray(std::initializer_list<int64_t> value,
519 int64_t time = 0) {
520 return MakeIntegerArray(std::span(value.begin(), value.end()), time);
521 }
522
523 /**
524 * Creates an integer array entry value.
525 *
526 * @param value the value
527 * @param time if nonzero, the creation time to use (instead of the current
528 * time)
529 * @return The entry value
530 *
531 * @note This function moves the values out of the vector.
532 */
533 static Value MakeIntegerArray(std::vector<int64_t>&& value, int64_t time = 0);
534
535 /**
536 * Creates a float array entry value.
537 *
538 * @param value the value
539 * @param time if nonzero, the creation time to use (instead of the current
540 * time)
541 * @return The entry value
542 */
543 static Value MakeFloatArray(std::span<const float> value, int64_t time = 0);
544
545 /**
546 * Creates a float array entry value.
547 *
548 * @param value the value
549 * @param time if nonzero, the creation time to use (instead of the current
550 * time)
551 * @return The entry value
552 */
553 static Value MakeFloatArray(std::initializer_list<float> value,
554 int64_t time = 0) {
555 return MakeFloatArray(std::span(value.begin(), value.end()), time);
556 }
557
558 /**
559 * Creates a float array entry value.
560 *
561 * @param value the value
562 * @param time if nonzero, the creation time to use (instead of the current
563 * time)
564 * @return The entry value
565 *
566 * @note This function moves the values out of the vector.
567 */
568 static Value MakeFloatArray(std::vector<float>&& value, int64_t time = 0);
569
570 /**
571 * Creates a double array entry value.
572 *
573 * @param value the value
574 * @param time if nonzero, the creation time to use (instead of the current
575 * time)
576 * @return The entry value
577 */
578 static Value MakeDoubleArray(std::span<const double> value, int64_t time = 0);
579
580 /**
581 * Creates a double array entry value.
582 *
583 * @param value the value
584 * @param time if nonzero, the creation time to use (instead of the current
585 * time)
586 * @return The entry value
587 */
588 static Value MakeDoubleArray(std::initializer_list<double> value,
589 int64_t time = 0) {
590 return MakeDoubleArray(std::span(value.begin(), value.end()), time);
591 }
592
593 /**
594 * Creates a double array entry value.
595 *
596 * @param value the value
597 * @param time if nonzero, the creation time to use (instead of the current
598 * time)
599 * @return The entry value
600 *
601 * @note This function moves the values out of the vector.
602 */
603 static Value MakeDoubleArray(std::vector<double>&& value, int64_t time = 0);
604
605 /**
606 * Creates a string array entry value.
607 *
608 * @param value the value
609 * @param time if nonzero, the creation time to use (instead of the current
610 * time)
611 * @return The entry value
612 */
613 static Value MakeStringArray(std::span<const std::string> value,
614 int64_t time = 0);
615
616 /**
617 * Creates a string array entry value.
618 *
619 * @param value the value
620 * @param time if nonzero, the creation time to use (instead of the current
621 * time)
622 * @return The entry value
623 */
624 static Value MakeStringArray(std::initializer_list<std::string> value,
625 int64_t time = 0) {
626 return MakeStringArray(std::span(value.begin(), value.end()), time);
627 }
628
629 /**
630 * Creates a string array entry value.
631 *
632 * @param value the value
633 * @param time if nonzero, the creation time to use (instead of the current
634 * time)
635 * @return The entry value
636 *
637 * @note This function moves the values out of the vector.
638 */
639 static Value MakeStringArray(std::vector<std::string>&& value,
640 int64_t time = 0);
641
642 /** @} */
643
644 friend bool operator==(const Value& lhs, const Value& rhs);
645
646 private:
647 NT_Value m_val = {};
648 std::shared_ptr<void> m_storage;
649 size_t m_size = 0;
650};
651
652#if __GNUC__ >= 13
653#pragma GCC diagnostic pop
654#endif
655
656bool operator==(const Value& lhs, const Value& rhs);
657
658/**
659 * NetworkTable Value alias for similarity with Java.
660 * @ingroup ntcore_cpp_api
661 */
663
664} // namespace nt
A network table entry value.
Definition: NetworkTableValue.h:32
static Value MakeStringArray(std::vector< std::string > &&value, int64_t time=0)
Creates a string array entry value.
static Value MakeBoolean(bool value, int64_t time=0)
Creates a boolean entry value.
Definition: NetworkTableValue.h:322
int64_t server_time() const
Get the creation time of the value, in server time.
Definition: NetworkTableValue.h:92
static Value MakeIntegerArray(std::vector< int64_t > &&value, int64_t time=0)
Creates an integer array entry value.
static Value MakeBooleanArray(std::vector< int > &&value, int64_t time=0)
Creates a boolean array entry value.
static Value MakeFloat(float value, int64_t time=0)
Creates a float entry value.
Definition: NetworkTableValue.h:350
static Value MakeString(T &&value, int64_t time=0)
Creates a string entry value.
Definition: NetworkTableValue.h:396
static Value MakeFloatArray(std::initializer_list< float > value, int64_t time=0)
Creates a float array entry value.
Definition: NetworkTableValue.h:553
static Value MakeBooleanArray(std::initializer_list< int > value, int64_t time=0)
Creates a boolean array entry value.
Definition: NetworkTableValue.h:482
bool IsValid() const
Determine if entry value contains a value or is unassigned.
Definition: NetworkTableValue.h:111
bool IsBooleanArray() const
Determine if entry value contains a boolean array.
Definition: NetworkTableValue.h:160
std::span< const int64_t > GetIntegerArray() const
Get the entry's integer array value.
Definition: NetworkTableValue.h:272
static Value MakeFloatArray(std::span< const float > value, int64_t time=0)
Creates a float array entry value.
bool IsRaw() const
Determine if entry value contains a raw.
Definition: NetworkTableValue.h:153
static Value MakeRaw(std::span< const uint8_t > value, int64_t time=0)
Creates a raw entry value.
Definition: NetworkTableValue.h:413
static Value MakeDoubleArray(std::vector< double > &&value, int64_t time=0)
Creates a double array entry value.
bool IsIntegerArray() const
Determine if entry value contains an integer array.
Definition: NetworkTableValue.h:167
bool IsDouble() const
Determine if entry value contains a double.
Definition: NetworkTableValue.h:139
NT_Type type() const
Get the data type.
Definition: NetworkTableValue.h:48
friend bool operator==(const Value &lhs, const Value &rhs)
static Value MakeIntegerArray(std::span< const int64_t > value, int64_t time=0)
Creates an integer array entry value.
float GetFloat() const
Get the entry's float value.
Definition: NetworkTableValue.h:222
static Value MakeString(std::string_view value, int64_t time=0)
Creates a string entry value.
Definition: NetworkTableValue.h:378
std::span< const float > GetFloatArray() const
Get the entry's float array value.
Definition: NetworkTableValue.h:282
int64_t last_change() const
Get the creation time of the value, in local time.
Definition: NetworkTableValue.h:62
bool IsDoubleArray() const
Determine if entry value contains a double array.
Definition: NetworkTableValue.h:181
static Value MakeBooleanArray(std::span< const int > value, int64_t time=0)
Creates a boolean array entry value.
static Value MakeStringArray(std::initializer_list< std::string > value, int64_t time=0)
Creates a string array entry value.
Definition: NetworkTableValue.h:624
bool IsFloat() const
Determine if entry value contains a float.
Definition: NetworkTableValue.h:132
static Value MakeRaw(T &&value, int64_t time=0)
Creates a raw entry value.
Definition: NetworkTableValue.h:432
bool IsStringArray() const
Determine if entry value contains a string array.
Definition: NetworkTableValue.h:188
static Value MakeDoubleArray(std::span< const double > value, int64_t time=0)
Creates a double array entry value.
void SetServerTime(int64_t time)
Set the creation time of the value, in server time.
Definition: NetworkTableValue.h:99
double GetDouble() const
Get the entry's double value.
Definition: NetworkTableValue.h:232
bool IsInteger() const
Determine if entry value contains an integer.
Definition: NetworkTableValue.h:125
const NT_Value & value() const
Get the data value stored.
Definition: NetworkTableValue.h:55
static Value MakeFloatArray(std::vector< float > &&value, int64_t time=0)
Creates a float array entry value.
static Value MakeStringArray(std::span< const std::string > value, int64_t time=0)
Creates a string array entry value.
Value(NT_Type type, size_t size, int64_t time, const private_init &)
std::span< const std::string > GetStringArray() const
Get the entry's string array value.
Definition: NetworkTableValue.h:302
static Value MakeDouble(double value, int64_t time=0)
Creates a double entry value.
Definition: NetworkTableValue.h:364
int64_t GetInteger() const
Get the entry's integer value.
Definition: NetworkTableValue.h:212
std::span< const double > GetDoubleArray() const
Get the entry's double array value.
Definition: NetworkTableValue.h:292
std::span< const uint8_t > GetRaw() const
Get the entry's raw value.
Definition: NetworkTableValue.h:252
bool IsBoolean() const
Determine if entry value contains a boolean.
Definition: NetworkTableValue.h:118
bool IsString() const
Determine if entry value contains a string.
Definition: NetworkTableValue.h:146
static Value MakeBooleanArray(std::span< const bool > value, int64_t time=0)
Creates a boolean array entry value.
static Value MakeInteger(int64_t value, int64_t time=0)
Creates an integer entry value.
Definition: NetworkTableValue.h:336
bool GetBoolean() const
Get the entry's boolean value.
Definition: NetworkTableValue.h:202
size_t size() const
Get the approximate in-memory size of the value in bytes.
Definition: NetworkTableValue.h:78
bool IsFloatArray() const
Determine if entry value contains a float array.
Definition: NetworkTableValue.h:174
Value(NT_Type type, size_t size, int64_t time, int64_t serverTime, const private_init &)
std::string_view GetString() const
Get the entry's string value.
Definition: NetworkTableValue.h:242
std::span< const int > GetBooleanArray() const
Get the entry's boolean array value.
Definition: NetworkTableValue.h:262
static Value MakeBooleanArray(std::initializer_list< bool > value, int64_t time=0)
Creates a boolean array entry value.
Definition: NetworkTableValue.h:459
static Value MakeDoubleArray(std::initializer_list< double > value, int64_t time=0)
Creates a double array entry value.
Definition: NetworkTableValue.h:588
void SetTime(int64_t time)
Set the local creation time of the value.
Definition: NetworkTableValue.h:85
static Value MakeIntegerArray(std::initializer_list< int64_t > value, int64_t time=0)
Creates an integer array entry value.
Definition: NetworkTableValue.h:518
int64_t time() const
Get the creation time of the value, in local time.
Definition: NetworkTableValue.h:69
basic_string_view< char > string_view
Definition: core.h:501
NT_Type
NetworkTables data types.
Definition: ntcore_c.h:51
@ NT_DOUBLE
Definition: ntcore_c.h:54
@ NT_BOOLEAN
Definition: ntcore_c.h:53
@ NT_DOUBLE_ARRAY
Definition: ntcore_c.h:58
@ NT_STRING
Definition: ntcore_c.h:55
@ NT_FLOAT_ARRAY
Definition: ntcore_c.h:64
@ NT_INTEGER
Definition: ntcore_c.h:61
@ NT_BOOLEAN_ARRAY
Definition: ntcore_c.h:57
@ NT_FLOAT
Definition: ntcore_c.h:62
@ NT_STRING_ARRAY
Definition: ntcore_c.h:59
@ NT_INTEGER_ARRAY
Definition: ntcore_c.h:63
@ NT_UNASSIGNED
Definition: ntcore_c.h:52
@ NT_RAW
Definition: ntcore_c.h:56
NetworkTables (ntcore) namespace.
Definition: ntcore_cpp.h:36
bool operator==(const Value &lhs, const Value &rhs)
NetworkTables Entry Value.
Definition: ntcore_c.h:150
enum NT_Type type
Definition: ntcore_c.h:151
int64_t last_change
Definition: ntcore_c.h:152
int64_t server_time
Definition: ntcore_c.h:153
uint8_t * data
Definition: ntcore_c.h:161