mirror of
https://github.com/Fishwaldo/open-zwave.git
synced 2025-03-15 19:41:36 +00:00
Added invertEndpointSource parameter in xml to use destination endpoint as… (#1750)
* Added invertEndpointSource parameter in xml to use destination endpoint as source * Move the Config Option to the MultiInstance CC * update configuration and xmltest * write out the config as well to our cache
This commit is contained in:
parent
c01bd597bf
commit
52edf00d83
4 changed files with 28 additions and 3 deletions
|
@ -124,6 +124,14 @@
|
|||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name='invertEndpointSource' use='optional'>
|
||||
<xs:simpleType>
|
||||
<xs:restriction base='xs:string'>
|
||||
<xs:enumeration value='true'/>
|
||||
<xs:enumeration value='false'/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name='ForceInstances' use='optional'>
|
||||
<xs:simpleType>
|
||||
<xs:restriction base='xs:string'>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
</CommandClass>
|
||||
|
||||
<CommandClass id="96" mapping="endpoints" />
|
||||
<CommandClass id="96" mapping="endpoints" invertEndpointSource="true" />
|
||||
<!-- COMMAND_CLASS_ALARM. This class is in the list reported by the GreenWave PowerNode 6, but it does not respond to requests -->
|
||||
<CommandClass id="113" action="remove" />
|
||||
<!-- COMMAND_CLASS_INDICATOR. This class is in the list reported by the GreenWave PowerNode 6, but it does not respond to requests -->
|
||||
|
|
|
@ -89,6 +89,7 @@ MultiInstance::MultiInstance
|
|||
):
|
||||
CommandClass( _homeId, _nodeId ),
|
||||
m_numEndPoints( 0 ),
|
||||
m_useDestAsSrc(false),
|
||||
m_numEndPointsHint( 0 ),
|
||||
m_endPointMap( MultiInstanceMapAll ),
|
||||
m_endPointFindSupported( false ),
|
||||
|
@ -147,6 +148,12 @@ void MultiInstance::ReadXML
|
|||
{
|
||||
m_uniqueendpoints = !strcmp( str, "true");
|
||||
}
|
||||
str = _ccElement->Attribute( "invertEndpointSource" );
|
||||
if( str )
|
||||
{
|
||||
m_useDestAsSrc = !strcmp( str, "true" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -181,6 +188,10 @@ void MultiInstance::WriteXML
|
|||
{
|
||||
_ccElement->SetAttribute( "forceUniqueEndpoints", "true" );
|
||||
}
|
||||
if ( m_useDestAsSrc )
|
||||
{
|
||||
_ccElement->SetAttribute( "invertEndpointSource", "true" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -444,7 +455,12 @@ void MultiInstance::HandleMultiChannelCapabilityReport
|
|||
return;
|
||||
}
|
||||
|
||||
uint8 endPoint = _data[1] & 0x7f;
|
||||
uint8 endPoint;
|
||||
if (m_useDestAsSrc) {
|
||||
endPoint = _data[2] & 0x7f;
|
||||
} else {
|
||||
endPoint = _data[1] & 0x7f;
|
||||
}
|
||||
|
||||
Log::Write( LogLevel_Info, GetNodeId(), "Received MultiChannelCapabilityReport from node %d for endpoint %d", GetNodeId(), endPoint );
|
||||
Log::Write( LogLevel_Info, GetNodeId(), " Endpoint is%sdynamic, and is a %s", dynamic ? " " : " not ", node->GetEndPointDeviceClassLabel( _data[2], _data[3] ).c_str() );
|
||||
|
|
|
@ -92,7 +92,8 @@ namespace OpenZWave
|
|||
bool m_numEndPointsCanChange;
|
||||
bool m_endPointsAreSameClass;
|
||||
uint8 m_numEndPoints;
|
||||
|
||||
bool m_useDestAsSrc;
|
||||
|
||||
// Finding endpoints
|
||||
uint8 m_endPointFindIndex;
|
||||
uint8 m_numEndPointsFound;
|
||||
|
|
Loading…
Add table
Reference in a new issue