mirror of
https://github.com/Fishwaldo/open-zwave.git
synced 2025-03-15 19:41:36 +00:00
Issue #1831 - Implement GetTypeAsString and GetGenreAsString in ValueID Class
This commit is contained in:
parent
339d53d7cb
commit
7f440b6e0d
5 changed files with 23 additions and 3 deletions
|
@ -531,6 +531,7 @@ exit 0</Command>
|
|||
<ClCompile Include="..\..\..\src\value_classes\ValueByte.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueDecimal.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueInt.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueID.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueList.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueShort.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueStore.cpp" />
|
||||
|
|
|
@ -403,6 +403,7 @@ exit 0</Command>
|
|||
<ClCompile Include="..\..\..\src\value_classes\ValueByte.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueDecimal.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueInt.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueID.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueList.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueShort.cpp" />
|
||||
<ClCompile Include="..\..\..\src\value_classes\ValueStore.cpp" />
|
||||
|
|
|
@ -366,11 +366,12 @@ int main( int argc, char* argv[] )
|
|||
{
|
||||
ValueID v = *it2;
|
||||
printf("\t ValueLabel: %s \n", Manager::Get()->GetValueLabel(v).c_str());
|
||||
printf("\t\t ValueType: %d \n", v.GetType());
|
||||
printf("\t\t ValueType: %s (%d) \n", v.GetTypeAsString().c_str(), v.GetType());
|
||||
printf("\t\t ValueHelp: %s \n", Manager::Get()->GetValueHelp(v).c_str());
|
||||
printf("\t\t ValueUnits: %s \n", Manager::Get()->GetValueUnits(v).c_str());
|
||||
printf("\t\t ValueMin: %d \n", Manager::Get()->GetValueMin(v));
|
||||
printf("\t\t ValueMax: %d \n", Manager::Get()->GetValueMax(v));
|
||||
printf("\t\t ValueGenre: %s (%d)\n", v.GetGenreAsString().c_str(), v.GetGenre());
|
||||
|
||||
if( v.GetCommandClassId() == COMMAND_CLASS_BASIC )
|
||||
{
|
||||
|
|
|
@ -149,6 +149,14 @@ namespace OpenZWave
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the genre of the value as a String. The genre classifies a value to enable
|
||||
* low-level system or configuration parameters to be filtered out by the application
|
||||
* \return the value's genre.
|
||||
* \see ValueGenre, ValueID::GetGenre
|
||||
*/
|
||||
string GetGenreAsString() const;
|
||||
|
||||
/**
|
||||
* Get the Z-Wave command class that created and manages this value. Knowledge of
|
||||
* command classes is not required to use OpenZWave, but this information is
|
||||
* exposed in case it is of interest.
|
||||
|
@ -197,6 +205,15 @@ namespace OpenZWave
|
|||
return ((ValueType) (m_id & 0x0000000f));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the type of the value as a String. The type describes the data held by the value
|
||||
* and enables the user to select the correct value accessor method in the
|
||||
* Manager class.
|
||||
* \return the value's type.
|
||||
* \see ValueType, Manager::GetValueAsBool, Manager::GetValueAsByte, Manager::GetValueAsFloat, Manager::GetValueAsInt, Manager::GetValueAsShort, Manager::GetValueAsString, Manager::GetValueListSelection, ValueID::GetType
|
||||
*/
|
||||
string GetTypeAsString() const;
|
||||
|
||||
/**
|
||||
* Get a 64Bit Integer that represents this ValueID. This Integer is not guaranteed to be the same
|
||||
* across restarts of OpenZWave.
|
||||
|
|
4
dist/openzwave.spec
vendored
4
dist/openzwave.spec
vendored
|
@ -3,7 +3,7 @@
|
|||
%endif
|
||||
|
||||
Name: openzwave
|
||||
Version: 1.6.739
|
||||
Version: 1.6.748
|
||||
Release: 1.0%{?dist}
|
||||
Summary: Sample Executables for OpenZWave
|
||||
URL: http://www.openzwave.net
|
||||
|
@ -135,7 +135,7 @@ getent group zwave >/dev/null || groupadd -f -r zwave
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed May 08 2019 Justin Hammond <justin@dynam.ac> - 1.6.739
|
||||
* Wed May 08 2019 Justin Hammond <justin@dynam.ac> - 1.6.748
|
||||
- Update to new release of OpenZwave - 1.6
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-0.20180624git1e36dcc.0
|
||||
|
|
Loading…
Add table
Reference in a new issue