mirror of
https://github.com/Fishwaldo/qt-openzwave.git
synced 2025-03-16 03:51:25 +00:00
update to QT types
This commit is contained in:
parent
65d3860ef9
commit
e128571e19
16 changed files with 345 additions and 344 deletions
|
@ -8,7 +8,7 @@ QTOpenZwave::QTOpenZwave
|
|||
QObject (parent),
|
||||
m_manager(nullptr)
|
||||
{
|
||||
qRegisterMetaType<uint32_t>("uint32_t");
|
||||
//qRegisterMetaType<uint32_t>("uint32_t");
|
||||
qRegisterMetaType<QTOZW_ValueIDList>("QTOZW_ValueIDList");
|
||||
qRegisterMetaTypeStreamOperators<QTOZW_ValueIDList>("QTOZW_ValueIDList");
|
||||
qRegisterMetaType<QTOZW_ValueIDBitSet>("QTOZW_ValueIDBitSet");
|
||||
|
|
|
@ -73,7 +73,7 @@ QVariant QTOZW_Associations::headerData(int section, Qt::Orientation orientation
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant QTOZW_Associations::getassocationData(uint8_t _node, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance, associationColumns _column) {
|
||||
QVariant QTOZW_Associations::getassocationData(quint8 _node, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance, associationColumns _column) {
|
||||
int32_t row = this->getassocationRow(_node, _groupIDX, _targetNodeId, _targetNodeInstance);
|
||||
if (row >= 0)
|
||||
return this->m_associationData[row][_column];
|
||||
|
@ -81,7 +81,7 @@ QVariant QTOZW_Associations::getassocationData(uint8_t _node, uint8_t _groupIDX,
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
int32_t QTOZW_Associations::getassocationRow(uint8_t _node, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance) {
|
||||
int32_t QTOZW_Associations::getassocationRow(quint8 _node, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance) {
|
||||
if (this->m_associationData.count() == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ QTOZW_Associations_internal::QTOZW_Associations_internal(QObject *parent)
|
|||
|
||||
}
|
||||
|
||||
void QTOZW_Associations_internal::addAssociation(uint8_t _nodeID, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance)
|
||||
void QTOZW_Associations_internal::addAssociation(quint8 _nodeID, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance)
|
||||
{
|
||||
if (this->getassocationRow(_nodeID, _groupIDX, _targetNodeId, _targetNodeInstance) >= 0) {
|
||||
qWarning() << "Association Group " << _groupIDX << " for node " << _nodeID << " with Target Node: " << _targetNodeId << ":" << _targetNodeInstance << " Already Exists";
|
||||
|
@ -137,7 +137,7 @@ void QTOZW_Associations_internal::addAssociation(uint8_t _nodeID, uint8_t _group
|
|||
this->endInsertRows();
|
||||
}
|
||||
|
||||
void QTOZW_Associations_internal::delAssociation(uint8_t _nodeID, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance) {
|
||||
void QTOZW_Associations_internal::delAssociation(quint8 _nodeID, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance) {
|
||||
QMap<int32_t, QMap<associationColumns, QVariant> >::iterator it;
|
||||
QMap<int32_t, QMap<associationColumns, QVariant> > newAssociationMap;
|
||||
int32_t newrow = 0;
|
||||
|
@ -161,7 +161,7 @@ void QTOZW_Associations_internal::delAssociation(uint8_t _nodeID, uint8_t _group
|
|||
this->m_associationData.swap(newAssociationMap);
|
||||
}
|
||||
|
||||
void QTOZW_Associations_internal::setAssociationData(uint8_t _nodeID, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance, QTOZW_Associations::associationColumns column, QVariant data)
|
||||
void QTOZW_Associations_internal::setAssociationData(quint8 _nodeID, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance, QTOZW_Associations::associationColumns column, QVariant data)
|
||||
{
|
||||
int row = this->getassocationRow(_nodeID, _groupIDX, _targetNodeId, _targetNodeInstance);
|
||||
if (row == -1) {
|
||||
|
@ -176,7 +176,7 @@ void QTOZW_Associations_internal::setAssociationData(uint8_t _nodeID, uint8_t _g
|
|||
}
|
||||
}
|
||||
|
||||
void QTOZW_Associations_internal::setAssociationFlags(uint8_t _nodeID, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance, QTOZW_Associations::associationFlags _flags, bool _value)
|
||||
void QTOZW_Associations_internal::setAssociationFlags(quint8 _nodeID, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance, QTOZW_Associations::associationFlags _flags, bool _value)
|
||||
{
|
||||
int row = this->getassocationRow(_nodeID, _groupIDX, _targetNodeId, _targetNodeInstance);
|
||||
if (row == -1) {
|
||||
|
@ -194,7 +194,7 @@ void QTOZW_Associations_internal::setAssociationFlags(uint8_t _nodeID, uint8_t _
|
|||
}
|
||||
|
||||
|
||||
void QTOZW_Associations_internal::delNode(uint8_t _nodeID) {
|
||||
void QTOZW_Associations_internal::delNode(quint8 _nodeID) {
|
||||
QMap<int32_t, QMap<associationColumns, QVariant> >::iterator it;
|
||||
QMap<int32_t, QMap<associationColumns, QVariant> > newAssociationMap;
|
||||
int32_t newrow = 0;
|
||||
|
@ -213,7 +213,7 @@ void QTOZW_Associations_internal::delNode(uint8_t _nodeID) {
|
|||
this->m_associationData.swap(newAssociationMap);
|
||||
}
|
||||
|
||||
void QTOZW_Associations_internal::delGroup(uint8_t _nodeID, uint8_t _groupIDX) {
|
||||
void QTOZW_Associations_internal::delGroup(quint8 _nodeID, quint8 _groupIDX) {
|
||||
QMap<int32_t, QMap<associationColumns, QVariant> >::iterator it;
|
||||
QMap<int32_t, QMap<associationColumns, QVariant> > newAssociationMap;
|
||||
int32_t newrow = 0;
|
||||
|
@ -241,7 +241,7 @@ void QTOZW_Associations_internal::resetModel() {
|
|||
}
|
||||
|
||||
|
||||
void QTOZW_Associations_internal::setDefaultGroupData(uint8_t _nodeID, uint8_t _groupIDX, QTOZW_Associations::associationColumns column, QVariant data) {
|
||||
void QTOZW_Associations_internal::setDefaultGroupData(quint8 _nodeID, quint8 _groupIDX, QTOZW_Associations::associationColumns column, QVariant data) {
|
||||
switch (column) {
|
||||
case NodeID:
|
||||
case GroupID:
|
||||
|
@ -256,7 +256,7 @@ void QTOZW_Associations_internal::setDefaultGroupData(uint8_t _nodeID, uint8_t _
|
|||
}
|
||||
|
||||
if (this->m_defaultData.count(_nodeID) == 0) {
|
||||
QMap<uint8_t, QMap<QTOZW_Associations::associationColumns, QVariant> > newNode;
|
||||
QMap<quint8, QMap<QTOZW_Associations::associationColumns, QVariant> > newNode;
|
||||
this->m_defaultData.insert(_nodeID, newNode);
|
||||
}
|
||||
if (this->m_defaultData[_nodeID].count(_groupIDX) == 0) {
|
||||
|
@ -268,15 +268,15 @@ void QTOZW_Associations_internal::setDefaultGroupData(uint8_t _nodeID, uint8_t _
|
|||
for (it = this->m_associationData.begin(); it != this->m_associationData.end(); ++it) {
|
||||
if (it.value()[associationColumns::NodeID] == _nodeID) {
|
||||
if (it.value()[associationColumns::GroupID] == _groupIDX) {
|
||||
this->setAssociationData(_nodeID, _groupIDX, it.value()[associationColumns::MemberNodeID].value<uint8_t>(), it.value()[associationColumns::MemberNodeInstance].value<uint8_t>(), column, data);
|
||||
this->setAssociationData(_nodeID, _groupIDX, it.value()[associationColumns::MemberNodeID].value<quint8>(), it.value()[associationColumns::MemberNodeInstance].value<quint8>(), column, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QTOZW_Associations_internal::setDefaultGroupFlags(uint8_t _nodeID, uint8_t _groupIDX, QTOZW_Associations::associationFlags flag, bool data) {
|
||||
void QTOZW_Associations_internal::setDefaultGroupFlags(quint8 _nodeID, quint8 _groupIDX, QTOZW_Associations::associationFlags flag, bool data) {
|
||||
if (this->m_defaultData.count(_nodeID) == 0) {
|
||||
QMap<uint8_t, QMap<QTOZW_Associations::associationColumns, QVariant> > newNode;
|
||||
QMap<quint8, QMap<QTOZW_Associations::associationColumns, QVariant> > newNode;
|
||||
this->m_defaultData.insert(_nodeID, newNode);
|
||||
}
|
||||
if (this->m_defaultData[_nodeID].count(_groupIDX) == 0) {
|
||||
|
@ -290,12 +290,12 @@ void QTOZW_Associations_internal::setDefaultGroupFlags(uint8_t _nodeID, uint8_t
|
|||
for (it = this->m_associationData.begin(); it != this->m_associationData.end(); ++it) {
|
||||
if (it.value()[associationColumns::NodeID] == _nodeID) {
|
||||
if (it.value()[associationColumns::GroupID] == _groupIDX) {
|
||||
this->setAssociationFlags(_nodeID, _groupIDX, it.value()[associationColumns::MemberNodeID].value<uint8_t>(), it.value()[associationColumns::MemberNodeInstance].value<uint8_t>(), flag, data);
|
||||
this->setAssociationFlags(_nodeID, _groupIDX, it.value()[associationColumns::MemberNodeID].value<quint8>(), it.value()[associationColumns::MemberNodeInstance].value<quint8>(), flag, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool QTOZW_Associations_internal::isAssociationExists(uint8_t _node, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance) {
|
||||
bool QTOZW_Associations_internal::isAssociationExists(quint8 _node, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance) {
|
||||
return this->getassocationRow(_node, _groupIDX, _targetNodeId, _targetNodeInstance) == -1 ? false : true;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ public:
|
|||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
|
||||
protected:
|
||||
QVariant getassocationData(uint8_t _node, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance, QTOZW_Associations::associationColumns _column);
|
||||
int32_t getassocationRow(uint8_t _node, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance);
|
||||
QVariant getassocationData(quint8 _node, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance, QTOZW_Associations::associationColumns _column);
|
||||
int32_t getassocationRow(quint8 _node, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance);
|
||||
|
||||
QMap<int32_t, QMap<QTOZW_Associations::associationColumns, QVariant> > m_associationData;
|
||||
};
|
||||
|
@ -46,19 +46,19 @@ class QTOZW_Associations_internal : public QTOZW_Associations {
|
|||
public:
|
||||
QTOZW_Associations_internal(QObject *parent=nullptr);
|
||||
public Q_SLOTS:
|
||||
void addAssociation(uint8_t _nodeID, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance);
|
||||
void delAssociation(uint8_t _nodeID, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance);
|
||||
void setAssociationData(uint8_t _nodeID, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance, QTOZW_Associations::associationColumns column, QVariant data);
|
||||
void setAssociationFlags(uint8_t _nodeID, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance, QTOZW_Associations::associationFlags _flags, bool _value);
|
||||
bool isAssociationExists(uint8_t _node, uint8_t _groupIDX, uint8_t _targetNodeId, uint8_t _targetNodeInstance);
|
||||
void setDefaultGroupData(uint8_t _nodeID, uint8_t _groupIDX, QTOZW_Associations::associationColumns column, QVariant data);
|
||||
void setDefaultGroupFlags(uint8_t _nodeID, uint8_t _groupIDX, QTOZW_Associations::associationFlags _flags, bool _value);
|
||||
void delNode(uint8_t _nodeID);
|
||||
void delGroup(uint8_t _nodeID, uint8_t _groupIDX);
|
||||
void addAssociation(quint8 _nodeID, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance);
|
||||
void delAssociation(quint8 _nodeID, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance);
|
||||
void setAssociationData(quint8 _nodeID, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance, QTOZW_Associations::associationColumns column, QVariant data);
|
||||
void setAssociationFlags(quint8 _nodeID, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance, QTOZW_Associations::associationFlags _flags, bool _value);
|
||||
bool isAssociationExists(quint8 _node, quint8 _groupIDX, quint8 _targetNodeId, quint8 _targetNodeInstance);
|
||||
void setDefaultGroupData(quint8 _nodeID, quint8 _groupIDX, QTOZW_Associations::associationColumns column, QVariant data);
|
||||
void setDefaultGroupFlags(quint8 _nodeID, quint8 _groupIDX, QTOZW_Associations::associationFlags _flags, bool _value);
|
||||
void delNode(quint8 _nodeID);
|
||||
void delGroup(quint8 _nodeID, quint8 _groupIDX);
|
||||
void resetModel();
|
||||
private:
|
||||
|
||||
QMap<uint8_t, QMap<uint8_t, QMap<QTOZW_Associations::associationColumns, QVariant> > > m_defaultData;
|
||||
QMap<quint8, QMap<quint8, QMap<QTOZW_Associations::associationColumns, QVariant> > > m_defaultData;
|
||||
};
|
||||
|
||||
#endif // QTOZWASSOCIATIONS_H
|
||||
|
|
|
@ -124,7 +124,7 @@ bool QTOZWManager_Internal::open(QString SerialPort)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool QTOZWManager_Internal::refreshNodeInfo(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::refreshNodeInfo(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -136,7 +136,7 @@ bool QTOZWManager_Internal::refreshNodeInfo(uint8_t _node) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool QTOZWManager_Internal::requestNodeState(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::requestNodeState(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -148,7 +148,7 @@ bool QTOZWManager_Internal::requestNodeState(uint8_t _node) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool QTOZWManager_Internal::requestNodeDynamic(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::requestNodeDynamic(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -160,7 +160,7 @@ bool QTOZWManager_Internal::requestNodeDynamic(uint8_t _node) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool QTOZWManager_Internal::setConfigParam(uint8_t _node, uint8_t _param, int32_t _value, uint8_t const _size) {
|
||||
bool QTOZWManager_Internal::setConfigParam(quint8 _node, quint8 _param, qint32 _value, quint8 const _size) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -172,7 +172,7 @@ bool QTOZWManager_Internal::setConfigParam(uint8_t _node, uint8_t _param, int32_
|
|||
return false;
|
||||
}
|
||||
|
||||
void QTOZWManager_Internal::requestConfigParam(uint8_t _node, uint8_t _param) {
|
||||
void QTOZWManager_Internal::requestConfigParam(quint8 _node, quint8 _param) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return;
|
||||
try {
|
||||
|
@ -184,7 +184,7 @@ void QTOZWManager_Internal::requestConfigParam(uint8_t _node, uint8_t _param) {
|
|||
return;
|
||||
}
|
||||
|
||||
void QTOZWManager_Internal::requestAllConfigParam(uint8_t _node) {
|
||||
void QTOZWManager_Internal::requestAllConfigParam(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return;
|
||||
try {
|
||||
|
@ -234,7 +234,7 @@ bool QTOZWManager_Internal::cancelControllerCommand() {
|
|||
return false;
|
||||
}
|
||||
|
||||
void QTOZWManager_Internal::testNetworkNode(uint8_t _node, uint32_t const _count) {
|
||||
void QTOZWManager_Internal::testNetworkNode(quint8 _node, quint32 const _count) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return;
|
||||
try {
|
||||
|
@ -245,7 +245,7 @@ void QTOZWManager_Internal::testNetworkNode(uint8_t _node, uint32_t const _count
|
|||
}
|
||||
return;
|
||||
}
|
||||
void QTOZWManager_Internal::testNetwork(uint32_t const _count) {
|
||||
void QTOZWManager_Internal::testNetwork(quint32 const _count) {
|
||||
if (!this->checkHomeId() )
|
||||
return;
|
||||
try {
|
||||
|
@ -256,7 +256,7 @@ void QTOZWManager_Internal::testNetwork(uint32_t const _count) {
|
|||
}
|
||||
return;
|
||||
}
|
||||
void QTOZWManager_Internal::healNetworkNode(uint8_t _node, bool _doRR) {
|
||||
void QTOZWManager_Internal::healNetworkNode(quint8 _node, bool _doRR) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return;
|
||||
try {
|
||||
|
@ -300,7 +300,7 @@ bool QTOZWManager_Internal::removeNode() {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool QTOZWManager_Internal::removeFailedNode(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::removeFailedNode(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -311,7 +311,7 @@ bool QTOZWManager_Internal::removeFailedNode(uint8_t _node) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool QTOZWManager_Internal::hasNodeFailed(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::hasNodeFailed(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -322,7 +322,7 @@ bool QTOZWManager_Internal::hasNodeFailed(uint8_t _node) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool QTOZWManager_Internal::requestNodeNeighborUpdate(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::requestNodeNeighborUpdate(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -333,7 +333,7 @@ bool QTOZWManager_Internal::requestNodeNeighborUpdate(uint8_t _node) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool QTOZWManager_Internal::assignReturnRoute(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::assignReturnRoute(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -344,7 +344,7 @@ bool QTOZWManager_Internal::assignReturnRoute(uint8_t _node) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool QTOZWManager_Internal::deleteAllReturnRoute(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::deleteAllReturnRoute(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -355,7 +355,7 @@ bool QTOZWManager_Internal::deleteAllReturnRoute(uint8_t _node) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool QTOZWManager_Internal::sendNodeInfomation(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::sendNodeInfomation(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -366,7 +366,7 @@ bool QTOZWManager_Internal::sendNodeInfomation(uint8_t _node) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool QTOZWManager_Internal::replaceFailedNode(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::replaceFailedNode(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -377,7 +377,7 @@ bool QTOZWManager_Internal::replaceFailedNode(uint8_t _node) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
bool QTOZWManager_Internal::requestNetworkUpdate(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::requestNetworkUpdate(quint8 _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -389,7 +389,7 @@ bool QTOZWManager_Internal::requestNetworkUpdate(uint8_t _node) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool QTOZWManager_Internal::checkLatestConfigFileRevision(uint8_t const _node) {
|
||||
bool QTOZWManager_Internal::checkLatestConfigFileRevision(quint8 const _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -413,7 +413,7 @@ bool QTOZWManager_Internal::checkLatestMFSRevision() {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool QTOZWManager_Internal::downloadLatestConfigFileRevision(uint8_t const _node) {
|
||||
bool QTOZWManager_Internal::downloadLatestConfigFileRevision(quint8 const _node) {
|
||||
if (!this->checkHomeId() || !this->checkNodeId(_node))
|
||||
return false;
|
||||
try {
|
||||
|
@ -480,7 +480,7 @@ bool QTOZWManager_Internal::checkHomeId() {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
bool QTOZWManager_Internal::checkNodeId(uint8_t _node) {
|
||||
bool QTOZWManager_Internal::checkNodeId(quint8 _node) {
|
||||
if (!this->m_validNodes.contains(_node)) {
|
||||
emit this->error(QTOZWErrorCodes::nodeId_Invalid);
|
||||
this->setErrorString("Invalid nodeID");
|
||||
|
@ -489,7 +489,7 @@ bool QTOZWManager_Internal::checkNodeId(uint8_t _node) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool QTOZWManager_Internal::checkValueKey(uint64_t _vidKey) {
|
||||
bool QTOZWManager_Internal::checkValueKey(quint64 _vidKey) {
|
||||
if (!this->m_validValues.contains(_vidKey)) {
|
||||
emit this->error(QTOZWErrorCodes::valueIDKey_Invalid);
|
||||
this->setErrorString("Invalid ValueID Key");
|
||||
|
@ -498,7 +498,7 @@ bool QTOZWManager_Internal::checkValueKey(uint64_t _vidKey) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool QTOZWManager_Internal::convertValueID(uint64_t vidKey) {
|
||||
bool QTOZWManager_Internal::convertValueID(quint64 vidKey) {
|
||||
OpenZWave::ValueID vid(this->homeId(), vidKey);
|
||||
switch (vid.GetType()) {
|
||||
case OpenZWave::ValueID::ValueType_Bool:
|
||||
|
@ -511,10 +511,10 @@ bool QTOZWManager_Internal::convertValueID(uint64_t vidKey) {
|
|||
}
|
||||
case OpenZWave::ValueID::ValueType_Byte:
|
||||
{
|
||||
uint8_t value;
|
||||
quint8 value;
|
||||
this->m_manager->GetValueAsByte(vid, &value);
|
||||
/* QT has a habbit of treating uint8_t as char... so cast it to 32 to get around that */
|
||||
this->m_valueModel->setValueData(vidKey, QTOZW_ValueIds::ValueIdColumns::Value, QVariant::fromValue(static_cast<uint32_t>(value)));
|
||||
/* QT has a habbit of treating quint8 as char... so cast it to 32 to get around that */
|
||||
this->m_valueModel->setValueData(vidKey, QTOZW_ValueIds::ValueIdColumns::Value, QVariant::fromValue(static_cast<quint32>(value)));
|
||||
this->m_valueModel->setValueData(vidKey, QTOZW_ValueIds::ValueIdColumns::Type, QTOZW_ValueIds::ValueIdTypes::Byte);
|
||||
return true;
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ bool QTOZWManager_Internal::convertValueID(uint64_t vidKey) {
|
|||
}
|
||||
case OpenZWave::ValueID::ValueType_Int:
|
||||
{
|
||||
int32_t value;
|
||||
qint32 value;
|
||||
this->m_manager->GetValueAsInt(vid, &value);
|
||||
this->m_valueModel->setValueData(vidKey, QTOZW_ValueIds::ValueIdColumns::Value, QVariant::fromValue(value));
|
||||
this->m_valueModel->setValueData(vidKey, QTOZW_ValueIds::ValueIdColumns::Type, QTOZW_ValueIds::ValueIdTypes::Int);
|
||||
|
@ -592,8 +592,8 @@ bool QTOZWManager_Internal::convertValueID(uint64_t vidKey) {
|
|||
}
|
||||
case OpenZWave::ValueID::ValueType_BitSet:
|
||||
{
|
||||
uint8_t bssize;
|
||||
int32_t bsmask;
|
||||
quint8 bssize;
|
||||
qint32 bsmask;
|
||||
this->m_manager->GetBitSetSize(vid, &bssize);
|
||||
this->m_manager->GetBitMask(vid, &bsmask);
|
||||
QTOZW_ValueIDBitSet vidbs;
|
||||
|
@ -602,7 +602,7 @@ bool QTOZWManager_Internal::convertValueID(uint64_t vidKey) {
|
|||
vidbs.mask[i] = (bsmask & (1 << i));
|
||||
}
|
||||
vidbs.values.resize(bssize * 8);
|
||||
for (uint8_t i = 1; i <= bssize * 8; ++i) {
|
||||
for (quint8 i = 1; i <= bssize * 8; ++i) {
|
||||
/* OZW is 1 base - QT is 0 base. */
|
||||
if (vidbs.mask.at(i-1)) {
|
||||
bool value;
|
||||
|
@ -614,7 +614,7 @@ bool QTOZWManager_Internal::convertValueID(uint64_t vidKey) {
|
|||
}
|
||||
}
|
||||
#if 0
|
||||
qDebug() << (uint32_t)bsmask;
|
||||
qDebug() << (quint32)bsmask;
|
||||
this->m_manager->GetBitMask(vid, &bsmask);
|
||||
qDebug().noquote() << BitSettoQString(vidbs.mask);
|
||||
qDebug().noquote() << BitSettoQString(vidbs.values);
|
||||
|
@ -628,7 +628,7 @@ bool QTOZWManager_Internal::convertValueID(uint64_t vidKey) {
|
|||
}
|
||||
|
||||
|
||||
void QTOZWManager_Internal::pvt_valueAdded(uint64_t vidKey)
|
||||
void QTOZWManager_Internal::pvt_valueAdded(quint64 vidKey)
|
||||
{
|
||||
qDebug() << "Notification pvt_valueAdded";
|
||||
if (!this->m_validValues.contains(vidKey))
|
||||
|
@ -662,7 +662,7 @@ void QTOZWManager_Internal::pvt_valueAdded(uint64_t vidKey)
|
|||
}
|
||||
emit this->valueAdded(vidKey);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_valueRemoved(uint64_t vidKey)
|
||||
void QTOZWManager_Internal::pvt_valueRemoved(quint64 vidKey)
|
||||
{
|
||||
qDebug() << "Notification pvt_valueRemoved";
|
||||
if (this->m_validValues.contains(vidKey))
|
||||
|
@ -671,32 +671,32 @@ void QTOZWManager_Internal::pvt_valueRemoved(uint64_t vidKey)
|
|||
emit this->valueRemoved(vidKey);
|
||||
Q_UNUSED(vidKey);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_valueChanged(uint64_t vidKey)
|
||||
void QTOZWManager_Internal::pvt_valueChanged(quint64 vidKey)
|
||||
{
|
||||
qDebug() << "Notification pvt_valueChanged";
|
||||
this->convertValueID(vidKey);
|
||||
emit this->valueChanged(vidKey);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_valueRefreshed(uint64_t vidKey)
|
||||
void QTOZWManager_Internal::pvt_valueRefreshed(quint64 vidKey)
|
||||
{
|
||||
qDebug() << "Notification pvt_valueRefreshed";
|
||||
|
||||
this->convertValueID(vidKey);
|
||||
emit this->valueRefreshed(vidKey);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_valuePollingEnabled(uint64_t vidKey)
|
||||
void QTOZWManager_Internal::pvt_valuePollingEnabled(quint64 vidKey)
|
||||
{
|
||||
qDebug() << "Notification pvt_valuePollingEnabled";
|
||||
this->m_valueModel->setValueFlags(vidKey, QTOZW_ValueIds::ValueIDFlags::ValuePolled, true);
|
||||
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_valuePollingDisabled(uint64_t vidKey)
|
||||
void QTOZWManager_Internal::pvt_valuePollingDisabled(quint64 vidKey)
|
||||
{
|
||||
qDebug() << "Notification pvt_valuePollingDisabled";
|
||||
this->m_valueModel->setValueFlags(vidKey, QTOZW_ValueIds::ValueIDFlags::ValuePolled, false);
|
||||
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeGroupChanged(uint8_t node, uint8_t group)
|
||||
void QTOZWManager_Internal::pvt_nodeGroupChanged(quint8 node, quint8 group)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeGroupChanged";
|
||||
|
||||
|
@ -709,8 +709,8 @@ void QTOZWManager_Internal::pvt_nodeGroupChanged(uint8_t node, uint8_t group)
|
|||
this->m_associationDefaultsSet[node][group] = true;
|
||||
}
|
||||
OpenZWave::InstanceAssociation *ia;
|
||||
uint32_t count = this->m_manager->GetAssociations(this->homeId(), node, group, &ia);
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
quint32 count = this->m_manager->GetAssociations(this->homeId(), node, group, &ia);
|
||||
for (quint32 i = 0; i < count; i++) {
|
||||
if (!this->m_associationsModel->isAssociationExists(node, group, ia[i].m_nodeId, ia[i].m_instance)) {
|
||||
this->m_associationsModel->addAssociation(node, group, ia[i].m_nodeId, ia[i].m_instance);
|
||||
}
|
||||
|
@ -719,7 +719,7 @@ void QTOZWManager_Internal::pvt_nodeGroupChanged(uint8_t node, uint8_t group)
|
|||
for (int row = 0; row < this->m_associationsModel->rowCount(QModelIndex()); ++row) {
|
||||
QMap<QTOZW_Associations::associationColumns, QVariant> data = this->m_associationsModel->m_associationData[row];
|
||||
bool found = false;
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
for (quint32 i = 0; i < count; i++) {
|
||||
if (data[QTOZW_Associations::associationColumns::NodeID] == node) {
|
||||
if (data[QTOZW_Associations::associationColumns::GroupID] == group) {
|
||||
if (data[QTOZW_Associations::associationColumns::MemberNodeID] == ia[i].m_nodeId) {
|
||||
|
@ -731,13 +731,13 @@ void QTOZWManager_Internal::pvt_nodeGroupChanged(uint8_t node, uint8_t group)
|
|||
}
|
||||
}
|
||||
if (found == false) {
|
||||
this->m_associationsModel->delAssociation(node, group, data[QTOZW_Associations::associationColumns::MemberNodeID].value<uint8_t>(), data[QTOZW_Associations::associationColumns::MemberNodeInstance].value<uint8_t>());
|
||||
this->m_associationsModel->delAssociation(node, group, data[QTOZW_Associations::associationColumns::MemberNodeID].value<quint8>(), data[QTOZW_Associations::associationColumns::MemberNodeInstance].value<quint8>());
|
||||
}
|
||||
}
|
||||
if (ia != nullptr)
|
||||
delete [] ia;
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeNew(uint8_t node)
|
||||
void QTOZWManager_Internal::pvt_nodeNew(quint8 node)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeNew";
|
||||
if (!this->m_validNodes.contains(node))
|
||||
|
@ -760,7 +760,7 @@ void QTOZWManager_Internal::pvt_nodeNew(uint8_t node)
|
|||
|
||||
emit this->nodeNew(node);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeAdded(uint8_t node)
|
||||
void QTOZWManager_Internal::pvt_nodeAdded(quint8 node)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeAdded";
|
||||
if (!this->m_validNodes.contains(node))
|
||||
|
@ -784,7 +784,7 @@ void QTOZWManager_Internal::pvt_nodeAdded(uint8_t node)
|
|||
emit this->nodeAdded(node);
|
||||
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeRemoved(uint8_t node)
|
||||
void QTOZWManager_Internal::pvt_nodeRemoved(quint8 node)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeRemoved";
|
||||
if (this->m_validNodes.contains(node))
|
||||
|
@ -796,7 +796,7 @@ void QTOZWManager_Internal::pvt_nodeRemoved(uint8_t node)
|
|||
emit this->nodeRemoved(node);
|
||||
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeReset(uint8_t node)
|
||||
void QTOZWManager_Internal::pvt_nodeReset(quint8 node)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeReset";
|
||||
if (this->m_validNodes.contains(node))
|
||||
|
@ -809,7 +809,7 @@ void QTOZWManager_Internal::pvt_nodeReset(uint8_t node)
|
|||
emit this->nodeReset(node);
|
||||
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeNaming(uint8_t node)
|
||||
void QTOZWManager_Internal::pvt_nodeNaming(quint8 node)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeNaming";
|
||||
try {
|
||||
|
@ -833,7 +833,7 @@ void QTOZWManager_Internal::pvt_nodeNaming(uint8_t node)
|
|||
}
|
||||
emit this->nodeNaming(node);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeEvent(uint8_t node, uint8_t event)
|
||||
void QTOZWManager_Internal::pvt_nodeEvent(quint8 node, quint8 event)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeEvent";
|
||||
try {
|
||||
|
@ -850,7 +850,7 @@ void QTOZWManager_Internal::pvt_nodeEvent(uint8_t node, uint8_t event)
|
|||
}
|
||||
emit this->nodeEvent(node, event);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeProtocolInfo(uint8_t node)
|
||||
void QTOZWManager_Internal::pvt_nodeProtocolInfo(quint8 node)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeProtocolInfo";
|
||||
try {
|
||||
|
@ -924,7 +924,7 @@ void QTOZWManager_Internal::pvt_nodeProtocolInfo(uint8_t node)
|
|||
}
|
||||
emit this->nodeProtocolInfo(node);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeEssentialNodeQueriesComplete(uint8_t node)
|
||||
void QTOZWManager_Internal::pvt_nodeEssentialNodeQueriesComplete(quint8 node)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeEssentialNodeQueriesComplete";
|
||||
try {
|
||||
|
@ -1001,7 +1001,7 @@ void QTOZWManager_Internal::pvt_nodeEssentialNodeQueriesComplete(uint8_t node)
|
|||
}
|
||||
emit this->nodeEssentialNodeQueriesComplete(node);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_nodeQueriesComplete(uint8_t node)
|
||||
void QTOZWManager_Internal::pvt_nodeQueriesComplete(quint8 node)
|
||||
{
|
||||
qDebug() << "Notification pvt_nodeQueriesComplete";
|
||||
/* Plus Type Info here */
|
||||
|
@ -1090,14 +1090,14 @@ void QTOZWManager_Internal::pvt_nodeQueriesComplete(uint8_t node)
|
|||
}
|
||||
emit this->nodeQueriesComplete(node);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_driverReady(uint32_t _homeID)
|
||||
void QTOZWManager_Internal::pvt_driverReady(quint32 _homeID)
|
||||
{
|
||||
qDebug() << "Notification pvt_driverRead";
|
||||
this->setHomeId(_homeID);
|
||||
emit this->started(_homeID);
|
||||
emit this->driverReady(_homeID);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_driverFailed(uint32_t _homeID)
|
||||
void QTOZWManager_Internal::pvt_driverFailed(quint32 _homeID)
|
||||
{
|
||||
qDebug() << "Notification pvt_driverFailed";
|
||||
this->m_associationsModel->resetModel();
|
||||
|
@ -1107,7 +1107,7 @@ void QTOZWManager_Internal::pvt_driverFailed(uint32_t _homeID)
|
|||
emit this->driverFailed(_homeID);
|
||||
this->setHomeId(0);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_driverReset(uint32_t _homeID)
|
||||
void QTOZWManager_Internal::pvt_driverReset(quint32 _homeID)
|
||||
{
|
||||
qDebug() << "Notification pvt_driverReset";
|
||||
this->m_associationsModel->resetModel();
|
||||
|
@ -1117,7 +1117,7 @@ void QTOZWManager_Internal::pvt_driverReset(uint32_t _homeID)
|
|||
emit this->driverReset(_homeID);
|
||||
this->setHomeId(0);
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_driverRemoved(uint32_t _homeID)
|
||||
void QTOZWManager_Internal::pvt_driverRemoved(quint32 _homeID)
|
||||
{
|
||||
qDebug() << "Notification pvt_driverRemoved";
|
||||
this->m_associationsModel->resetModel();
|
||||
|
@ -1142,7 +1142,7 @@ void QTOZWManager_Internal::pvt_driverAwakeNodesQueried()
|
|||
qDebug() << "Notification pvt_driverAwakeNodesQueried";
|
||||
emit this->driverAllNodesQueried();
|
||||
}
|
||||
void QTOZWManager_Internal::pvt_controllerCommand(uint8_t command)
|
||||
void QTOZWManager_Internal::pvt_controllerCommand(quint8 command)
|
||||
{
|
||||
qDebug() << "Notification pvt_controllerCommand";
|
||||
emit this->controllerCommand(command);
|
||||
|
@ -1174,7 +1174,7 @@ void QTOZWManager_Internal::pvt_nodeModelDataChanged(const QModelIndex &topLeft,
|
|||
qDebug() << "nodeModel Changed!" << static_cast<QTOZW_Nodes::NodeColumns>(topLeft.column()) << ": "<< topLeft.data();
|
||||
/* get the Node Number */
|
||||
QModelIndex nodeIdIndex = topLeft.siblingAtColumn(QTOZW_Nodes::NodeColumns::NodeID);
|
||||
uint8_t nodeId = this->m_nodeModel->data(nodeIdIndex, Qt::DisplayRole).value<uint8_t>();
|
||||
quint8 nodeId = this->m_nodeModel->data(nodeIdIndex, Qt::DisplayRole).value<quint8>();
|
||||
try {
|
||||
switch (static_cast<QTOZW_Nodes::NodeColumns>(topLeft.column())) {
|
||||
case QTOZW_Nodes::NodeColumns::NodeName:
|
||||
|
@ -1202,7 +1202,7 @@ void QTOZWManager_Internal::pvt_valueModelDataChanged(const QModelIndex &topLeft
|
|||
}
|
||||
qDebug() << "valueModel Changed!" << static_cast<QTOZW_ValueIds::ValueIdColumns>(topLeft.column()) << ": "<< topLeft.data();
|
||||
/* get the Node Number */
|
||||
uint64_t vidKey = this->m_valueModel->data(topLeft.siblingAtColumn(QTOZW_ValueIds::ValueIdColumns::ValueIDKey), Qt::DisplayRole).value<uint64_t>();
|
||||
quint64 vidKey = this->m_valueModel->data(topLeft.siblingAtColumn(QTOZW_ValueIds::ValueIdColumns::ValueIDKey), Qt::DisplayRole).value<quint64>();
|
||||
try {
|
||||
OpenZWave::ValueID vid(this->homeId(), vidKey);
|
||||
switch (static_cast<OpenZWave::ValueID::ValueType>(vid.GetType())) {
|
||||
|
@ -1213,7 +1213,7 @@ void QTOZWManager_Internal::pvt_valueModelDataChanged(const QModelIndex &topLeft
|
|||
}
|
||||
case OpenZWave::ValueID::ValueType_Byte:
|
||||
{
|
||||
this->m_manager->SetValue(vid, topLeft.data().value<uint8_t>());
|
||||
this->m_manager->SetValue(vid, topLeft.data().value<quint8>());
|
||||
return;
|
||||
}
|
||||
case OpenZWave::ValueID::ValueType_Decimal:
|
||||
|
@ -1262,13 +1262,13 @@ void QTOZWManager_Internal::pvt_valueModelDataChanged(const QModelIndex &topLeft
|
|||
for (int i = 0; i <= bs.values.size()-1; i++) {
|
||||
if (bs.mask.at(i)) {
|
||||
bool curval;
|
||||
this->m_manager->GetValueAsBitSet(vid, (uint8_t)i+1, &curval);
|
||||
this->m_manager->GetValueAsBitSet(vid, (quint8)i+1, &curval);
|
||||
if (curval != bs.values.at(i)) {
|
||||
/* we send this as a uint32_t so its a atomic change... and return.
|
||||
/* we send this as a quint32 so its a atomic change... and return.
|
||||
* as the chances of other Bits changing are probably high, and a
|
||||
* each call to SetValue generates traffis, so instead by sending a
|
||||
* uint32_t here, we only send one packet*/
|
||||
this->m_manager->SetValue(vid, (int32_t)BitSettoInteger(bs.values));
|
||||
* quint32 here, we only send one packet*/
|
||||
this->m_manager->SetValue(vid, (qint32)BitSettoInteger(bs.values));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1488,22 +1488,22 @@ void QTOZWManager::connectSignals() {
|
|||
bool QTOZWManager::open(QString serialPort) {
|
||||
CALL_DPTR_RTN(open(serialPort), bool);
|
||||
}
|
||||
bool QTOZWManager::refreshNodeInfo(uint8_t _node) {
|
||||
bool QTOZWManager::refreshNodeInfo(quint8 _node) {
|
||||
CALL_DPTR_RTN(refreshNodeInfo(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::requestNodeState(uint8_t _node) {
|
||||
bool QTOZWManager::requestNodeState(quint8 _node) {
|
||||
CALL_DPTR_RTN(requestNodeState(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::requestNodeDynamic(uint8_t _node) {
|
||||
bool QTOZWManager::requestNodeDynamic(quint8 _node) {
|
||||
CALL_DPTR_RTN(requestNodeDynamic(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::setConfigParam(uint8_t _node, uint8_t _param, int32_t _value, uint8_t const _size) {
|
||||
bool QTOZWManager::setConfigParam(quint8 _node, quint8 _param, qint32 _value, quint8 const _size) {
|
||||
CALL_DPTR_RTN(setConfigParam(_node, _param, _value, _size), bool);
|
||||
}
|
||||
void QTOZWManager::requestConfigParam(uint8_t _node, uint8_t _param) {
|
||||
void QTOZWManager::requestConfigParam(quint8 _node, quint8 _param) {
|
||||
CALL_DPTR(requestConfigParam(_node, _param));
|
||||
}
|
||||
void QTOZWManager::requestAllConfigParam(uint8_t _node) {
|
||||
void QTOZWManager::requestAllConfigParam(quint8 _node) {
|
||||
CALL_DPTR(requestAllConfigParam(_node));
|
||||
}
|
||||
void QTOZWManager::softResetController() {
|
||||
|
@ -1515,13 +1515,13 @@ void QTOZWManager::hardResetController() {
|
|||
bool QTOZWManager::cancelControllerCommand() {
|
||||
CALL_DPTR_RTN(cancelControllerCommand(), bool);
|
||||
}
|
||||
void QTOZWManager::testNetworkNode(uint8_t _node, uint32_t const _count) {
|
||||
void QTOZWManager::testNetworkNode(quint8 _node, quint32 const _count) {
|
||||
CALL_DPTR(testNetworkNode(_node, _count));
|
||||
}
|
||||
void QTOZWManager::testNetwork(uint32_t const _count) {
|
||||
void QTOZWManager::testNetwork(quint32 const _count) {
|
||||
CALL_DPTR(testNetwork(_count));
|
||||
}
|
||||
void QTOZWManager::healNetworkNode(uint8_t _node, bool _doRR) {
|
||||
void QTOZWManager::healNetworkNode(quint8 _node, bool _doRR) {
|
||||
CALL_DPTR(healNetworkNode(_node, _doRR));
|
||||
}
|
||||
void QTOZWManager::healNetwork(bool _doRR) {
|
||||
|
@ -1533,37 +1533,37 @@ bool QTOZWManager::addNode(bool _doSecure) {
|
|||
bool QTOZWManager::removeNode() {
|
||||
CALL_DPTR_RTN(removeNode(), bool);
|
||||
}
|
||||
bool QTOZWManager::removeFailedNode(uint8_t _node) {
|
||||
bool QTOZWManager::removeFailedNode(quint8 _node) {
|
||||
CALL_DPTR_RTN(removeFailedNode(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::hasNodeFailed(uint8_t _node) {
|
||||
bool QTOZWManager::hasNodeFailed(quint8 _node) {
|
||||
CALL_DPTR_RTN(hasNodeFailed(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::requestNodeNeighborUpdate(uint8_t _node) {
|
||||
bool QTOZWManager::requestNodeNeighborUpdate(quint8 _node) {
|
||||
CALL_DPTR_RTN(requestNodeNeighborUpdate(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::assignReturnRoute(uint8_t _node) {
|
||||
bool QTOZWManager::assignReturnRoute(quint8 _node) {
|
||||
CALL_DPTR_RTN(assignReturnRoute(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::deleteAllReturnRoute(uint8_t _node) {
|
||||
bool QTOZWManager::deleteAllReturnRoute(quint8 _node) {
|
||||
CALL_DPTR_RTN(deleteAllReturnRoute(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::sendNodeInfomation(uint8_t _node) {
|
||||
bool QTOZWManager::sendNodeInfomation(quint8 _node) {
|
||||
CALL_DPTR_RTN(sendNodeInfomation(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::replaceFailedNode(uint8_t _node) {
|
||||
bool QTOZWManager::replaceFailedNode(quint8 _node) {
|
||||
CALL_DPTR_RTN(replaceFailedNode(_node), bool)
|
||||
}
|
||||
bool QTOZWManager::requestNetworkUpdate(uint8_t _node) {
|
||||
bool QTOZWManager::requestNetworkUpdate(quint8 _node) {
|
||||
CALL_DPTR_RTN(requestNetworkUpdate(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::checkLatestConfigFileRevision(uint8_t const _node) {
|
||||
bool QTOZWManager::checkLatestConfigFileRevision(quint8 const _node) {
|
||||
CALL_DPTR_RTN(checkLatestConfigFileRevision(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::checkLatestMFSRevision() {
|
||||
CALL_DPTR_RTN(checkLatestMFSRevision(), bool);
|
||||
}
|
||||
bool QTOZWManager::downloadLatestConfigFileRevision(uint8_t const _node) {
|
||||
bool QTOZWManager::downloadLatestConfigFileRevision(quint8 const _node) {
|
||||
CALL_DPTR_RTN(downloadLatestConfigFileRevision(_node), bool);
|
||||
}
|
||||
bool QTOZWManager::downloadLatestMFSRevision() {
|
||||
|
|
|
@ -39,65 +39,65 @@ public:
|
|||
|
||||
public Q_SLOTS:
|
||||
bool open(QString serialPort);
|
||||
bool refreshNodeInfo(uint8_t _node);
|
||||
bool requestNodeState(uint8_t _node);
|
||||
bool requestNodeDynamic(uint8_t _node);
|
||||
bool refreshNodeInfo(quint8 _node);
|
||||
bool requestNodeState(quint8 _node);
|
||||
bool requestNodeDynamic(quint8 _node);
|
||||
|
||||
bool setConfigParam(uint8_t _node, uint8_t _param, int32_t _value, uint8_t const _size);
|
||||
void requestConfigParam(uint8_t _node, uint8_t _param);
|
||||
void requestAllConfigParam(uint8_t _node);
|
||||
bool setConfigParam(quint8 _node, quint8 _param, int32_t _value, quint8 const _size);
|
||||
void requestConfigParam(quint8 _node, quint8 _param);
|
||||
void requestAllConfigParam(quint8 _node);
|
||||
|
||||
void softResetController();
|
||||
void hardResetController();
|
||||
|
||||
bool cancelControllerCommand();
|
||||
|
||||
void testNetworkNode(uint8_t _node, uint32_t const _count);
|
||||
void testNetwork(uint32_t const _count);
|
||||
void healNetworkNode(uint8_t _node, bool _doRR);
|
||||
void testNetworkNode(quint8 _node, quint32 const _count);
|
||||
void testNetwork(quint32 const _count);
|
||||
void healNetworkNode(quint8 _node, bool _doRR);
|
||||
void healNetwork(bool _doRR);
|
||||
bool addNode(bool _doSecure);
|
||||
bool removeNode();
|
||||
bool removeFailedNode(uint8_t _node);
|
||||
bool hasNodeFailed(uint8_t _node);
|
||||
bool requestNodeNeighborUpdate(uint8_t _node);
|
||||
bool assignReturnRoute(uint8_t _node);
|
||||
bool deleteAllReturnRoute(uint8_t _node);
|
||||
bool sendNodeInfomation(uint8_t _node);
|
||||
bool replaceFailedNode(uint8_t _node);
|
||||
bool requestNetworkUpdate(uint8_t _node);
|
||||
bool removeFailedNode(quint8 _node);
|
||||
bool hasNodeFailed(quint8 _node);
|
||||
bool requestNodeNeighborUpdate(quint8 _node);
|
||||
bool assignReturnRoute(quint8 _node);
|
||||
bool deleteAllReturnRoute(quint8 _node);
|
||||
bool sendNodeInfomation(quint8 _node);
|
||||
bool replaceFailedNode(quint8 _node);
|
||||
bool requestNetworkUpdate(quint8 _node);
|
||||
|
||||
bool checkLatestConfigFileRevision(uint8_t const _node);
|
||||
bool checkLatestConfigFileRevision(quint8 const _node);
|
||||
bool checkLatestMFSRevision();
|
||||
bool downloadLatestConfigFileRevision(uint8_t const _node);
|
||||
bool downloadLatestConfigFileRevision(quint8 const _node);
|
||||
bool downloadLatestMFSRevision();
|
||||
|
||||
|
||||
/* these slots are called from our OZWNotification Class. Applications should not call them */
|
||||
void pvt_valueAdded(uint64_t vidKey);
|
||||
void pvt_valueRemoved(uint64_t vidKey);
|
||||
void pvt_valueChanged(uint64_t vidKey);
|
||||
void pvt_valueRefreshed(uint64_t vidKey);
|
||||
void pvt_valuePollingEnabled(uint64_t vidKey);
|
||||
void pvt_valuePollingDisabled(uint64_t vidKey);
|
||||
void pvt_nodeGroupChanged(uint8_t node, uint8_t group);
|
||||
void pvt_nodeNew(uint8_t node);
|
||||
void pvt_nodeAdded(uint8_t node);
|
||||
void pvt_nodeRemoved(uint8_t node);
|
||||
void pvt_nodeReset(uint8_t node);
|
||||
void pvt_nodeNaming(uint8_t node);
|
||||
void pvt_nodeEvent(uint8_t node, uint8_t event);
|
||||
void pvt_nodeProtocolInfo(uint8_t node);
|
||||
void pvt_nodeEssentialNodeQueriesComplete(uint8_t node);
|
||||
void pvt_nodeQueriesComplete(uint8_t node);
|
||||
void pvt_driverReady(uint32_t homeID);
|
||||
void pvt_driverFailed(uint32_t homeID);
|
||||
void pvt_driverReset(uint32_t homeID);
|
||||
void pvt_driverRemoved(uint32_t homeID);
|
||||
void pvt_valueAdded(quint64 vidKey);
|
||||
void pvt_valueRemoved(quint64 vidKey);
|
||||
void pvt_valueChanged(quint64 vidKey);
|
||||
void pvt_valueRefreshed(quint64 vidKey);
|
||||
void pvt_valuePollingEnabled(quint64 vidKey);
|
||||
void pvt_valuePollingDisabled(quint64 vidKey);
|
||||
void pvt_nodeGroupChanged(quint8 node, quint8 group);
|
||||
void pvt_nodeNew(quint8 node);
|
||||
void pvt_nodeAdded(quint8 node);
|
||||
void pvt_nodeRemoved(quint8 node);
|
||||
void pvt_nodeReset(quint8 node);
|
||||
void pvt_nodeNaming(quint8 node);
|
||||
void pvt_nodeEvent(quint8 node, quint8 event);
|
||||
void pvt_nodeProtocolInfo(quint8 node);
|
||||
void pvt_nodeEssentialNodeQueriesComplete(quint8 node);
|
||||
void pvt_nodeQueriesComplete(quint8 node);
|
||||
void pvt_driverReady(quint32 homeID);
|
||||
void pvt_driverFailed(quint32 homeID);
|
||||
void pvt_driverReset(quint32 homeID);
|
||||
void pvt_driverRemoved(quint32 homeID);
|
||||
void pvt_driverAllNodesQueriedSomeDead();
|
||||
void pvt_driverAllNodesQueried();
|
||||
void pvt_driverAwakeNodesQueried();
|
||||
void pvt_controllerCommand(uint8_t command);
|
||||
void pvt_controllerCommand(quint8 command);
|
||||
void pvt_ozwNotification(OpenZWave::Notification::NotificationCode event);
|
||||
void pvt_ozwUserAlert(OpenZWave::Notification::UserAlertNotification event);
|
||||
void pvt_manufacturerSpecificDBReady();
|
||||
|
@ -112,9 +112,9 @@ private:
|
|||
private:
|
||||
|
||||
bool checkHomeId();
|
||||
bool checkNodeId(uint8_t _node);
|
||||
bool checkValueKey(uint64_t _vidKey);
|
||||
bool convertValueID(uint64_t vidKey);
|
||||
bool checkNodeId(quint8 _node);
|
||||
bool checkValueKey(quint64 _vidKey);
|
||||
bool convertValueID(quint64 vidKey);
|
||||
|
||||
|
||||
OpenZWave::Options *m_options;
|
||||
|
@ -123,9 +123,9 @@ private:
|
|||
QTOZW_ValueIds_internal *m_valueModel;
|
||||
QTOZW_Associations_internal *m_associationsModel;
|
||||
pthread_mutex_t m_manager_mutex;
|
||||
QVector<uint8_t> m_validNodes;
|
||||
QVector<uint64_t> m_validValues;
|
||||
QMap<uint8_t, QMap<uint8_t, bool > > m_associationDefaultsSet;
|
||||
QVector<quint8> m_validNodes;
|
||||
QVector<quint64> m_validValues;
|
||||
QMap<quint8, QMap<quint8, bool > > m_associationDefaultsSet;
|
||||
|
||||
};
|
||||
|
||||
|
@ -154,70 +154,70 @@ public:
|
|||
|
||||
/* OpenZWave::Manager methods */
|
||||
bool open(QString serialPort);
|
||||
bool refreshNodeInfo(uint8_t _node);
|
||||
bool requestNodeState(uint8_t _node);
|
||||
bool requestNodeDynamic(uint8_t _node);
|
||||
bool refreshNodeInfo(quint8 _node);
|
||||
bool requestNodeState(quint8 _node);
|
||||
bool requestNodeDynamic(quint8 _node);
|
||||
|
||||
bool setConfigParam(uint8_t _node, uint8_t _param, int32_t _value, uint8_t const _size);
|
||||
void requestConfigParam(uint8_t _node, uint8_t _param);
|
||||
void requestAllConfigParam(uint8_t _node);
|
||||
bool setConfigParam(quint8 _node, quint8 _param, int32_t _value, quint8 const _size);
|
||||
void requestConfigParam(quint8 _node, quint8 _param);
|
||||
void requestAllConfigParam(quint8 _node);
|
||||
|
||||
void softResetController();
|
||||
void hardResetController();
|
||||
|
||||
bool cancelControllerCommand();
|
||||
|
||||
void testNetworkNode(uint8_t _node, uint32_t const _count);
|
||||
void testNetwork(uint32_t const _count);
|
||||
void healNetworkNode(uint8_t _node, bool _doRR);
|
||||
void testNetworkNode(quint8 _node, quint32 const _count);
|
||||
void testNetwork(quint32 const _count);
|
||||
void healNetworkNode(quint8 _node, bool _doRR);
|
||||
void healNetwork(bool _doRR);
|
||||
bool addNode(bool _doSecure);
|
||||
bool removeNode();
|
||||
bool removeFailedNode(uint8_t _node);
|
||||
bool hasNodeFailed(uint8_t _node);
|
||||
bool requestNodeNeighborUpdate(uint8_t _node);
|
||||
bool assignReturnRoute(uint8_t _node);
|
||||
bool deleteAllReturnRoute(uint8_t _node);
|
||||
bool sendNodeInfomation(uint8_t _node);
|
||||
bool replaceFailedNode(uint8_t _node);
|
||||
bool requestNetworkUpdate(uint8_t _node);
|
||||
bool removeFailedNode(quint8 _node);
|
||||
bool hasNodeFailed(quint8 _node);
|
||||
bool requestNodeNeighborUpdate(quint8 _node);
|
||||
bool assignReturnRoute(quint8 _node);
|
||||
bool deleteAllReturnRoute(quint8 _node);
|
||||
bool sendNodeInfomation(quint8 _node);
|
||||
bool replaceFailedNode(quint8 _node);
|
||||
bool requestNetworkUpdate(quint8 _node);
|
||||
|
||||
bool checkLatestConfigFileRevision(uint8_t const _node);
|
||||
bool checkLatestConfigFileRevision(quint8 const _node);
|
||||
bool checkLatestMFSRevision();
|
||||
bool downloadLatestConfigFileRevision(uint8_t const _node);
|
||||
bool downloadLatestConfigFileRevision(quint8 const _node);
|
||||
bool downloadLatestMFSRevision();
|
||||
|
||||
|
||||
Q_SIGNALS:
|
||||
void ready();
|
||||
void valueAdded(uint64_t vidKey);
|
||||
void valueRemoved(uint64_t vidKey);
|
||||
void valueChanged(uint64_t vidKey);
|
||||
void valueRefreshed(uint64_t vidKey);
|
||||
void nodeNew(uint8_t node);
|
||||
void nodeAdded(uint8_t node);
|
||||
void nodeRemoved(uint8_t node);
|
||||
void nodeReset(uint8_t node);
|
||||
void nodeNaming(uint8_t node);
|
||||
void nodeEvent(uint8_t node, uint8_t event);
|
||||
void nodeProtocolInfo(uint8_t node);
|
||||
void nodeEssentialNodeQueriesComplete(uint8_t node);
|
||||
void nodeQueriesComplete(uint8_t node);
|
||||
void driverReady(uint32_t homeID);
|
||||
void driverFailed(uint32_t homeID);
|
||||
void driverReset(uint32_t homeID);
|
||||
void driverRemoved(uint32_t homeID);
|
||||
void valueAdded(quint64 vidKey);
|
||||
void valueRemoved(quint64 vidKey);
|
||||
void valueChanged(quint64 vidKey);
|
||||
void valueRefreshed(quint64 vidKey);
|
||||
void nodeNew(quint8 node);
|
||||
void nodeAdded(quint8 node);
|
||||
void nodeRemoved(quint8 node);
|
||||
void nodeReset(quint8 node);
|
||||
void nodeNaming(quint8 node);
|
||||
void nodeEvent(quint8 node, quint8 event);
|
||||
void nodeProtocolInfo(quint8 node);
|
||||
void nodeEssentialNodeQueriesComplete(quint8 node);
|
||||
void nodeQueriesComplete(quint8 node);
|
||||
void driverReady(quint32 homeID);
|
||||
void driverFailed(quint32 homeID);
|
||||
void driverReset(quint32 homeID);
|
||||
void driverRemoved(quint32 homeID);
|
||||
void driverAllNodesQueriedSomeDead();
|
||||
void driverAllNodesQueried();
|
||||
void driverAwakeNodesQueried();
|
||||
void controllerCommand(uint8_t command);
|
||||
void controllerCommand(quint8 command);
|
||||
// void ozwNotification(OpenZWave::Notification::NotificationCode event);
|
||||
// void ozwUserAlert(OpenZWave::Notification::UserAlertNotification event);
|
||||
void manufacturerSpecificDBReady();
|
||||
|
||||
void starting();
|
||||
void started(uint32_t homeID);
|
||||
void stopped(uint32_t homeID);
|
||||
void started(quint32 homeID);
|
||||
void stopped(quint32 homeID);
|
||||
// void error(QTOZWErrorCodes errorcode);
|
||||
|
||||
|
||||
|
|
|
@ -13,69 +13,69 @@ class QTOZWManager {
|
|||
|
||||
|
||||
PROP(bool running SOURCEONLYSETTER)
|
||||
PROP(uint32_t homeId SOURCEONLYSETTER)
|
||||
PROP(quint32 homeId SOURCEONLYSETTER)
|
||||
PROP(QString errorString SOURCEONLYSETTER)
|
||||
|
||||
SIGNAL(valueAdded(uint64_t vidKey))
|
||||
SIGNAL(valueRemoved(uint64_t vidKey))
|
||||
SIGNAL(valueChanged(uint64_t vidKey))
|
||||
SIGNAL(valueRefreshed(uint64_t vidKey))
|
||||
SIGNAL(nodeNew(uint8_t node))
|
||||
SIGNAL(nodeAdded(uint8_t node))
|
||||
SIGNAL(nodeRemoved(uint8_t node))
|
||||
SIGNAL(nodeReset(uint8_t node))
|
||||
SIGNAL(nodeNaming(uint8_t node))
|
||||
SIGNAL(nodeEvent(uint8_t node, uint8_t event))
|
||||
SIGNAL(nodeProtocolInfo(uint8_t node))
|
||||
SIGNAL(nodeEssentialNodeQueriesComplete(uint8_t node))
|
||||
SIGNAL(nodeQueriesComplete(uint8_t node))
|
||||
SIGNAL(driverReady(uint32_t homeID))
|
||||
SIGNAL(driverFailed(uint32_t homeID))
|
||||
SIGNAL(driverReset(uint32_t homeID))
|
||||
SIGNAL(driverRemoved(uint32_t homeID))
|
||||
SIGNAL(valueAdded(quint64 vidKey))
|
||||
SIGNAL(valueRemoved(quint64 vidKey))
|
||||
SIGNAL(valueChanged(quint64 vidKey))
|
||||
SIGNAL(valueRefreshed(quint64 vidKey))
|
||||
SIGNAL(nodeNew(quint8 node))
|
||||
SIGNAL(nodeAdded(quint8 node))
|
||||
SIGNAL(nodeRemoved(quint8 node))
|
||||
SIGNAL(nodeReset(quint8 node))
|
||||
SIGNAL(nodeNaming(quint8 node))
|
||||
SIGNAL(nodeEvent(quint8 node, quint8 event))
|
||||
SIGNAL(nodeProtocolInfo(quint8 node))
|
||||
SIGNAL(nodeEssentialNodeQueriesComplete(quint8 node))
|
||||
SIGNAL(nodeQueriesComplete(quint8 node))
|
||||
SIGNAL(driverReady(quint32 homeID))
|
||||
SIGNAL(driverFailed(quint32 homeID))
|
||||
SIGNAL(driverReset(quint32 homeID))
|
||||
SIGNAL(driverRemoved(quint32 homeID))
|
||||
SIGNAL(driverAllNodesQueriedSomeDead())
|
||||
SIGNAL(driverAllNodesQueried())
|
||||
SIGNAL(driverAwakeNodesQueried())
|
||||
SIGNAL(controllerCommand(uint8_t command))
|
||||
SIGNAL(controllerCommand(quint8 command))
|
||||
// SIGNAL(ozwNotification(OpenZWave::Notification::NotificationCode event))
|
||||
// SIGNAL(ozwUserAlert(OpenZWave::Notification::UserAlertNotification event))
|
||||
SIGNAL(manufacturerSpecificDBReady())
|
||||
|
||||
SIGNAL(starting());
|
||||
SIGNAL(started(uint32_t homeID))
|
||||
SIGNAL(stopped(uint32_t homeID))
|
||||
SIGNAL(started(quint32 homeID))
|
||||
SIGNAL(stopped(quint32 homeID))
|
||||
SIGNAL(error(QTOZWErrorCodes errorcode))
|
||||
|
||||
SLOT(bool open(QString serialPort))
|
||||
SLOT(bool refreshNodeInfo(uint8_t _node))
|
||||
SLOT(bool requestNodeState(uint8_t _node))
|
||||
SLOT(bool requestNodeDynamic(uint8_t _node))
|
||||
SLOT(bool refreshNodeInfo(quint8 _node))
|
||||
SLOT(bool requestNodeState(quint8 _node))
|
||||
SLOT(bool requestNodeDynamic(quint8 _node))
|
||||
|
||||
SLOT(bool setConfigParam(uint8_t _node, uint8_t _param, int32_t _value, uint8_t const _size))
|
||||
SLOT(void requestConfigParam(uint8_t _node, uint8_t _param))
|
||||
SLOT(void requestAllConfigParam(uint8_t _node))
|
||||
SLOT(bool setConfigParam(quint8 _node, quint8 _param, qint32 _value, quint8 const _size))
|
||||
SLOT(void requestConfigParam(quint8 _node, quint8 _param))
|
||||
SLOT(void requestAllConfigParam(quint8 _node))
|
||||
SLOT(void softResetController())
|
||||
SLOT(void hardResetController())
|
||||
|
||||
SLOT(bool cancelControllerCommand())
|
||||
SLOT(void testNetworkNode(uint8_t _node, uint32_t const _count))
|
||||
SLOT(void testNetwork(uint32_t const _count))
|
||||
SLOT(void healNetworkNode(uint8_t _node, bool _doRR))
|
||||
SLOT(void testNetworkNode(quint8 _node, quint32 const _count))
|
||||
SLOT(void testNetwork(quint32 const _count))
|
||||
SLOT(void healNetworkNode(quint8 _node, bool _doRR))
|
||||
SLOT(void healNetwork(bool _doRR))
|
||||
SLOT(bool addNode(bool _doSecure))
|
||||
SLOT(bool removeNode())
|
||||
SLOT(bool removeFailedNode(uint8_t _node))
|
||||
SLOT(bool hasNodeFailed(uint8_t _node))
|
||||
SLOT(bool requestNodeNeighborUpdate(uint8_t _node))
|
||||
SLOT(bool assignReturnRoute(uint8_t _node))
|
||||
SLOT(bool deleteAllReturnRoute(uint8_t _node))
|
||||
SLOT(bool sendNodeInfomation(uint8_t _node))
|
||||
SLOT(bool replaceFailedNode(uint8_t _node))
|
||||
SLOT(bool requestNetworkUpdate(uint8_t _node))
|
||||
SLOT(bool removeFailedNode(quint8 _node))
|
||||
SLOT(bool hasNodeFailed(quint8 _node))
|
||||
SLOT(bool requestNodeNeighborUpdate(quint8 _node))
|
||||
SLOT(bool assignReturnRoute(quint8 _node))
|
||||
SLOT(bool deleteAllReturnRoute(quint8 _node))
|
||||
SLOT(bool sendNodeInfomation(quint8 _node))
|
||||
SLOT(bool replaceFailedNode(quint8 _node))
|
||||
SLOT(bool requestNetworkUpdate(quint8 _node))
|
||||
|
||||
SLOT(bool checkLatestConfigFileRevision(uint8_t const _node))
|
||||
SLOT(bool checkLatestConfigFileRevision(quint8 const _node))
|
||||
SLOT(bool checkLatestMFSRevision())
|
||||
SLOT(bool downloadLatestConfigFileRevision(uint8_t const _node))
|
||||
SLOT(bool downloadLatestConfigFileRevision(quint8 const _node))
|
||||
SLOT(bool downloadLatestMFSRevision())
|
||||
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ bool QTOZW_Nodes::setData(const QModelIndex &index, const QVariant &value, int r
|
|||
return true;
|
||||
}
|
||||
|
||||
QVariant QTOZW_Nodes::getNodeData(uint8_t _node, QTOZW_Nodes::NodeColumns _column) {
|
||||
QVariant QTOZW_Nodes::getNodeData(quint8 _node, QTOZW_Nodes::NodeColumns _column) {
|
||||
int32_t row = this->getNodeRow(_node);
|
||||
if (row >= 0)
|
||||
return this->m_nodeData[row][_column];
|
||||
|
@ -161,7 +161,7 @@ QVariant QTOZW_Nodes::getNodeData(uint8_t _node, QTOZW_Nodes::NodeColumns _colum
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
int32_t QTOZW_Nodes::getNodeRow(uint8_t _node) {
|
||||
int32_t QTOZW_Nodes::getNodeRow(quint8 _node) {
|
||||
if (this->m_nodeData.count() == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ QTOZW_Nodes_internal::QTOZW_Nodes_internal(QObject *parent)
|
|||
|
||||
}
|
||||
|
||||
void QTOZW_Nodes_internal::addNode(uint8_t _nodeID)
|
||||
void QTOZW_Nodes_internal::addNode(quint8 _nodeID)
|
||||
{
|
||||
if (this->getNodeRow(_nodeID) >= 0) {
|
||||
qWarning() << "Node " << _nodeID << " Already Exists";
|
||||
|
@ -201,7 +201,7 @@ void QTOZW_Nodes_internal::addNode(uint8_t _nodeID)
|
|||
this->endInsertRows();
|
||||
}
|
||||
|
||||
void QTOZW_Nodes_internal::setNodeData(uint8_t _nodeID, QTOZW_Nodes::NodeColumns column, QVariant data)
|
||||
void QTOZW_Nodes_internal::setNodeData(quint8 _nodeID, QTOZW_Nodes::NodeColumns column, QVariant data)
|
||||
{
|
||||
int row = this->getNodeRow(_nodeID);
|
||||
if (row == -1) {
|
||||
|
@ -216,7 +216,7 @@ void QTOZW_Nodes_internal::setNodeData(uint8_t _nodeID, QTOZW_Nodes::NodeColumns
|
|||
}
|
||||
}
|
||||
|
||||
void QTOZW_Nodes_internal::setNodeFlags(uint8_t _nodeID, QTOZW_Nodes::nodeFlags _flags, bool _value)
|
||||
void QTOZW_Nodes_internal::setNodeFlags(quint8 _nodeID, QTOZW_Nodes::nodeFlags _flags, bool _value)
|
||||
{
|
||||
int row = this->getNodeRow(_nodeID);
|
||||
if (row == -1) {
|
||||
|
@ -232,7 +232,7 @@ void QTOZW_Nodes_internal::setNodeFlags(uint8_t _nodeID, QTOZW_Nodes::nodeFlags
|
|||
this->dataChanged(this->createIndex(row, QTOZW_Nodes::NodeFlags), this->createIndex(row, QTOZW_Nodes::NodeFlags), roles);
|
||||
}
|
||||
}
|
||||
void QTOZW_Nodes_internal::delNode(uint8_t _nodeID) {
|
||||
void QTOZW_Nodes_internal::delNode(quint8 _nodeID) {
|
||||
QMap<int32_t, QMap<NodeColumns, QVariant> >::iterator it;
|
||||
QMap<int32_t, QMap<NodeColumns, QVariant> > newNodeMap;
|
||||
int32_t newrow = 0;
|
||||
|
|
|
@ -61,8 +61,8 @@ public:
|
|||
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole);
|
||||
|
||||
protected:
|
||||
QVariant getNodeData(uint8_t, NodeColumns);
|
||||
int32_t getNodeRow(uint8_t _node);
|
||||
QVariant getNodeData(quint8, NodeColumns);
|
||||
int32_t getNodeRow(quint8 _node);
|
||||
|
||||
QMap<int32_t, QMap<NodeColumns, QVariant> > m_nodeData;
|
||||
};
|
||||
|
@ -72,10 +72,10 @@ class QTOZW_Nodes_internal : public QTOZW_Nodes {
|
|||
public:
|
||||
QTOZW_Nodes_internal(QObject *parent=nullptr);
|
||||
public Q_SLOTS:
|
||||
void addNode(uint8_t _nodeID);
|
||||
void setNodeData(uint8_t _nodeID, QTOZW_Nodes::NodeColumns column, QVariant data);
|
||||
void setNodeFlags(uint8_t _nodeID, QTOZW_Nodes::nodeFlags _flags, bool _value);
|
||||
void delNode(uint8_t _nodeID);
|
||||
void addNode(quint8 _nodeID);
|
||||
void setNodeData(quint8 _nodeID, QTOZW_Nodes::NodeColumns column, QVariant data);
|
||||
void setNodeFlags(quint8 _nodeID, QTOZW_Nodes::nodeFlags _flags, bool _value);
|
||||
void delNode(quint8 _nodeID);
|
||||
void resetModel();
|
||||
|
||||
};
|
||||
|
|
|
@ -25,12 +25,12 @@ void OZWNotification::processNotification
|
|||
//qDebug() << QString(_notification->GetAsString().c_str());
|
||||
//qDebug() << _notification;
|
||||
#if 0
|
||||
void valueAdded(uint64_t vidKey);
|
||||
void valueRemoved(uint64_t vidKey);
|
||||
void valueChanged(uint64_t vidKey);
|
||||
void valueRefreshed(uint64_t vidKey);
|
||||
void valuePollingEnabled(uint64_t vidKey);
|
||||
void valuePollingDisabled(uint64_t vidKey);
|
||||
void valueAdded(quint64 vidKey);
|
||||
void valueRemoved(quint64 vidKey);
|
||||
void valueChanged(quint64 vidKey);
|
||||
void valueRefreshed(quint64 vidKey);
|
||||
void valuePollingEnabled(quint64 vidKey);
|
||||
void valuePollingDisabled(quint64 vidKey);
|
||||
#endif
|
||||
|
||||
switch( _notification->GetType() )
|
||||
|
|
|
@ -12,30 +12,30 @@ public:
|
|||
// All our Signals that we emit - one for each type of Notification
|
||||
//-----------------------------------------------------------------------------
|
||||
signals:
|
||||
void valueAdded(uint64_t vidKey);
|
||||
void valueRemoved(uint64_t vidKey);
|
||||
void valueChanged(uint64_t vidKey);
|
||||
void valueRefreshed(uint64_t vidKey);
|
||||
void valuePollingEnabled(uint64_t vidKey);
|
||||
void valuePollingDisabled(uint64_t vidKey);
|
||||
void nodeGroupChanged(uint8_t node, uint8_t group);
|
||||
void nodeNew(uint8_t node);
|
||||
void nodeAdded(uint8_t node);
|
||||
void nodeRemoved(uint8_t node);
|
||||
void nodeReset(uint8_t node);
|
||||
void nodeNaming(uint8_t node);
|
||||
void nodeEvent(uint8_t node, uint8_t event);
|
||||
void nodeProtocolInfo(uint8_t node);
|
||||
void nodeEssentialNodeQueriesComplete(uint8_t node);
|
||||
void nodeQueriesComplete(uint8_t node);
|
||||
void driverReady(uint32_t homeID);
|
||||
void driverFailed(uint32_t homeID);
|
||||
void driverReset(uint32_t homeID);
|
||||
void driverRemoved(uint32_t homeID);
|
||||
void valueAdded(quint64 vidKey);
|
||||
void valueRemoved(quint64 vidKey);
|
||||
void valueChanged(quint64 vidKey);
|
||||
void valueRefreshed(quint64 vidKey);
|
||||
void valuePollingEnabled(quint64 vidKey);
|
||||
void valuePollingDisabled(quint64 vidKey);
|
||||
void nodeGroupChanged(quint8 node, quint8 group);
|
||||
void nodeNew(quint8 node);
|
||||
void nodeAdded(quint8 node);
|
||||
void nodeRemoved(quint8 node);
|
||||
void nodeReset(quint8 node);
|
||||
void nodeNaming(quint8 node);
|
||||
void nodeEvent(quint8 node, quint8 event);
|
||||
void nodeProtocolInfo(quint8 node);
|
||||
void nodeEssentialNodeQueriesComplete(quint8 node);
|
||||
void nodeQueriesComplete(quint8 node);
|
||||
void driverReady(quint32 homeID);
|
||||
void driverFailed(quint32 homeID);
|
||||
void driverReset(quint32 homeID);
|
||||
void driverRemoved(quint32 homeID);
|
||||
void driverAllNodesQueriedSomeDead();
|
||||
void driverAwakeNodesQueried();
|
||||
void driverAllNodesQueried();
|
||||
void controllerCommand(uint8_t command);
|
||||
void controllerCommand(quint8 command);
|
||||
void ozwNotification(OpenZWave::Notification::NotificationCode event);
|
||||
void ozwUserAlert(OpenZWave::Notification::UserAlertNotification event);
|
||||
void manufacturerSpecificDBReady();
|
||||
|
|
|
@ -24,7 +24,7 @@ void QTOZW_proxyValueModel::setSelectionModel(QItemSelectionModel *model) {
|
|||
|
||||
void QTOZW_proxyValueModel::currentSelectedRowChanged(const QModelIndex ¤t, const QModelIndex &previous) {
|
||||
Q_UNUSED(previous);
|
||||
this->m_nodeFilter = current.siblingAtColumn(QTOZW_Nodes::NodeColumns::NodeID).data().value<uint8_t>();
|
||||
this->m_nodeFilter = current.siblingAtColumn(QTOZW_Nodes::NodeColumns::NodeID).data().value<quint8>();
|
||||
invalidateFilter();
|
||||
}
|
||||
void QTOZW_proxyValueModel::setFilterGenre(QTOZW_ValueIds::ValueIdGenres genre)
|
||||
|
@ -41,7 +41,7 @@ bool QTOZW_proxyValueModel::filterAcceptsRow(int sourceRow, const QModelIndex &s
|
|||
}
|
||||
if (this->m_nodeFilter > 0) {
|
||||
QModelIndex nodeIDIndex = sourceModel()->index(sourceRow, QTOZW_ValueIds::ValueIdColumns::Node, sourceParent);
|
||||
if (nodeIDIndex.data().value<uint8_t>() != this->m_nodeFilter)
|
||||
if (nodeIDIndex.data().value<quint8>() != this->m_nodeFilter)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -59,14 +59,15 @@ void QTOZW_proxyAssociationModel::setSelectionModel(QItemSelectionModel *model)
|
|||
}
|
||||
|
||||
void QTOZW_proxyAssociationModel::currentSelectedRowChanged(const QModelIndex ¤t, const QModelIndex &previous) {
|
||||
this->m_nodeFilter = current.siblingAtColumn(QTOZW_Nodes::NodeColumns::NodeID).data().value<uint8_t>();
|
||||
Q_UNUSED(previous);
|
||||
this->m_nodeFilter = current.siblingAtColumn(QTOZW_Nodes::NodeColumns::NodeID).data().value<quint8>();
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
bool QTOZW_proxyAssociationModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const {
|
||||
if (this->m_nodeFilter > 0) {
|
||||
QModelIndex nodeIDIndex = sourceModel()->index(sourceRow, QTOZW_Associations::associationColumns::NodeID, sourceParent);
|
||||
if (nodeIDIndex.data().value<uint8_t>() != this->m_nodeFilter)
|
||||
if (nodeIDIndex.data().value<quint8>() != this->m_nodeFilter)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -159,7 +159,7 @@ bool QTOZW_ValueIds::setData(const QModelIndex &index, const QVariant &value, in
|
|||
return true;
|
||||
}
|
||||
|
||||
QVariant QTOZW_ValueIds::getValueData(uint64_t _vidKey, ValueIdColumns _column) {
|
||||
QVariant QTOZW_ValueIds::getValueData(quint64 _vidKey, ValueIdColumns _column) {
|
||||
int32_t row = this->getValueRow(_vidKey);
|
||||
if (row >= 0)
|
||||
return this->m_valueData[row][_column];
|
||||
|
@ -167,7 +167,7 @@ QVariant QTOZW_ValueIds::getValueData(uint64_t _vidKey, ValueIdColumns _column)
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
int32_t QTOZW_ValueIds::getValueRow(uint64_t _vidKey) {
|
||||
int32_t QTOZW_ValueIds::getValueRow(quint64 _vidKey) {
|
||||
if (this->m_valueData.count() == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ QTOZW_ValueIds_internal::QTOZW_ValueIds_internal(QObject *parent)
|
|||
|
||||
}
|
||||
|
||||
void QTOZW_ValueIds_internal::addValue(uint64_t _vidKey)
|
||||
void QTOZW_ValueIds_internal::addValue(quint64 _vidKey)
|
||||
{
|
||||
if (this->getValueRow(_vidKey) >= 0) {
|
||||
qWarning() << "ValueID " << _vidKey << " Already Exists";
|
||||
|
@ -205,7 +205,7 @@ void QTOZW_ValueIds_internal::addValue(uint64_t _vidKey)
|
|||
this->endInsertRows();
|
||||
}
|
||||
|
||||
void QTOZW_ValueIds_internal::setValueData(uint64_t _vidKey, QTOZW_ValueIds::ValueIdColumns column, QVariant data)
|
||||
void QTOZW_ValueIds_internal::setValueData(quint64 _vidKey, QTOZW_ValueIds::ValueIdColumns column, QVariant data)
|
||||
{
|
||||
int row = this->getValueRow(_vidKey);
|
||||
if (row == -1) {
|
||||
|
@ -218,7 +218,7 @@ void QTOZW_ValueIds_internal::setValueData(uint64_t _vidKey, QTOZW_ValueIds::Val
|
|||
}
|
||||
}
|
||||
|
||||
void QTOZW_ValueIds_internal::setValueFlags(uint64_t _vidKey, QTOZW_ValueIds::ValueIDFlags _flags, bool _value)
|
||||
void QTOZW_ValueIds_internal::setValueFlags(quint64 _vidKey, QTOZW_ValueIds::ValueIDFlags _flags, bool _value)
|
||||
{
|
||||
int row = this->getValueRow(_vidKey);
|
||||
if (row == -1) {
|
||||
|
@ -233,7 +233,7 @@ void QTOZW_ValueIds_internal::setValueFlags(uint64_t _vidKey, QTOZW_ValueIds::Va
|
|||
}
|
||||
}
|
||||
|
||||
void QTOZW_ValueIds_internal::delValue(uint64_t _vidKey) {
|
||||
void QTOZW_ValueIds_internal::delValue(quint64 _vidKey) {
|
||||
QMap<int32_t, QMap<ValueIdColumns, QVariant> >::iterator it;
|
||||
QMap<int32_t, QMap<ValueIdColumns, QVariant> > newValueMap;
|
||||
int32_t newrow = 0;
|
||||
|
@ -252,10 +252,10 @@ void QTOZW_ValueIds_internal::delValue(uint64_t _vidKey) {
|
|||
this->m_valueData.swap(newValueMap);
|
||||
}
|
||||
|
||||
void QTOZW_ValueIds_internal::delNodeValues(uint8_t _node) {
|
||||
void QTOZW_ValueIds_internal::delNodeValues(quint8 _node) {
|
||||
QMap<int32_t, QMap<ValueIdColumns, QVariant> >::iterator it;
|
||||
QMap<int32_t, QMap<ValueIdColumns, QVariant> > newValueMap;
|
||||
int32_t newrow = 0;
|
||||
qint32 newrow = 0;
|
||||
for (it = this->m_valueData.begin(); it != this->m_valueData.end(); ++it) {
|
||||
if (it.value()[QTOZW_ValueIds::ValueIdColumns::Node] == _node) {
|
||||
qDebug() << "Removing Value " << it.value()[QTOZW_ValueIds::ValueIdColumns::Label] << it.key();
|
||||
|
@ -293,10 +293,10 @@ QString BitSettoQString(QBitArray ba) {
|
|||
#endif
|
||||
}
|
||||
|
||||
uint32_t BitSettoInteger(QBitArray ba) {
|
||||
uint32_t value = 0;
|
||||
quint32 BitSettoInteger(QBitArray ba) {
|
||||
quint32 value = 0;
|
||||
for (int i = 0; i <= ba.size()-1; ++i) {
|
||||
value += (uint32_t)((ba.at(i) ? 1 : 0) << i);
|
||||
value += (quint32)((ba.at(i) ? 1 : 0) << i);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
|
||||
struct QTOZW_ValueIDList {
|
||||
QList< uint32_t > values;
|
||||
QList< quint32 > values;
|
||||
QStringList labels;
|
||||
QString selectedItem;
|
||||
};
|
||||
|
@ -20,8 +20,8 @@ Q_DECLARE_METATYPE(QTOZW_ValueIDList);
|
|||
struct QTOZW_ValueIDBitSet {
|
||||
QBitArray values;
|
||||
QBitArray mask;
|
||||
QMap<uint32_t, QString> label;
|
||||
QMap<uint32_t, QString> help;
|
||||
QMap<quint32, QString> label;
|
||||
QMap<quint32, QString> help;
|
||||
};
|
||||
QDataStream & operator<<( QDataStream & dataStream, const QTOZW_ValueIDBitSet & list );
|
||||
QDataStream & operator>>(QDataStream & dataStream, QTOZW_ValueIDBitSet & list);
|
||||
|
@ -90,8 +90,8 @@ public:
|
|||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole);
|
||||
protected:
|
||||
QVariant getValueData(uint64_t, ValueIdColumns);
|
||||
int32_t getValueRow(uint64_t _node);
|
||||
QVariant getValueData(quint64, ValueIdColumns);
|
||||
int32_t getValueRow(quint64 _node);
|
||||
|
||||
QMap<int32_t, QMap<ValueIdColumns, QVariant> > m_valueData;
|
||||
};
|
||||
|
@ -101,16 +101,16 @@ class QTOZW_ValueIds_internal : public QTOZW_ValueIds {
|
|||
public:
|
||||
QTOZW_ValueIds_internal(QObject *parent=nullptr);
|
||||
public Q_SLOTS:
|
||||
void addValue(uint64_t _vidKey);
|
||||
void setValueData(uint64_t _vidKey, QTOZW_ValueIds::ValueIdColumns column, QVariant data);
|
||||
void setValueFlags(uint64_t _vidKey, QTOZW_ValueIds::ValueIDFlags _flags, bool _value);
|
||||
void delValue(uint64_t _vidKey);
|
||||
void delNodeValues(uint8_t _node);
|
||||
void addValue(quint64 _vidKey);
|
||||
void setValueData(quint64 _vidKey, QTOZW_ValueIds::ValueIdColumns column, QVariant data);
|
||||
void setValueFlags(quint64 _vidKey, QTOZW_ValueIds::ValueIDFlags _flags, bool _value);
|
||||
void delValue(quint64 _vidKey);
|
||||
void delNodeValues(quint8 _node);
|
||||
void resetModel();
|
||||
};
|
||||
|
||||
QString BitSettoQString(QBitArray ba);
|
||||
uint32_t BitSettoInteger(QBitArray ba);
|
||||
quint32 BitSettoInteger(QBitArray ba);
|
||||
|
||||
|
||||
#endif // QTOZWVALUEIDMODEL_H
|
||||
|
|
|
@ -160,57 +160,57 @@ void MainWindow::QTOZW_Ready() {
|
|||
|
||||
}
|
||||
|
||||
void MainWindow::valueAdded(uint64_t vidKey) {
|
||||
void MainWindow::valueAdded(quint64 vidKey) {
|
||||
Q_UNUSED(vidKey)
|
||||
this->ui->statusbar->showMessage("ValueAdded Notification", 2000);
|
||||
}
|
||||
void MainWindow::valueRemoved(uint64_t vidKey) {
|
||||
void MainWindow::valueRemoved(quint64 vidKey) {
|
||||
Q_UNUSED(vidKey)
|
||||
this->ui->statusbar->showMessage("ValueRemoved Notification", 2000);
|
||||
}
|
||||
void MainWindow::valueChanged(uint64_t vidKey) {
|
||||
void MainWindow::valueChanged(quint64 vidKey) {
|
||||
Q_UNUSED(vidKey)
|
||||
this->ui->statusbar->showMessage("ValueChanged Notification", 2000);
|
||||
}
|
||||
void MainWindow::valueRefreshed(uint64_t vidKey) {
|
||||
void MainWindow::valueRefreshed(quint64 vidKey) {
|
||||
Q_UNUSED(vidKey)
|
||||
this->ui->statusbar->showMessage("ValueRefreshed Notification", 2000);
|
||||
}
|
||||
void MainWindow::nodeNew(uint8_t node) {
|
||||
void MainWindow::nodeNew(quint8 node) {
|
||||
Q_UNUSED(node);
|
||||
this->ui->statusbar->showMessage("NodeNew Notification", 2000);
|
||||
}
|
||||
void MainWindow::nodeAdded(uint8_t node) {
|
||||
void MainWindow::nodeAdded(quint8 node) {
|
||||
Q_UNUSED(node);
|
||||
this->ui->statusbar->showMessage("NodeAdded Notification", 2000);
|
||||
}
|
||||
void MainWindow::nodeRemoved(uint8_t node) {
|
||||
void MainWindow::nodeRemoved(quint8 node) {
|
||||
Q_UNUSED(node);
|
||||
this->ui->statusbar->showMessage("NodeRemoved Notification", 2000);
|
||||
}
|
||||
void MainWindow::nodeReset(uint8_t node) {
|
||||
void MainWindow::nodeReset(quint8 node) {
|
||||
Q_UNUSED(node);
|
||||
this->ui->statusbar->showMessage("NodeReset Notification", 2000);
|
||||
}
|
||||
void MainWindow::nodeNaming(uint8_t node) {
|
||||
void MainWindow::nodeNaming(quint8 node) {
|
||||
Q_UNUSED(node);
|
||||
this->ui->statusbar->showMessage("NodeNaming Notification", 2000);
|
||||
}
|
||||
void MainWindow::nodeEvent(uint8_t node, uint8_t event) {
|
||||
void MainWindow::nodeEvent(quint8 node, quint8 event) {
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(event)
|
||||
this->ui->statusbar->showMessage("NodeEvent Notification", 2000);
|
||||
}
|
||||
void MainWindow::nodeProtocolInfo(uint8_t node) {
|
||||
void MainWindow::nodeProtocolInfo(quint8 node) {
|
||||
Q_UNUSED(node)
|
||||
this->ui->statusbar->showMessage("NodeProtocolInfo Notification", 2000);
|
||||
}
|
||||
void MainWindow::nodeEssentialNodeQueriesComplete(uint8_t node) {
|
||||
void MainWindow::nodeEssentialNodeQueriesComplete(quint8 node) {
|
||||
Q_UNUSED(node)
|
||||
this->ui->statusbar->showMessage("NodeEssentialNodeQueriesComplete Notification", 2000);
|
||||
}
|
||||
void MainWindow::nodeQueriesComplete(uint8_t node) {
|
||||
static QMap<uint8_t, bool> refreshdone;
|
||||
void MainWindow::nodeQueriesComplete(quint8 node) {
|
||||
static QMap<quint8, bool> refreshdone;
|
||||
this->ui->statusbar->showMessage("nodeQueriesComplete Notification", 2000);
|
||||
if (!refreshdone[node]) {
|
||||
refreshdone[node] = true;
|
||||
|
@ -218,19 +218,19 @@ void MainWindow::nodeQueriesComplete(uint8_t node) {
|
|||
this->m_qtozwmanager->requestAllConfigParam(node);
|
||||
}
|
||||
}
|
||||
void MainWindow::driverReady(uint32_t homeID) {
|
||||
void MainWindow::driverReady(quint32 homeID) {
|
||||
Q_UNUSED(homeID)
|
||||
this->ui->statusbar->showMessage("DriverReady Notification", 2000);
|
||||
}
|
||||
void MainWindow::driverFailed(uint32_t homeID) {
|
||||
void MainWindow::driverFailed(quint32 homeID) {
|
||||
Q_UNUSED(homeID)
|
||||
this->ui->statusbar->showMessage("DriverFailed Notification", 2000);
|
||||
}
|
||||
void MainWindow::driverReset(uint32_t homeID) {
|
||||
void MainWindow::driverReset(quint32 homeID) {
|
||||
Q_UNUSED(homeID)
|
||||
this->ui->statusbar->showMessage("DriverReset Notification", 2000);
|
||||
}
|
||||
void MainWindow::driverRemoved(uint32_t homeID) {
|
||||
void MainWindow::driverRemoved(quint32 homeID) {
|
||||
Q_UNUSED(homeID)
|
||||
this->ui->statusbar->showMessage("DriverRemoved Notification", 2000);
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ void MainWindow::driverAllNodesQueried() {
|
|||
void MainWindow::driverAwakeNodesQueried() {
|
||||
this->ui->statusbar->showMessage("DriverAwakeNodesQueried Notification", 2000);
|
||||
}
|
||||
void MainWindow::controllerCommand(uint8_t command) {
|
||||
void MainWindow::controllerCommand(quint8 command) {
|
||||
Q_UNUSED(command)
|
||||
this->ui->statusbar->showMessage("ControllerCommand Notification", 2000);
|
||||
}
|
||||
|
@ -256,11 +256,11 @@ void MainWindow::manufacturerSpecificDBReady() {
|
|||
void MainWindow::starting() {
|
||||
this->ui->statusbar->showMessage("Starting", 2000);
|
||||
}
|
||||
void MainWindow::started(uint32_t homeID) {
|
||||
void MainWindow::started(quint32 homeID) {
|
||||
Q_UNUSED(homeID)
|
||||
this->ui->statusbar->showMessage("Started", 2000);
|
||||
}
|
||||
void MainWindow::stopped(uint32_t homeID) {
|
||||
void MainWindow::stopped(quint32 homeID) {
|
||||
Q_UNUSED(homeID)
|
||||
this->ui->statusbar->showMessage("Stopped", 2000);
|
||||
}
|
||||
|
|
|
@ -21,34 +21,34 @@ public Q_SLOTS:
|
|||
void startRemote(QString);
|
||||
void startLocal(QString, bool);
|
||||
void QTOZW_Ready();
|
||||
void valueAdded(uint64_t vidKey);
|
||||
void valueRemoved(uint64_t vidKey);
|
||||
void valueChanged(uint64_t vidKey);
|
||||
void valueRefreshed(uint64_t vidKey);
|
||||
void nodeNew(uint8_t node);
|
||||
void nodeAdded(uint8_t node);
|
||||
void nodeRemoved(uint8_t node);
|
||||
void nodeReset(uint8_t node);
|
||||
void nodeNaming(uint8_t node);
|
||||
void nodeEvent(uint8_t node, uint8_t event);
|
||||
void nodeProtocolInfo(uint8_t node);
|
||||
void nodeEssentialNodeQueriesComplete(uint8_t node);
|
||||
void nodeQueriesComplete(uint8_t node);
|
||||
void driverReady(uint32_t homeID);
|
||||
void driverFailed(uint32_t homeID);
|
||||
void driverReset(uint32_t homeID);
|
||||
void driverRemoved(uint32_t homeID);
|
||||
void valueAdded(quint64 vidKey);
|
||||
void valueRemoved(quint64 vidKey);
|
||||
void valueChanged(quint64 vidKey);
|
||||
void valueRefreshed(quint64 vidKey);
|
||||
void nodeNew(quint8 node);
|
||||
void nodeAdded(quint8 node);
|
||||
void nodeRemoved(quint8 node);
|
||||
void nodeReset(quint8 node);
|
||||
void nodeNaming(quint8 node);
|
||||
void nodeEvent(quint8 node, quint8 event);
|
||||
void nodeProtocolInfo(quint8 node);
|
||||
void nodeEssentialNodeQueriesComplete(quint8 node);
|
||||
void nodeQueriesComplete(quint8 node);
|
||||
void driverReady(quint32 homeID);
|
||||
void driverFailed(quint32 homeID);
|
||||
void driverReset(quint32 homeID);
|
||||
void driverRemoved(quint32 homeID);
|
||||
void driverAllNodesQueriedSomeDead();
|
||||
void driverAllNodesQueried();
|
||||
void driverAwakeNodesQueried();
|
||||
void controllerCommand(uint8_t command);
|
||||
void controllerCommand(quint8 command);
|
||||
// void ozwNotification(OpenZWave::Notification::NotificationCode event);
|
||||
// void ozwUserAlert(OpenZWave::Notification::UserAlertNotification event);
|
||||
void manufacturerSpecificDBReady();
|
||||
|
||||
void starting();
|
||||
void started(uint32_t homeID);
|
||||
void stopped(uint32_t homeID);
|
||||
void started(quint32 homeID);
|
||||
void stopped(quint32 homeID);
|
||||
// void error(QTOZWErrorCodes errorcode);
|
||||
|
||||
|
||||
|
|
|
@ -69,9 +69,9 @@ void QTOZW_ItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &op
|
|||
if (typeIndex.data().value<QTOZW_ValueIds::ValueIdTypes>() == QTOZW_ValueIds::ValueIdTypes::Int) {
|
||||
max = qMin(max, std::numeric_limits<int>::max());
|
||||
} else if (typeIndex.data().value<QTOZW_ValueIds::ValueIdTypes>() == QTOZW_ValueIds::ValueIdTypes::Byte) {
|
||||
max = qMin(static_cast<uint8_t>(max), std::numeric_limits<uint8_t>::max());
|
||||
max = qMin(static_cast<quint8>(max), std::numeric_limits<quint8>::max());
|
||||
} else if (typeIndex.data().value<QTOZW_ValueIds::ValueIdTypes>() == QTOZW_ValueIds::ValueIdTypes::Short) {
|
||||
max = qMin(static_cast<uint16_t>(max), std::numeric_limits<uint16_t>::max());
|
||||
max = qMin(static_cast<quint16>(max), std::numeric_limits<quint16>::max());
|
||||
}
|
||||
this->m_spinBox->setRange(min, max);
|
||||
painter->save();
|
||||
|
@ -184,9 +184,9 @@ void QTOZW_ItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index
|
|||
if (typeIndex.data().value<QTOZW_ValueIds::ValueIdTypes>() == QTOZW_ValueIds::ValueIdTypes::Int) {
|
||||
max = qMin(max, std::numeric_limits<int>::max());
|
||||
} else if (typeIndex.data().value<QTOZW_ValueIds::ValueIdTypes>() == QTOZW_ValueIds::ValueIdTypes::Byte) {
|
||||
max = qMin(static_cast<uint8_t>(max), std::numeric_limits<uint8_t>::max());
|
||||
max = qMin(static_cast<quint8>(max), std::numeric_limits<quint8>::max());
|
||||
} else if (typeIndex.data().value<QTOZW_ValueIds::ValueIdTypes>() == QTOZW_ValueIds::ValueIdTypes::Short) {
|
||||
max = qMin(static_cast<uint16_t>(max), std::numeric_limits<uint16_t>::max());
|
||||
max = qMin(static_cast<quint16>(max), std::numeric_limits<quint16>::max());
|
||||
}
|
||||
sb->setRange(min, max);
|
||||
sb->setValue(index.data().toInt());
|
||||
|
|
Loading…
Add table
Reference in a new issue