Merge PR #4: Add assign operator for zigbee security configuration

This commit is contained in:
Jenkins nymea 2020-01-16 00:39:09 +01:00
commit 003985b8d0
2 changed files with 10 additions and 0 deletions

View File

@ -8,6 +8,7 @@ ZigbeeSecurityConfiguration::ZigbeeSecurityConfiguration()
ZigbeeSecurityConfiguration::ZigbeeSecurityConfiguration(const ZigbeeSecurityConfiguration &other)
{
m_networkKey = other.networkKey();
m_zigbeeSecurityMode = other.zigbeeSecurityMode();
m_globalTrustCenterLinkKey = other.networkKey();
}
@ -48,6 +49,14 @@ void ZigbeeSecurityConfiguration::clear()
m_globalTrustCenterLinkKey = "5A6967426565416C6C69616E63653039";
}
ZigbeeSecurityConfiguration &ZigbeeSecurityConfiguration::operator=(const ZigbeeSecurityConfiguration &other)
{
m_networkKey = other.networkKey();
m_zigbeeSecurityMode = other.zigbeeSecurityMode();
m_globalTrustCenterLinkKey = other.globalTrustCenterLinkKey();
return *this;
}
bool ZigbeeSecurityConfiguration::operator==(const ZigbeeSecurityConfiguration &other) const
{
return m_networkKey == other.networkKey() && m_globalTrustCenterLinkKey == other.globalTrustCenterLinkKey() && m_zigbeeSecurityMode == other.zigbeeSecurityMode();

View File

@ -26,6 +26,7 @@ public:
void clear();
ZigbeeSecurityConfiguration &operator=(const ZigbeeSecurityConfiguration &other);
bool operator==(const ZigbeeSecurityConfiguration &other) const;
bool operator!=(const ZigbeeSecurityConfiguration &other) const;