@@ -305,14 +305,14 @@ namespace OZW {
305305 OZWManagerAssign (result, IsNodeSecurityDevice, homeid, nodeid);
306306 info.GetReturnValue ().Set (Nan::New<Boolean>(result));
307307 }
308-
308+
309309 // ===================================================================
310310 NAN_METHOD (OZW::GetNodePlusTypeString)
311311 // ===================================================================
312312 {
313313 Nan::HandleScope scope;
314314 CheckMinArgs (1 , " nodeid" );
315- uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
315+ uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
316316 ::std::string result = OpenZWave::Manager::Get ()->GetNodePlusTypeString (homeid, nodeid);
317317 info.GetReturnValue ().Set (Nan::New<String>(result.c_str ()).ToLocalChecked ());
318318 }
@@ -324,7 +324,7 @@ namespace OZW {
324324 {
325325 Nan::HandleScope scope;
326326 CheckMinArgs (1 , " nodeid" );
327- uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
327+ uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
328328 ::std::string result = OpenZWave::Manager::Get ()->GetNodeRoleString (homeid, nodeid);
329329 info.GetReturnValue ().Set (Nan::New<String>(result.c_str ()).ToLocalChecked ());
330330 }
@@ -336,7 +336,7 @@ namespace OZW {
336336 {
337337 Nan::HandleScope scope;
338338 CheckMinArgs (1 , " nodeid" );
339- uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
339+ uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
340340 uint8 result = OpenZWave::Manager::Get ()->GetNodePlusType (homeid, nodeid);
341341 info.GetReturnValue ().Set (Nan::New<Integer>(result));
342342 }
@@ -348,7 +348,7 @@ namespace OZW {
348348 {
349349 Nan::HandleScope scope;
350350 CheckMinArgs (1 , " nodeid" );
351- uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
351+ uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
352352 uint8 result = OpenZWave::Manager::Get ()->GetNodeRole (homeid, nodeid);
353353 info.GetReturnValue ().Set (Nan::New<Integer>(result));
354354 }
@@ -360,7 +360,7 @@ namespace OZW {
360360 {
361361 Nan::HandleScope scope;
362362 CheckMinArgs (1 , " nodeid" );
363- uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
363+ uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
364364 ::std::string result = OpenZWave::Manager::Get ()->GetNodeDeviceTypeString (homeid, nodeid);
365365 info.GetReturnValue ().Set (Nan::New<String>(result.c_str ()).ToLocalChecked ());
366366 }
@@ -372,7 +372,7 @@ namespace OZW {
372372 {
373373 Nan::HandleScope scope;
374374 CheckMinArgs (1 , " nodeid" );
375- uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
375+ uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
376376 uint16 result = OpenZWave::Manager::Get ()->GetNodeDeviceType (homeid, nodeid);
377377 info.GetReturnValue ().Set (Nan::New<Integer>(result));
378378 }
@@ -648,4 +648,45 @@ namespace OZW {
648648 OZWManager ( SetNodeProductName, homeid, nodeid, name);
649649 }
650650
651+ /*
652+ *
653+ */
654+ // ===================================================================
655+ NAN_METHOD (OZW::GetMetaData)
656+ // ===================================================================
657+ {
658+ Nan::HandleScope scope;
659+ CheckMinArgs (2 , " nodeid, metadata" );
660+ uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
661+ OpenZWave::Node::MetaDataFields metadata = static_cast <OpenZWave::Node::MetaDataFields>(Nan::To<int >(info[1 ]).ToChecked ());
662+ ::std::string result (" " );
663+ OZWManagerAssign (result, GetMetaData, homeid, nodeid, metadata);
664+ info.GetReturnValue ().Set (Nan::New<String>(result.c_str ()).ToLocalChecked ());
665+ }
666+
667+ #if OPENZWAVE_16
668+ /*
669+ *
670+ */
671+ // ===================================================================
672+ NAN_METHOD (OZW::GetChangeLog)
673+ // ===================================================================
674+ {
675+ Nan::HandleScope scope;
676+ CheckMinArgs (2 , " nodeid, revision" );
677+ uint8 nodeid = Nan::To<Number>(info[0 ]).ToLocalChecked ()->Value ();
678+ uint32_t revision = Nan::To<Number>(info[1 ]).ToLocalChecked ()->Value ();
679+
680+ OpenZWave::Node::ChangeLogEntry result;
681+ OZWManagerAssign (result, GetChangeLog, homeid, nodeid, revision);
682+
683+ Local <Object> changeLog = Nan::New<Object>();
684+ AddStringProp (changeLog, author, result.author );
685+ AddStringProp (changeLog, date, result.date );
686+ AddIntegerProp (changeLog, revision, result.revision );
687+ AddStringProp (changeLog, description, result.description );
688+ info.GetReturnValue ().Set (changeLog);
689+ }
690+ #endif
691+
651692}
0 commit comments