PEL: Add constructors to BCDTime
Add constructors to set all members to zero initially or pass
them all in.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ic28cee19014c739f331fd0498229dfb503b0df88
diff --git a/extensions/openpower-pels/bcd_time.hpp b/extensions/openpower-pels/bcd_time.hpp
index 72c5755..3a805a5 100644
--- a/extensions/openpower-pels/bcd_time.hpp
+++ b/extensions/openpower-pels/bcd_time.hpp
@@ -22,6 +22,21 @@
uint8_t seconds;
uint8_t hundredths;
+ BCDTime() :
+ yearMSB(0), yearLSB(0), month(0), day(0), hour(0), minutes(0),
+ seconds(0), hundredths(0)
+ {
+ }
+
+ BCDTime(uint8_t yearMSB, uint8_t yearLSB, uint8_t month, uint8_t day,
+ uint8_t hour, uint8_t minutes, uint8_t seconds,
+ uint8_t hundredths) :
+ yearMSB(yearMSB),
+ yearLSB(yearLSB), month(month), day(day), hour(hour), minutes(minutes),
+ seconds(seconds), hundredths(hundredths)
+ {
+ }
+
bool operator==(const BCDTime& right) const;
bool operator!=(const BCDTime& right) const;