ofxOsc ofxXmlSettings
compile watchdog
make watchdog folder on your app
copy oF_Win_Watchdog\Watchdog\bin\*
to your watchdog folder
edit watchdog\data\setting\watchdog.xml
like this
<!-- exe base name (w/o .exe) -->
<exe_name>Watchdog_example</exe_name>
<!-- watchdog <=> app com port -->
<communication_port>9000</communication_port>
<!-- watchdog <=> app polling interval for life monitoring -->
<ping_wait_interval_sec>5.0</ping_wait_interval_sec>
<!-- dont care about this. 2.0 sec is usually OK -->
<terminate_closealert_boot_interval>2.0</terminate_closealert_boot_interval>
copy oF_Win_Watchdog\Watchdog\put_this_to_tgt_app\Watchdog_Responder.h
on your app src
on your app,
.h
#pragma once
#include "ofMain.h"
#include "Watchdog_Responder.h"
class ofApp : public ofBaseApp
{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void mouseEntered(int x, int y);
void mouseExited(int x, int y);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
private:
unique_ptr<WatchDog_Responder> wdr;
};
.cpp
#include "ofApp.h"
void ofApp::setup()
{
wdr = make_unique<WatchDog_Responder>(true, 9000, "../../watchdog");
}
void ofApp::update() {}
void ofApp::draw() {}
void ofApp::keyPressed(int key) {}
void ofApp::keyReleased(int key) {}
void ofApp::mouseMoved(int x, int y) {}
void ofApp::mouseDragged(int x, int y, int button) {}
void ofApp::mousePressed(int x, int y, int button) {}
void ofApp::mouseReleased(int x, int y, int button) {}
void ofApp::mouseEntered(int x, int y) {}
void ofApp::mouseExited(int x, int y) {}
void ofApp::windowResized(int w, int h) {}
void ofApp::gotMessage(ofMessage msg) {}
void ofApp::dragEvent(ofDragInfo dragInfo) {}
check watchdog_tester.maxpat
check Watchdog_example