> Menu

External links

Sourceforge

     
  sourceforge.net  
     
   

> Quick start

The code below don't compile as is, but it show you what you can do with the library and the basics commands with some exemples.

This sample can be downloaded here.



#if defined(WIN32)

  #include "camera.hpp"
#else
  #include <ipsi/camera.hpp>
#endif

#include <iostream>

// Namespace of the iPSi library
using namespace ipsi;
using namespace std ;

int main (int argc, char * const argv[])
{
  try
  {
    //===== CAMERAS DECLARATIONS =====

    // ---LOCALS IP CAMERAS---
    Camera<Mjpg,3> c(new ParamIP("root", "password", "192.168.0.1", PTZ, 600));
    Camera<Mjpg,3> c(new ParamIP("root", "password", "192.168.0.2"));

    // ---VIRTUAL CAMERA (FROM A SERIES OF PICTURES FROM A DISK)---
    Camera<MjpgDisk,3> c(new ParamDisk(1500));

    // ---DISTANTS IP CAMERAS---
    Camera<Mjpg,3> c(new ParamIP(new Panasonic, "", "", "210.203.219.182"));
    Camera<Mjpg,3> c(new ParamIP(new Panasonic, "", "", "218.219.197.30" ));
    Camera<Mjpg,3> c(new ParamIP(new Panasonic, "", "", "147.140.9.4", PTZ));
    Camera<Mjpg,3> c(new ParamIP(new Panasonic, "", "", "213.227.141.5", PTZ ));
    Camera<Mjpg,3> c(new ParamIP(new Panasonic, "", "", "61.141.30.118" ));
    Camera<Mjpg,3> c(new ParamIP(new Panasonic, "", "", "211.18.192.147", PTZ));
    Camera<Mjpg,3> c(new ParamIP(new Panasonic, "", "", "218.44.120.103", PTZ));
    Camera<Mjpg,3> c(new ParamIP(new Panasonic, "", "", "83.118.226.219", PTZ));


    //===== FONCTIONS OF A CAMERA =====
    c.recSnap(1500,30); // Record 1,500 pictures with 30ms between each one
    c.affiche(); // Display the camera
    c.clearLog(); // Clear the log of the camera


    //====== COMMANDS THAT CAN BE SEND TO PTZ CAMERAS (AXIS HERE) =====
    c.sendReq("rpan;-80;rtilt;-90");
    c.sendReq("query;position");
    c.sendReq("whoami;NULL");
    c.sendReq("move;down");
    c.sendReq("gotoserverpresetname;home;move;up;rtilt;50;rpan;-80");
    tempo(2000); // Wait the end of the request

  }

  catch (string err)
  {
    cerr << err << endl;
  }

  return 0;
}





 
Copyright © 2006 - ipsi.sourceforge.net- Tous droits réservés.