class::sys::SerialNumber

class sys::SerialNumber
  : public api::InfoObject

The SerialNumber class holds a value for an MCU serial number.

Stratify OS supports reading the serial number directly from the chip. This class makes doing so as simply as possible.

Summary

SerialNumber()

[SerialNumber](#classsys_1_1_serial_number_1a62eba3cd83bed4671760fb43b2d1a301)(  

const u32 serial_number
)

[SerialNumber](#classsys_1_1_serial_number_1a4b1b6a1c491d09d958b23fe9b97a3b93)(  

const mcu_sn_t serial_number
)

SerialNumber(

const var::ConstString & str
)

u32 at(

u32 idx
) const

bool is_valid() const

bool operator==(

const SerialNumber & serial_number
)

var::String to_string() const

static SerialNumber from_string(

const var::ConstString & str
)

Members

SerialNumber()

Constructs an empty serial number.


SerialNumber(

const u32 serial_number
)

Constructs a serial number for an array of u32 values.


SerialNumber(

const mcu_sn_t serial_number
)

Constructs a serial number from an mcu_sn_t.


SerialNumber(

const var::ConstString & str
)

Constructs this serial number from str.


u32 at(

u32 idx
) const

Returns the u32 section of the serial number specified by idx.


bool is_valid() const

Returns true if a valid serial number is held.


bool operator==(

const SerialNumber & serial_number
)

Compares this strig to serial_number.


var::String to_string() const

Converts the serial number to a string.


static SerialNumber from_string(

const var::ConstString & str
)

Returns a serial number object from a string type.


X

Thanks for Coming!

Subscribe to news and updates