mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
[ntcore] Allow numeric-compatible value sets (#4620)
Also fix entry publishing behavior to allow numerically compatible set default publish following a subscribe.
This commit is contained in:
@@ -471,6 +471,18 @@ class Value final {
|
||||
return MakeBooleanArray(std::span(value.begin(), value.end()), time);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a boolean array entry value.
|
||||
*
|
||||
* @param value the value
|
||||
* @param time if nonzero, the creation time to use (instead of the current
|
||||
* time)
|
||||
* @return The entry value
|
||||
*
|
||||
* @note This function moves the values out of the vector.
|
||||
*/
|
||||
static Value MakeBooleanArray(std::vector<int>&& value, int64_t time = 0);
|
||||
|
||||
/**
|
||||
* Creates an integer array entry value.
|
||||
*
|
||||
@@ -495,6 +507,18 @@ class Value final {
|
||||
return MakeIntegerArray(std::span(value.begin(), value.end()), time);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an integer array entry value.
|
||||
*
|
||||
* @param value the value
|
||||
* @param time if nonzero, the creation time to use (instead of the current
|
||||
* time)
|
||||
* @return The entry value
|
||||
*
|
||||
* @note This function moves the values out of the vector.
|
||||
*/
|
||||
static Value MakeIntegerArray(std::vector<int64_t>&& value, int64_t time = 0);
|
||||
|
||||
/**
|
||||
* Creates a float array entry value.
|
||||
*
|
||||
@@ -518,6 +542,18 @@ class Value final {
|
||||
return MakeFloatArray(std::span(value.begin(), value.end()), time);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a float array entry value.
|
||||
*
|
||||
* @param value the value
|
||||
* @param time if nonzero, the creation time to use (instead of the current
|
||||
* time)
|
||||
* @return The entry value
|
||||
*
|
||||
* @note This function moves the values out of the vector.
|
||||
*/
|
||||
static Value MakeFloatArray(std::vector<float>&& value, int64_t time = 0);
|
||||
|
||||
/**
|
||||
* Creates a double array entry value.
|
||||
*
|
||||
@@ -541,6 +577,18 @@ class Value final {
|
||||
return MakeDoubleArray(std::span(value.begin(), value.end()), time);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a double array entry value.
|
||||
*
|
||||
* @param value the value
|
||||
* @param time if nonzero, the creation time to use (instead of the current
|
||||
* time)
|
||||
* @return The entry value
|
||||
*
|
||||
* @note This function moves the values out of the vector.
|
||||
*/
|
||||
static Value MakeDoubleArray(std::vector<double>&& value, int64_t time = 0);
|
||||
|
||||
/**
|
||||
* Creates a string array entry value.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user