ActiveLib
Loading...
Searching...
No Matches
Public Member Functions | List of all members
active::serialise::HexTransport Class Reference

#include <HexTransport.h>

Public Member Functions

bool send (const utility::BufferIn &source, const utility::BufferOut &destination, utility::Memory::sizeOption howMany=std::nullopt) const
 
bool receive (const utility::BufferOut &destination, const utility::BufferIn &source, utility::Memory::sizeOption howMany=std::nullopt) const
 
std::optional< uint32_t > receive (const utility::String &source) const
 

Detailed Description

A serialisation tool class to send/receive data encoded as hex characters

Member Function Documentation

◆ receive() [1/2]

bool HexTransport::receive ( const utility::BufferOut & destination,
const utility::BufferIn & source,
utility::Memory::sizeOption howMany = std::nullopt ) const

Receive specified data from a stream of hex characters

Parameters
destinationThe buffer to receive the data
sourceThe hex stream source
howManyThe number of bytes to import (nullopt = to eof)
Returns
True if the import was successful
Here is the call graph for this function:
Here is the caller graph for this function:

◆ receive() [2/2]

std::optional< uint32_t > HexTransport::receive ( const utility::String & source) const

Receive an integer from the specified hex chars

Parameters
sourceThe hex stream source
Returns
The received integer (nullopt on failure)
Here is the call graph for this function:

◆ send()

bool HexTransport::send ( const utility::BufferIn & source,
const utility::BufferOut & destination,
utility::Memory::sizeOption howMany = std::nullopt ) const

Export specified data as hex chars

Parameters
sourceThe data to send (NB: binary data is assumed to be big-endian - prepare the source accordingly)
destinationThe destination buffer for the exported hex chars
howManyThe number of bytes to export (nullopt = to eof)
Returns
True if no errors occurred
Here is the call graph for this function:

The documentation for this class was generated from the following files: