31template<
typename T,
typename =
void>
32struct has_cycles_init : std::false_type {};
34struct has_cycles_init<T, std::void_t<decltype(T::init())>> : std::true_type {};
36template<
typename T,
typename =
void>
37struct has_cycles_read : std::false_type {};
39struct has_cycles_read<T, std::void_t<decltype(T::read())>> : std::is_same<decltype(T::read()), uint32_t> {};
41template<
typename T,
typename =
void>
42struct has_cycles_rate : std::false_type {};
44struct has_cycles_rate<T, std::void_t<decltype(T::rate())>> : std::is_same<decltype(T::rate()), uint32_t> {};
49template<
typename Port>
51 static_assert(detail::has_cycles_init<Port>::value,
"SBL ERROR: cycle port missing init().\n"
52 "Required: static void init()");
53 static_assert(detail::has_cycles_read<Port>::value,
"SBL ERROR: cycle port missing read().\n"
54 "Required: static uint32_t read()");
55 static_assert(detail::has_cycles_rate<Port>::value,
"SBL ERROR: cycle port missing rate().\n"
56 "Required: static constexpr uint32_t rate()");
57 static constexpr bool value = detail::has_cycles_init<Port>::value && detail::has_cycles_read<Port>::value &&
58 detail::has_cycles_rate<Port>::value;
61template<
typename Port>