ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
walkthrough.cpp File Reference

This application demonstrates how to operate a GenICam device by the use of the IDS peak genericAPI. More...

#include <peak/peak.hpp>
#include <algorithm>
#include <cstdint>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
Include dependency graph for walkthrough.cpp:

Macros

#define VERSION   "1.1.3"
 

Functions

int main (int argc, char *argv[])
 The sample implementation.
 
bool parse_command_line (int argc, char *argv[])
 Parse command line for program arguments.
 
void wait_for_enter ()
 

Variables

std::string cti_selection
 
bool no_key_for_exit = false
 
uint32_t num_frames_to_acquire = 100
 
bool print_help_text_and_exit = false
 
bool print_version_and_exit = false
 

Detailed Description

This application demonstrates how to operate a GenICam device by the use of the IDS peak genericAPI.

Author
IDS Imaging Development Systems GmbH
Date
2022-06-01
Since
1.0.0
Version
1.1.3

Copyright (C) 2019 - 2025, IDS Imaging Development Systems GmbH.

The information in this document is subject to change without notice and should not be construed as a commitment by IDS Imaging Development Systems GmbH. IDS Imaging Development Systems GmbH does not assume any responsibility for any errors that may appear in this document.

This document, or source code, is provided solely as an example of how to utilize IDS Imaging Development Systems GmbH software libraries in a sample application. IDS Imaging Development Systems GmbH does not assume any responsibility for the use or reliability of any portion of this document.

General permission to copy or modify is hereby granted.

Macro Definition Documentation

◆ VERSION

#define VERSION   "1.1.3"

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

The sample implementation.

The program will select a GenICam Producer library (cti) to work with. It will then open the first available device and acquire a number of images from it.

◆ parse_command_line()

bool parse_command_line ( int argc,
char * argv[] )

Parse command line for program arguments.

The program can be called with none or with any combination of these arguments: -'–cti filepath' Specify the full path to a *.cti file to be instrumented. -'–frmcnt number' Specify the number of images to acquire from the camera device. -'–nokey' Turn off the 'wait for key' at the end of the program. -'–help' Request help text output. Program will exit after printing the help text. -'–version' Request the version of the sample. Program will exit after printing the version.

Note
The parser is kept as simple as possible.

◆ wait_for_enter()

void wait_for_enter ( )

\bief Wait for enter function

The function waits for the user pressing the enter key, unless the command line option –nokey is specified.

This function is called from main() whenever the program exits, either in consequence of an error or after normal termination.

Variable Documentation

◆ cti_selection

std::string cti_selection

◆ no_key_for_exit

bool no_key_for_exit = false

◆ num_frames_to_acquire

uint32_t num_frames_to_acquire = 100

◆ print_help_text_and_exit

bool print_help_text_and_exit = false

◆ print_version_and_exit

bool print_version_and_exit = false