Commit 44ffd93a authored by Jan Koniarik's avatar Jan Koniarik
Browse files

changed the way protocol message formats

parent 95f22c6e
Pipeline #100135 failed with stage
in 1 minute and 58 seconds
#ifdef EMLABCPP_USE_STREAMS
#include "emlabcpp/iterators/numeric.h"
#include "emlabcpp/protocol/base.h"
#include "emlabcpp/protocol/register_map.h"
#include <iomanip>
#ifdef EMLABCPP_USE_MAGIC_ENUM
#include <magic_enum.hpp>
......@@ -18,9 +21,11 @@ template < std::size_t N >
inline std::ostream& operator<<( std::ostream& os, const protocol_message< N >& msg )
{
std::ios_base::fmtflags f( os.flags() );
os << std::hex;
os << std::hex << std::setfill( '0' ) << std::setw( 2 );
std::string l = "";
for ( uint8_t v : msg ) {
os << int( v );
os << l << int( v );
l = " ";
}
os.flags( f );
return os;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment