// *****************************************************************************
//  Copyright (C): Christian Nastasi, 2011                                    
//  Author(s): Christian Nastasi                                              
//  Developed at the:                                                         
//  - Retis LAB, TeCIP Institute, Scuola Superiore Sant'Anna (Pisa)           
//  - School of Elec Eng and Computer Science, Queen Mary University (London) 
//  This file is distributed under the terms in the attached LICENSE_2 file.  
//  If you do not find this file, copies can be found by writing to:          
//  - c.nastasi@sssup.it                                                      
//  - nastasichr@gmail.com                                                    
//  - andrea.cavallaro@eecs.qmul.ac.uk                                        
// *****************************************************************************

#ifndef __WiseCameraTrackerTest_h__
#define __WiseCameraTrackerTest_h__ 

#include <vector>
#include <fstream>
#include "WiseCameraSimplePeriodicTracker.h"
#include "WiseCameraTrackerTestMessage_m.h"

class WiseCameraTrackerTest : public WiseCameraSimplePeriodicTracker {
private: 
	struct measurement_t {
		unsigned int tid;
		double x;
		double y;
	};
private:
	static ofstream logger; //!< Used to collect node print-out

	int some_parameter;
	int n_targets;
	unsigned int tracking_step;
	std::vector<measurement_t> observations;

protected:
	virtual void at_startup();
	virtual void at_timer_fired(int index) {} ;
	virtual void at_tracker_init();
	virtual void at_tracker_first_sample();
	virtual void at_tracker_end_first_sample();
	virtual void at_tracker_sample();
	virtual void at_tracker_end_sample();
	virtual void make_measurements(const std::vector<WiseTargetDetection>&);
	virtual void process_network_message(WiseApplicationPacket *);
	virtual void handleDirectApplicationMessage(WiseApplicationPacket *);
};
#endif // __WiseCameraTrackerTest_h__	
