VisionServer  v2.1.1-1-g21dc5465
FRC vision library
config.cpp File Reference
#include "config.h"
#include <wpi/raw_ostream.h>
#include <wpi/MemoryBuffer.h>
#include <wpi/StringExtras.h>
#include <networktables/NetworkTableInstance.h>
#include "cpp-tools/src/resources.h"
+ Include dependency graph for config.cpp:

Go to the source code of this file.

Functions

bool loadJson (wpi::json &j, const char *file)
 
bool initNT (const char *file)
 
bool initSimNT (const char *sim_ip)
 
bool createCameras (std::vector< VisionCamera > &cameras, const char *file)
 
bool createCameras (std::vector< VisionCamera > &cameras, CalibList calibrations, const char *file)
 
bool readConfig (std::vector< VisionCamera > &cameras, const char *file)
 

Function Documentation

◆ loadJson()

bool loadJson ( wpi::json &  j,
const char *  file 
)

Definition at line 11 of file config.cpp.

◆ initNT()

bool initNT ( const char *  file)

Definition at line 30 of file config.cpp.

◆ initSimNT()

bool initSimNT ( const char *  sim_ip)

Definition at line 73 of file config.cpp.

◆ createCameras() [1/2]

bool createCameras ( std::vector< VisionCamera > &  cameras,
const char *  file 
)

Definition at line 86 of file config.cpp.

◆ createCameras() [2/2]

bool createCameras ( std::vector< VisionCamera > &  cameras,
CalibList  calibrations,
const char *  file 
)

Definition at line 122 of file config.cpp.

◆ readConfig()

bool readConfig ( std::vector< VisionCamera > &  cameras,
const char *  file = FRC_CONFIG 
)

Reads a config json and creates appropriate VisionCameras in the supplied vector

Parameters
camerasThe output vector in which cameras will be created
fileThe path to the json, default is "/boot/frc.json"
Returns
false if there was an error

Definition at line 182 of file config.cpp.