VCC4.C

Go to the documentation of this file.
00001 /*!@file Devices/VCC4.C class for interfacing with the pan-tilt mechanism of a */
00002 //          Canon VC-C4 camera
00003 //
00004 // //////////////////////////////////////////////////////////////////// //
00005 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the //
00006 // University of Southern California (USC) and the iLab at USC.         //
00007 // See http://iLab.usc.edu for information about this project.          //
00008 // //////////////////////////////////////////////////////////////////// //
00009 // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
00010 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00011 // in Visual Environments, and Applications'' by Christof Koch and      //
00012 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00013 // pending; application number 09/912,225 filed July 23, 2001; see      //
00014 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00015 // //////////////////////////////////////////////////////////////////// //
00016 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00017 //                                                                      //
00018 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00019 // redistribute it and/or modify it under the terms of the GNU General  //
00020 // Public License as published by the Free Software Foundation; either  //
00021 // version 2 of the License, or (at your option) any later version.     //
00022 //                                                                      //
00023 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00024 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00025 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00026 // PURPOSE.  See the GNU General Public License for more details.       //
00027 //                                                                      //
00028 // You should have received a copy of the GNU General Public License    //
00029 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00030 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00031 // Boston, MA 02111-1307 USA.                                           //
00032 // //////////////////////////////////////////////////////////////////// //
00033 //
00034 // Primary maintainer for this file: Dirk Walther <walther@caltech.edu>
00035 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Devices/VCC4.C $
00036 // $Id: VCC4.C 6853 2006-07-18 17:20:09Z ibeo $
00037 //
00038 
00039 #include "Devices/VCC4.H"
00040 #include "Component/OptionManager.H"
00041 #include "Devices/DeviceOpts.H"
00042 #include "Util/log.H"
00043 
00044 #include <cmath>
00045 #include <string.h>
00046 
00047 // ######################################################################
00048 VCC4::VCC4(OptionManager& mgr, const std::string& descrName,
00049            const std::string& tagName) :
00050   ModelComponent(mgr, descrName, tagName),
00051   itsPort(new Serial(mgr)),
00052   itsSerialDevice(&OPT_VCC4serialDevice, this),
00053   itsUnitNo(&OPT_VCC4unitNo, this),
00054   itsPulseRatio(&OPT_VCC4pulseRatio, this), // was 0.1125F
00055   itsMaxAngle(&OPT_VCC4maxAngle, this) // was 100.0125F
00056 {
00057   // adopt our serial port as a subcomponent:
00058   addSubComponent(itsPort);
00059 }
00060 
00061 // ######################################################################
00062 VCC4::~VCC4(void)
00063 { }
00064 
00065 // ######################################################################
00066 void VCC4::start1()
00067 {
00068   // configure our serial port:
00069   itsPort->configure(itsSerialDevice.getVal().c_str(), 9600, "8N1", false, true, 1);
00070 }
00071 
00072 // ######################################################################
00073 void VCC4::stop1()
00074 {
00075   PlainCommand (VCC4_EnterLocalMode);
00076 }
00077 
00078 // ######################################################################
00079 int VCC4::CameraInitialize (bool goHome)
00080 {
00081   int err, init_cmd;
00082 
00083   // switch to host control mode and switch camera power on
00084   PlainCommand (VCC4_EnterHostMode);
00085   PlainCommand (VCC4_SetCameraPowerON);
00086 
00087   // initialize camera as soon as Power On has finished
00088   if (goHome) init_cmd = VCC4_PTinit1;
00089   else init_cmd = VCC4_PTinit2;
00090 
00091   while (true)
00092     {
00093       err = PlainCommand (init_cmd, false);
00094       if ((err & VCC4_MODE_ERR) == 0) break;
00095       // try again after 10 ms
00096       usleep (10000);
00097     }
00098 
00099   // retrieve the pulse ratio if it is unconfigured
00100   if (itsPulseRatio.getVal() == 0.0F) {
00101     err = PlainCommand (VCC4_GetPanGRatio);
00102     if (err != 0) LERROR("Error in VCC4_GetPanGRatio");
00103     else itsPulseRatio.setVal((float)getAbsNum (4) / 1.0e5F);
00104   }
00105 
00106   // retrieve the maximum pan angle if it is unconfigured
00107   if (itsMaxAngle.getVal() == 0.0F) {
00108     err = PlainCommand (VCC4_GetAngleRatio2);
00109     if (err != 0)
00110       {
00111         LERROR("Error in VCC4_GetAngleRatio2");
00112       }
00113     else
00114       {
00115         float ang = 0.0F;
00116         err = getOneAngle(ang); itsMaxAngle.setVal(ang);
00117         if (err !=0) LERROR("Error in getOneAngle");
00118       }
00119   }
00120 
00121   // retrieve unit name (i.e. camera name)
00122   PlainCommand (VCC4_GetUnitName);
00123   return (err);
00124 }
00125 
00126 
00127 // ######################################################################
00128 int VCC4::gotoPosition(float pan, float tilt, bool wait)
00129 {
00130   int err;
00131   float max = 0.0F, min = 0.0F;
00132 
00133   PlainCommand (VCC4_GetPTAngle0);
00134   getTwoAngles (min, max);
00135   if (pan < min)
00136     {
00137       LERROR("VCC4: pan angle too small: %f - go to minimum angle %f instead",
00138              pan, min);
00139       pan = min;
00140     }
00141   if (pan > max)
00142     {
00143       LERROR("VCC4: pan angle too large: %f - go to maximum angle %f instead",
00144              pan, max);
00145       pan = max;
00146     }
00147 
00148   PlainCommand (VCC4_GetPTAngle1);
00149   getTwoAngles (min, max);
00150   if (tilt < min)
00151     {
00152       LERROR("VCC4: tilt angle too small: %f - go to minimum angle %f instead",
00153              tilt, min);
00154       tilt = min;
00155     }
00156 
00157   if (tilt > max)
00158     {
00159       LERROR("VCC4: tilt angle too large: %f - go to maximum angle %f instead",
00160              tilt, max);
00161       tilt = max;
00162     }
00163 
00164   err = AngleCommand (VCC4_SetPTAngle2, pan, tilt);
00165   err = err | getPosition (pan, tilt, wait);
00166   return err;
00167 }
00168 
00169 
00170 
00171 // ######################################################################
00172 int VCC4::getPosition (float& pan, float& tilt, bool wait)
00173 {
00174   int err;
00175   err = PlainCommand (VCC4_GetPTAngle2, wait);
00176   getTwoAngles (pan, tilt);
00177   return err;
00178 }
00179 
00180 
00181 // ######################################################################
00182 int VCC4::PlainCommand (int cmdno, bool wait)
00183 {
00184   int i = getIndex (cmdno);
00185   if (i == VCC4_INVALID_COMMAND) return i;
00186   if (command[i].cmdtyp != VCC4_EMBED_NONE) return (VCC4_INVALID_COMMAND);
00187 
00188   if (wait) return WaitRawCommand (cmdno);
00189   else return SendRawCommand (cmdno);
00190 }
00191 
00192 
00193 // ######################################################################
00194 int VCC4::AbsNumCommand (int cmdno, unsigned int value, bool wait)
00195 {
00196   int i, err;
00197   i = getIndex (cmdno);
00198   if (i == VCC4_INVALID_COMMAND) return i;
00199   if (command[i].cmdtyp != VCC4_EMBED_NUM) return (VCC4_INVALID_COMMAND);
00200 
00201   err = intToHexString (value, &(paramString[0]), command[i].cmdparamlen);
00202   if (err != command[i].cmdparamlen) return VCC4_INVALID_NUMBER;
00203 
00204   if (wait) return WaitRawCommand (cmdno, &(paramString[0]));
00205   else return SendRawCommand (cmdno, &(paramString[0]));
00206 }
00207 
00208 
00209 // ######################################################################
00210 int VCC4::getOneAngle (float& angle)
00211 {
00212   int val;
00213   val = hexStringToInt (&(ReplyString[0]), 4);
00214   if (val < 0) return val;
00215 
00216   angle = (float)(val - 0x8000) * itsPulseRatio.getVal();
00217   return VCC4_SUCCESS;
00218 }
00219 
00220 
00221 // ######################################################################
00222 int VCC4::getTwoAngles (float& angle1, float& angle2)
00223 {
00224   int val1, val2;
00225   val1 = hexStringToInt (&(ReplyString[0]), 4);
00226   val2 = hexStringToInt (&(ReplyString[4]), 4);
00227   if (val1 < 0) return val1;
00228   if (val2 < 0) return val2;
00229 
00230   angle1 = (float)(val1 - 0x8000) * itsPulseRatio.getVal();
00231   angle2 = (float)(val2 - 0x8000) * itsPulseRatio.getVal();
00232 
00233   return VCC4_SUCCESS;
00234 }
00235 
00236 
00237 // ######################################################################
00238 int VCC4::AngleCommand (int cmdno, float angle1, float angle2, bool wait)
00239 {
00240   unsigned int code1, code2;
00241 
00242   int i = getIndex (cmdno);
00243   if (i == VCC4_INVALID_COMMAND) return i;
00244   if (command[i].cmdtyp != VCC4_EMBED_ANG) return (VCC4_INVALID_COMMAND);
00245 
00246   if ((fabs(angle1) > itsMaxAngle.getVal()) ||
00247       (fabs(angle2) > itsMaxAngle.getVal()))
00248     return VCC4_INVALID_ANGLE;
00249 
00250   code1 = (unsigned int)((int)(angle1 / itsPulseRatio.getVal()) + 0x8000);
00251   code2 = (unsigned int)((int)(angle2 / itsPulseRatio.getVal()) + 0x8000);
00252 
00253   intToHexString (code1, &(paramString[0]), 4);
00254   intToHexString (code2, &(paramString[4]), 4);
00255 
00256   if (wait) return WaitRawCommand (cmdno, &(paramString[0]));
00257   else return SendRawCommand (cmdno, &(paramString[0]));
00258 }
00259 
00260 
00261 // ######################################################################
00262 int VCC4::StringCommand (int cmdno, char* string, bool wait)
00263 {
00264   int i = getIndex (cmdno);
00265   if (i == VCC4_INVALID_COMMAND) return i;
00266   if (command[i].cmdtyp != VCC4_EMBED_STR) return (VCC4_INVALID_COMMAND);
00267 
00268   if (wait) return WaitRawCommand (cmdno, string);
00269   else return SendRawCommand (cmdno, string);
00270 }
00271 
00272 
00273 
00274 // ######################################################################
00275 // transforms an unsigned int to a string of hex digits
00276 // returns length if everything is okay
00277 // returns VCC4_BUF_OVERFLOW if the buffer paramString is too small
00278 // returns VCC4_NUM_OVERFLOW if the number is too big to fit the string
00279 //
00280 int VCC4::intToHexString (unsigned int value, char* buf, unsigned int length)
00281 {
00282   int i, j;
00283   unsigned int p;
00284 
00285   for ((i = length-1, j = 0); i >= 0; (i--, j++))
00286     {
00287       p = ((0xF << (4*i)) & value) >> (4*i);
00288       buf[j] = (p < 0xA) ? ('0' + p):('A' + p - 0xA);
00289     }
00290 
00291   if ((value >> (4*length)) != 0)
00292     return VCC4_NUM_OVERFLOW;
00293   else
00294     return length;
00295 }
00296 
00297 
00298 // ######################################################################
00299 int VCC4::hexStringToInt (char* buf, unsigned int length)
00300 {
00301   int i, p;
00302   unsigned int val = 0;
00303 
00304   for (i = 0; i < (int)length; i++)
00305     {
00306       if (buf[i] == '\x00') return VCC4_BUF_UNDERFLOW;
00307       p = (int)((buf[i] <= '9') ? (buf[i] - '0'):(buf[i] - 'A' + 0xA));
00308       val = (val << 4) | (p & 0xF);
00309     }
00310   return val;
00311 }
00312 
00313 
00314 // ######################################################################
00315 int VCC4::WaitRawCommand (int cmdno, char* param)
00316 {
00317   int err;
00318   while (true)
00319     {
00320       err = SendRawCommand (cmdno, param);
00321       if ((err & VCC4_BUSY_ERR) == 0) break;
00322       if ((err & VCC4_MODE_ERR) != 0) break;
00323       // try again after 10 ms
00324       usleep (10000);
00325     }
00326   return err;
00327 }
00328 
00329 
00330 // ######################################################################
00331 int VCC4::SendRawCommand (int cmdno, char* param)
00332 {
00333   char cmd_string[30];
00334 
00335   int i = getIndex (cmdno);
00336   if (i == VCC4_INVALID_COMMAND)
00337     {
00338       LERROR("VCC4::SendRawCommand - invalid command number: %i", cmdno);
00339       return (i);
00340     }
00341 
00342   // found - prepare command string
00343   bzero (cmd_string, sizeof(cmd_string));
00344   memcpy (cmd_string, command[i].cmdstr, command[i].cmdlen);
00345 
00346   // copy unit number in
00347   cmd_string[2] = '0' + (char)(itsUnitNo.getVal());
00348 
00349   // if we have to include parameters, include them
00350   if (command[i].cmdparamlen > 0)
00351     {
00352       if (param == NULL)
00353         {
00354           LERROR ("VCC4::SendRawCommand - invalid parameter pointer");
00355           return (VCC4_INVALID_PARAM);
00356         }
00357 
00358       // now copy the parameters over
00359       memcpy (&(cmd_string[command[i].cmdparamstart - 1]), param,
00360               command[i].cmdparamlen);
00361     }
00362 
00363   // send the command string to the port
00364   if (!itsPort->write (cmd_string, command[i].cmdlen))
00365     {
00366       LERROR("VCC4::SendRawCommand - error writing to the device");
00367       return (VCC4_IO_ERR);
00368     }
00369   return (getReply());
00370 }
00371 
00372 
00373 
00374 // ######################################################################
00375 // retrieve reply
00376 int VCC4::getReply (void)
00377 {
00378   char rep_string[30];
00379   bool endfound = false;
00380   int err, j;
00381 
00382   bzero (rep_string, sizeof(rep_string));
00383   bzero (ReplyString, sizeof(ReplyString));
00384 
00385   for (j = 0; ((j < (int)sizeof(rep_string)) && !endfound); j++)
00386     {
00387       rep_string[j] = itsPort->read();
00388       endfound = (rep_string[j] == '\xEF');
00389     }
00390 
00391   if (!endfound)
00392     {
00393       LERROR("VCC4::getReply - reply string overflow");
00394       return (VCC4_REPLY_ERR);
00395     }
00396 
00397   if (j < 6)
00398     {
00399       LERROR("VCC4::getReply - reply string too short: %i", j);
00400       return (VCC4_REPLY_ERR);
00401     }
00402 
00403   // return values?
00404   if (j > 6) memcpy (ReplyString, &(rep_string[5]), (j-6));
00405 
00406   // get errors from reply string
00407   err = (((int)(rep_string[3] - '0') & 0xF) << 12)
00408       | (((int)(rep_string[4] - '0') & 0xF) <<  8);
00409 
00410   return (err);
00411 }
00412 
00413 
00414 // ######################################################################
00415 int VCC4::getIndex (int cmdno)
00416 {
00417   int i;
00418   bool found = false;
00419 
00420   for (i = 0; ((i < VCC4_CMDMAX) && !found); i++)
00421     if (command[i].cmdno == cmdno) found = true;
00422   i--;
00423   if (!found) i = VCC4_INVALID_COMMAND;
00424   return (i);
00425 }
00426 
00427 
00428 
00429 // ######################################################################
00430 /*
00431  * This array contains all the command codes for controlling the
00432  * Canon VC-C4 camera's pan and tilt mechanism
00433  * The structure VC4CMD is defined in vcc4cmddef.h
00434  *
00435  *  This array is adapted from the Software Developer's Kit vcc4sdk
00436  *  provided by Canon for Microsoft Windows programming,
00437  *  extended by the fourth  and fifth numbers (command[i].cmdparamlen
00438  *  and command[i].paramstart), which give the length and the start
00439  *  postion of the embedded parameter section in bytes.
00440  */
00441 VCC4CMD VCC4::command[VCC4_CMDMAX] = {
00442 {2,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA0','\x30','\xEF'}},// set : power off
00443 {3,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA0','\x31','\xEF'}},// set : power on
00444 {4,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA1','\x30','\xEF'}},// set : focus mode AF
00445 {5,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA1','\x31','\xEF'}},// set : focus mode manual
00446 {6,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA1','\x32','\xEF'}},// set : focus near
00447 {7,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA1','\x33','\xEF'}},// set : focus far
00448 {8,1,10,4,6,{'\xFF','\x30','\x30','\x00','\xB0','*','*','*','*','\xEF'}},// set : focus position
00449 {9,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xB1','\x30','\xEF'}},// request : focus position
00450 {10,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xB1','\x31','\xEF'}},// set : onepush AF
00451 {11,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA2','\x30','\xEF'}},// set : zooming stop
00452 {12,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA2','\x31','\xEF'}},// set : zooming wide
00453 {13,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA2','\x32','\xEF'}},// set : zooming tele
00454 {14,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA2','\x33','\xEF'}},// set : high zooming wide
00455 {15,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA2','\x34','\xEF'}},// set : high zooming tele
00456 {16,1,8,2,6,{'\xFF','\x30','\x30','\x00','\xA3','*','*','\xEF'}},// set : zooming position1
00457 {17,0,6,0,6,{'\xFF','\x30','\x30','\x00','\xA4','\xEF'} },// request : zooming position1
00458 {18,1,10,4,6,{'\xFF','\x30','\x30','\x00','\xB3','*','*','*','*','\xEF'}},// set : zooming position2
00459 {19,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xB4','\x30','\xEF'}},// request : zooming position2
00460 {20,1,8,1,6,{'\xFF','\x30','\x30','\x00','\xB4','\x31','*','\xEF'}},// set : zooming speed
00461 {21,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xB4','\x32','\xEF'}},// request : zooming speed
00462 {22,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x30','\xEF'}},// set : backlight off
00463 {23,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x31','\xEF'}},// set : backlight on
00464 {24,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x32','\xEF'}},// set : exposed auto
00465 {25,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x33','\xEF'}},// set : exposed manual
00466 {26,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA8','\x30','\xEF'}},// set : shutter speed program
00467 {28,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x36','\xEF'}},// request : shutter speed
00468 {29,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA8','\x31','\xEF'}},// set : shutter speed 1/60(PAL:1/50)
00469 {30,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA8','\x32','\xEF'}},// set : shutter speed 1/100(PAL:1/120)
00470 {31,1,9,2,6,{'\xFF','\x30','\x30','\x00','\xA5','\x37','*','*','\xEF'}},// set : AGC gain
00471 {32,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x38','\xEF'}},// request : AGC gain
00472 {33,1,9,2,6,{'\xFF','\x30','\x30','\x00','\xA5','\x39','*','*','\xEF'}},// set : iris
00473 {34,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x3A','\xEF'}},// request : iris
00474 {35,1,9,2,6,{'\xFF','\x30','\x30','\x00','\xA5','\x3B','*','*','\xEF'}},// set : AE target value
00475 {36,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x3C','\xEF'}},// request : AE target value
00476 {37,1,8,1,6,{'\xFF','\x30','\x30','\x00','\xA5','\x3D','*','\xEF'}},// set : gain select
00477 {38,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x3E','\xEF'}},// request : gain select
00478 {39,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA7','\x32','\xEF'}},// set : white balance manual
00479 {40,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA7','\x33','\xEF'}},// set : white balance high speed
00480 {41,1,9,2,6,{'\xFF','\x30','\x30','\x00','\xA7','\x34','*','*','\xEF'}},// set : white balance manual
00481 {42,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA7','\x35','\xEF'}},// request : white balance
00482 {44,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA9','\x30','\xEF'}},// set : fading mode normal
00483 {45,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA9','\x31','\xEF'}},// set : fading mode white
00484 {46,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA9','\x32','\xEF'}},// set : fading mode high speed white
00485 {47,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA9','\x33','\xEF'}},// set : fading mode high speed black
00486 {48,0,6,0,6,{'\xFF','\x30','\x30','\x00','\xAA','\xEF'} },// set : camera reset
00487 {49,0,6,0,6,{'\xFF','\x30','\x30','\x00','\xAB','\xEF'} },// request : zooming ratio
00488 {50,0,6,0,6,{'\xFF','\x30','\x30','\x00','\xAC','\xEF'} },// request : CCD size
00489 {53,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xB4','\x33','\xEF'}},// request : zooming maximum value
00490 {57,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xBE','\x30','\xEF'}},        // request : camera version
00491 {58,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xBE','\x31','\xEF'}},        // request : eeprom version
00492 {59,1,9,3,6,{'\xFF','\x30','\x30','\x00','\x50','*','*','*','\xEF'}},// set : pan motor speed
00493 {60,1,9,3,6,{'\xFF','\x30','\x30','\x00','\x51','*','*','*','\xEF'}},// set : tilt motor speed
00494 {61,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x52','\x30','\xEF'}},// request : pan motor speed
00495 {62,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x52','\x31','\xEF'}},// request : tilt motor speed
00496 {63,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x53','\x30','\xEF'}},// set : pan/tilt stop
00497 {64,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x53','\x31','\xEF'}},// set : pan right start
00498 {65,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x53','\x32','\xEF'}},// set : pan left start
00499 {66,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x53','\x33','\xEF'}},// set : tilt up start
00500 {67,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x53','\x34','\xEF'}},// set : tilt down start
00501 {69,0,6,0,6,{'\xFF','\x30','\x30','\x00','\x57','\xEF'} },// set : goto home position
00502 {70,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x58','\x30','\xEF'}},// set : pan/tilt motor initilaize1
00503 {71,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x58','\x31','\xEF'}},// set : pan/tilt motor initilaize2
00504 {72,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x59','\x30','\xEF'}},// request : pan motor minimum speed
00505 {73,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x59','\x31','\xEF'}},// request : pan motor maximum speed
00506 {74,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x59','\x32','\xEF'}},// request : tilt motor minimum speed
00507 {75,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x59','\x33','\xEF'}},// request : tilt motor maximum speed
00508 {76,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x5B','\x30','\xEF'}},// request : pan gear ratio
00509 {77,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x5B','\x31','\xEF'}},// request : tilt gear ratio
00510 {78,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x5C','\x30','\xEF'}},// request : pan motor minimum angle
00511 {79,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x5C','\x31','\xEF'}},// request : pan motor maximum angle
00512 {80,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x5C','\x32','\xEF'}},// request : tilt motor minimum angle
00513 {81,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x5C','\x33','\xEF'}},// request : tilt motor maximum angle
00514 {82,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x60','\x30','\x30','\xEF'}},// set : pan/tilt stop
00515 {83,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x60','\x30','\x31','\xEF'}},// set : tilt up start
00516 {84,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x60','\x30','\x32','\xEF'}},// set : tilt down start
00517 {85,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x60','\x31','\x30','\xEF'}},// set : pan right start
00518 {86,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x60','\x32','\x30','\xEF'}},// set : pan left start
00519 {87,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x60','\x31','\x31','\xEF'}},// set : pan right and tilt up start
00520 {88,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x60','\x31','\x32','\xEF'}},// set : pan right and tilt down start
00521 {89,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x60','\x32','\x31','\xEF'}},// set : pan left and tilt up start
00522 {90,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x60','\x32','\x32','\xEF'}},// set : pan left and tilt down start
00523 {92,2,14,8,6,{'\xFF','\x30','\x30','\x00','\x62','*','*','*','*','*','*','*','*','\xEF'}},// set : pan/tilt angle
00524 {93,0,6,0,6,{'\xFF','\x30','\x30','\x00','\x63','\xEF'} },// request : pan/tilt angle
00525 {94,2,15,8,7,{'\xFF','\x30','\x30','\x00','\x64','\x30','*','*','*','*','*','*','*','*','\xEF'}},// set : pan movement angle
00526 {95,2,15,8,7,{'\xFF','\x30','\x30','\x00','\x64','\x31','*','*','*','*','*','*','*','*','\xEF'}},// set : tilt movement angle
00527 {96,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x65','\x30','\xEF'}},// request : pan movement angle
00528 {97,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x65','\x31','\xEF'}},// request : tilt movement angle
00529 {102,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x80','\x30','\xEF'}},// set : remote command on
00530 {103,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x80','\x31','\xEF'}},// set : remote command off
00531 {104,0,6,0,6,{'\xFF','\x30','\x30','\x00','\x86','\xEF'}},// request : movement status
00532 {106,0,6,0,6,{'\xFF','\x30','\x30','\x00','\x87','\xEF'}},// request : unit name
00533 {107,0,6,0,6,{'\xFF','\x30','\x30','\x00','\x88','\xEF'}},// request : rom version
00534 {108,1,7,1,6,{'\xFF','\x30','\x30','\x00','\x89','*','\xEF'}},// set : preset memory
00535 {109,1,7,1,6,{'\xFF','\x30','\x30','\x00','\x8A','*','\xEF'}},// set : movement preset memory
00536 {110,0,6,0,6,{'\xFF','\x30','\x30','\x00','\x8B','\xEF'}},// request : preset status
00537 {113,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8D','\x30','\xEF'}},// set : remote command pass on
00538 {114,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8D','\x31','\xEF'}},// set : remote command pass off
00539 {118,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8F','\x30','\xEF'}},// set : cascade on
00540 {119,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8F','\x31','\xEF'}},// set : cascade off
00541 {120,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x90','\x30','\xEF'}},// set : host mode
00542 {121,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x90','\x31','\xEF'}},// set local mode
00543 {122,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x30','\xEF'}},// set : onscreen off
00544 {123,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x31','\xEF'}},// set : onscreen on
00545 {124,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x32','\xEF'}},// set : screen title display off
00546 {125,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x33','\xEF'}},// set : screen title display on
00547 {126,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x34','\xEF'}},// set : screen time display off
00548 {127,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x35','\xEF'}},// set : screen time display on (mode1)
00549 {128,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x36','\xEF'}},// set : screen time display on (mode2)
00550 {129,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x37','\xEF'}},// set : screen date display off
00551 {130,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x38','\xEF'}},// set : screen date display on (mode1)
00552 {131,0,8,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x30','\x39','\xEF'}},// set : screen date display on (mode2)
00553 {132,3,12,5,7,{'\xFF','\x30','\x30','\x00','\x91','\x31','*','*','*','*','*','\xEF'}},// set : screen title
00554 {133,3,10,3,7,{'\xFF','\x30','\x30','\x00','\x91','\x32','*','*','*','\xEF'}},// request : screen title
00555 {134,3,13,6,7,{'\xFF','\x30','\x30','\x00','\x91','\x33','*','*','*','*','*','*','\xEF'}},// set : screen date
00556 {135,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x34','\xEF'}},// request : screen date
00557 {136,3,13,6,7,{'\xFF','\x30','\x30','\x00','\x91','\x35','*','*','*','*','*','*','\xEF'}},// set : screen time
00558 {137,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x91','\x36','\xEF'}},// request : screen time
00559 {138,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x92','\x30','\xEF'}},// request : camera power on time
00560 {139,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x92','\x31','\xEF'}},// request : pedestal power on time
00561 {140,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x93','\x30','\xEF'}},// set : default reset
00562 {147,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x86','\x30','\xEF'}},// request : extend movement status
00563 {148,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8B','\x30','\xEF'}},// request : extend preset status
00564 {149,1,9,2,7,{'\xFF','\x30','\x30','\x00','\xA5','\x35','*','*','\xEF'}},// set : shutter speed
00565 {150,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA7','\x30','\xEF'}},// set : white balance normal
00566 {151,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xA7','\x31','\xEF'}},// set : white balance lock
00567 {152,0,7,0,6,{'\xFF','\x30','\x30','\x00','\xB1','\x32','\xEF'}},// request : focus range
00568 {155,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x94','\x30','\xEF'}},// set : notify command off
00569 {156,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x94','\x31','\xEF'}},// set : notify command on
00570 {157,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x95','\x30','\xEF'}},// set : cascade global notify off
00571 {158,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x95','\x31','\xEF'}},// set : cascade global notify on
00572 {159,0,8,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x34','\x30','\xEF'}},// set : AE lock off
00573 {160,0,8,0,6,{'\xFF','\x30','\x30','\x00','\xA5','\x34','\x31','\xEF'}},// set : AE lock on
00574 {164,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8E','\x30','\xEF'}},// set : LED normal
00575 {165,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8E','\x31','\xEF'}},// set : LED green on
00576 {166,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8E','\x32','\xEF'}},// set : LED all off
00577 {167,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8E','\x33','\xEF'}},// set : LED red on
00578 {168,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x8E','\x34','\xEF'}},// set : LED orange on
00579 {170,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x9A','\x30','\xEF'}},// request : pedestal model
00580 {171,0,7,0,6,{'\xFF','\x30','\x30','\x00','\x9A','\x31','\xEF'}}  // request : camera model
00581 };
00582 
00583 // ######################################################################
00584 /* So things look consistent in everyone's emacs... */
00585 /* Local Variables: */
00586 /* indent-tabs-mode: nil */
00587 /* End: */
Generated on Sun May 8 08:40:38 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3