// File: scipio.h
// Created by: <Joern Reimerdes>
// Created on: 22.03.2005

/**
 * scipio.h - is part of the iwear-framework
 * @file
 * $Id: scipio.h 2376 2005-09-20 20:48:48Z jrei $
 * $Revision: 2376 $
 * $Author: jrei $
 * $Date: 2005-09-20 22:48:48 +0200 (Di, 20 Sep 2005) $
 *
 * This file is part of The iWear Framework.
 * In particular this file is part of the Framework Input Library
 *
 * The iWear Framework is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation as in version 2 of the License.

 * 
 * The iWear Framework is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __IWEAR_SCIPIO_H
#define __IWEAR_SCIPIO_H

#ifndef __IWEAR_SCIPIODATA_H
#include <iwear_scipio/scipiodata.h>
#endif

#include <iostream>


/**
 * Fills the x, y, z and button value with the current data.
 * @param name The mac address (bluetooth), hostname (tcp) or  device name
 *	(serial) of the scipio
 * @param val The channel (bluetooth), port (tcp) or bits per second (serial)
 */
extern "C" {
    void get_values_z (const char *name, int val, int *x, int *y, int *z, int *button);
}

namespace iwear {
namespace scipio{

class Scipio
{
public:

    Scipio( void );

    ~Scipio( void );
    
    
    inline void get_values(ScipioData* scipio_data){
	//	cout << "getting values for scipio: " << endl;
	    //	      << scipio_data->address.c_str() << scipio_data->channel << endl;
 	get_values_z (scipio_data->address.c_str(), scipio_data->channel, 
 		      &(scipio_data->x), &(scipio_data->y), &(scipio_data->z), 
 		      &(scipio_data->button));
	cout << "getting values for scipio: "
	     << " x: " << scipio_data->x 
	     << " y: " << scipio_data->y 
	     << " z: " << scipio_data->y << endl;
 	
    }

protected:
    

private: 

};

} // scipio
} // iwear
#endif	//__IWEAR_SCIPIO_H



