Skip to content

Commit

Permalink
Add Metadata (from/to string) methods into Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
jano42 committed Nov 29, 2019
1 parent 25230d7 commit b277c38
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
19 changes: 19 additions & 0 deletions cpp/src/Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4821,6 +4821,25 @@ if (Driver* driver = GetDriver(_homeId))
return "";
}

//-----------------------------------------------------------------------------
// <Manager::GetMetaDataId>
// Retrieve metadata from its name
//-----------------------------------------------------------------------------
Node::MetaDataFields Manager::GetMetaDataId(const string& metaDataFiledtoParse)
{
return Node::GetMetaDataId(metaDataFiledtoParse);
}


//-----------------------------------------------------------------------------
// <Manager::GetMetaDataString>
// Get the MetaData string representation
//-----------------------------------------------------------------------------
string const Manager::GetMetaDataString(Node::MetaDataFields metaData)
{
return Node::GetMetaDataString(metaData);
}

//-----------------------------------------------------------------------------
// <Manager::GetChangeLog>
// Retrieve ChangeLog of a Configuration File about a Node.
Expand Down
12 changes: 12 additions & 0 deletions cpp/src/Manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2645,6 +2645,18 @@ namespace OpenZWave
* \return a string containing the requested metadata
*/
string const GetMetaData(uint32 const _homeId, uint8 const _nodeId, Node::MetaDataFields _metadata);
/**
* \brief Retrieve metadata from its name
* \param metaDataFiledtoParse the string to parse (careful, case sensitive)
* \return the found metaDataField if parsing is successful, or MetaData_Invalid
*/
Node::MetaDataFields GetMetaDataId(const string & metaDataFiledtoParse);
/**
* \brief Get the MetaData string representation
* \param metaData the metaData enum
* \return the metaData name (or empty string if not found)
*/
string const GetMetaDataString(Node::MetaDataFields metaData);
/**
* \brief Retrieve ChangeLogs about a configuration revision
* \param _homeId The Home ID of the driver for the node
Expand Down

0 comments on commit b277c38

Please sign in to comment.