diff --git a/lib/openzwave-shared.js b/lib/openzwave-shared.js index 345454cf..a8c622fd 100644 --- a/lib/openzwave-shared.js +++ b/lib/openzwave-shared.js @@ -25,9 +25,10 @@ var debugAddon = addonLocation+'Debug/'+addonFileName; var releaseAddon = addonLocation+'Release/'+addonFileName; if (fs.existsSync(debugAddon)) { - console.log("loading up DEBUG addon"); + console.log("loading up DEBUG addon: "+debugAddon); addon = require(debugAddon).Emitter; } else { + console.log("loading up RELEASE addon: "+releaseAddon); addon = require(releaseAddon).Emitter; } diff --git a/src/openzwave-config.cc b/src/openzwave-config.cc index cfa23c9c..5a1df118 100644 --- a/src/openzwave-config.cc +++ b/src/openzwave-config.cc @@ -24,7 +24,7 @@ namespace OZW { * Set Config Parameters */ // =================================================================== - NAN_METHOD(SetConfigParam) + NAN_METHOD(OZW::SetConfigParam) // =================================================================== { NanScope(); @@ -60,7 +60,7 @@ namespace OZW { * Configuration::StaticGetCommandClassId. */ // =================================================================== - NAN_METHOD(RequestConfigParam) + NAN_METHOD(OZW::RequestConfigParam) // =================================================================== { NanScope(); @@ -79,7 +79,7 @@ namespace OZW { * device. * */ // =================================================================== - NAN_METHOD(RequestAllConfigParams) + NAN_METHOD(OZW::RequestAllConfigParams) // =================================================================== { NanScope(); diff --git a/src/openzwave-driver.cc b/src/openzwave-driver.cc index ded1b1e7..45b8c8ad 100644 --- a/src/openzwave-driver.cc +++ b/src/openzwave-driver.cc @@ -23,7 +23,7 @@ using namespace node; namespace OZW { // =================================================================== - NAN_METHOD(Connect) + NAN_METHOD(OZW::Connect) // =================================================================== { NanScope(); @@ -47,7 +47,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(Disconnect) + NAN_METHOD(OZW::Disconnect) // =================================================================== { NanScope(); @@ -67,7 +67,7 @@ namespace OZW { * out all known configuration, a soft reset just restarts the chip. */ // =================================================================== - NAN_METHOD(HardReset) + NAN_METHOD(OZW::HardReset) // =================================================================== { NanScope(); @@ -78,7 +78,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(SoftReset) + NAN_METHOD(OZW::SoftReset) // =================================================================== { NanScope(); @@ -89,7 +89,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(BeginControllerCommand) + NAN_METHOD(OZW::BeginControllerCommand) // =================================================================== { NanScope(); @@ -135,7 +135,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(CancelControllerCommand) + NAN_METHOD(OZW::CancelControllerCommand) // =================================================================== { NanScope(); @@ -144,7 +144,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(GetControllerNodeId) + NAN_METHOD(OZW::GetControllerNodeId) // =================================================================== { NanScope(); @@ -153,7 +153,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(GetSUCNodeId) + NAN_METHOD(OZW::GetSUCNodeId) // =================================================================== { NanScope(); @@ -167,7 +167,7 @@ namespace OZW { * are secondary controllers. */ // =================================================================== - NAN_METHOD(IsPrimaryController) + NAN_METHOD(OZW::IsPrimaryController) // =================================================================== { NanScope(); @@ -181,7 +181,7 @@ namespace OZW { * receive information about network changes. */ // =================================================================== - NAN_METHOD(IsStaticUpdateController) + NAN_METHOD(OZW::IsStaticUpdateController) // =================================================================== { NanScope(); @@ -194,7 +194,7 @@ namespace OZW { * associated with other controllers to enable events to be passed on. */ // =================================================================== - NAN_METHOD(IsBridgeController) + NAN_METHOD(OZW::IsBridgeController) // =================================================================== { NanScope(); @@ -205,7 +205,7 @@ namespace OZW { /* Get the version of the Z-Wave API library used by a controller. */ // =================================================================== - NAN_METHOD(GetLibraryVersion) + NAN_METHOD(OZW::GetLibraryVersion) // =================================================================== { NanScope(); @@ -229,7 +229,7 @@ namespace OZW { * use the IsBridgeController method. */ // =================================================================== - NAN_METHOD(GetLibraryTypeName) + NAN_METHOD(OZW::GetLibraryTypeName) // =================================================================== { NanScope(); @@ -238,7 +238,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(GetSendQueueCount) + NAN_METHOD(OZW::GetSendQueueCount) // =================================================================== { NanScope(); diff --git a/src/openzwave-groups.cc b/src/openzwave-groups.cc index 1af78e6d..b08b682a 100644 --- a/src/openzwave-groups.cc +++ b/src/openzwave-groups.cc @@ -28,7 +28,7 @@ namespace OZW { * will be a number between 1 and 4. */ // =================================================================== - NAN_METHOD(GetNumGroups) + NAN_METHOD(OZW::GetNumGroups) // =================================================================== { NanScope(); @@ -43,7 +43,7 @@ namespace OZW { * */ // =================================================================== - NAN_METHOD(GetAssociations) + NAN_METHOD(OZW::GetAssociations) // =================================================================== { NanScope(); @@ -73,7 +73,7 @@ namespace OZW { * */ // =================================================================== - NAN_METHOD(GetMaxAssociations) + NAN_METHOD(OZW::GetMaxAssociations) // =================================================================== { NanScope(); @@ -92,7 +92,7 @@ namespace OZW { * */ // =================================================================== - NAN_METHOD(GetGroupLabel) + NAN_METHOD(OZW::GetGroupLabel) // =================================================================== { NanScope(); @@ -111,7 +111,7 @@ namespace OZW { * */ // =================================================================== - NAN_METHOD(AddAssociation) + NAN_METHOD(OZW::AddAssociation) // =================================================================== { NanScope(); @@ -131,7 +131,7 @@ namespace OZW { * */ // =================================================================== - NAN_METHOD(RemoveAssociation) + NAN_METHOD(OZW::RemoveAssociation) // =================================================================== { NanScope(); diff --git a/src/openzwave-network.cc b/src/openzwave-network.cc index ffddf206..e97092e1 100644 --- a/src/openzwave-network.cc +++ b/src/openzwave-network.cc @@ -26,7 +26,7 @@ namespace OZW { * for testing network reliability. */ // =================================================================== - NAN_METHOD(TestNetworkNode) + NAN_METHOD(OZW::TestNetworkNode) // =================================================================== { NanScope(); @@ -44,7 +44,7 @@ namespace OZW { * network for testing network reliability. */ // =================================================================== - NAN_METHOD(TestNetwork) + NAN_METHOD(OZW::TestNetwork) // =================================================================== { NanScope(); @@ -60,7 +60,7 @@ namespace OZW { * Heal network node by requesting the node rediscover their neighbors. */ // =================================================================== - NAN_METHOD(HealNetworkNode) + NAN_METHOD(OZW::HealNetworkNode) // =================================================================== { NanScope(); @@ -79,7 +79,7 @@ namespace OZW { * Can take a while on larger networks. */ // =================================================================== - NAN_METHOD(HealNetwork) + NAN_METHOD(OZW::HealNetwork) // =================================================================== { NanScope(); diff --git a/src/openzwave-nodes.cc b/src/openzwave-nodes.cc index c6f6d8ea..3e7f4c80 100644 --- a/src/openzwave-nodes.cc +++ b/src/openzwave-nodes.cc @@ -25,7 +25,7 @@ namespace OZW { * Gets the neighbors for a node */ // =================================================================== - NAN_METHOD(GetNodeNeighbors) + NAN_METHOD(OZW::GetNodeNeighbors) // =================================================================== { NanScope(); @@ -43,7 +43,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(SwitchAllOn) + NAN_METHOD(OZW::SwitchAllOn) // =================================================================== { NanScope(); @@ -54,7 +54,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(SwitchAllOff) + NAN_METHOD(OZW::SwitchAllOff) // =================================================================== { NanScope(); @@ -68,7 +68,7 @@ namespace OZW { * Write a new location string to the device, if supported. */ // =================================================================== - NAN_METHOD(SetLocation) + NAN_METHOD(OZW::SetLocation) // =================================================================== { NanScope(); @@ -85,7 +85,7 @@ namespace OZW { * Write a new name string to the device, if supported. */ // =================================================================== - NAN_METHOD(SetName) + NAN_METHOD(OZW::SetName) // =================================================================== { NanScope(); @@ -109,7 +109,7 @@ namespace OZW { * This is the same as the query state starting from the beginning. */ // =================================================================== - NAN_METHOD(RefreshNodeInfo) + NAN_METHOD(OZW::RefreshNodeInfo) // =================================================================== { NanScope(); diff --git a/src/openzwave-polling.cc b/src/openzwave-polling.cc index 09037172..44a1e185 100644 --- a/src/openzwave-polling.cc +++ b/src/openzwave-polling.cc @@ -23,7 +23,7 @@ namespace OZW { // Get the time period between polls of a node's state // =================================================================== - NAN_METHOD(GetPollInterval) + NAN_METHOD(OZW::GetPollInterval) // =================================================================== { NanScope(); @@ -43,7 +43,7 @@ namespace OZW { * network does not have to cope with more than one poll per second). */ // =================================================================== - NAN_METHOD(SetPollInterval) + NAN_METHOD(OZW::SetPollInterval) // =================================================================== { NanScope(); @@ -57,7 +57,7 @@ namespace OZW { * Enable/Disable polling on a COMMAND_CLASS basis. */ // =================================================================== - NAN_METHOD(EnablePoll) + NAN_METHOD(OZW::EnablePoll) // =================================================================== { NanScope(); @@ -80,7 +80,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(DisablePoll) + NAN_METHOD(OZW::DisablePoll) // =================================================================== { NanScope(); @@ -104,7 +104,7 @@ namespace OZW { // Determine the polling of a device's state. // =================================================================== - NAN_METHOD(IsPolled) + NAN_METHOD(OZW::IsPolled) // =================================================================== { NanScope(); @@ -130,7 +130,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(SetPollIntensity) + NAN_METHOD(OZW::SetPollIntensity) // =================================================================== { NanScope(); @@ -158,7 +158,7 @@ namespace OZW { // Get the polling intensity of a device's state. // =================================================================== - NAN_METHOD(GetPollIntensity) + NAN_METHOD(OZW::GetPollIntensity) // =================================================================== { NanScope(); diff --git a/src/openzwave-scenes.cc b/src/openzwave-scenes.cc index adb14172..1b0499a0 100644 --- a/src/openzwave-scenes.cc +++ b/src/openzwave-scenes.cc @@ -24,7 +24,7 @@ namespace OZW { /* OpenZWave scene management functions */ // =================================================================== - NAN_METHOD(CreateScene) + NAN_METHOD(OZW::CreateScene) // =================================================================== { NanScope(); @@ -48,7 +48,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(RemoveScene) + NAN_METHOD(OZW::RemoveScene) // =================================================================== { NanScope(); @@ -67,7 +67,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(GetScenes) + NAN_METHOD(OZW::GetScenes) // =================================================================== { NanScope(); @@ -113,7 +113,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(AddSceneValue) + NAN_METHOD(OZW::AddSceneValue) // =================================================================== { NanScope(); @@ -192,7 +192,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(RemoveSceneValue) + NAN_METHOD(OZW::RemoveSceneValue) // =================================================================== { NanScope(); @@ -221,7 +221,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(SceneGetValues) + NAN_METHOD(OZW::SceneGetValues) // =================================================================== { NanScope(); @@ -255,7 +255,7 @@ namespace OZW { } // =================================================================== - NAN_METHOD(ActivateScene) + NAN_METHOD(OZW::ActivateScene) // =================================================================== { NanScope(); diff --git a/src/openzwave-values.cc b/src/openzwave-values.cc index d78293bf..2ca8769e 100644 --- a/src/openzwave-values.cc +++ b/src/openzwave-values.cc @@ -25,7 +25,7 @@ namespace OZW { * Generic value set. */ // ================================================================= - NAN_METHOD(SetValue) + NAN_METHOD(OZW::SetValue) // ================================================================= { NanScope(); diff --git a/src/openzwave.cc b/src/openzwave.cc index 74535489..60792578 100644 --- a/src/openzwave.cc +++ b/src/openzwave.cc @@ -44,7 +44,7 @@ namespace OZW { CommandMap* ctrlCmdNames; // =================================================================== - NAN_METHOD(OZW::New) + NAN_METHOD(OZW::OZW::New) // =================================================================== { NanScope(); diff --git a/test.js b/test.js index b22cb4e8..e6ff5f9b 100644 --- a/test.js +++ b/test.js @@ -2,7 +2,7 @@ * OpenZWave test program. */ -var OpenZWave = require('./lib/openzwave.js'); +var OpenZWave = require('./lib/openzwave-shared.js'); var zwave = new OpenZWave('/dev/ttyUSB0', { saveconfig: true,