mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
[ntcore] Rename constants to all caps style (#8676)
This commit is contained in:
@@ -67,30 +67,30 @@ final class GenericEntryImpl extends EntryBase implements GenericEntry {
|
||||
long time = value.getTime();
|
||||
Object otherValue = value.getValue();
|
||||
switch (value.getType()) {
|
||||
case kBoolean:
|
||||
case BOOLEAN:
|
||||
return NetworkTablesJNI.setBoolean(m_handle, time, (Boolean) otherValue);
|
||||
case kInteger:
|
||||
case INTEGER:
|
||||
return NetworkTablesJNI.setInteger(
|
||||
m_handle, time, ((Number) otherValue).longValue());
|
||||
case kFloat:
|
||||
case FLOAT:
|
||||
return NetworkTablesJNI.setFloat(
|
||||
m_handle, time, ((Number) otherValue).floatValue());
|
||||
case kDouble:
|
||||
case DOUBLE:
|
||||
return NetworkTablesJNI.setDouble(
|
||||
m_handle, time, ((Number) otherValue).doubleValue());
|
||||
case kString:
|
||||
case STRING:
|
||||
return NetworkTablesJNI.setString(m_handle, time, (String) otherValue);
|
||||
case kRaw:
|
||||
case RAW:
|
||||
return NetworkTablesJNI.setRaw(m_handle, time, (byte[]) otherValue);
|
||||
case kBooleanArray:
|
||||
case BOOLEAN_ARRAY:
|
||||
return NetworkTablesJNI.setBooleanArray(m_handle, time, (boolean[]) otherValue);
|
||||
case kIntegerArray:
|
||||
case INTEGER_ARRAY:
|
||||
return NetworkTablesJNI.setIntegerArray(m_handle, time, (long[]) otherValue);
|
||||
case kFloatArray:
|
||||
case FLOAT_ARRAY:
|
||||
return NetworkTablesJNI.setFloatArray(m_handle, time, (float[]) otherValue);
|
||||
case kDoubleArray:
|
||||
case DOUBLE_ARRAY:
|
||||
return NetworkTablesJNI.setDoubleArray(m_handle, time, (double[]) otherValue);
|
||||
case kStringArray:
|
||||
case STRING_ARRAY:
|
||||
return NetworkTablesJNI.setStringArray(m_handle, time, (String[]) otherValue);
|
||||
default:
|
||||
return true;
|
||||
@@ -220,30 +220,30 @@ final class GenericEntryImpl extends EntryBase implements GenericEntry {
|
||||
long time = defaultValue.getTime();
|
||||
Object otherValue = defaultValue.getValue();
|
||||
switch (defaultValue.getType()) {
|
||||
case kBoolean:
|
||||
case BOOLEAN:
|
||||
return NetworkTablesJNI.setDefaultBoolean(m_handle, time, (Boolean) otherValue);
|
||||
case kInteger:
|
||||
case INTEGER:
|
||||
return NetworkTablesJNI.setDefaultInteger(
|
||||
m_handle, time, ((Number) otherValue).longValue());
|
||||
case kFloat:
|
||||
case FLOAT:
|
||||
return NetworkTablesJNI.setDefaultFloat(
|
||||
m_handle, time, ((Number) otherValue).floatValue());
|
||||
case kDouble:
|
||||
case DOUBLE:
|
||||
return NetworkTablesJNI.setDefaultDouble(
|
||||
m_handle, time, ((Number) otherValue).doubleValue());
|
||||
case kString:
|
||||
case STRING:
|
||||
return NetworkTablesJNI.setDefaultString(m_handle, time, (String) otherValue);
|
||||
case kRaw:
|
||||
case RAW:
|
||||
return NetworkTablesJNI.setDefaultRaw(m_handle, time, (byte[]) otherValue);
|
||||
case kBooleanArray:
|
||||
case BOOLEAN_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultBooleanArray(m_handle, time, (boolean[]) otherValue);
|
||||
case kIntegerArray:
|
||||
case INTEGER_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultIntegerArray(m_handle, time, (long[]) otherValue);
|
||||
case kFloatArray:
|
||||
case FLOAT_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultFloatArray(m_handle, time, (float[]) otherValue);
|
||||
case kDoubleArray:
|
||||
case DOUBLE_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultDoubleArray(m_handle, time, (double[]) otherValue);
|
||||
case kStringArray:
|
||||
case STRING_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultStringArray(m_handle, time, (String[]) otherValue);
|
||||
default:
|
||||
return true;
|
||||
|
||||
@@ -222,30 +222,30 @@ public final class NetworkTableEntry implements Publisher, Subscriber {
|
||||
long time = ((NetworkTableValue) defaultValue).getTime();
|
||||
Object otherValue = ((NetworkTableValue) defaultValue).getValue();
|
||||
switch (((NetworkTableValue) defaultValue).getType()) {
|
||||
case kBoolean:
|
||||
case BOOLEAN:
|
||||
return NetworkTablesJNI.setDefaultBoolean(m_handle, time, (Boolean) otherValue);
|
||||
case kInteger:
|
||||
case INTEGER:
|
||||
return NetworkTablesJNI.setDefaultInteger(
|
||||
m_handle, time, ((Number) otherValue).longValue());
|
||||
case kFloat:
|
||||
case FLOAT:
|
||||
return NetworkTablesJNI.setDefaultFloat(
|
||||
m_handle, time, ((Number) otherValue).floatValue());
|
||||
case kDouble:
|
||||
case DOUBLE:
|
||||
return NetworkTablesJNI.setDefaultDouble(
|
||||
m_handle, time, ((Number) otherValue).doubleValue());
|
||||
case kString:
|
||||
case STRING:
|
||||
return NetworkTablesJNI.setDefaultString(m_handle, time, (String) otherValue);
|
||||
case kRaw:
|
||||
case RAW:
|
||||
return NetworkTablesJNI.setDefaultRaw(m_handle, time, (byte[]) otherValue);
|
||||
case kBooleanArray:
|
||||
case BOOLEAN_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultBooleanArray(m_handle, time, (boolean[]) otherValue);
|
||||
case kIntegerArray:
|
||||
case INTEGER_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultIntegerArray(m_handle, time, (long[]) otherValue);
|
||||
case kFloatArray:
|
||||
case FLOAT_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultFloatArray(m_handle, time, (float[]) otherValue);
|
||||
case kDoubleArray:
|
||||
case DOUBLE_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultDoubleArray(m_handle, time, (double[]) otherValue);
|
||||
case kStringArray:
|
||||
case STRING_ARRAY:
|
||||
return NetworkTablesJNI.setDefaultStringArray(m_handle, time, (String[]) otherValue);
|
||||
default:
|
||||
return true;
|
||||
@@ -375,30 +375,30 @@ public final class NetworkTableEntry implements Publisher, Subscriber {
|
||||
long time = ((NetworkTableValue) value).getTime();
|
||||
Object otherValue = ((NetworkTableValue) value).getValue();
|
||||
switch (((NetworkTableValue) value).getType()) {
|
||||
case kBoolean:
|
||||
case BOOLEAN:
|
||||
return NetworkTablesJNI.setBoolean(m_handle, time, (Boolean) otherValue);
|
||||
case kInteger:
|
||||
case INTEGER:
|
||||
return NetworkTablesJNI.setInteger(
|
||||
m_handle, time, ((Number) otherValue).longValue());
|
||||
case kFloat:
|
||||
case FLOAT:
|
||||
return NetworkTablesJNI.setFloat(
|
||||
m_handle, time, ((Number) otherValue).floatValue());
|
||||
case kDouble:
|
||||
case DOUBLE:
|
||||
return NetworkTablesJNI.setDouble(
|
||||
m_handle, time, ((Number) otherValue).doubleValue());
|
||||
case kString:
|
||||
case STRING:
|
||||
return NetworkTablesJNI.setString(m_handle, time, (String) otherValue);
|
||||
case kRaw:
|
||||
case RAW:
|
||||
return NetworkTablesJNI.setRaw(m_handle, time, (byte[]) otherValue);
|
||||
case kBooleanArray:
|
||||
case BOOLEAN_ARRAY:
|
||||
return NetworkTablesJNI.setBooleanArray(m_handle, time, (boolean[]) otherValue);
|
||||
case kIntegerArray:
|
||||
case INTEGER_ARRAY:
|
||||
return NetworkTablesJNI.setIntegerArray(m_handle, time, (long[]) otherValue);
|
||||
case kFloatArray:
|
||||
case FLOAT_ARRAY:
|
||||
return NetworkTablesJNI.setFloatArray(m_handle, time, (float[]) otherValue);
|
||||
case kDoubleArray:
|
||||
case DOUBLE_ARRAY:
|
||||
return NetworkTablesJNI.setDoubleArray(m_handle, time, (double[]) otherValue);
|
||||
case kStringArray:
|
||||
case STRING_ARRAY:
|
||||
return NetworkTablesJNI.setStringArray(m_handle, time, (String[]) otherValue);
|
||||
default:
|
||||
return true;
|
||||
|
||||
@@ -47,16 +47,16 @@ public final class NetworkTableInstance implements AutoCloseable {
|
||||
/** Client/server mode flag values (as returned by {@link #getNetworkMode()}). */
|
||||
public enum NetworkMode {
|
||||
/** Running in server mode. */
|
||||
kServer(0x01),
|
||||
SERVER(0x01),
|
||||
|
||||
/** Running in client mode. */
|
||||
kClient(0x04),
|
||||
CLIENT(0x04),
|
||||
|
||||
/** Currently starting up (either client or server). */
|
||||
kStarting(0x08),
|
||||
STARTING(0x08),
|
||||
|
||||
/** Running in local-only mode. */
|
||||
kLocal(0x10);
|
||||
LOCAL(0x10);
|
||||
|
||||
private final int value;
|
||||
|
||||
@@ -75,7 +75,7 @@ public final class NetworkTableInstance implements AutoCloseable {
|
||||
}
|
||||
|
||||
/** The default port that network tables operates on. */
|
||||
public static final int kDefaultPort = 5810;
|
||||
public static final int DEFAULT_PORT = 5810;
|
||||
|
||||
/**
|
||||
* Construct from native handle.
|
||||
@@ -709,9 +709,9 @@ public final class NetworkTableInstance implements AutoCloseable {
|
||||
*/
|
||||
public int addConnectionListener(
|
||||
boolean immediateNotify, Consumer<NetworkTableEvent> listener) {
|
||||
EnumSet<NetworkTableEvent.Kind> eventKinds = EnumSet.of(NetworkTableEvent.Kind.kConnection);
|
||||
EnumSet<NetworkTableEvent.Kind> eventKinds = EnumSet.of(NetworkTableEvent.Kind.CONNECTION);
|
||||
if (immediateNotify) {
|
||||
eventKinds.add(NetworkTableEvent.Kind.kImmediate);
|
||||
eventKinds.add(NetworkTableEvent.Kind.IMMEDIATE);
|
||||
}
|
||||
return m_listeners.add(m_handle, eventKinds, listener);
|
||||
}
|
||||
@@ -727,9 +727,9 @@ public final class NetworkTableInstance implements AutoCloseable {
|
||||
*/
|
||||
public int addTimeSyncListener(
|
||||
boolean immediateNotify, Consumer<NetworkTableEvent> listener) {
|
||||
EnumSet<NetworkTableEvent.Kind> eventKinds = EnumSet.of(NetworkTableEvent.Kind.kTimeSync);
|
||||
EnumSet<NetworkTableEvent.Kind> eventKinds = EnumSet.of(NetworkTableEvent.Kind.TIME_SYNC);
|
||||
if (immediateNotify) {
|
||||
eventKinds.add(NetworkTableEvent.Kind.kImmediate);
|
||||
eventKinds.add(NetworkTableEvent.Kind.IMMEDIATE);
|
||||
}
|
||||
return m_listeners.add(m_handle, eventKinds, listener);
|
||||
}
|
||||
@@ -913,7 +913,7 @@ public final class NetworkTableInstance implements AutoCloseable {
|
||||
* @param mdnsService the mDNS service name to advertise, or empty to not advertise
|
||||
*/
|
||||
public void startServer(String persistFilename, String listenAddress, String mdnsService) {
|
||||
startServer(persistFilename, listenAddress, mdnsService, kDefaultPort);
|
||||
startServer(persistFilename, listenAddress, mdnsService, DEFAULT_PORT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,7 +76,7 @@ public final class NetworkTableValue {
|
||||
* @return True if the entry value contains a value.
|
||||
*/
|
||||
public boolean isValid() {
|
||||
return m_type != NetworkTableType.kUnassigned;
|
||||
return m_type != NetworkTableType.UNASSIGNED;
|
||||
}
|
||||
{% for t in types %}
|
||||
/**
|
||||
@@ -85,7 +85,7 @@ public final class NetworkTableValue {
|
||||
* @return True if the entry value is of {{ t.java.ValueType }} type.
|
||||
*/
|
||||
public boolean is{{ t.TypeName }}() {
|
||||
return m_type == NetworkTableType.k{{ t.TypeName }};
|
||||
return m_type == NetworkTableType.{{ t.TYPE_NAME }};
|
||||
}
|
||||
{% endfor %}
|
||||
/*
|
||||
@@ -99,7 +99,7 @@ public final class NetworkTableValue {
|
||||
* @throws ClassCastException if the entry value is not of {{ t.java.ValueType }} type.
|
||||
*/
|
||||
public {{ t.java.ValueType }} get{{ t.TypeName }}() {
|
||||
if (m_type != NetworkTableType.k{{ t.TypeName }}) {
|
||||
if (m_type != NetworkTableType.{{ t.TYPE_NAME }}) {
|
||||
throw new ClassCastException("cannot convert " + m_type + " to {{ t.java.ValueType }}");
|
||||
}
|
||||
return {{ t.java.FromStorageBegin }}m_value{{ t.java.FromStorageEnd }};
|
||||
@@ -116,7 +116,7 @@ public final class NetworkTableValue {
|
||||
* @return The entry value
|
||||
*/
|
||||
public static NetworkTableValue make{{ t.TypeName }}({{ t.java.ValueType }} value) {
|
||||
return new NetworkTableValue(NetworkTableType.k{{ t.TypeName }}, {{ t.java.ToWrapObject }}(value));
|
||||
return new NetworkTableValue(NetworkTableType.{{ t.TYPE_NAME }}, {{ t.java.ToWrapObject }}(value));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ public final class NetworkTableValue {
|
||||
* @return The entry value
|
||||
*/
|
||||
public static NetworkTableValue make{{ t.TypeName }}({{ t.java.ValueType }} value, long time) {
|
||||
return new NetworkTableValue(NetworkTableType.k{{ t.TypeName }}, {{ t.java.ToWrapObject }}(value), time);
|
||||
return new NetworkTableValue(NetworkTableType.{{ t.TYPE_NAME }}, {{ t.java.ToWrapObject }}(value), time);
|
||||
}
|
||||
{% if t.java.WrapValueType %}
|
||||
/**
|
||||
@@ -137,7 +137,7 @@ public final class NetworkTableValue {
|
||||
* @return The entry value
|
||||
*/
|
||||
public static NetworkTableValue make{{ t.TypeName }}({{ t.java.WrapValueType }} value) {
|
||||
return new NetworkTableValue(NetworkTableType.k{{ t.TypeName }}, toNative{{ t.TypeName }}(value));
|
||||
return new NetworkTableValue(NetworkTableType.{{ t.TYPE_NAME }}, toNative{{ t.TypeName }}(value));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,7 +148,7 @@ public final class NetworkTableValue {
|
||||
* @return The entry value
|
||||
*/
|
||||
public static NetworkTableValue make{{ t.TypeName }}({{ t.java.WrapValueType }} value, long time) {
|
||||
return new NetworkTableValue(NetworkTableType.k{{ t.TypeName }}, toNative{{ t.TypeName }}(value), time);
|
||||
return new NetworkTableValue(NetworkTableType.{{ t.TYPE_NAME }}, toNative{{ t.TypeName }}(value), time);
|
||||
}
|
||||
{% endif -%}
|
||||
{% endfor %}
|
||||
|
||||
@@ -10,7 +10,7 @@ package org.wpilib.networktables;
|
||||
public final class {{ TypeName }}Topic extends Topic {
|
||||
{%- if TypeString %}
|
||||
/** The default type string for this topic type. */
|
||||
public static final String kTypeString = {{ TypeString }};
|
||||
public static final String TYPE_STRING = {{ TypeString }};
|
||||
{% endif %}
|
||||
/**
|
||||
* Construct from a generic topic.
|
||||
@@ -58,7 +58,7 @@ public final class {{ TypeName }}Topic extends Topic {
|
||||
return new {{ TypeName }}EntryImpl(
|
||||
this,
|
||||
NetworkTablesJNI.subscribe(
|
||||
m_handle, NetworkTableType.k{{ TypeName }}.getValue(),
|
||||
m_handle, NetworkTableType.{{ TYPE_NAME }}.getValue(),
|
||||
{{ TypeString|default('typeString') }}, options),
|
||||
defaultValue);
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public final class {{ TypeName }}Topic extends Topic {
|
||||
return new {{ TypeName }}EntryImpl(
|
||||
this,
|
||||
NetworkTablesJNI.subscribe(
|
||||
m_handle, NetworkTableType.k{{ TypeName }}.getValue(),
|
||||
m_handle, NetworkTableType.{{ TYPE_NAME }}.getValue(),
|
||||
typeString, options),
|
||||
defaultValue);
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public final class {{ TypeName }}Topic extends Topic {
|
||||
return new {{ TypeName }}EntryImpl(
|
||||
this,
|
||||
NetworkTablesJNI.publish(
|
||||
m_handle, NetworkTableType.k{{ TypeName }}.getValue(),
|
||||
m_handle, NetworkTableType.{{ TYPE_NAME }}.getValue(),
|
||||
{{ TypeString|default('typeString') }}, options),
|
||||
{{ java.EmptyValue }});
|
||||
}
|
||||
@@ -147,7 +147,7 @@ public final class {{ TypeName }}Topic extends Topic {
|
||||
return new {{ TypeName }}EntryImpl(
|
||||
this,
|
||||
NetworkTablesJNI.publishEx(
|
||||
m_handle, NetworkTableType.k{{ TypeName }}.getValue(),
|
||||
m_handle, NetworkTableType.{{ TYPE_NAME }}.getValue(),
|
||||
typeString, properties, options),
|
||||
{{ java.EmptyValue }});
|
||||
}
|
||||
@@ -184,7 +184,7 @@ public final class {{ TypeName }}Topic extends Topic {
|
||||
return new {{ TypeName }}EntryImpl(
|
||||
this,
|
||||
NetworkTablesJNI.getEntry(
|
||||
m_handle, NetworkTableType.k{{ TypeName }}.getValue(),
|
||||
m_handle, NetworkTableType.{{ TYPE_NAME }}.getValue(),
|
||||
{{ TypeString|default('typeString') }}, options),
|
||||
defaultValue);
|
||||
}
|
||||
@@ -217,7 +217,7 @@ public final class {{ TypeName }}Topic extends Topic {
|
||||
return new {{ TypeName }}EntryImpl(
|
||||
this,
|
||||
NetworkTablesJNI.getEntry(
|
||||
m_handle, NetworkTableType.k{{ TypeName }}.getValue(),
|
||||
m_handle, NetworkTableType.{{ TYPE_NAME }}.getValue(),
|
||||
typeString, options),
|
||||
defaultValue);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ class {{ TypeName }}Topic final : public Topic {
|
||||
using TimestampedValueType = Timestamped{{ TypeName }};
|
||||
{%- if TypeString %}
|
||||
/** The default type string for this topic type. */
|
||||
static constexpr std::string_view kTypeString = {{ TypeString }};
|
||||
static constexpr std::string_view TYPE_STRING = {{ TypeString }};
|
||||
{%- endif %}
|
||||
|
||||
{{ TypeName }}Topic() = default;
|
||||
@@ -344,9 +344,9 @@ class {{ TypeName }}Topic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType Subscribe(
|
||||
{% if not TypeString %}std::string_view typeString, {% endif %}ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return {{ TypeName }}Subscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_{{ cpp.TYPE_NAME }}, {{ TypeString|default('typeString') }}, options),
|
||||
::wpi::nt::Subscribe(m_handle, NT_{{ TYPE_NAME }}, {{ TypeString|default('typeString') }}, options),
|
||||
defaultValue};
|
||||
}
|
||||
{%- if TypeString %}
|
||||
@@ -369,9 +369,9 @@ class {{ TypeName }}Topic final : public Topic {
|
||||
[[nodiscard]]
|
||||
SubscriberType SubscribeEx(
|
||||
std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return {{ TypeName }}Subscriber{
|
||||
::wpi::nt::Subscribe(m_handle, NT_{{ cpp.TYPE_NAME }}, typeString, options),
|
||||
::wpi::nt::Subscribe(m_handle, NT_{{ TYPE_NAME }}, typeString, options),
|
||||
defaultValue};
|
||||
}
|
||||
{% endif %}
|
||||
@@ -394,9 +394,9 @@ class {{ TypeName }}Topic final : public Topic {
|
||||
* @return publisher
|
||||
*/
|
||||
[[nodiscard]]
|
||||
PublisherType Publish({% if not TypeString %}std::string_view typeString, {% endif %}const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
PublisherType Publish({% if not TypeString %}std::string_view typeString, {% endif %}const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return {{ TypeName }}Publisher{
|
||||
::wpi::nt::Publish(m_handle, NT_{{ cpp.TYPE_NAME }}, {{ TypeString|default('typeString') }}, options)};
|
||||
::wpi::nt::Publish(m_handle, NT_{{ TYPE_NAME }}, {{ TypeString|default('typeString') }}, options)};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -419,9 +419,9 @@ class {{ TypeName }}Topic 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 {{ TypeName }}Publisher{
|
||||
::wpi::nt::PublishEx(m_handle, NT_{{ cpp.TYPE_NAME }}, typeString, properties, options)};
|
||||
::wpi::nt::PublishEx(m_handle, NT_{{ TYPE_NAME }}, typeString, properties, options)};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -449,9 +449,9 @@ class {{ TypeName }}Topic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntry({% if not TypeString %}std::string_view typeString, {% endif %}ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return {{ TypeName }}Entry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_{{ cpp.TYPE_NAME }}, {{ TypeString|default('typeString') }}, options),
|
||||
::wpi::nt::GetEntry(m_handle, NT_{{ TYPE_NAME }}, {{ TypeString|default('typeString') }}, options),
|
||||
defaultValue};
|
||||
}
|
||||
{%- if TypeString %}
|
||||
@@ -478,9 +478,9 @@ class {{ TypeName }}Topic final : public Topic {
|
||||
*/
|
||||
[[nodiscard]]
|
||||
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue,
|
||||
const PubSubOptions& options = kDefaultPubSubOptions) {
|
||||
const PubSubOptions& options = DEFAULT_PUB_SUB_OPTIONS) {
|
||||
return {{ TypeName }}Entry{
|
||||
::wpi::nt::GetEntry(m_handle, NT_{{ cpp.TYPE_NAME }}, typeString, options),
|
||||
::wpi::nt::GetEntry(m_handle, NT_{{ TYPE_NAME }}, typeString, options),
|
||||
defaultValue};
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user