ArPiRobot-CoreLib C++
C++ library for ArPiRobot robots
Static Public Member Functions | Friends | List of all members
arpirobot::NetworkTable Class Reference

#include <arpirobot/core/network/NetworkTable.hpp>

Static Public Member Functions

static void set (std::string key, std::string value)
 
static std::string get (std::string key)
 
static bool has (std::string key)
 
static bool changed (std::string key)
 

Friends

class NetworkManager
 

Detailed Description

Helper class used to manage network table key/value pairs

Member Function Documentation

◆ changed()

static bool arpirobot::NetworkTable::changed ( std::string  key)
static

Check if a key's value has changed since last call to get (only due to drive station)

Parameters
keyKey to check
Returns
true If the key has been changed by the drive station since get was last called
false If the key has not been changed

◆ get()

static std::string arpirobot::NetworkTable::get ( std::string  key)
static

Get the value for a key/value pair

Parameters
keyThe key to get the associated value with
Returns
The value associated with the given key. If the key does not exist an empty string is returned.

◆ has()

static bool arpirobot::NetworkTable::has ( std::string  key)
static

Check if a key has a value

Parameters
keyThe key to check for a value associated with
Returns
true if a value exists for the given key, else false

◆ set()

static void arpirobot::NetworkTable::set ( std::string  key,
std::string  value 
)
static

Sets a given key/value pair. If the key does not exist it will be created. Else the value will be updated.

Parameters
keyThe key for the pair
valueThe value for the pair

The documentation for this class was generated from the following file: