Struct nt::NetworkTables [−][src]
pub struct NetworkTables { /* fields omitted */ }
Core struct representing a connection to a NetworkTables server
Methods
impl NetworkTables
[src]
impl NetworkTables
pub fn connect(client_name: &'static str, target: SocketAddr) -> NetworkTables
[src]
pub fn connect(client_name: &'static str, target: SocketAddr) -> NetworkTables
Performs the initial connection process to the given target
.
Assumes that target is a valid, running NetworkTables server.
Returns a new NetworkTables
once a connection has been established.
pub fn entries(&self) -> HashMap<u16, EntryData>
[src]
pub fn entries(&self) -> HashMap<u16, EntryData>
Returns a clone of all the entries this client currently knows of.
pub fn get_entry(&self, id: u16) -> EntryData
[src]
pub fn get_entry(&self, id: u16) -> EntryData
Returns a clone of the entry with id id
pub fn create_entry(&mut self, data: EntryData)
[src]
pub fn create_entry(&mut self, data: EntryData)
Creates a new entry with data contained in data
.
The new entry will be accessible through self.entries()
This function will time out after 3 seconds if confirmation the value was written has not been received.
pub fn delete_entry(&mut self, id: u16)
[src]
pub fn delete_entry(&mut self, id: u16)
Deletes the entry with id id
from the server the client is currently connected to
Must be used with care. Cannot be undone
pub fn delete_all_entries(&mut self)
[src]
pub fn delete_all_entries(&mut self)
Deletes all entries from the server this client is currently connected to Must be used with care. Cannot be undone
pub fn update_entry(&mut self, id: u16, new_value: EntryValue)
[src]
pub fn update_entry(&mut self, id: u16, new_value: EntryValue)
Updates the value of the entry with id id
.
The updated value of the entry will match new_value
pub fn update_entry_flags(&mut self, id: u16, flags: u8)
[src]
pub fn update_entry_flags(&mut self, id: u16, flags: u8)
Updates the flags of the entry with id id
.
pub fn connected(&self) -> bool
[src]
pub fn connected(&self) -> bool
Checks if the client is actively connected to an NT server true if the 3-way handshake has been completed, and the client is fully synchronized
Auto Trait Implementations
impl Send for NetworkTables
impl Send for NetworkTables
impl Sync for NetworkTables
impl Sync for NetworkTables