OpenZWave / node-openzwave-shared

OpenZWave addon for Node.js (all versions) including management and security functions
Other
199 stars 113 forks source link

Issue:291 add device metadata #336

Closed mlankamp closed 4 years ago

mlankamp commented 5 years ago

I've added the getMetaData and getChangeLog functionality. c++ is not my strong point, so don't know if the following: OpenZWave::Node::MetaDataFields metadata = static_cast<OpenZWave::Node::MetaDataFields>(Nan::To<int>(info[1]).ToChecked());

is the correct way to cast and int to enum.

ekarak commented 5 years ago

Looks good to me. As for the static cast, I think we just need proper boundary checks (ie test if the integer supplied is within the MetaDataFields enum)

robertsLando commented 4 years ago

@ekarak Could this be merged?