read_memory.cpp
Go to the documentation of this file.
1 #include "prosilica/prosilica.h"
2 #include <cstdio>
3 #include <cassert>
4 
5 int main(int argc, char** argv)
6 {
7  if (argc < 2) {
8  printf("Usage: %s <IP address>\n", argv[0]);
9  return 0;
10  }
11 
13  char buffer[prosilica::Camera::USER_MEMORY_SIZE] = {0};
14  {
15  prosilica::Camera cam(argv[1]);
16  cam.readUserMemory(buffer, sizeof(buffer));
17  }
19 
20  fwrite(buffer, 1, sizeof(buffer), stdout);
21 
22  return 0;
23 }
void readUserMemory(char *data, size_t size)
Definition: prosilica.cpp:550
void init()
Definition: prosilica.cpp:88
static const size_t USER_MEMORY_SIZE
Data must have size <= USER_MEMORY_SIZE bytes.
Definition: prosilica.h:171
void fini()
Definition: prosilica.cpp:93
int main(int argc, char **argv)
Definition: read_memory.cpp:5


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