summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-12-02 15:37:21 -0600
committerMatt Spinler <spinler@us.ibm.com>2019-12-09 13:47:57 -0600
commit86c703629d8d70434b7d9cc642578f70a78818bc (patch)
tree838dbaeae96d1021321d5a7886a01c7e8f0345cd /extensions
parent29d18c116394b5d6b2a57876a4cac6ce86e7716a (diff)
downloadphosphor-logging-86c703629d8d70434b7d9cc642578f70a78818bc.tar.gz
phosphor-logging-86c703629d8d70434b7d9cc642578f70a78818bc.zip
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
Diffstat (limited to 'extensions')
-rw-r--r--extensions/openpower-pels/bcd_time.hpp15
1 files changed, 15 insertions, 0 deletions
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 @@ struct BCDTime
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;
OpenPOWER on IntegriCloud