public class NetworkTableEntry extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
name
the name of the entry
|
static char |
UNKNOWN_ID
the id that represents that an id is unknown for an entry
|
Constructor and Description |
---|
NetworkTableEntry(char id,
java.lang.String name,
char sequenceNumber,
NetworkTableEntryType type,
java.lang.Object value)
Create a new entry with the given id, name, sequence number, type and value
|
NetworkTableEntry(java.lang.String name,
NetworkTableEntryType type,
java.lang.Object value)
Create a new entry with the given name, type, value, an unknown id and a sequence number of 0
|
Modifier and Type | Method and Description |
---|---|
void |
clearId()
clear the id of the entry to unknown
|
void |
fireListener(AbstractNetworkTableEntryStore.TableListenerManager listenerManager) |
void |
forcePut(char newSequenceNumber,
NetworkTableEntryType type,
java.lang.Object newValue)
force a value and new sequence number upon an entry, Will also set the type of the entry
|
void |
forcePut(char newSequenceNumber,
java.lang.Object newValue)
force a value and new sequence number upon an entry
|
char |
getId() |
char |
getSequenceNumber() |
NetworkTableEntryType |
getType() |
java.lang.Object |
getValue() |
boolean |
isDirty() |
void |
makeClean() |
void |
makeDirty() |
boolean |
putValue(char newSequenceNumber,
java.lang.Object newValue)
set the value of the entry if the given sequence number is greater that the current sequence number
|
void |
send(NetworkTableConnection connection) |
void |
sendValue(java.io.DataOutputStream os)
Send the value of the entry over the output stream
|
void |
setId(char id)
Sets the id of the entry
|
java.lang.String |
toString() |
public static final char UNKNOWN_ID
public final java.lang.String name
public NetworkTableEntry(java.lang.String name, NetworkTableEntryType type, java.lang.Object value)
name
- type
- value
- public NetworkTableEntry(char id, java.lang.String name, char sequenceNumber, NetworkTableEntryType type, java.lang.Object value)
id
- name
- sequenceNumber
- type
- value
- public char getId()
public java.lang.Object getValue()
public NetworkTableEntryType getType()
public boolean putValue(char newSequenceNumber, java.lang.Object newValue)
newSequenceNumber
- the sequence number of the incoming entrynewValue
- the new valuepublic void forcePut(char newSequenceNumber, java.lang.Object newValue)
newSequenceNumber
- newValue
- public void forcePut(char newSequenceNumber, NetworkTableEntryType type, java.lang.Object newValue)
newSequenceNumber
- type
- newValue
- public void makeDirty()
public void makeClean()
public boolean isDirty()
public void sendValue(java.io.DataOutputStream os) throws java.io.IOException
os
- java.io.IOException
public char getSequenceNumber()
public void setId(char id) throws java.lang.IllegalStateException
id
- the id of the entryjava.lang.IllegalStateException
- if the entry already has a known idpublic void clearId()
public void send(NetworkTableConnection connection) throws java.io.IOException
java.io.IOException
public void fireListener(AbstractNetworkTableEntryStore.TableListenerManager listenerManager)
public java.lang.String toString()
toString
in class java.lang.Object