mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[ntcore] Rename constants to all caps style (#8676)
This commit is contained in:
@@ -302,7 +302,7 @@ class BooleanArrayTopic final : public Topic {
|
||||
using ParamType = std::span<const int>;
|
||||
using TimestampedValueType = TimestampedBooleanArray;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "boolean[]";
|
||||
static constexpr std::string_view TYPE_STRING = "boolean[]";
|
||||
|
||||
BooleanArrayTopic() = default;
|
||||
|
||||
@@ -339,7 +339,7 @@ class BooleanArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_BOOLEAN_ARRAY, "boolean[]", options),
|
||||
defaultValue};
|
||||
@@ -363,7 +363,7 @@ class BooleanArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_BOOLEAN_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
@@ -385,7 +385,7 @@ class BooleanArrayTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanArrayPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_BOOLEAN_ARRAY, "boolean[]", options)};
|
||||
}
|
||||
@@ -410,7 +410,7 @@ class BooleanArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanArrayPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_BOOLEAN_ARRAY, typeString, properties, options)};
|
||||
}
|
||||
@@ -437,7 +437,7 @@ class BooleanArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_BOOLEAN_ARRAY, "boolean[]", options),
|
||||
defaultValue};
|
||||
@@ -465,7 +465,7 @@ class BooleanArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_BOOLEAN_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -241,7 +241,7 @@ class BooleanTopic final : public Topic {
|
||||
using ParamType = bool;
|
||||
using TimestampedValueType = TimestampedBoolean;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "boolean";
|
||||
static constexpr std::string_view TYPE_STRING = "boolean";
|
||||
|
||||
BooleanTopic() = default;
|
||||
|
||||
@@ -278,7 +278,7 @@ class BooleanTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_BOOLEAN, "boolean", options),
|
||||
defaultValue};
|
||||
@@ -302,7 +302,7 @@ class BooleanTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_BOOLEAN, typeString, options),
|
||||
defaultValue};
|
||||
@@ -324,7 +324,7 @@ class BooleanTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_BOOLEAN, "boolean", options)};
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class BooleanTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_BOOLEAN, typeString, properties, options)};
|
||||
}
|
||||
@@ -376,7 +376,7 @@ class BooleanTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_BOOLEAN, "boolean", options),
|
||||
defaultValue};
|
||||
@@ -404,7 +404,7 @@ class BooleanTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return BooleanEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_BOOLEAN, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -302,7 +302,7 @@ class DoubleArrayTopic final : public Topic {
|
||||
using ParamType = std::span<const double>;
|
||||
using TimestampedValueType = TimestampedDoubleArray;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "double[]";
|
||||
static constexpr std::string_view TYPE_STRING = "double[]";
|
||||
|
||||
DoubleArrayTopic() = default;
|
||||
|
||||
@@ -339,7 +339,7 @@ class DoubleArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_DOUBLE_ARRAY, "double[]", options),
|
||||
defaultValue};
|
||||
@@ -363,7 +363,7 @@ class DoubleArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_DOUBLE_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
@@ -385,7 +385,7 @@ class DoubleArrayTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleArrayPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_DOUBLE_ARRAY, "double[]", options)};
|
||||
}
|
||||
@@ -410,7 +410,7 @@ class DoubleArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleArrayPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_DOUBLE_ARRAY, typeString, properties, options)};
|
||||
}
|
||||
@@ -437,7 +437,7 @@ class DoubleArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_DOUBLE_ARRAY, "double[]", options),
|
||||
defaultValue};
|
||||
@@ -465,7 +465,7 @@ class DoubleArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_DOUBLE_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -241,7 +241,7 @@ class DoubleTopic final : public Topic {
|
||||
using ParamType = double;
|
||||
using TimestampedValueType = TimestampedDouble;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "double";
|
||||
static constexpr std::string_view TYPE_STRING = "double";
|
||||
|
||||
DoubleTopic() = default;
|
||||
|
||||
@@ -278,7 +278,7 @@ class DoubleTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_DOUBLE, "double", options),
|
||||
defaultValue};
|
||||
@@ -302,7 +302,7 @@ class DoubleTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_DOUBLE, typeString, options),
|
||||
defaultValue};
|
||||
@@ -324,7 +324,7 @@ class DoubleTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoublePublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_DOUBLE, "double", options)};
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class DoubleTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoublePublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_DOUBLE, typeString, properties, options)};
|
||||
}
|
||||
@@ -376,7 +376,7 @@ class DoubleTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_DOUBLE, "double", options),
|
||||
defaultValue};
|
||||
@@ -404,7 +404,7 @@ class DoubleTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return DoubleEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_DOUBLE, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -302,7 +302,7 @@ class FloatArrayTopic final : public Topic {
|
||||
using ParamType = std::span<const float>;
|
||||
using TimestampedValueType = TimestampedFloatArray;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "float[]";
|
||||
static constexpr std::string_view TYPE_STRING = "float[]";
|
||||
|
||||
FloatArrayTopic() = default;
|
||||
|
||||
@@ -339,7 +339,7 @@ class FloatArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_FLOAT_ARRAY, "float[]", options),
|
||||
defaultValue};
|
||||
@@ -363,7 +363,7 @@ class FloatArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_FLOAT_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
@@ -385,7 +385,7 @@ class FloatArrayTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatArrayPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_FLOAT_ARRAY, "float[]", options)};
|
||||
}
|
||||
@@ -410,7 +410,7 @@ class FloatArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatArrayPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_FLOAT_ARRAY, typeString, properties, options)};
|
||||
}
|
||||
@@ -437,7 +437,7 @@ class FloatArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_FLOAT_ARRAY, "float[]", options),
|
||||
defaultValue};
|
||||
@@ -465,7 +465,7 @@ class FloatArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_FLOAT_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -241,7 +241,7 @@ class FloatTopic final : public Topic {
|
||||
using ParamType = float;
|
||||
using TimestampedValueType = TimestampedFloat;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "float";
|
||||
static constexpr std::string_view TYPE_STRING = "float";
|
||||
|
||||
FloatTopic() = default;
|
||||
|
||||
@@ -278,7 +278,7 @@ class FloatTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_FLOAT, "float", options),
|
||||
defaultValue};
|
||||
@@ -302,7 +302,7 @@ class FloatTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_FLOAT, typeString, options),
|
||||
defaultValue};
|
||||
@@ -324,7 +324,7 @@ class FloatTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_FLOAT, "float", options)};
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class FloatTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_FLOAT, typeString, properties, options)};
|
||||
}
|
||||
@@ -376,7 +376,7 @@ class FloatTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_FLOAT, "float", options),
|
||||
defaultValue};
|
||||
@@ -404,7 +404,7 @@ class FloatTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return FloatEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_FLOAT, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -302,7 +302,7 @@ class IntegerArrayTopic final : public Topic {
|
||||
using ParamType = std::span<const int64_t>;
|
||||
using TimestampedValueType = TimestampedIntegerArray;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "int[]";
|
||||
static constexpr std::string_view TYPE_STRING = "int[]";
|
||||
|
||||
IntegerArrayTopic() = default;
|
||||
|
||||
@@ -339,7 +339,7 @@ class IntegerArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_INTEGER_ARRAY, "int[]", options),
|
||||
defaultValue};
|
||||
@@ -363,7 +363,7 @@ class IntegerArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_INTEGER_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
@@ -385,7 +385,7 @@ class IntegerArrayTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerArrayPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_INTEGER_ARRAY, "int[]", options)};
|
||||
}
|
||||
@@ -410,7 +410,7 @@ class IntegerArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerArrayPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_INTEGER_ARRAY, typeString, properties, options)};
|
||||
}
|
||||
@@ -437,7 +437,7 @@ class IntegerArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_INTEGER_ARRAY, "int[]", options),
|
||||
defaultValue};
|
||||
@@ -465,7 +465,7 @@ class IntegerArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_INTEGER_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -241,7 +241,7 @@ class IntegerTopic final : public Topic {
|
||||
using ParamType = int64_t;
|
||||
using TimestampedValueType = TimestampedInteger;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "int";
|
||||
static constexpr std::string_view TYPE_STRING = "int";
|
||||
|
||||
IntegerTopic() = default;
|
||||
|
||||
@@ -278,7 +278,7 @@ class IntegerTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_INTEGER, "int", options),
|
||||
defaultValue};
|
||||
@@ -302,7 +302,7 @@ class IntegerTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_INTEGER, typeString, options),
|
||||
defaultValue};
|
||||
@@ -324,7 +324,7 @@ class IntegerTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_INTEGER, "int", options)};
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class IntegerTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_INTEGER, typeString, properties, options)};
|
||||
}
|
||||
@@ -376,7 +376,7 @@ class IntegerTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_INTEGER, "int", options),
|
||||
defaultValue};
|
||||
@@ -404,7 +404,7 @@ class IntegerTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return IntegerEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_INTEGER, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -339,7 +339,7 @@ class RawTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return RawSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_RAW, typeString, options),
|
||||
defaultValue};
|
||||
@@ -362,7 +362,7 @@ class RawTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(std::string_view typeString, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(std::string_view typeString, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return RawPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_RAW, typeString, options)};
|
||||
}
|
||||
@@ -387,7 +387,7 @@ class RawTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return RawPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_RAW, typeString, properties, options)};
|
||||
}
|
||||
@@ -416,7 +416,7 @@ class RawTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return RawEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_RAW, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -241,7 +241,7 @@ class StringArrayTopic final : public Topic {
|
||||
using ParamType = std::span<const std::string>;
|
||||
using TimestampedValueType = TimestampedStringArray;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "string[]";
|
||||
static constexpr std::string_view TYPE_STRING = "string[]";
|
||||
|
||||
StringArrayTopic() = default;
|
||||
|
||||
@@ -278,7 +278,7 @@ class StringArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_STRING_ARRAY, "string[]", options),
|
||||
defaultValue};
|
||||
@@ -302,7 +302,7 @@ class StringArrayTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringArraySubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_STRING_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
@@ -324,7 +324,7 @@ class StringArrayTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringArrayPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_STRING_ARRAY, "string[]", options)};
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class StringArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringArrayPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_STRING_ARRAY, typeString, properties, options)};
|
||||
}
|
||||
@@ -376,7 +376,7 @@ class StringArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_STRING_ARRAY, "string[]", options),
|
||||
defaultValue};
|
||||
@@ -404,7 +404,7 @@ class StringArrayTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringArrayEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_STRING_ARRAY, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
@@ -304,7 +304,7 @@ class StringTopic final : public Topic {
|
||||
using ParamType = std::string_view;
|
||||
using TimestampedValueType = TimestampedString;
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = "string";
|
||||
static constexpr std::string_view TYPE_STRING = "string";
|
||||
|
||||
StringTopic() = default;
|
||||
|
||||
@@ -341,7 +341,7 @@ class StringTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_STRING, "string", options),
|
||||
defaultValue};
|
||||
@@ -365,7 +365,7 @@ class StringTopic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringSubscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_STRING, typeString, options),
|
||||
defaultValue};
|
||||
@@ -387,7 +387,7 @@ class StringTopic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish(const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish(const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringPublisher{
|
||||
::wpi::nt::Publish(m_handle, NT_STRING, "string", options)};
|
||||
}
|
||||
@@ -412,7 +412,7 @@ class StringTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType PublishEx(std::string_view typeString,
|
||||
const wpi::util::json& properties, const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const wpi::util::json& properties, const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringPublisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_STRING, typeString, properties, options)};
|
||||
}
|
||||
@@ -439,7 +439,7 @@ class StringTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry(ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_STRING, "string", options),
|
||||
defaultValue};
|
||||
@@ -467,7 +467,7 @@ class StringTopic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return StringEntry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_STRING, typeString, options),
|
||||
defaultValue};
|
||||
|
||||
Reference in New Issue
Block a user