WPILibC++  unspecified
Table Functions

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_EntryInfoNT_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...
 
NT_Entry nt::GetEntry (NT_Inst inst, const Twine &name)
 Get Entry Handle. More...
 
std::vector< NT_Entry > nt::GetEntries (NT_Inst inst, const Twine &prefix, unsigned int types)
 Get Entry Handles. More...
 
std::string nt::GetEntryName (NT_Entry entry)
 Gets the name of the specified entry. More...
 
NT_Type nt::GetEntryType (NT_Entry entry)
 Gets the type for the specified entry, or unassigned if non existent. More...
 
uint64_t nt::GetEntryLastChange (NT_Entry entry)
 Gets the last time the entry was changed. More...
 
std::shared_ptr< Value > nt::GetEntryValue (StringRef name)
 Get Entry Value. More...
 
std::shared_ptr< Value > nt::GetEntryValue (NT_Entry entry)
 Get Entry Value. More...
 
bool nt::SetDefaultEntryValue (StringRef name, std::shared_ptr< Value > value)
 Set Default Entry Value Returns copy of current entry value if it exists. More...
 
bool nt::SetDefaultEntryValue (NT_Entry entry, std::shared_ptr< Value > value)
 Set Default Entry Value Returns copy of current entry value if it exists. More...
 
bool nt::SetEntryValue (StringRef name, std::shared_ptr< Value > value)
 Set Entry Value. More...
 
bool nt::SetEntryValue (NT_Entry entry, std::shared_ptr< Value > value)
 Set Entry Value. More...
 
void nt::SetEntryTypeValue (StringRef name, std::shared_ptr< Value > value)
 Set Entry Type and Value. More...
 
void nt::SetEntryTypeValue (NT_Entry entry, std::shared_ptr< Value > value)
 Set Entry Type and Value. More...
 
void nt::SetEntryFlags (StringRef name, unsigned int flags)
 Set Entry Flags. More...
 
void nt::SetEntryFlags (NT_Entry entry, unsigned int flags)
 Set Entry Flags. More...
 
unsigned int nt::GetEntryFlags (StringRef name)
 Get Entry Flags. More...
 
unsigned int nt::GetEntryFlags (NT_Entry entry)
 Get Entry Flags. More...
 
void nt::DeleteEntry (StringRef name)
 Delete Entry. More...
 
void nt::DeleteEntry (NT_Entry entry)
 Delete Entry. More...
 
void nt::DeleteAllEntries ()
 Delete All Entries. More...
 
void nt::DeleteAllEntries (NT_Inst inst)
 Delete All Entries. More...
 
std::vector< EntryInfo > nt::GetEntryInfo (StringRef prefix, unsigned int types)
 Get Entry Information. More...
 
std::vector< EntryInfo > nt::GetEntryInfo (NT_Inst inst, const Twine &prefix, unsigned int types)
 
EntryInfo nt::GetEntryInfo (NT_Entry entry)
 Get Entry Information. More...
 

Detailed Description

Function Documentation

void nt::DeleteAllEntries ( )

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: 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.

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: 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.

Parameters
instinstance handle
void nt::DeleteEntry ( StringRef  name)

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: 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.

Parameters
nameentry name (UTF-8 string)
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: 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.

Parameters
entryentry handle
std::vector< NT_Entry > nt::GetEntries ( NT_Inst  inst,
const Twine prefix,
unsigned int  types 
)

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.

Parameters
instinstance handle
prefixentry name required prefix; only entries whose name starts with this string are returned
typesbitmask of NT_Type values; 0 is treated specially as a "don't care"
Returns
Array of entry handles.
NT_Entry nt::GetEntry ( NT_Inst  inst,
const Twine name 
)

Get Entry Handle.

Parameters
instinstance handle
nameentry name (UTF-8 string)
Returns
entry handle
unsigned int nt::GetEntryFlags ( StringRef  name)

Get Entry Flags.

Parameters
nameentry name (UTF-8 string)
Returns
Flags value (bitmask of NT_EntryFlags)
unsigned int nt::GetEntryFlags ( NT_Entry  entry)

Get Entry Flags.

Parameters
entryentry handle
Returns
Flags value (bitmask of NT_EntryFlags)
std::vector< EntryInfo > nt::GetEntryInfo ( StringRef  prefix,
unsigned int  types 
)

Get Entry Information.

Returns an array of entry information (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.

Parameters
prefixentry name required prefix; only entries whose name starts with this string are returned
typesbitmask of NT_Type values; 0 is treated specially as a "don't care"
Returns
Array of entry information.
std::vector< EntryInfo > nt::GetEntryInfo ( NT_Inst  inst,
const Twine prefix,
unsigned int  types 
)

Parameters
instinstance handle
EntryInfo nt::GetEntryInfo ( NT_Entry  entry)

Get Entry Information.

Returns information about an entry (name, entry type, and timestamp of last change to type/value).

Parameters
entryentry handle
Returns
Entry information.
uint64_t nt::GetEntryLastChange ( NT_Entry  entry)

Gets the last time the entry was changed.

Returns 0 if the handle is invalid.

Parameters
entryentry handle
Returns
Entry last change time
std::string nt::GetEntryName ( NT_Entry  entry)

Gets the name of the specified entry.

Returns an empty string if the handle is invalid.

Parameters
entryentry handle
Returns
Entry name
NT_Type nt::GetEntryType ( NT_Entry  entry)

Gets the type for the specified entry, or unassigned if non existent.

Parameters
entryentry handle
Returns
Entry type
std::shared_ptr< Value > nt::GetEntryValue ( StringRef  name)

Get Entry Value.

Returns copy of current entry value. Note that one of the type options is "unassigned".

Parameters
nameentry name (UTF-8 string)
Returns
entry value
std::shared_ptr< Value > nt::GetEntryValue ( NT_Entry  entry)

Get Entry Value.

Returns copy of current entry value. Note that one of the type options is "unassigned".

Parameters
entryentry handle
Returns
entry value
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.

Parameters
instinstance 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.

Parameters
entryentry 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.

Parameters
prefixentry name required prefix; only entries whose name starts with this string are returned
prefix_lenlength of prefix in bytes
typesbitmask of NT_Type values; 0 is treated specially as a "don't care"
Returns
Array of entry handles.
NT_Entry NT_GetEntry ( NT_Inst  inst,
const char *  name,
size_t  name_len 
)

Get Entry Handle.

Parameters
instinstance handle
nameentry name (UTF-8 string)
name_lenlength of name in bytes
Returns
entry handle
unsigned int NT_GetEntryFlags ( NT_Entry  entry)

Get Entry Flags.

Parameters
entryentry handle
Returns
Flags value (bitmask of NT_EntryFlags)
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.

Parameters
instinstance handle
prefixentry name required prefix; only entries whose name starts with this string are returned
prefix_lenlength of prefix in bytes
typesbitmask of NT_Type values; 0 is treated specially as a "don't care"
countoutput parameter; set to length of returned array
Returns
Array of entry information.
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).

Parameters
entryentry handle
infoentry information (output)
Returns
True if successful, false on error.
uint64_t NT_GetEntryLastChange ( NT_Entry  entry)

Gets the last time the entry was changed.

Returns 0 if the handle is invalid.

Parameters
entryentry handle
Returns
Entry last change time
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.

Parameters
entryentry handle
name_lenlength of the returned string (output parameter)
Returns
Entry name
enum NT_Type NT_GetEntryType ( NT_Entry  entry)

Gets the type for the specified key, or unassigned if non existent.

Parameters
entryentry handle
Returns
Entry type
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".

Parameters
entryentry handle
valuestorage 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).

NT_Bool NT_SetDefaultEntryValue ( NT_Entry  entry,
const struct NT_Value default_value 
)

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".

Parameters
entryentry handle
default_valuevalue to be set if name does not exist
Returns
0 on error (value not set), 1 on success
void NT_SetEntryFlags ( NT_Entry  entry,
unsigned int  flags 
)

Set Entry Flags.

Parameters
entryentry handle
flagsflags 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.

Parameters
entryentry handle
valuenew entry value
NT_Bool NT_SetEntryValue ( NT_Entry  entry,
const struct NT_Value 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.

Parameters
entryentry handle
valuenew entry value
Returns
0 on error (type mismatch), 1 on success
bool nt::SetDefaultEntryValue ( StringRef  name,
std::shared_ptr< Value value 
)

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".

Parameters
nameentry name (UTF-8 string)
valuevalue to be set if name does not exist
Returns
False on error (value not set), True on success
bool nt::SetDefaultEntryValue ( NT_Entry  entry,
std::shared_ptr< Value value 
)

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".

Parameters
entryentry handle
valuevalue to be set if name does not exist
Returns
False on error (value not set), True on success
void nt::SetEntryFlags ( StringRef  name,
unsigned int  flags 
)

Set Entry Flags.

Parameters
nameentry name (UTF-8 string)
flagsflags value (bitmask of NT_EntryFlags)
void nt::SetEntryFlags ( NT_Entry  entry,
unsigned int  flags 
)

Set Entry Flags.

Parameters
entryentry handle
flagsflags value (bitmask of NT_EntryFlags)
void nt::SetEntryTypeValue ( StringRef  name,
std::shared_ptr< 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 SetEntryValue() should be used instead, with appropriate error handling.

Parameters
nameentry name (UTF-8 string)
valuenew entry value
void nt::SetEntryTypeValue ( NT_Entry  entry,
std::shared_ptr< 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 SetEntryValue() should be used instead, with appropriate error handling.

Parameters
entryentry handle
valuenew entry value
bool nt::SetEntryValue ( StringRef  name,
std::shared_ptr< Value 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.

Parameters
nameentry name (UTF-8 string)
valuenew entry value
Returns
False on error (type mismatch), True on success
bool nt::SetEntryValue ( NT_Entry  entry,
std::shared_ptr< Value 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.

Parameters
entryentry handle
valuenew entry value
Returns
False on error (type mismatch), True on success