CamTool Sample
CamTool is a command line tool that demonstrates the features and API’s of CameraSDK. The source code is demonstrating best practice usage of CameraSDK, encapsulated in a command line parser.
Before you dive into this sample project, you should have read C++ in the “Getting Started” section. This sample is based on the CMake project file, introduced in the “Getting Started” guide.
Download
A ZIP file with the project can be found here
Tip
See the README.md
file in the project, on how to build.
File overview
Shell.h/cpp
: A crude interactive shell for entering commands*Commands.h/cpp
: The implementation of camera related commands that are triggered from the shell. SDK is called from heremain.cpp
: The entry point that initiates the Shell and setup the available Commands
Available commands
This is a print of the help
command’s output:
Available commands:
capture Trigger a capture on the open camera
close Close the currently opened camera
exit Quit the application
help Print this help text
hostcapacity <capacity in MB> Tells the camera how much capacity this host has available for images
list Prints a list of visible camera (USB only)
liveview [on|off] Shows config and Enable/Disable receiving live view images
notif Enable/Disable notifications
open [IP=X.X.X.X|serialno=<serialno>] [password=<password>] [retries=<num>] [timeout=<secs>] Open an IP or USB camera
opened List all opened cameras
pending List pending images count, for all cameras
property Control of properties
quit Quit the application
recv <on|off> Enable / Disable receiving captured images.
save <on|off> Save received images to CWD
Tip
On Linux if you can not see any connected USB cameras, please refer to our Linux Troubleshooting guide.