25#ifndef ETL_FRAME_CHECK_SEQUENCE_INCLUDED
26#define ETL_FRAME_CHECK_SEQUENCE_INCLUDED
29#include "static_assert.h"
36ETL_STATIC_ASSERT(ETL_USING_8BIT_TYPES,
"This file does not currently support targets with no 8bit type");
43 namespace private_frame_check_sequence
49 template <
typename TFrame_Check_Sequence>
96 template <
typename TPolicy>
102 typedef typename policy_type::value_type value_type;
120 template<
typename TIterator>
123 ETL_STATIC_ASSERT(
sizeof(
typename etl::iterator_traits<TIterator>::value_type) == 1,
"Type not supported");
134 frame_check = policy.initial();
142 template<
typename TIterator>
145 ETL_STATIC_ASSERT(
sizeof(
typename etl::iterator_traits<TIterator>::value_type) == 1,
"Type not supported");
149 frame_check = policy.add(frame_check, *
begin);
159 frame_check = policy.add(frame_check,
value_);
167 return policy.final(frame_check);
173 operator value_type ()
const
175 return policy.final(frame_check);
188 value_type frame_check;
Definition frame_check_sequence.h:51
void reset()
Resets the FCS to the initial state.
Definition frame_check_sequence.h:132
add_insert_iterator input()
Gets an add_insert_iterator for input.
Definition frame_check_sequence.h:181
void add(uint8_t value_)
Definition frame_check_sequence.h:157
frame_check_sequence(TIterator begin, const TIterator end)
Definition frame_check_sequence.h:121
void add(TIterator begin, const TIterator end)
Definition frame_check_sequence.h:143
frame_check_sequence()
Default constructor.
Definition frame_check_sequence.h:110
value_type value() const
Gets the FCS value.
Definition frame_check_sequence.h:165
Definition frame_check_sequence.h:98
is_unsigned
Definition type_traits_generator.h:1021
bitset_ext
Definition absolute.h:38
ETL_CONSTEXPR TContainer::iterator begin(TContainer &container)
Definition iterator.h:962
ETL_CONSTEXPR TContainer::iterator end(TContainer &container)
Definition iterator.h:992
iterator
Definition iterator.h:399
pair holds two objects of arbitrary type
Definition utility.h:164