VisionServer  v2.1.1-1-g21dc5465
FRC vision library
config.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#include <string>
5
6#include <wpi/json.h>
7
8#include "visioncamera.h"
9#include "calib.h"
10
11#define FRC_CONFIG "/boot/frc.json"
12#ifndef NT_CLIENT_VERSION
13#define NT_CLIENT_VERSION 4
14#endif
15
16bool loadJson(wpi::json&, const char* file);
17
18// template<typename... tmpl_T>
19// bool searchCalibs(const wpi::json&, CalibMap_<tmpl_T...>&);
20
21bool initNT(const char* file = FRC_CONFIG);
22bool initSimNT(const char* sim_ip);
23bool createCameras(std::vector<VisionCamera>& cameras, const char* file = FRC_CONFIG);
24bool createCameras(std::vector<VisionCamera>& cameras, CalibList calibrations, const char* file = FRC_CONFIG);
25
26
27// Leagacy loader
34bool readConfig(std::vector<VisionCamera>& cameras, const char* file = FRC_CONFIG);
#define FRC_CONFIG
Definition: config.h:11
bool loadJson(wpi::json &, const char *file)
Definition: config.cpp:11
bool readConfig(std::vector< VisionCamera > &cameras, const char *file=FRC_CONFIG)
Definition: config.cpp:182
bool initNT(const char *file=FRC_CONFIG)
Definition: config.cpp:30
bool createCameras(std::vector< VisionCamera > &cameras, const char *file=FRC_CONFIG)
Definition: config.cpp:86
bool initSimNT(const char *sim_ip)
Definition: config.cpp:73