fusion_engine_framer.cc File Reference

Detailed Description

FusionEngine message framer.

Definition in file fusion_engine_framer.cc.

Go to the source code of this file.

Classes

class  HexPrintableIntegerInst< T >
 

Macros

#define P1_VMODULE_NAME   fusion_engine_framer
 

Functions

template<typename T >
HexPrintableIntegerInst< T > HexPrintableInteger (T value)
 Wrap an integer so it will be output to a stream as its hex representation. More...
 
template<typename T >
p1_ostreamoperator<< (p1_ostream &stream, const HexPrintableIntegerInst< T > &obj)
 

Macro Definition Documentation

◆ P1_VMODULE_NAME

#define P1_VMODULE_NAME   fusion_engine_framer

Definition at line 7 of file fusion_engine_framer.cc.

Function Documentation

◆ HexPrintableInteger()

template<typename T >
HexPrintableIntegerInst<T> HexPrintableInteger ( value)

Wrap an integer so it will be output to a stream as its hex representation.

For example:

std::cout << HexPrintableValue((int16_t)-255) << std::endl;
std::cout << HexPrintableValue((uint32_t)255) << std::endl;
std::cout << HexPrintableValue((uint8_t)48) << std::endl;

generates the following output:

0xff01
0x000000ff
0x30 ('0')
Template Parameters
TThe type of the value parameter (inferred implicitly).
Parameters
valueThe integer value to wrap.
Returns
The wrapped integer that can be used in an p1_ostream.

Definition at line 90 of file fusion_engine_framer.cc.

◆ operator<<()

template<typename T >
p1_ostream& operator<< ( p1_ostream stream,
const HexPrintableIntegerInst< T > &  obj 
)

Definition at line 38 of file fusion_engine_framer.cc.