Permalink
Browse files

testing example_addonSettings

  • Loading branch information...
1 parent f8992ca commit 5f08ebbcf25e90276666005a2b163b66e2341d0c Paul Vollmer committed May 17, 2012
Showing with 16 additions and 9 deletions.
  1. +15 −9 example_addonSettings/src/testApp.cpp
  2. +1 −0 example_addonSettings/src/testApp.h
@@ -44,20 +44,26 @@ void testApp::setup(){
defXML.setSettings();
- // Initialize osc addon settings.
+ // Initialize osc sender addon settings.
defXMLosc.initSender(defXML);
- // get values from xml file.
- cout << "Host = " << defXMLosc.getSenderHost(defXML) << endl;
- cout << "Port = " << defXMLosc.getSenderPort(defXML) << endl;
+ // or initialize with host and port variables
+ //defXMLosc.initSender(defXML, "127.0.0.101", 9000);
- // change the osc settings vriable values.
- defXMLosc.setSenderHost(defXML, "169.192.0.1");
+ sender.setup(defXMLosc.getSenderHost(defXML),
+ defXMLosc.getSenderPort(defXML));
+
+ // change the osc sender settings variable.
+ /*defXMLosc.setSenderHost(defXML, "90.60.90.0");
defXMLosc.setSenderPort(defXML, 12345);
- cout << "Host = " << defXMLosc.getSenderHost(defXML) << endl;
- cout << "Port = " << defXMLosc.getSenderPort(defXML) << endl;
+ cout << "Sender Host = " << defXMLosc.getSenderHost(defXML) << endl;
+ cout << "Sender Port = " << defXMLosc.getSenderPort(defXML) << endl;*/
+
+
+ // Initialize osc sender addon settings.
+ defXMLosc.initReceiver(defXML);
- //receiver.setup(PORT);
+ receiver.setup(defXMLosc.getReceiverPort(defXML));
}
@@ -52,6 +52,7 @@ class testApp : public ofBaseApp{
ofxXmlDefaultSettings defXML;
ofxXmlOscSettings defXMLosc;
+ ofxOscSender sender;
ofxOscReceiver receiver;

0 comments on commit 5f08ebb

Please sign in to comment.