VisionServer  v2.1.1-1-g21dc5465
FRC vision library
config.h File Reference
#include <vector>
#include <string>
#include <wpi/json.h>
#include "visioncamera.h"
#include "calib.h"
+ Include dependency graph for config.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FRC_CONFIG   "/boot/frc.json"
 
#define NT_CLIENT_VERSION   4
 

Functions

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

Macro Definition Documentation

◆ FRC_CONFIG

#define FRC_CONFIG   "/boot/frc.json"

Definition at line 11 of file config.h.

◆ NT_CLIENT_VERSION

#define NT_CLIENT_VERSION   4

Definition at line 13 of file config.h.

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 = FRC_CONFIG)

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 = FRC_CONFIG 
)

Definition at line 86 of file config.cpp.

◆ createCameras() [2/2]

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

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.