HF-FDO2 Driver 0.1.0-dev
UART driver for PyroScience FDO2-G2 (data sheet v5 ยง4: #MOXY, #MRAW, #VERS)
Loading...
Searching...
No Matches
fdo2::detail Namespace Reference

Functions

bool AppendCmd (char *buf, std::size_t cap, std::string_view cmd) noexcept
 
void StripOptionalModbusCrcSuffix (char *line) noexcept
 If CRC is enabled, response is ... : <decimal>\\r. Strip from last " :".
 
template<typename UartT >
DriverError ReadAsciiLine (UartT &uart, char *buf, std::size_t cap, uint32_t timeout_ms) noexcept
 
const char * SkipWs (const char *p) noexcept
 
DriverError Tokenize (const char *line, char *store, std::size_t store_cap, const char *tokens[], std::size_t max_tokens, std::size_t *out_count) noexcept
 
int32_t ParseI32 (const char *s, bool *ok) noexcept
 
uint32_t ParseU32 (const char *s, bool *ok) noexcept
 
uint64_t ParseU64 (const char *s, bool *ok) noexcept
 
bool IsErroHeader (const char *tok0) noexcept
 

Function Documentation

◆ AppendCmd()

bool fdo2::detail::AppendCmd ( char * buf,
std::size_t cap,
std::string_view cmd )
inlinenoexcept

◆ IsErroHeader()

bool fdo2::detail::IsErroHeader ( const char * tok0)
inlinenoexcept

◆ ParseI32()

int32_t fdo2::detail::ParseI32 ( const char * s,
bool * ok )
inlinenoexcept

◆ ParseU32()

uint32_t fdo2::detail::ParseU32 ( const char * s,
bool * ok )
inlinenoexcept

◆ ParseU64()

uint64_t fdo2::detail::ParseU64 ( const char * s,
bool * ok )
inlinenoexcept

◆ ReadAsciiLine()

template<typename UartT >
DriverError fdo2::detail::ReadAsciiLine ( UartT & uart,
char * buf,
std::size_t cap,
uint32_t timeout_ms )
inlinenoexcept

◆ SkipWs()

const char * fdo2::detail::SkipWs ( const char * p)
inlinenoexcept

◆ StripOptionalModbusCrcSuffix()

void fdo2::detail::StripOptionalModbusCrcSuffix ( char * line)
inlinenoexcept

If CRC is enabled, response is ... : <decimal>\\r. Strip from last " :".

◆ Tokenize()

DriverError fdo2::detail::Tokenize ( const char * line,
char * store,
std::size_t store_cap,
const char * tokens[],
std::size_t max_tokens,
std::size_t * out_count )
inlinenoexcept