Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
utilities
set_inhibition.cpp
Go to the documentation of this file.
1
#include "
prosilica/prosilica.h
"
2
#include <cstdio>
3
4
int
main
(
int
argc,
char
** argv)
5
{
6
if
(argc < 2) {
7
printf(
"Usage: %s <IP address>\n"
, argv[0]);
8
return
1;
9
}
10
11
prosilica::init
();
12
13
try
{
14
// Open camera at specified IP address
15
prosilica::Camera
cam(argv[1]);
16
// Load factory settings
17
cam.
setAttributeEnum
(
"ConfigFileIndex"
,
"Factory"
);
18
cam.
runCommand
(
"ConfigFileLoad"
);
19
// Write settings for signaling exposure
20
cam.
setAttributeEnum
(
"SyncOut1Invert"
,
"Off"
);
21
cam.
setAttributeEnum
(
"SyncOut1Mode"
,
"Exposing"
);
22
// Save settings to config file 1
23
cam.
setAttributeEnum
(
"ConfigFileIndex"
,
"1"
);
24
cam.
runCommand
(
"ConfigFileSave"
);
25
// Always load config file 1 on power up
26
cam.
setAttributeEnum
(
"ConfigFilePowerUp"
,
"1"
);
27
}
28
catch
(
const
prosilica::ProsilicaException
& e) {
29
printf(
"CONFIGURATION FAILED:\n%s\n"
, e.what());
30
return
1;
31
}
32
printf(
"Configured camera successfully.\n"
);
33
34
prosilica::fini
();
35
return
0;
36
}
prosilica::init
void init()
Definition:
prosilica.cpp:88
main
int main(int argc, char **argv)
Definition:
set_inhibition.cpp:4
prosilica.h
prosilica::Camera::runCommand
void runCommand(const std::string &name)
Definition:
prosilica.cpp:514
prosilica::fini
void fini()
Definition:
prosilica.cpp:93
prosilica::Camera::setAttributeEnum
void setAttributeEnum(const std::string &name, const std::string &value)
Definition:
prosilica.cpp:486
prosilica::ProsilicaException
Definition:
prosilica.h:63
prosilica::Camera
Definition:
prosilica.h:114
prosilica_camera
Author(s): Maintained by William Woodall - wwoodall@willowgarage.com, Contributions by Allison Thackston - allison.thackston@nasa.gov
autogenerated on Mon Jun 10 2019 14:20:19