15#include <pybind11/pybind11.h>
16#include <pybind11/stl.h>
22namespace py = pybind11;
28std::map<std::string, FixedLengthCommandType>
swap_commands_map(
const std::map<FixedLengthCommandType, std::string>& command_map)
30 std::map<std::string, FixedLengthCommandType> swapped_map;
31 for (
auto& cmd: command_map) {
32 swapped_map.emplace( std::pair<std::string,FixedLengthCommandType>(cmd.second, cmd.first) );
40 py::enum_<BoardType>(m,
"BoardType")
41 .value(
"kBoardFMC", kBoardFMC)
42 .value(
"kBoardSim", kBoardSim)
43 .value(
"kBoardPC059", kBoardPC059)
44 .value(
"kBoardMicrozed", kBoardMicrozed)
45 .value(
"kBoardTLU", kBoardTLU)
46 .value(
"kBoardFIB", kBoardFIB)
47 .value(
"kBoardMIB", kBoardMIB)
48 .value(
"kBoardPC069", kBoardPC069)
49 .value(
"kBoardGIB", kBoardGIB)
53 py::enum_<BoardRevision>(m,
"BoardRevision")
54 .value(
"kFMCRev1", kFMCRev1)
55 .value(
"kFMCRev2", kFMCRev2)
56 .value(
"kFMCRev3", kFMCRev3)
57 .value(
"kFMCRev4", kFMCRev4)
58 .value(
"kPC059Rev1", kPC059Rev1)
59 .value(
"kTLURev1", kTLURev1)
60 .value(
"kSIMRev1", kSIMRev1)
61 .value(
"kFIBRev1", kFIBRev1)
62 .value(
"kMIBRev1", kMIBRev1)
67 .value(
"kGIBRev1", kGIBRev1)
68 .value(
"kFIBRev2", kFIBRev2)
71 py::enum_<CarrierType>(m,
"CarrierType")
72 .value(
"kCarrierEnclustraA35", kCarrierEnclustraA35)
73 .value(
"kCarrierKC705", kCarrierKC705)
74 .value(
"kCarrierMicrozed", kCarrierMicrozed)
77 .value(
"kCarrierNexusVideo", kCarrierNexusVideo)
78 .value(
"kCarrierTrenzTE0712", kCarrierTrenzTE0712)
82 py::enum_<DesignType>(m,
"DesignType")
83 .value(
"kDesignMaster", kDesignMaster)
84 .value(
"kDesignOuroborosSim", kDesignOuroborosSim)
85 .value(
"kDesignOuroboros", kDesignOuroboros)
86 .value(
"kDesignTest", kDesignTest)
87 .value(
"kDesignEndpoint", kDesignEndpoint)
88 .value(
"kDesignFanout", kDesignFanout)
89 .value(
"kDesignOverlord", kDesignOverlord)
91 .value(
"kDesignChronos", kDesignChronos)
92 .value(
"kDesignBoreas", kDesignBoreas)
93 .value(
"kDesignKerberos", kDesignKerberos)
94 .value(
"kDesignGaia", kDesignGaia)
95 .value(
"kDesignCharon", kDesignCharon)
96 .value(
"kDesignHades", kDesignHades)
100 py::enum_<FixedLengthCommandType>(m,
"FixedLengthCommandType")
118 py::enum_<ClockSource>(m,
"ClockSource")
119 .value(
"kFreeRun", kFreeRun)
120 .value(
"kInput0", kInput0)
121 .value(
"kInput1", kInput1)
122 .value(
"kInput2", kInput2)
123 .value(
"kInput3", kInput3)
126 py::enum_<TimestampSource>(m,
"TimestampSource")
127 .value(
"kUpstream", kUpstream)
128 .value(
"kSoftware", kSoftware)
132 py::enum_<IRIGEpoch>(m,
"IRIGEpoch")
134 .value(
"kUNIX",
kUNIX)
static std::map< uint8_t, std::string > get_endpoint_state_map()
Get the states map.
static constexpr size_t hsi_buffer_event_words_number
static const std::vector< BoardType > & get_library_supported_boards()
static const std::map< std::string, std::string > & get_clock_config_map()
static const std::vector< DesignType > & get_library_supported_designs()
static const std::map< uint64_t, BoardRevision > & get_board_uid_revision_map()
static const std::map< DesignType, std::string > & get_design_type_map()
static const std::map< BoardRevision, std::string > & get_board_revision_map()
static const std::map< BoardType, std::string > & get_board_type_map()
static const std::map< CarrierType, std::string > & get_carrier_type_map()
static const uint32_t required_major_firmware_version
void register_definitions(py::module &m)
std::map< std::string, FixedLengthCommandType > swap_commands_map(const std::map< FixedLengthCommandType, std::string > &command_map)