MCPcopy Create free account
hub / github.com/comaps/comaps / get_value

Function get_value

libs/indexer/classificator.cpp:145–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145uint8_t get_value(uint32_t type, uint8_t level)
146{
147 level *= bits_count; // level to bits;
148
149 uint32_t const m = uint32_t(max_value) << level;
150 type &= m; // leave only our bits
151
152 type = type >> level; // move to start
153 ASSERT(type <= max_value, ("invalid output value", type));
154
155 return uint8_t(type); // conversion
156}
157
158uint8_t get_control_level(uint32_t type)
159{

Callers 1

GetValueFunction · 0.85

Calls 1

ASSERTFunction · 0.85

Tested by

no test coverage detected