8 #ifndef NTCORE_NTCORE_C_H_
9 #define NTCORE_NTCORE_C_H_
19 #include <wpi/deprecated.h>
36 typedef unsigned int NT_Handle;
37 typedef NT_Handle NT_ConnectionListener;
38 typedef NT_Handle NT_ConnectionListenerPoller;
39 typedef NT_Handle NT_Entry;
40 typedef NT_Handle NT_EntryListener;
41 typedef NT_Handle NT_EntryListenerPoller;
42 typedef NT_Handle NT_Inst;
43 typedef NT_Handle NT_Logger;
44 typedef NT_Handle NT_LoggerPoller;
45 typedef NT_Handle NT_RpcCall;
46 typedef NT_Handle NT_RpcCallPoller;
49 #define NT_DEFAULT_PORT 1735
58 NT_BOOLEAN_ARRAY = 0x10,
59 NT_DOUBLE_ARRAY = 0x20,
60 NT_STRING_ARRAY = 0x40,
83 NT_NOTIFY_IMMEDIATE = 0x01,
84 NT_NOTIFY_LOCAL = 0x02,
86 NT_NOTIFY_DELETE = 0x08,
87 NT_NOTIFY_UPDATE = 0x10,
88 NT_NOTIFY_FLAGS = 0x20
93 NT_NET_MODE_NONE = 0x00,
94 NT_NET_MODE_SERVER = 0x01,
95 NT_NET_MODE_CLIENT = 0x02,
96 NT_NET_MODE_STARTING = 0x04,
97 NT_NET_MODE_FAILURE = 0x08,
98 NT_NET_MODE_LOCAL = 0x10,
125 uint64_t last_change;
205 unsigned int version;
324 NT_Entry
NT_GetEntry(NT_Inst inst,
const char* name,
size_t name_len);
340 NT_Entry*
NT_GetEntries(NT_Inst inst,
const char* prefix,
size_t prefix_len,
341 unsigned int types,
size_t* count);
397 const struct NT_Value* default_value);
490 size_t prefix_len,
unsigned int types,
534 size_t prefix_len,
void* data,
629 NT_EntryListenerPoller poller,
size_t* len,
double timeout,
720 NT_ConnectionListenerPoller poller,
NT_Bool immediate_notify);
735 NT_ConnectionListenerPoller poller,
size_t* len);
752 NT_ConnectionListenerPoller poller,
size_t* len,
double timeout,
812 void NT_CreateRpc(NT_Entry entry,
const char* def,
size_t def_len,
void* data,
848 NT_RpcCallPoller poller);
882 double timeout,
NT_Bool* timed_out);
933 NT_RpcCall
NT_CallRpc(NT_Entry entry,
const char* params,
size_t params_len);
944 char*
NT_GetRpcResult(NT_Entry entry, NT_RpcCall call,
size_t* result_len);
958 size_t* result_len,
double timeout,
1000 size_t* packed_len);
1065 const char* listen_address,
unsigned int port);
1088 void NT_StartClient(NT_Inst inst,
const char* server_name,
unsigned int port);
1101 const unsigned int* ports);
1126 void NT_SetServer(NT_Inst inst,
const char* server_name,
unsigned int port);
1139 const unsigned int* ports);
1242 void (*warn)(
size_t line,
const char* msg));
1255 const char* prefix,
size_t prefix_len);
1269 const char* prefix,
size_t prefix_len,
1270 void (*warn)(
size_t line,
const char* msg));
1448 unsigned int min_level,
unsigned int max_level);
1478 unsigned int max_level);
1503 double timeout,
NT_Bool* timed_out);
1719 uint64_t* last_change,
size_t* arr_size);
1736 uint64_t* last_change,
size_t* arr_size);
1755 uint64_t* last_change,
1799 char*
NT_GetEntryString(NT_Entry entry, uint64_t* last_change,
size_t* str_len);
1814 char*
NT_GetEntryRaw(NT_Entry entry, uint64_t* last_change,
size_t* raw_len);
1898 double default_double);
1912 const char* default_value,
size_t default_len);
1926 const char* default_value,
size_t default_len);
1940 const int* default_value,
1941 size_t default_size);
1955 const double* default_value,
1956 size_t default_size);
1971 size_t default_size);
2018 size_t str_len,
NT_Bool force);
2032 size_t raw_len,
NT_Bool force);
2074 const struct NT_String* arr,
size_t size,
2085 #endif // NTCORE_NTCORE_C_H_
char * NT_GetEntryString(NT_Entry entry, uint64_t *last_change, size_t *str_len)
Returns a copy of the string assigned to the entry name.
NetworkTables RPC Version 1 Definition Parameter.
Definition: ntcore_c.h:192
NT_Bool NT_GetEntryBoolean(NT_Entry entry, uint64_t *last_change, NT_Bool *v_boolean)
Returns the boolean currently assigned to the entry name.
NT_ConnectionListener NT_AddConnectionListener(NT_Inst inst, void *data, NT_ConnectionListenerCallback callback, NT_Bool immediate_notify)
Add a connection listener.
NT_Logger NT_AddLogger(NT_Inst inst, void *data, NT_LogFunc func, unsigned int min_level, unsigned int max_level)
Add logger callback function.
char * NT_AllocateCharArray(size_t size)
Allocates an array of chars.
int NT_Bool
Typedefs.
Definition: ntcore_c.h:34
char * str
String contents (UTF-8).
Definition: ntcore_c.h:113
NT_Bool NT_SetDefaultEntryBoolean(NT_Entry entry, uint64_t time, NT_Bool default_boolean)
Set Default Entry Boolean.
NetworkTables Connection Notification.
Definition: ntcore_c.h:244
NT_EntryListener listener
Listener that was triggered.
Definition: ntcore_c.h:225
void NT_DeleteEntry(NT_Entry entry)
Delete Entry.
void NT_DestroyRpcCallPoller(NT_RpcCallPoller poller)
Destroy a RPC call poller.
struct NT_EntryInfo * NT_GetEntryInfo(NT_Inst inst, const char *prefix, size_t prefix_len, unsigned int types, size_t *count)
Get Entry Information.
const char * filename
The filename of the source file that generated the message.
Definition: ntcore_c.h:264
struct NT_EntryNotification * NT_PollEntryListener(NT_EntryListenerPoller poller, size_t *len)
Get the next entry listener event.
void NT_Flush(NT_Inst inst)
Flush Entries.
unsigned int flags
Entry flags.
Definition: ntcore_c.h:158
void NT_DisposeEntryArray(NT_Entry *arr, size_t count)
Disposes an entry handle array.
struct NT_LogMessage * NT_PollLoggerTimeout(NT_LoggerPoller poller, size_t *len, double timeout, NT_Bool *timed_out)
Get the next log event.
NT_EntryListener NT_AddEntryListenerSingle(NT_Entry entry, void *data, NT_EntryListenerCallback callback, unsigned int flags)
Add a listener for a single entry.
NT_Bool NT_WaitForEntryListenerQueue(NT_Inst inst, double timeout)
Wait for the entry listener queue to be empty.
double * NT_GetValueDoubleArray(const struct NT_Value *value, uint64_t *last_change, size_t *arr_size)
Returns a copy of the double array from the NT_Value.
NT_Logger NT_AddPolledLogger(NT_LoggerPoller poller, unsigned int min_level, unsigned int max_level)
Set the log level for a log poller.
struct NT_ConnectionNotification * NT_PollConnectionListener(NT_ConnectionListenerPoller poller, size_t *len)
Get the next connection event.
struct NT_Value value
The new value.
Definition: ntcore_c.h:234
NetworkTables RPC Version 1 Definition.
Definition: ntcore_c.h:204
void(* NT_EntryListenerCallback)(void *data, const struct NT_EntryNotification *event)
Entry listener callback function.
Definition: ntcore_c.h:519
char * NT_GetEntryRaw(NT_Entry entry, uint64_t *last_change, size_t *raw_len)
Returns a copy of the raw value assigned to the entry name.
void NT_FreeDoubleArray(double *v_double)
Frees an array of doubles.
NT_Bool NT_SetEntryBoolean(NT_Entry entry, uint64_t time, NT_Bool v_boolean, NT_Bool force)
Set Entry Boolean Sets an entry boolean.
struct NT_ConnectionInfo * NT_GetConnections(NT_Inst inst, size_t *count)
Get information on the currently established network connections.
enum NT_Type NT_GetValueType(const struct NT_Value *value)
Returns the type of an NT_Value struct.
const char * NT_SavePersistent(NT_Inst inst, const char *filename)
Save persistent values to a file.
NetworkTables Connection Information.
Definition: ntcore_c.h:165
void NT_GetEntryValue(NT_Entry entry, struct NT_Value *value)
Get Entry Value.
NT_Bool NT_SetEntryDoubleArray(NT_Entry entry, uint64_t time, const double *arr, size_t size, NT_Bool force)
Set Entry Double Array Sets an entry double array.
void NT_StartLocal(NT_Inst inst)
Starts local-only operation.
unsigned int level
Log level of the message.
Definition: ntcore_c.h:261
NT_Bool NT_SetDefaultEntryValue(NT_Entry entry, const struct NT_Value *default_value)
Set Default Entry Value.
struct NT_EntryNotification * NT_PollEntryListenerTimeout(NT_EntryListenerPoller poller, size_t *len, double timeout, NT_Bool *timed_out)
Get the next entry listener event.
NT_RpcCall NT_CallRpc(NT_Entry entry, const char *params, size_t params_len)
Call a RPC function.
void NT_DisposeRpcAnswerArray(struct NT_RpcAnswer *arr, size_t count)
Disposes a Rpc Answer array.
void NT_DisposeEntryNotification(struct NT_EntryNotification *info)
Disposes a single entry notification.
void NT_FreeCharArray(char *v_char)
Frees an array of chars.
NT_Bool NT_GetValueDouble(const struct NT_Value *value, uint64_t *last_change, double *v_double)
Returns the double from the NT_Value.
NT_Bool NT_SetEntryString(NT_Entry entry, uint64_t time, const char *str, size_t str_len, NT_Bool force)
Set Entry String Sets an entry string.
NT_Bool NT_SetEntryStringArray(NT_Entry entry, uint64_t time, const struct NT_String *arr, size_t size, NT_Bool force)
Set Entry String Array Sets an entry string array.
void NT_StopClient(NT_Inst inst)
Stops the client if it is running.
struct NT_Value ** NT_UnpackRpcValues(const char *packed, size_t packed_len, const enum NT_Type *types, size_t types_len)
Unpack RPC values as required for RPC version 1 definition messages.
const char * NT_LoadPersistent(NT_Inst inst, const char *filename, void(*warn)(size_t line, const char *msg))
Load persistent values from a file.
const char * NT_LoadEntries(NT_Inst inst, const char *filename, const char *prefix, size_t prefix_len, void(*warn)(size_t line, const char *msg))
Load table values from a file.
NT_EntryListenerPoller NT_CreateEntryListenerPoller(NT_Inst inst)
Create a entry listener poller.
struct NT_String remote_ip
The IP address of the remote node.
Definition: ntcore_c.h:173
void NT_DisposeConnectionNotificationArray(struct NT_ConnectionNotification *arr, size_t count)
Disposes a connection notification array.
void NT_SetUpdateRate(NT_Inst inst, double interval)
Set the periodic update rate.
void NT_SetEntryFlags(NT_Entry entry, unsigned int flags)
Set Entry Flags.
NetworkTables Entry Value.
Definition: ntcore_c.h:123
void NT_DestroyLoggerPoller(NT_LoggerPoller poller)
Destroy a log poller.
enum NT_Type NT_GetEntryType(NT_Entry entry)
Gets the type for the specified key, or unassigned if non existent.
void NT_StopDSClient(NT_Inst inst)
Stops requesting server address from Driver Station.
void NT_RemoveConnectionListener(NT_ConnectionListener conn_listener)
Remove a connection listener.
void(* NT_RpcCallback)(void *data, const struct NT_RpcAnswer *call)
Remote Procedure Call (RPC) callback function.
Definition: ntcore_c.h:800
void NT_StartClientTeam(NT_Inst inst, unsigned int team, unsigned int port)
Starts a client using commonly known robot addresses for the specified team.
enum NT_Type type
Entry type.
Definition: ntcore_c.h:155
char * message
The message.
Definition: ntcore_c.h:270
NT_Bool NT_SetDefaultEntryRaw(NT_Entry entry, uint64_t time, const char *default_value, size_t default_len)
Set Default Entry Raw.
NT_Bool NT_SetDefaultEntryString(NT_Entry entry, uint64_t time, const char *default_value, size_t default_len)
Set Default Entry String.
void NT_SetServer(NT_Inst inst, const char *server_name, unsigned int port)
Sets server address and port for client (without restarting client).
uint64_t NT_GetEntryLastChange(NT_Entry entry)
Gets the last time the entry was changed.
void(* NT_ConnectionListenerCallback)(void *data, const struct NT_ConnectionNotification *event)
Connection listener callback function.
Definition: ntcore_c.h:675
void NT_DisposeConnectionNotification(struct NT_ConnectionNotification *info)
Disposes a single connection notification.
NT_Entry entry
Entry handle.
Definition: ntcore_c.h:149
void NT_DisposeLogMessageArray(struct NT_LogMessage *arr, size_t count)
Disposes a log message array.
NT_EntryFlags
NetworkTables entry flags.
Definition: ntcore_c.h:65
void NT_CreateRpc(NT_Entry entry, const char *def, size_t def_len, void *data, NT_RpcCallback callback)
Create a callback-based RPC entry point.
NT_ConnectionListener NT_AddPolledConnectionListener(NT_ConnectionListenerPoller poller, NT_Bool immediate_notify)
Create a polled connection listener.
NT_Logger logger
The logger that generated the message.
Definition: ntcore_c.h:258
NT_NetworkMode
Client/server modes.
Definition: ntcore_c.h:92
NetworkTables log message.
Definition: ntcore_c.h:256
NT_Bool NT_SetDefaultEntryStringArray(NT_Entry entry, uint64_t time, const struct NT_String *default_value, size_t default_size)
Set Default Entry String Array.
NT_Bool NT_WaitForRpcCallQueue(NT_Inst inst, double timeout)
Wait for the incoming RPC call queue to be empty.
void NT_StartDSClient(NT_Inst inst, unsigned int port)
Starts requesting server address from Driver Station.
NT_Bool NT_GetValueBoolean(const struct NT_Value *value, uint64_t *last_change, NT_Bool *v_boolean)
Returns the boolean from the NT_Value.
void NT_StartServer(NT_Inst inst, const char *persist_filename, const char *listen_address, unsigned int port)
Starts a server using the specified filename, listening address, and port.
void NT_DisposeLogMessage(struct NT_LogMessage *info)
Disposes a single log message.
NT_EntryListener NT_AddEntryListener(NT_Inst inst, const char *prefix, size_t prefix_len, void *data, NT_EntryListenerCallback callback, unsigned int flags)
Add a listener for all entries starting with a certain prefix.
unsigned int flags
Update flags.
Definition: ntcore_c.h:240
struct NT_RpcAnswer * NT_PollRpcTimeout(NT_RpcCallPoller poller, size_t *len, double timeout, NT_Bool *timed_out)
Get the next incoming RPC call.
NT_Entry entry
Entry handle.
Definition: ntcore_c.h:228
struct NT_String * NT_AllocateStringArray(size_t size)
Allocates an array of NT_Strings.
struct NT_String * NT_GetValueStringArray(const struct NT_Value *value, uint64_t *last_change, size_t *arr_size)
Returns a copy of the NT_String array from the NT_Value.
NT_Bool NT_SetDefaultEntryBooleanArray(NT_Entry entry, uint64_t time, const int *default_value, size_t default_size)
Set Default Entry Boolean Array.
char * NT_GetRpcResultTimeout(NT_Entry entry, NT_RpcCall call, size_t *result_len, double timeout, NT_Bool *timed_out)
Get the result (return value) of a RPC call.
NT_Bool NT_SetEntryValue(NT_Entry entry, const struct NT_Value *value)
Set Entry Value.
char * NT_GetRpcResult(NT_Entry entry, NT_RpcCall call, size_t *result_len)
Get the result (return value) of a RPC call.
void(* NT_LogFunc)(void *data, const struct NT_LogMessage *msg)
Log function.
Definition: ntcore_c.h:1431
NT_Bool NT_SetEntryRaw(NT_Entry entry, uint64_t time, const char *raw, size_t raw_len, NT_Bool force)
Set Entry Raw Sets the raw value of an entry.
void NT_CancelPollConnectionListener(NT_ConnectionListenerPoller poller)
Cancel a PollConnectionListener call.
NT_ConnectionListener listener
Listener that was triggered.
Definition: ntcore_c.h:246
void NT_DestroyConnectionListenerPoller(NT_ConnectionListenerPoller poller)
Destroy a connection listener poller.
struct NT_ConnectionNotification * NT_PollConnectionListenerTimeout(NT_ConnectionListenerPoller poller, size_t *len, double timeout, NT_Bool *timed_out)
Get the next connection event.
NT_Bool * NT_GetEntryBooleanArray(NT_Entry entry, uint64_t *last_change, size_t *arr_size)
Returns a copy of the boolean array assigned to the entry name.
NT_Bool * NT_GetValueBooleanArray(const struct NT_Value *value, uint64_t *last_change, size_t *arr_size)
Returns a copy of the boolean array from the NT_Value.
void NT_InitString(struct NT_String *str)
Initializes a NT_String.
NT_Bool NT_UnpackRpcDefinition(const char *packed, size_t packed_len, struct NT_RpcDefinition *def)
Unpack a RPC version 1 definition.
char * NT_GetValueString(const struct NT_Value *value, uint64_t *last_change, size_t *str_len)
Returns a copy of the string from the NT_Value.
unsigned int line
The line number in the source file that generated the message.
Definition: ntcore_c.h:267
NT_Bool NT_GetEntryInfoHandle(NT_Entry entry, struct NT_EntryInfo *info)
Get Entry Information.
NT_LoggerPoller NT_CreateLoggerPoller(NT_Inst inst)
Create a log poller.
void NT_DisposeEntryInfo(struct NT_EntryInfo *info)
Disposes a single entry info (as returned by NT_GetEntryInfoHandle).
NT_Bool NT_WaitForLoggerQueue(NT_Inst inst, double timeout)
Wait for the incoming log event queue to be empty.
NT_Entry NT_GetEntry(NT_Inst inst, const char *name, size_t name_len)
Get Entry Handle.
void NT_StopServer(NT_Inst inst)
Stops the server if it is running.
void NT_CancelRpcResult(NT_Entry entry, NT_RpcCall call)
Ignore the result of a RPC call.
NT_Bool NT_SetEntryBooleanArray(NT_Entry entry, uint64_t time, const int *arr, size_t size, NT_Bool force)
Set Entry Boolean Array Sets an entry boolean array.
void NT_SetServerTeam(NT_Inst inst, unsigned int team, unsigned int port)
Sets server addresses and port for client (without restarting client).
void NT_DisposeRpcAnswer(struct NT_RpcAnswer *answer)
Disposes a Rpc Answer structure.
char * NT_PackRpcDefinition(const struct NT_RpcDefinition *def, size_t *packed_len)
Pack a RPC version 1 definition.
void NT_DisposeRpcDefinition(struct NT_RpcDefinition *def)
Disposes a Rpc Definition structure.
NT_Bool * NT_AllocateBooleanArray(size_t size)
Allocates an array of booleans.
A NetworkTables string.
Definition: ntcore_c.h:106
NT_Inst NT_GetDefaultInstance(void)
Get default instance.
unsigned int NT_GetNetworkMode(NT_Inst inst)
Get the current network mode.
NT_Bool NT_SetDefaultEntryDoubleArray(NT_Entry entry, uint64_t time, const double *default_value, size_t default_size)
Set Default Entry Double Array.
struct NT_String name
Entry name.
Definition: ntcore_c.h:231
struct NT_RpcAnswer * NT_PollRpc(NT_RpcCallPoller poller, size_t *len)
Get the next incoming RPC call.
NT_Bool NT_PostRpcResponse(NT_Entry entry, NT_RpcCall call, const char *result, size_t result_len)
Post RPC response (return value) for a polled RPC.
NetworkTables Entry Information.
Definition: ntcore_c.h:147
void NT_CancelPollEntryListener(NT_EntryListenerPoller poller)
Cancel a PollEntryListener call.
NT_EntryListener NT_AddPolledEntryListenerSingle(NT_EntryListenerPoller poller, NT_Entry entry, unsigned int flags)
Create a polled entry listener.
char * NT_GetValueRaw(const struct NT_Value *value, uint64_t *last_change, size_t *raw_len)
Returns a copy of the raw value from the NT_Value.
void NT_DisposeValue(struct NT_Value *value)
Frees value memory.
void NT_InitValue(struct NT_Value *value)
Initializes a NT_Value.
void NT_RemoveLogger(NT_Logger logger)
Remove a logger.
const char * NT_SaveEntries(NT_Inst inst, const char *filename, const char *prefix, size_t prefix_len)
Save table values to a file.
void NT_StartClientNone(NT_Inst inst)
Starts a client.
char * NT_PackRpcValues(const struct NT_Value **values, size_t values_len, size_t *packed_len)
Pack RPC values as required for RPC version 1 definition messages.
double * NT_AllocateDoubleArray(size_t size)
Allocates an array of doubles.
void NT_FreeStringArray(struct NT_String *v_string, size_t arr_size)
Frees an array of NT_Strings.
NT_Inst NT_CreateInstance(void)
Create an instance.
NT_Entry * NT_GetEntries(NT_Inst inst, const char *prefix, size_t prefix_len, unsigned int types, size_t *count)
Get Entry Handles.
void NT_SetNetworkIdentity(NT_Inst inst, const char *name, size_t name_len)
Set the network identity of this node.
void NT_CancelPollLogger(NT_LoggerPoller poller)
Cancel a PollLogger call.
void NT_StartClientMulti(NT_Inst inst, size_t count, const char **server_names, const unsigned int *ports)
Starts a client using the specified (server, port) combinations.
void NT_DisposeString(struct NT_String *str)
Frees string memory.
void NT_DestroyEntryListenerPoller(NT_EntryListenerPoller poller)
Destroy a entry listener poller.
uint64_t last_update
The last time any update was received from the remote node (same scale as returned by nt::Now()).
Definition: ntcore_c.h:182
NT_RpcCallPoller NT_CreateRpcCallPoller(NT_Inst inst)
Create a RPC call poller.
struct NT_LogMessage * NT_PollLogger(NT_LoggerPoller poller, size_t *len)
Get the next log event.
void NT_StopLocal(NT_Inst inst)
Stops local-only operation.
NetworkTables RPC Version 1 Definition Result.
Definition: ntcore_c.h:198
NT_Type
NetworkTables data types.
Definition: ntcore_c.h:52
NT_NotifyKind
NetworkTables notifier kinds.
Definition: ntcore_c.h:81
uint64_t NT_Now(void)
Returns monotonic current time in 1 us increments.
struct NT_String * NT_GetEntryStringArray(NT_Entry entry, uint64_t *last_change, size_t *arr_size)
Returns a copy of the NT_String array assigned to the entry name.
struct NT_ConnectionInfo conn
Connection info.
Definition: ntcore_c.h:252
NT_Bool connected
True if event is due to connection being established.
Definition: ntcore_c.h:249
NT_Bool NT_SetEntryDouble(NT_Entry entry, uint64_t time, double v_double, NT_Bool force)
Set Entry Double Sets an entry double.
NT_Bool NT_SetDefaultEntryDouble(NT_Entry entry, uint64_t time, double default_double)
Set Default Entry Double.
void NT_DisposeConnectionInfoArray(struct NT_ConnectionInfo *arr, size_t count)
Disposes a connection info array.
double * NT_GetEntryDoubleArray(NT_Entry entry, uint64_t *last_change, size_t *arr_size)
Returns a copy of the double array assigned to the entry name.
char * NT_GetEntryName(NT_Entry entry, size_t *name_len)
Gets the name of the specified entry.
struct NT_String remote_id
The remote identifier (as set on the remote node by NetworkTableInstance::SetNetworkIdentity() or nt:...
Definition: ntcore_c.h:170
NT_LogLevel
NetworkTables logging levels.
Definition: ntcore_c.h:68
NT_Inst NT_GetInstanceFromHandle(NT_Handle handle)
Get instance handle from another handle.
void NT_DeleteAllEntries(NT_Inst inst)
Delete All Entries.
void NT_RemoveEntryListener(NT_EntryListener entry_listener)
Remove an entry listener.
NetworkTables Entry Notification.
Definition: ntcore_c.h:223
void NT_FreeBooleanArray(NT_Bool *v_boolean)
Frees an array of booleans.
size_t len
Length of the string in bytes.
Definition: ntcore_c.h:119
void NT_SetServerMulti(NT_Inst inst, size_t count, const char **server_names, const unsigned int *ports)
Sets server addresses for client (without restarting client).
NT_Bool NT_IsConnected(NT_Inst inst)
Return whether or not the instance is connected to another node.
void NT_CancelPollRpc(NT_RpcCallPoller poller)
Cancel a PollRpc call.
void NT_StartClient(NT_Inst inst, const char *server_name, unsigned int port)
Starts a client using the specified server and port.
NT_Bool NT_WaitForConnectionListenerQueue(NT_Inst inst, double timeout)
Wait for the connection listener queue to be empty.
void NT_DisposeEntryNotificationArray(struct NT_EntryNotification *arr, size_t count)
Disposes an entry notification array.
NT_ConnectionListenerPoller NT_CreateConnectionListenerPoller(NT_Inst inst)
Create a connection listener poller.
void NT_DestroyInstance(NT_Inst inst)
Destroy an instance.
NetworkTables RPC Call Data.
Definition: ntcore_c.h:214
unsigned int protocol_version
The protocol version being used for this connection.
Definition: ntcore_c.h:188
unsigned int NT_GetEntryFlags(NT_Entry entry)
Get Entry Flags.
void NT_CreatePolledRpc(NT_Entry entry, const char *def, size_t def_len, NT_RpcCallPoller poller)
Create a polled RPC entry point.
NT_EntryListener NT_AddPolledEntryListener(NT_EntryListenerPoller poller, const char *prefix, size_t prefix_len, unsigned int flags)
Create a polled entry listener.
unsigned int remote_port
The port number of the remote node.
Definition: ntcore_c.h:176
NT_Bool NT_GetEntryDouble(NT_Entry entry, uint64_t *last_change, double *v_double)
Returns the double currently assigned to the entry name.
struct NT_String name
Entry name.
Definition: ntcore_c.h:152
void NT_SetEntryTypeValue(NT_Entry entry, const struct NT_Value *value)
Set Entry Type and Value.
uint64_t last_change
Timestamp of last change to entry (type or value).
Definition: ntcore_c.h:161
void NT_DisposeEntryInfoArray(struct NT_EntryInfo *arr, size_t count)
Disposes an entry info array.