TSDuck Version 3.15-955 (TSDuck - The MPEG Transport Stream Toolkit)
tsBCD.h File Reference

Binary Coded Decimal utilities. More...

Namespaces

 ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Functions

void ts::BCDToString (std::string &str, const uint8_t *bcd, size_t bcd_count, int decimal)
 Decode a string representation of a variable-length Binary Coded Decimal (BCD) encoded integer. More...
 
int ts::DecodeBCD (uint8_t b)
 Return the decimal value of a Binary Coded Decimal (BCD) encoded byte. More...
 
uint32_t ts::DecodeBCD (const uint8_t *bcd, size_t bcd_count)
 Return the decimal value of a Binary Coded Decimal (BCD) encoded string. More...
 
uint8_t ts::EncodeBCD (int i)
 Return a one-byte Binary Coded Decimal (BCD) representation of an integer. More...
 
void ts::EncodeBCD (uint8_t *bcd, size_t bcd_count, uint32_t value)
 Encode a Binary Coded Decimal (BCD) string. More...
 
bool ts::IsValidBCD (uint8_t b)
 Check if a byte is a valid Binary Coded Decimal (BCD) value. More...
 

Detailed Description

Binary Coded Decimal utilities.