libkitclient API documentation

0.2.6

Multiplatform library for management and interaction with FITKit devices.

Written in C++ and designed to be easy to use.

Including SWIG Python wrapper, with possibility to add another scripting interfaces.

#include "fitkit.h"
#include "fitkitmgr.h"
#include <cstdio>

int main()
{
   // Find devices
   FitKitMgr mgr;
   if(!mgr.discover())
      return 1;
   
   // Initialize first device
   FitKit* kit = 0;
   if((kit = mgr.acquire()) == 0)
      return 1;
   
   FitKitChannel& b =  kit->channel('b');
   b.open();
   b.resetMCU();

   // Wait for input
   char buf = '\0';
   while(b.read(&buf, 1) >= 0 && buf != '>')
      putchar(buf);
   
   putchar(buf);
   
   // Release device
   b.close();
   mgr.release(kit);

   printf(" Hello FITKit!\n");
}

Other examples and tests can be found in the "test", "examples" and "swig" directories.


Generated on Mon Oct 27 21:40:32 2008 for libkitclient by  doxygen 1.5.6