Veethree D7 SDK
Loading...
Searching...
No Matches
i420_common.h
Go to the documentation of this file.
1
5#ifndef I420_COMMON_H
6#define I420_COMMON_H
7
8#include <cstdint>
9#include <map>
10
11namespace vsdk::io {
12
17
33
35
36} // namespace vsdk::io
37
38#ifndef DOXYGEN_SKIP_THIS
39
40#include <utils/fmt_wrapper.h>
41
42template<>
43struct fmt::formatter<vsdk::io::i420_input> : fmt::formatter<std::string> {
44 auto format(vsdk::io::i420_input input, format_context& ctx) const -> format_context::iterator
45 {
46 using namespace vsdk::io;
47
48 static std::map<i420_input, std::string> const inputs = {
49 { i420_input::sns0, "sns0" }, { i420_input::sns1, "sns1" },
50 { i420_input::sns2, "sns2" }, { i420_input::sns3, "sns3" },
51 { i420_input::sns4, "sns4" }, { i420_input::sns5, "sns5" },
52 { i420_input::cal_1v65, "cal_1v65" }, { i420_input::cal_0v15, "cal_0v15" },
53 { i420_input::vsns_main, "vsns_main" }, { i420_input::isns_main, "isns_main" },
54 };
55 std::string s;
56 auto it = inputs.find(input);
57 s = it == inputs.end() ? "unknown" : it->second;
58 return formatter<std::string>::format(fmt::format("i420-input:{}", s), ctx);
59 }
60};
61
62#endif // DOXYGEN_SKIP_THIS
63
64#endif // I420_COMMON_H
Include this file to your file so you have access to fmtlib header-only implementation.
i420_input
The sense input names.
Definition i420_common.h:21
@ sns4
input 4 in mA
Definition i420_common.h:26
@ vsns_main
board input voltage in mV (value fluctuates)
Definition i420_common.h:30
@ sns2
input 2 in mA
Definition i420_common.h:24
@ cal_1v65
input calibration 1650 mV
Definition i420_common.h:28
@ sns1
input 1 in mA
Definition i420_common.h:23
@ sns3
input 3 in mA
Definition i420_common.h:25
@ cal_0v15
input calibration 150 mV
Definition i420_common.h:29
@ sns0
input 0 in mA
Definition i420_common.h:22
@ sns5
input 5 in mA
Definition i420_common.h:27
@ isns_main
board input current in mA (value fluctuates)
Definition i420_common.h:31
Any entities that belong to the IO library.
Any entities that belong to the Veethree SDK libraries.
Definition can_adapter.h:11