mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[ntcore] remove deprecated flag (#6551)
This commit is contained in:
@@ -15,14 +15,6 @@ import java.nio.ByteBuffer;
|
||||
*/
|
||||
@SuppressWarnings("UnnecessaryParentheses")
|
||||
public final class NetworkTableEntry implements Publisher, Subscriber {
|
||||
/**
|
||||
* Flag values (as returned by {@link #getFlags()}).
|
||||
*
|
||||
* @deprecated Use isPersistent() instead.
|
||||
*/
|
||||
@Deprecated(since = "2022", forRemoval = true)
|
||||
public static final int kPersistent = 0x01;
|
||||
|
||||
/**
|
||||
* Construct from native handle.
|
||||
*
|
||||
@@ -114,17 +106,6 @@ public final class NetworkTableEntry implements Publisher, Subscriber {
|
||||
return NetworkTableType.getFromInt(NetworkTablesJNI.getType(m_handle));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the flags.
|
||||
*
|
||||
* @return the flags (bitmask)
|
||||
* @deprecated Use isPersistent() or topic properties instead
|
||||
*/
|
||||
@Deprecated(since = "2022", forRemoval = true)
|
||||
public int getFlags() {
|
||||
return NetworkTablesJNI.getEntryFlags(m_handle);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last time the entry's value was changed.
|
||||
*
|
||||
@@ -534,28 +515,6 @@ public final class NetworkTableEntry implements Publisher, Subscriber {
|
||||
return setDoubleArray(NetworkTableValue.toNativeDoubleArray(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets flags.
|
||||
*
|
||||
* @param flags the flags to set (bitmask)
|
||||
* @deprecated Use setPersistent() or topic properties instead
|
||||
*/
|
||||
@Deprecated(since = "2022", forRemoval = true)
|
||||
public void setFlags(int flags) {
|
||||
NetworkTablesJNI.setEntryFlags(m_handle, getFlags() | flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears flags.
|
||||
*
|
||||
* @param flags the flags to clear (bitmask)
|
||||
* @deprecated Use setPersistent() or topic properties instead
|
||||
*/
|
||||
@Deprecated(since = "2022", forRemoval = true)
|
||||
public void clearFlags(int flags) {
|
||||
NetworkTablesJNI.setEntryFlags(m_handle, getFlags() & ~flags);
|
||||
}
|
||||
|
||||
/** Make value persistent through program restarts. */
|
||||
public void setPersistent() {
|
||||
NetworkTablesJNI.setTopicPersistent(m_topic.getHandle(), true);
|
||||
|
||||
@@ -15,14 +15,6 @@ import java.nio.ByteBuffer;
|
||||
*/
|
||||
@SuppressWarnings("UnnecessaryParentheses")
|
||||
public final class NetworkTableEntry implements Publisher, Subscriber {
|
||||
/**
|
||||
* Flag values (as returned by {@link #getFlags()}).
|
||||
*
|
||||
* @deprecated Use isPersistent() instead.
|
||||
*/
|
||||
@Deprecated(since = "2022", forRemoval = true)
|
||||
public static final int kPersistent = 0x01;
|
||||
|
||||
/**
|
||||
* Construct from native handle.
|
||||
*
|
||||
@@ -114,17 +106,6 @@ public final class NetworkTableEntry implements Publisher, Subscriber {
|
||||
return NetworkTableType.getFromInt(NetworkTablesJNI.getType(m_handle));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the flags.
|
||||
*
|
||||
* @return the flags (bitmask)
|
||||
* @deprecated Use isPersistent() or topic properties instead
|
||||
*/
|
||||
@Deprecated(since = "2022", forRemoval = true)
|
||||
public int getFlags() {
|
||||
return NetworkTablesJNI.getEntryFlags(m_handle);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last time the entry's value was changed.
|
||||
*
|
||||
@@ -935,28 +916,6 @@ public final class NetworkTableEntry implements Publisher, Subscriber {
|
||||
return setDoubleArray(NetworkTableValue.toNativeDoubleArray(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets flags.
|
||||
*
|
||||
* @param flags the flags to set (bitmask)
|
||||
* @deprecated Use setPersistent() or topic properties instead
|
||||
*/
|
||||
@Deprecated(since = "2022", forRemoval = true)
|
||||
public void setFlags(int flags) {
|
||||
NetworkTablesJNI.setEntryFlags(m_handle, getFlags() | flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears flags.
|
||||
*
|
||||
* @param flags the flags to clear (bitmask)
|
||||
* @deprecated Use setPersistent() or topic properties instead
|
||||
*/
|
||||
@Deprecated(since = "2022", forRemoval = true)
|
||||
public void clearFlags(int flags) {
|
||||
NetworkTablesJNI.setEntryFlags(m_handle, getFlags() & ~flags);
|
||||
}
|
||||
|
||||
/** Make value persistent through program restarts. */
|
||||
public void setPersistent() {
|
||||
NetworkTablesJNI.setTopicPersistent(m_topic.getHandle(), true);
|
||||
|
||||
@@ -33,12 +33,6 @@ class Topic;
|
||||
*/
|
||||
class NetworkTableEntry final {
|
||||
public:
|
||||
/**
|
||||
* Flag values (as returned by GetFlags()).
|
||||
* @deprecated Use IsPersistent() instead.
|
||||
*/
|
||||
enum Flags { kPersistent = NT_PERSISTENT };
|
||||
|
||||
/**
|
||||
* Construct invalid instance.
|
||||
*/
|
||||
@@ -93,15 +87,6 @@ class NetworkTableEntry final {
|
||||
*/
|
||||
NetworkTableType GetType() const;
|
||||
|
||||
/**
|
||||
* Returns the flags.
|
||||
*
|
||||
* @return the flags (bitmask)
|
||||
* @deprecated Use IsPersistent() or topic properties instead
|
||||
*/
|
||||
[[deprecated("Use IsPersistent() or topic properties instead")]]
|
||||
unsigned int GetFlags() const;
|
||||
|
||||
/**
|
||||
* Gets the last time the entry's value was changed.
|
||||
*
|
||||
@@ -460,24 +445,6 @@ class NetworkTableEntry final {
|
||||
*/
|
||||
bool SetStringArray(std::span<const std::string> value, int64_t time = 0);
|
||||
|
||||
/**
|
||||
* Sets flags.
|
||||
*
|
||||
* @param flags the flags to set (bitmask)
|
||||
* @deprecated Use SetPersistent() or topic properties instead
|
||||
*/
|
||||
[[deprecated("Use SetPersistent() or topic properties instead")]]
|
||||
void SetFlags(unsigned int flags);
|
||||
|
||||
/**
|
||||
* Clears flags.
|
||||
*
|
||||
* @param flags the flags to clear (bitmask)
|
||||
* @deprecated Use SetPersistent() or topic properties instead
|
||||
*/
|
||||
[[deprecated("Use SetPersistent() or topic properties instead")]]
|
||||
void ClearFlags(unsigned int flags);
|
||||
|
||||
/**
|
||||
* Make value persistent through program restarts.
|
||||
*/
|
||||
|
||||
@@ -36,10 +36,6 @@ inline NetworkTableType NetworkTableEntry::GetType() const {
|
||||
return static_cast<NetworkTableType>(GetEntryType(m_handle));
|
||||
}
|
||||
|
||||
inline unsigned int NetworkTableEntry::GetFlags() const {
|
||||
return GetEntryFlags(m_handle);
|
||||
}
|
||||
|
||||
inline int64_t NetworkTableEntry::GetLastChange() const {
|
||||
return GetEntryLastChange(m_handle);
|
||||
}
|
||||
@@ -216,14 +212,6 @@ inline bool NetworkTableEntry::SetStringArray(
|
||||
return nt::SetStringArray(m_handle, value, time);
|
||||
}
|
||||
|
||||
inline void NetworkTableEntry::SetFlags(unsigned int flags) {
|
||||
SetEntryFlags(m_handle, GetEntryFlags(m_handle) | flags);
|
||||
}
|
||||
|
||||
inline void NetworkTableEntry::ClearFlags(unsigned int flags) {
|
||||
SetEntryFlags(m_handle, GetEntryFlags(m_handle) & ~flags);
|
||||
}
|
||||
|
||||
inline void NetworkTableEntry::SetPersistent() {
|
||||
nt::SetTopicPersistent(nt::GetTopicFromHandle(m_handle), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user