Crate ntcore_sys [−] [src]
Structs
NT_ConnectionInfo |
NetworkTables Connection Information |
NT_ConnectionNotification |
NetworkTables Connection Notification |
NT_EntryInfo |
NetworkTables Entry Information |
NT_EntryNotification |
NetworkTables Entry Notification |
NT_LogMessage |
NetworkTables log message. |
NT_RpcAnswer |
NetworkTables RPC Call Data |
NT_RpcDefinition |
NetworkTables RPC Version 1 Definition |
NT_RpcParamDef |
NetworkTables RPC Version 1 Definition Parameter |
NT_RpcResultDef |
NetworkTables RPC Version 1 Definition Result |
NT_String |
A NetworkTables string. |
NT_Value |
NetworkTables Entry Value. Note this is a typed union. |
NT_Value__bindgen_ty_1__bindgen_ty_1 | |
NT_Value__bindgen_ty_1__bindgen_ty_2 | |
NT_Value__bindgen_ty_1__bindgen_ty_3 |
Constants
Functions
NT_AddConnectionListener⚠ |
Add a connection listener. |
NT_AddEntryListener⚠ |
Add a listener for all entries starting with a certain prefix. |
NT_AddEntryListenerSingle⚠ |
Add a listener for a single entry. |
NT_AddLogger⚠ |
Add logger callback function. By default, log messages are sent to stderr; this function sends log messages to the provided callback function instead. The callback function will only be called for log messages with level greater than or equal to min_level and less than or equal to max_level; messages outside this range will be silently ignored. |
NT_AddPolledConnectionListener⚠ |
Create a polled connection listener. The caller is responsible for calling NT_PollConnectionListener() to poll. @param poller poller handle @param immediate_notify notify listener of all existing connections |
NT_AddPolledEntryListener⚠ |
Create a polled entry listener. The caller is responsible for calling NT_PollEntryListener() to poll. @param poller poller handle @param prefix UTF-8 string prefix @param flags NT_NotifyKind bitmask @return Listener handle |
NT_AddPolledEntryListenerSingle⚠ |
Create a polled entry listener. The caller is responsible for calling NT_PollEntryListener() to poll. @param poller poller handle @param prefix UTF-8 string prefix @param flags NT_NotifyKind bitmask @return Listener handle |
NT_AddPolledLogger⚠ |
Set the log level for a log poller. Events will only be generated for log messages with level greater than or equal to min_level and less than or equal to max_level; messages outside this range will be silently ignored. @param poller poller handle @param min_level minimum log level @param max_level maximum log level @return Logger handle |
NT_AllocateBooleanArray⚠ |
Allocates an array of booleans. Note that the size is the number of elements, and not the specific number of bytes to allocate. That is calculated internally. |
NT_AllocateCharArray⚠ |
Allocates an array of chars. Note that the size is the number of elements, and not the specific number of bytes to allocate. That is calculated internally. |
NT_AllocateDoubleArray⚠ |
Allocates an array of doubles. Note that the size is the number of elements, and not the specific number of bytes to allocate. That is calculated internally. |
NT_AllocateStringArray⚠ |
Allocates an array of NT_Strings. Note that the size is the number of elements, and not the specific number of bytes to allocate. That is calculated internally. |
NT_CallRpc⚠ |
Call a RPC function. May be used on either the client or server. This function is non-blocking. Either NT_GetRpcResult() or NT_CancelRpcResult() must be called to either get or ignore the result of the call. @param entry entry handle of RPC entry @param params parameter @param params_len length of param in bytes @return RPC call handle (for use with NT_GetRpcResult() or NT_CancelRpcResult()). |
NT_CancelPollConnectionListener⚠ |
Cancel a PollConnectionListener call. This wakes up a call to PollConnectionListener for this poller and causes it to immediately return an empty array. @param poller poller handle |
NT_CancelPollEntryListener⚠ |
Cancel a PollEntryListener call. This wakes up a call to PollEntryListener for this poller and causes it to immediately return an empty array. @param poller poller handle |
NT_CancelPollLogger⚠ |
Cancel a PollLogger call. This wakes up a call to PollLogger for this poller and causes it to immediately return an empty array. @param poller poller handle |
NT_CancelPollRpc⚠ |
Cancel a PollRpc call. This wakes up a call to PollRpc for this poller and causes it to immediately return an empty array. @param poller poller handle |
NT_CancelRpcResult⚠ |
Ignore the result of a RPC call. This function is non-blocking. @param entry entry handle of RPC entry @param call RPC call handle returned by NT_CallRpc() |
NT_CreateConnectionListenerPoller⚠ |
Create a connection listener poller. A poller provides a single queue of poll events. Events linked to this poller (using NT_AddPolledConnectionListener()) will be stored in the queue and must be collected by calling NT_PollConnectionListener(). The returned handle must be destroyed with NT_DestroyConnectionListenerPoller(). @param inst instance handle @return poller handle |
NT_CreateEntryListenerPoller⚠ |
Create a entry listener poller. A poller provides a single queue of poll events. Events linked to this poller (using NT_AddPolledEntryListener()) will be stored in the queue and must be collected by calling NT_PollEntryListener(). The returned handle must be destroyed with NT_DestroyEntryListenerPoller(). @param inst instance handle @return poller handle |
NT_CreateInstance⚠ |
Create an instance. @return Instance handle |
NT_CreateLoggerPoller⚠ |
Create a log poller. A poller provides a single queue of poll events. The returned handle must be destroyed with NT_DestroyLoggerPoller(). @param inst instance handle @return poller handle |
NT_CreatePolledRpc⚠ |
Create a polled RPC entry point. Only valid to use on the server. The caller is responsible for calling NT_PollRpc() or NT_PollRpcTimeout() to poll for servicing incoming RPC calls. @param entry entry handle of RPC entry @param def RPC definition @param def_len length of def in bytes @param poller poller handle |
NT_CreateRpc⚠ |
Create a callback-based RPC entry point. Only valid to use on the server. The callback function will be called when the RPC is called. @param entry entry handle of RPC entry @param def RPC definition @param def_len length of def in bytes @param data data pointer to pass to callback function @param callback callback function |
NT_CreateRpcCallPoller⚠ |
Create a RPC call poller. Only valid to use on the server. A poller provides a single queue of poll events. Events linked to this poller (using NT_CreatePolledRpc()) will be stored in the queue and must be collected by calling NT_PollRpc() or NT_PollRpcTimeout(). The returned handle must be destroyed with NT_DestroyRpcCallPoller(). @param inst instance handle @return poller handle |
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. |
NT_DeleteEntry⚠ |
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. |
NT_DestroyConnectionListenerPoller⚠ |
Destroy a connection listener poller. This will abort any blocked polling call and prevent additional events from being generated for this poller. @param poller poller handle |
NT_DestroyEntryListenerPoller⚠ |
Destroy a entry listener poller. This will abort any blocked polling call and prevent additional events from being generated for this poller. @param poller poller handle |
NT_DestroyInstance⚠ |
Destroy an instance. The default instance cannot be destroyed. @param inst Instance handle |
NT_DestroyLoggerPoller⚠ |
Destroy a log poller. This will abort any blocked polling call and prevent additional events from being generated for this poller. @param poller poller handle |
NT_DestroyRpcCallPoller⚠ |
Destroy a RPC call poller. This will abort any blocked polling call and prevent additional events from being generated for this poller. @param poller poller handle |
NT_DisposeConnectionInfoArray⚠ |
Disposes a connection info array. @param arr pointer to the array to dispose @param count number of elements in the array |
NT_DisposeConnectionNotification⚠ |
Disposes a single connection notification. @param info pointer to the info to dispose |
NT_DisposeConnectionNotificationArray⚠ |
Disposes a connection notification array. @param arr pointer to the array to dispose @param count number of elements in the array |
NT_DisposeEntryArray⚠ |
Disposes an entry handle array. @param arr pointer to the array to dispose @param count number of elements in the array |
NT_DisposeEntryInfo⚠ |
Disposes a single entry info (as returned by NT_GetEntryInfoHandle). @param info pointer to the info to dispose |
NT_DisposeEntryInfoArray⚠ |
Disposes an entry info array. @param arr pointer to the array to dispose @param count number of elements in the array |
NT_DisposeEntryNotification⚠ |
Disposes a single entry notification. @param info pointer to the info to dispose |
NT_DisposeEntryNotificationArray⚠ |
Disposes an entry notification array. @param arr pointer to the array to dispose @param count number of elements in the array |
NT_DisposeLogMessage⚠ |
Disposes a single log message. @param info pointer to the info to dispose |
NT_DisposeLogMessageArray⚠ |
Disposes a log message array. @param arr pointer to the array to dispose @param count number of elements in the array |
NT_DisposeRpcAnswer⚠ |
Disposes a Rpc Answer structure. @param answer pointer to the struct to dispose |
NT_DisposeRpcAnswerArray⚠ |
Disposes a Rpc Answer array. @param arr pointer to the array to dispose @param count number of elements in the array |
NT_DisposeRpcDefinition⚠ |
Disposes a Rpc Definition structure. @param def pointer to the struct to dispose |
NT_DisposeString⚠ |
Frees string memory. @param str string to free |
NT_DisposeValue⚠ |
Frees value memory. @param value value to free |
NT_Flush⚠ |
Flush Entries. Forces an immediate flush of all local entry changes to network. Normally this is done on a regularly scheduled interval (see NT_SetUpdateRate()). |
NT_FreeBooleanArray⚠ |
Frees an array of booleans. |
NT_FreeCharArray⚠ |
Frees an array of chars. |
NT_FreeDoubleArray⚠ |
Frees an array of doubles. |
NT_FreeStringArray⚠ |
Frees an array of NT_Strings. |
NT_GetConnections⚠ |
Get information on the currently established network connections. If operating as a client, this will return either zero or one values. |
NT_GetDefaultInstance⚠ |
Get default instance. This is the instance used by non-handle-taking functions. @return Instance handle |
NT_GetEntries⚠ |
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. |
NT_GetEntry⚠ |
Get Entry Handle. @param inst instance handle @param name entry name (UTF-8 string) @param name_len length of name in bytes @return entry handle |
NT_GetEntryBoolean⚠ |
Returns the boolean currently assigned to the entry name. If the entry name is not currently assigned, or is assigned to a different type, returns 0. |
NT_GetEntryBooleanArray⚠ |
Returns a copy of the boolean array assigned to the entry name. If the entry name is not currently assigned, or is assigned to a different type, returns null. |
NT_GetEntryDouble⚠ |
Returns the double currently assigned to the entry name. If the entry name is not currently assigned, or is assigned to a different type, returns 0. |
NT_GetEntryDoubleArray⚠ |
Returns a copy of the double array assigned to the entry name. If the entry name is not currently assigned, or is assigned to a different type, returns null. |
NT_GetEntryFlags⚠ |
Get Entry Flags. @param entry entry handle @return Flags value (bitmask of NT_EntryFlags) |
NT_GetEntryInfo⚠ |
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. |
NT_GetEntryInfoHandle⚠ |
Get Entry Information. Returns information about an entry (name, entry type, and timestamp of last change to type/value). |
NT_GetEntryLastChange⚠ |
Gets the last time the entry was changed. Returns 0 if the handle is invalid. @param entry entry handle @return Entry last change time |
NT_GetEntryName⚠ |
Gets the name of the specified entry. Returns an empty string if the handle is invalid. @param entry entry handle @param name_len length of the returned string (output parameter) @return Entry name |
NT_GetEntryRaw⚠ |
Returns a copy of the raw value assigned to the entry name. If the entry name is not currently assigned, or is assigned to a different type, returns null. |
NT_GetEntryString⚠ |
Returns a copy of the string assigned to the entry name. If the entry name is not currently assigned, or is assigned to a different type, returns null. |
NT_GetEntryStringArray⚠ |
Returns a copy of the NT_String array assigned to the entry name. If the entry name is not currently assigned, or is assigned to a different type, returns null. |
NT_GetEntryType⚠ |
Gets the type for the specified key, or unassigned if non existent. @param entry entry handle @return Entry type |
NT_GetEntryValue⚠ |
Get Entry Value. Returns copy of current entry value. Note that one of the type options is "unassigned". |
NT_GetInstanceFromHandle⚠ |
Get instance handle from another handle. @param handle handle @return Instance handle |
NT_GetNetworkMode⚠ |
Get the current network mode. @param inst instance handle @return Bitmask of NT_NetworkMode. |
NT_GetRpcResult⚠ |
Get the result (return value) of a RPC call. This function blocks until the result is received. @param entry entry handle of RPC entry @param call RPC call handle returned by NT_CallRpc() @param result_len length of returned result in bytes @return NULL on error, or result. |
NT_GetRpcResultTimeout⚠ |
Get the result (return value) of a RPC call. This function blocks until the result is received or it times out. @param entry entry handle of RPC entry @param call RPC call handle returned by NT_CallRpc() @param result_len length of returned result in bytes @param timeout timeout, in seconds @param timed_out true if the timeout period elapsed (output) @return NULL on error or timeout, or result. |
NT_GetValueBoolean⚠ |
Returns the boolean from the NT_Value. If the NT_Value is null, or is assigned to a different type, returns 0. |
NT_GetValueBooleanArray⚠ |
Returns a copy of the boolean array from the NT_Value. If the NT_Value is null, or is assigned to a different type, returns null. |
NT_GetValueDouble⚠ |
Returns the double from the NT_Value. If the NT_Value is null, or is assigned to a different type, returns 0. |
NT_GetValueDoubleArray⚠ |
Returns a copy of the double array from the NT_Value. If the NT_Value is null, or is assigned to a different type, returns null. |
NT_GetValueRaw⚠ |
Returns a copy of the raw value from the NT_Value. If the NT_Value is null, or is assigned to a different type, returns null. |
NT_GetValueString⚠ |
Returns a copy of the string from the NT_Value. If the NT_Value is null, or is assigned to a different type, returns 0. |
NT_GetValueStringArray⚠ |
Returns a copy of the NT_String array from the NT_Value. If the NT_Value is null, or is assigned to a different type, returns null. |
NT_GetValueType⚠ |
Returns the type of an NT_Value struct. Note that one of the type options is "unassigned". |
NT_InitString⚠ |
Initializes a NT_String. Sets length to zero and pointer to null. @param str string to initialize |
NT_InitValue⚠ |
Initializes a NT_Value. Sets type to NT_UNASSIGNED and clears rest of struct. @param value value to initialize |
NT_IsConnected⚠ |
Return whether or not the instance is connected to another node. @param inst instance handle @return True if connected. |
NT_LoadEntries⚠ |
Load table values from a file. The file format used is identical to that used for SavePersistent / LoadPersistent. @param inst instance handle @param filename filename @param prefix load only keys starting with this prefix @param prefix_len length of prefix in bytes @param warn callback function for warnings @return error string, or nullptr if successful |
NT_LoadPersistent⚠ |
Load persistent values from a file. The server automatically does this at startup, but this function provides a way to restore persistent values in the same format from a file at any time on either a client or a server. @param inst instance handle @param filename filename @param warn callback function for warnings @return error string, or NULL if successful |
NT_Now⚠ |
Returns monotonic current time in 1 us increments. This is the same time base used for entry and connection timestamps. This function is a compatibility wrapper around WPI_Now(). @return Timestamp |
NT_PackRpcDefinition⚠ |
Pack a RPC version 1 definition. @param def RPC version 1 definition @param packed_len length of return value in bytes @return Raw packed bytes. Use C standard library std::free() to release. |
NT_PackRpcValues⚠ |
Pack RPC values as required for RPC version 1 definition messages. @param values array of values to pack @param values_len length of values @param packed_len length of return value in bytes @return Raw packed bytes. Use C standard library std::free() to release. |
NT_PollConnectionListener⚠ |
Get the next connection event. This blocks until the next connect or disconnect occurs. This is intended to be used with NT_AddPolledConnectionListener(); connection listeners created using NT_AddConnectionListener() will not be serviced through this function. @param poller poller handle @param len length of returned array (output) @return Array of information on the connection events. Only returns NULL if an error occurred (e.g. the instance was invalid or is shutting down). |
NT_PollConnectionListenerTimeout⚠ |
Get the next connection event. This blocks until the next connect or disconnect occurs or it times out. This is intended to be used with NT_AddPolledConnectionListener(); connection listeners created using NT_AddConnectionListener() will not be serviced through this function. @param poller poller handle @param len length of returned array (output) @param timeout timeout, in seconds @param timed_out true if the timeout period elapsed (output) @return Array of information on the connection events. If NULL is returned and timed_out is also false, an error occurred (e.g. the instance was invalid or is shutting down). |
NT_PollEntryListener⚠ |
Get the next entry listener event. This blocks until the next event occurs. This is intended to be used with NT_AddPolledEntryListener(void); entry listeners created using NT_AddEntryListener() will not be serviced through this function. @param poller poller handle @param len length of returned array (output) @return Array of information on the entry listener events. Returns NULL if an erroroccurred (e.g. the instance was invalid or is shutting down). |
NT_PollEntryListenerTimeout⚠ |
Get the next entry listener event. This blocks until the next event occurs or it times out. This is intended to be used with NT_AddPolledEntryListener(); entry listeners created using NT_AddEntryListener() will not be serviced through this function. @param poller poller handle @param len length of returned array (output) @param timeout timeout, in seconds @param timed_out true if the timeout period elapsed (output) @return Array of information on the entry listener events. If NULL is returned and timed_out is also false, an error occurred (e.g. the instance was invalid or is shutting down). |
NT_PollLogger⚠ |
Get the next log event. This blocks until the next log occurs. @param poller poller handle @param len length of returned array (output) @return Array of information on the log events. Only returns NULL if an error occurred (e.g. the instance was invalid or is shutting down). |
NT_PollLoggerTimeout⚠ |
Get the next log event. This blocks until the next log occurs or it times out. @param poller poller handle @param len length of returned array (output) @param timeout timeout, in seconds @param timed_out true if the timeout period elapsed (output) @return Array of information on the log events. If NULL is returned and timed_out is also false, an error occurred (e.g. the instance was invalid or is shutting down). |
NT_PollRpc⚠ |
Get the next incoming RPC call. This blocks until the next incoming RPC call is received. This is intended to be used with NT_CreatePolledRpc(void); RPC calls created using NT_CreateRpc() will not be serviced through this function. Upon successful return, NT_PostRpcResponse() must be called to send the return value to the caller. The returned array must be freed using NT_DisposeRpcAnswerArray(). @param poller poller handle @param len length of returned array (output) @return Array of RPC call information. Only returns NULL if an error occurred (e.g. the instance was invalid or is shutting down). |
NT_PollRpcTimeout⚠ |
Get the next incoming RPC call. This blocks until the next incoming RPC call is received or it times out. This is intended to be used with NT_CreatePolledRpc(); RPC calls created using NT_CreateRpc() will not be serviced through this function. Upon successful return, NT_PostRpcResponse() must be called to send the return value to the caller. The returned array must be freed using NT_DisposeRpcAnswerArray(). @param poller poller handle @param len length of returned array (output) @param timeout timeout, in seconds @param timed_out true if the timeout period elapsed (output) @return Array of RPC call information. If NULL is returned and timed_out is also false, an error occurred (e.g. the instance was invalid or is shutting down). |
NT_PostRpcResponse⚠ |
Post RPC response (return value) for a polled RPC. The rpc and call parameters should come from the NT_RpcAnswer returned by NT_PollRpc(). @param entry entry handle of RPC entry (from NT_RpcAnswer) @param call RPC call handle (from NT_RpcAnswer) @param result result raw data that will be provided to remote caller @param result_len length of result in bytes |
NT_RemoveConnectionListener⚠ |
Remove a connection listener. @param conn_listener Listener handle to remove |
NT_RemoveEntryListener⚠ |
Remove an entry listener. @param entry_listener Listener handle to remove |
NT_RemoveLogger⚠ |
Remove a logger. @param logger Logger handle to remove |
NT_SaveEntries⚠ |
Save table values to a file. The file format used is identical to that used for SavePersistent. @param inst instance handle @param filename filename @param prefix save only keys starting with this prefix @param prefix_len length of prefix in bytes @return error string, or nullptr if successful |
NT_SavePersistent⚠ |
Save persistent values to a file. The server automatically does this, but this function provides a way to save persistent values in the same format to a file on either a client or a server. @param inst instance handle @param filename filename @return error string, or NULL if successful |
NT_SetDefaultEntryBoolean⚠ |
Set Default Entry Boolean. Sets the default for the specified key to be a boolean. If key exists with same type, does not set value. Otherwise sets value to the default. |
NT_SetDefaultEntryBooleanArray⚠ |
Set Default Entry Boolean Array. Sets the default for the specified key. If key exists with same type, does not set value. Otherwise sets value to the default. |
NT_SetDefaultEntryDouble⚠ |
Set Default Entry Double. Sets the default for the specified key. If key exists with same type, does not set value. Otherwise sets value to the default. |
NT_SetDefaultEntryDoubleArray⚠ |
Set Default Entry Double Array. Sets the default for the specified key. If key exists with same type, does not set value. Otherwise sets value to the default. |
NT_SetDefaultEntryRaw⚠ |
Set Default Entry Raw. Sets the default for the specified key. If key exists with same type, does not set value. Otherwise sets value to the default. |
NT_SetDefaultEntryString⚠ |
Set Default Entry String. Sets the default for the specified key. If key exists with same type, does not set value. Otherwise sets value to the default. |
NT_SetDefaultEntryStringArray⚠ |
Set Default Entry String Array. Sets the default for the specified key. If key exists with same type, does not set value. Otherwise sets value to the default. |
NT_SetDefaultEntryValue⚠ |
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". |
NT_SetEntryBoolean⚠ |
Set Entry Boolean Sets an entry boolean. If the entry name is not currently assigned to a boolean, returns error unless the force parameter is set. |
NT_SetEntryBooleanArray⚠ |
Set Entry Boolean Array Sets an entry boolean array. If the entry name is not currently assigned to a boolean array, returns error unless the force parameter is set. |
NT_SetEntryDouble⚠ |
Set Entry Double Sets an entry double. If the entry name is not currently assigned to a double, returns error unless the force parameter is set. |
NT_SetEntryDoubleArray⚠ |
Set Entry Double Array Sets an entry double array. If the entry name is not currently assigned to a double array, returns error unless the force parameter is set. |
NT_SetEntryFlags⚠ |
Set Entry Flags. @param entry entry handle @param flags flags value (bitmask of NT_EntryFlags) |
NT_SetEntryRaw⚠ |
Set Entry Raw Sets the raw value of an entry. If the entry name is not currently assigned to a raw value, returns error unless the force parameter is set. |
NT_SetEntryString⚠ |
Set Entry String Sets an entry string. If the entry name is not currently assigned to a string, returns error unless the force parameter is set. |
NT_SetEntryStringArray⚠ |
Set Entry String Array Sets an entry string array. If the entry name is not currently assigned to a string array, returns error unless the force parameter is set. |
NT_SetEntryTypeValue⚠ |
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). |
NT_SetEntryValue⚠ |
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. |
NT_SetNetworkIdentity⚠ |
Set the network identity of this node. This is the name used during the initial connection handshake, and is visible through NT_ConnectionInfo on the remote node. @param inst instance handle @param name identity to advertise @param name_len length of name in bytes |
NT_SetServer⚠ |
Sets server address and port for client (without restarting client). |
NT_SetServerMulti⚠ |
Sets server addresses for client (without restarting client). The client will attempt to connect to each server in round robin fashion. |
NT_SetServerTeam⚠ |
Sets server addresses and port for client (without restarting client). Connects using commonly known robot addresses for the specified team. |
NT_SetUpdateRate⚠ |
Set the periodic update rate. Sets how frequently updates are sent to other nodes over the network. |
NT_StartClient⚠ |
Starts a client using the specified server and port |
NT_StartClientMulti⚠ |
Starts a client using the specified (server, port) combinations. The client will attempt to connect to each server in round robin fashion. |
NT_StartClientNone⚠ |
Starts a client. Use NT_SetServer to set the server name and port. @param inst instance handle |
NT_StartClientTeam⚠ |
Starts a client using commonly known robot addresses for the specified team. |
NT_StartDSClient⚠ |
Starts requesting server address from Driver Station. This connects to the Driver Station running on localhost to obtain the server IP address. |
NT_StartServer⚠ |
Starts a server using the specified filename, listening address, and port. |
NT_StopClient⚠ |
Stops the client if it is running. @param inst instance handle |
NT_StopDSClient⚠ |
Stops requesting server address from Driver Station. @param inst instance handle |
NT_StopServer⚠ |
Stops the server if it is running. @param inst instance handle |
NT_UnpackRpcDefinition⚠ |
Unpack a RPC version 1 definition. This can be used for introspection or validation. @param packed raw packed bytes @param packed_len length of packed in bytes @param def RPC version 1 definition (output) @return True if successfully unpacked, false otherwise. |
NT_UnpackRpcValues⚠ |
Unpack RPC values as required for RPC version 1 definition messages. @param packed raw packed bytes @param packed_len length of packed in bytes @param types array of data types (as provided in the RPC definition) @param types_len length of types @return Array of NT_Value's. |
NT_WaitForConnectionListenerQueue⚠ |
Wait for the connection listener queue to be empty. This is primarily useful for deterministic testing. This blocks until either the connection listener queue is empty (e.g. there are no more events that need to be passed along to callbacks or poll queues) or the timeout expires. @param inst instance handle @param timeout timeout, in seconds. Set to 0 for non-blocking behavior, or a negative value to block indefinitely @return False if timed out, otherwise true. |
NT_WaitForEntryListenerQueue⚠ |
Wait for the entry listener queue to be empty. This is primarily useful for deterministic testing. This blocks until either the entry listener queue is empty (e.g. there are no more events that need to be passed along to callbacks or poll queues) or the timeout expires. @param inst instance handle @param timeout timeout, in seconds. Set to 0 for non-blocking behavior, or a negative value to block indefinitely @return False if timed out, otherwise true. |
NT_WaitForLoggerQueue⚠ |
Wait for the incoming log event queue to be empty. This is primarily useful for deterministic testing. This blocks until either the log event queue is empty (e.g. there are no more events that need to be passed along to callbacks or poll queues) or the timeout expires. @param inst instance handle @param timeout timeout, in seconds. Set to 0 for non-blocking behavior, or a negative value to block indefinitely @return False if timed out, otherwise true. |
NT_WaitForRpcCallQueue⚠ |
Wait for the incoming RPC call queue to be empty. This is primarily useful for deterministic testing. This blocks until either the RPC call queue is empty (e.g. there are no more events that need to be passed along to callbacks or poll queues) or the timeout expires. @param inst instance handle @param timeout timeout, in seconds. Set to 0 for non-blocking behavior, or a negative value to block indefinitely @return False if timed out, otherwise true. |
Type Definitions
NT_Bool |
Typedefs |
NT_ConnectionListener | |
NT_ConnectionListenerCallback |
Connection listener callback function. Called when a network connection is made or lost. |
NT_ConnectionListenerPoller | |
NT_Entry | |
NT_EntryFlags |
NetworkTables entry flags. |
NT_EntryListener | |
NT_EntryListenerCallback |
Entry listener callback function. Called when a key-value pair is changed. |
NT_EntryListenerPoller | |
NT_Handle | |
NT_Inst | |
NT_LogFunc |
Log function. @param data data pointer passed to NT_AddLogger() @param msg message information |
NT_LogLevel |
NetworkTables logging levels. |
NT_Logger | |
NT_LoggerPoller | |
NT_NetworkMode |
Client/server modes |
NT_NotifyKind |
NetworkTables notifier kinds. |
NT_RpcCall | |
NT_RpcCallPoller | |
NT_RpcCallback |
Remote Procedure Call (RPC) callback function. @param data data pointer provided to NT_CreateRpc() @param call call information Note: NT_PostRpcResponse() must be called by the callback to provide a response to the call. |
NT_Type |
NetworkTables data types. |
int_fast16_t | |
int_fast32_t | |
int_fast64_t | |
int_fast8_t | |
int_least16_t | |
int_least32_t | |
int_least64_t | |
int_least8_t | |
intmax_t | |
uint_fast16_t | |
uint_fast32_t | |
uint_fast64_t | |
uint_fast8_t | |
uint_least16_t | |
uint_least32_t | |
uint_least64_t | |
uint_least8_t | |
uintmax_t | |
wchar_t |
Unions
NT_Value__bindgen_ty_1 |