set_inhibition.cpp
Go to the documentation of this file.
00001 #include "prosilica/prosilica.h"
00002 #include <cstdio>
00003 
00004 int main(int argc, char** argv)
00005 {
00006   if (argc < 2) {
00007     printf("Usage: %s <IP address>\n", argv[0]);
00008     return 1;
00009   }
00010 
00011   prosilica::init();
00012 
00013   try {
00014     // Open camera at specified IP address
00015     prosilica::Camera cam(argv[1]);
00016     // Load factory settings
00017     cam.setAttributeEnum("ConfigFileIndex", "Factory");
00018     cam.runCommand("ConfigFileLoad");
00019     // Write settings for signaling exposure
00020     cam.setAttributeEnum("SyncOut1Invert", "Off");
00021     cam.setAttributeEnum("SyncOut1Mode", "Exposing");
00022     // Save settings to config file 1
00023     cam.setAttributeEnum("ConfigFileIndex", "1");
00024     cam.runCommand("ConfigFileSave");
00025     // Always load config file 1 on power up
00026     cam.setAttributeEnum("ConfigFilePowerUp", "1");
00027   }
00028   catch (const prosilica::ProsilicaException& e) {
00029     printf("CONFIGURATION FAILED:\n%s\n", e.what());
00030     return 1;
00031   }
00032   printf("Configured camera successfully.\n");
00033 
00034   prosilica::fini();
00035   return 0;
00036 }


prosilica_camera
Author(s): Maintained by William Woodall - wwoodall@willowgarage.com, Contributions by Allison Thackston - allison.thackston@nasa.gov
autogenerated on Fri Aug 28 2015 12:15:29