WPILibC++
2018.4.1-20180824021726-1174-g488ba79
|
Functions | |
NT_Entry | NT_GetEntry (NT_Inst inst, const char *name, size_t name_len) |
Get Entry Handle. More... | |
NT_Entry * | NT_GetEntries (NT_Inst inst, const char *prefix, size_t prefix_len, unsigned int types, size_t *count) |
Get Entry Handles. More... | |
char * | NT_GetEntryName (NT_Entry entry, size_t *name_len) |
Gets the name of the specified entry. More... | |
enum NT_Type | NT_GetEntryType (NT_Entry entry) |
Gets the type for the specified key, or unassigned if non existent. More... | |
uint64_t | NT_GetEntryLastChange (NT_Entry entry) |
Gets the last time the entry was changed. More... | |
void | NT_GetEntryValue (NT_Entry entry, struct NT_Value *value) |
Get Entry Value. More... | |
NT_Bool | NT_SetDefaultEntryValue (NT_Entry entry, const struct NT_Value *default_value) |
Set Default Entry Value. More... | |
NT_Bool | NT_SetEntryValue (NT_Entry entry, const struct NT_Value *value) |
Set Entry Value. More... | |
void | NT_SetEntryTypeValue (NT_Entry entry, const struct NT_Value *value) |
Set Entry Type and Value. More... | |
void | NT_SetEntryFlags (NT_Entry entry, unsigned int flags) |
Set Entry Flags. More... | |
unsigned int | NT_GetEntryFlags (NT_Entry entry) |
Get Entry Flags. More... | |
void | NT_DeleteEntry (NT_Entry entry) |
Delete Entry. More... | |
void | NT_DeleteAllEntries (NT_Inst inst) |
Delete All Entries. More... | |
struct NT_EntryInfo * | NT_GetEntryInfo (NT_Inst inst, const char *prefix, size_t prefix_len, unsigned int types, size_t *count) |
Get Entry Information. More... | |
NT_Bool | NT_GetEntryInfoHandle (NT_Entry entry, struct NT_EntryInfo *info) |
Get Entry Information. More... | |
void NT_DeleteAllEntries | ( | NT_Inst | inst | ) |
Delete All Entries.
Deletes ALL table entries. This is a new feature in version 3.0 of the so this may not have an effect if any other node in the network is not version 3.0 or newer.
Note: NT_GetConnections() can be used to determine the protocol version of direct remote connection(s), but this is not sufficient to determine if all nodes in the network are version 3.0 or newer.
inst | instance handle |
void NT_DeleteEntry | ( | NT_Entry | entry | ) |
Delete Entry.
Deletes an entry. This is a new feature in version 3.0 of the protocol, so this may not have an effect if any other node in the network is not version 3.0 or newer.
Note: NT_GetConnections() can be used to determine the protocol version of direct remote connection(s), but this is not sufficient to determine if all nodes in the network are version 3.0 or newer.
entry | entry handle |
NT_Entry* NT_GetEntries | ( | NT_Inst | inst, |
const char * | prefix, | ||
size_t | prefix_len, | ||
unsigned int | types, | ||
size_t * | count | ||
) |
Get Entry Handles.
Returns an array of entry handles. The results are optionally filtered by string prefix and entry type to only return a subset of all entries.
prefix | entry name required prefix; only entries whose name starts with this string are returned |
prefix_len | length of prefix in bytes |
types | bitmask of NT_Type values; 0 is treated specially as a "don't care" |
NT_Entry NT_GetEntry | ( | NT_Inst | inst, |
const char * | name, | ||
size_t | name_len | ||
) |
Get Entry Handle.
inst | instance handle |
name | entry name (UTF-8 string) |
name_len | length of name in bytes |
unsigned int NT_GetEntryFlags | ( | NT_Entry | entry | ) |
Get Entry Flags.
entry | entry handle |
struct NT_EntryInfo* NT_GetEntryInfo | ( | NT_Inst | inst, |
const char * | prefix, | ||
size_t | prefix_len, | ||
unsigned int | types, | ||
size_t * | count | ||
) |
Get Entry Information.
Returns an array of entry information (entry handle, name, entry type, and timestamp of last change to type/value). The results are optionally filtered by string prefix and entry type to only return a subset of all entries.
inst | instance handle |
prefix | entry name required prefix; only entries whose name starts with this string are returned |
prefix_len | length of prefix in bytes |
types | bitmask of NT_Type values; 0 is treated specially as a "don't care" |
count | output parameter; set to length of returned array |
NT_Bool NT_GetEntryInfoHandle | ( | NT_Entry | entry, |
struct NT_EntryInfo * | info | ||
) |
Get Entry Information.
Returns information about an entry (name, entry type, and timestamp of last change to type/value).
entry | entry handle |
info | entry information (output) |
uint64_t NT_GetEntryLastChange | ( | NT_Entry | entry | ) |
Gets the last time the entry was changed.
Returns 0 if the handle is invalid.
entry | entry handle |
char* NT_GetEntryName | ( | NT_Entry | entry, |
size_t * | name_len | ||
) |
Gets the name of the specified entry.
Returns an empty string if the handle is invalid.
entry | entry handle |
name_len | length of the returned string (output parameter) |
enum NT_Type NT_GetEntryType | ( | NT_Entry | entry | ) |
Gets the type for the specified key, or unassigned if non existent.
entry | entry handle |
void NT_GetEntryValue | ( | NT_Entry | entry, |
struct NT_Value * | value | ||
) |
Get Entry Value.
Returns copy of current entry value. Note that one of the type options is "unassigned".
entry | entry handle |
value | storage for returned entry value |
It is the caller's responsibility to free value once it's no longer needed (the utility function NT_DisposeValue() is useful for this purpose).
Set Default Entry Value.
Returns copy of current entry value if it exists. Otherwise, sets passed in value, and returns set value. Note that one of the type options is "unassigned".
entry | entry handle |
default_value | value to be set if name does not exist |
void NT_SetEntryFlags | ( | NT_Entry | entry, |
unsigned int | flags | ||
) |
Set Entry Flags.
entry | entry handle |
flags | flags value (bitmask of NT_EntryFlags) |
void NT_SetEntryTypeValue | ( | NT_Entry | entry, |
const struct NT_Value * | value | ||
) |
Set Entry Type and Value.
Sets new entry value. If type of new value differs from the type of the currently stored entry, the currently stored entry type is overridden (generally this will generate an Entry Assignment message).
This is NOT the preferred method to update a value; generally NT_SetEntryValue() should be used instead, with appropriate error handling.
entry | entry handle |
value | new entry value |
Set Entry Value.
Sets new entry value. If type of new value differs from the type of the currently stored entry, returns error and does not update value.
entry | entry handle |
value | new entry value |