TSDuck Version 3.20-1627 (TSDuck - The MPEG Transport Stream Toolkit)
tsBCD.h File Reference

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, bool left_justified=true)
 Decode a string representation of a variable-length Binary Coded Decimal (BCD) encoded integer. More...
 
uint32_t ts::DecodeBCD (const uint8_t *bcd, size_t bcd_count, bool left_justified=true)
 Return the decimal value of a Binary Coded Decimal (BCD) encoded string. More...
 
int ts::DecodeBCD (uint8_t b)
 Return the decimal value of a Binary Coded Decimal (BCD) encoded byte. 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, bool left_justified=true, uint8_t pad_nibble=0)
 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