Spinnaker C
4.3.0.189
 
Trigger_C_QuickSpin.c

Trigger_C_QuickSpin.c shows how to capture images with the trigger using the QuickSpin API. QuickSpin is a subset of the Spinnaker library that allows for simpler node access and control.

This example demonstrates how to prepare, execute, and clean up the camera in regards to using both software and hardware triggers. Retrieving and setting node values using QuickSpin is the only portion of the example that differs from Trigger_C.

A much wider range of topics is covered in the full Spinnaker examples than in the QuickSpin ones. There are only enough QuickSpin examples to demonstrate node access and to get started with the API; please see full Spinnaker examples for further or specific knowledge on a topic.

Please leave us feedback at: https://www.surveymonkey.com/r/TDYMVAPI More source code examples at: https://github.com/Teledyne-MV/Spinnaker-Examples Need help? Check out our forum at: https://teledynevisionsolutions.zendesk.com/hc/en-us/community/topics

//=============================================================================
// Copyright (c) 2025 FLIR Integrated Imaging Solutions, Inc. All Rights Reserved.
//
// This software is the confidential and proprietary information of FLIR
// Integrated Imaging Solutions, Inc. ("Confidential Information"). You
// shall not disclose such Confidential Information and shall use it only in
// accordance with the terms of the license agreement you entered into
// with FLIR Integrated Imaging Solutions, Inc. (FLIR).
//
// FLIR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
// SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE, OR NON-INFRINGEMENT. FLIR SHALL NOT BE LIABLE FOR ANY DAMAGES
// SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
// THIS SOFTWARE OR ITS DERIVATIVES.
//=============================================================================
#include "SpinnakerC.h"
#include "stdio.h"
#include "string.h"
// This macro helps with C-strings.
#define MAX_BUFF_LEN 256
// Use the following enum and global static variable to select whether a
// software or hardware trigger is used.
typedef enum _triggerType
{
} triggerType;
const triggerType chosenTrigger = SOFTWARE;
// This function helps to check if a node is readable
bool8_t IsReadable(spinNodeHandle hNode, char nodeName[])
{
spinError err = SPINNAKER_ERR_SUCCESS;
bool8_t pbReadable = False;
err = spinNodeIsReadable(hNode, &pbReadable);
{
printf("Unable to retrieve node readability (%s node), with error %d...\n\n", nodeName, err);
}
return pbReadable;
}
// This function configures the camera to use a trigger. First, trigger mode
// is set to off in order to select the trigger source. Trigger mode is
// then enabled, which has the camera capture only a single image upon the
// execution of the chosen trigger.
spinError ConfigureTrigger(quickSpin qs)
{
spinError err = SPINNAKER_ERR_SUCCESS;
printf("\n\n*** TRIGGER CONFIGURATION ***\n\n");
printf("Note that if the application / user software triggers faster than frame time, the trigger may be dropped / "
"skipped by the camera.\n");
printf("If several frames are needed per trigger, a more reliable alternative for such case, is to use the "
"multi-frame mode.\n\n");
{
printf("Software trigger chosen...\n\n");
}
else if (chosenTrigger == HARDWARE)
{
printf("Hardware trigger chosen...\n\n");
}
//
// Ensure trigger mode off
//
// *** NOTES ***
// The trigger must be disabled in order to configure whether the source
// is software or hardware.
//
{
printf("Unable to disable trigger mode. Aborting with error %d...\n\n", err);
return err;
}
printf("Trigger mode disabled...\n");
//
// Set TriggerSelector to FrameStart
//
// *** NOTES ***
// For this example, the trigger selector should be set to frame start.
// This is the default for most cameras.
//
{
printf("Unable to choose trigger selector. Aborting with error %d...\n\n", err);
return err;
}
printf("Trigger selector set to frame start...\n");
//
// Choose trigger source
//
// *** NOTES ***
// The trigger source must be set to hardware or software while trigger
// mode is off.
//
{
// Set software source
{
printf("Unable to choose trigger source. Aborting with error %d...\n\n", err);
return err;
}
printf("Trigger source set to software...\n");
}
else if (chosenTrigger == HARDWARE)
{
// Set hardware source
{
printf("Unable to choose trigger source. Aborting with error %d...\n\n", err);
return err;
}
printf("Trigger source set to line 0...\n");
}
//
// Turn trigger mode on
//
// *** LATER ***
// Once the appropriate trigger source has been set, turn trigger mode
// back on in order to retrieve images using the trigger.
//
{
printf("Unable to enable trigger mode. Aborting with error %d...\n\n", err);
return err;
}
printf("Trigger mode enabled...\n\n");
return err;
}
// This function retrieves a single image using the trigger. In this example,
// only a single image is captured and made available for acquisition - as such,
// attempting to acquire two images for a single trigger execution would cause
// the example to hang. This is different from other examples, whereby a
// constant stream of images are being captured and made available for image
// acquisition.
spinError GrabNextImageByTrigger(quickSpin qs)
{
spinError err = SPINNAKER_ERR_SUCCESS;
//
// Use trigger to capture image
//
// *** NOTES ***
// The software trigger only feigns being executed by the Enter key;
// what might not be immediately apparent is that there is no
// continuous stream of images being captured; in other examples that
// acquire images, the camera captures a continuous stream of images.
// When an image is then retrieved, it is plucked from the stream;
// there are many more images captured than retrieved. However, while
// trigger mode is activated, there is only a single image captured at
// the time that the trigger is activated.
//
{
// Get user input
printf("Press the Enter key to initiate software trigger...\n");
getchar();
// Execute software trigger
err = spinCommandExecute(qs.TriggerSoftware);
{
printf("Unable to execute software trigger. Aborting with error %d...\n\n", err);
return err;
}
}
else if (chosenTrigger == HARDWARE)
{
// Execute hardware trigger
printf("Use the hardware to trigger image acquisition.\n");
}
return err;
}
// This function returns the camera to a normal state by turning off trigger
// mode.
spinError ResetTrigger(quickSpin qs)
{
spinError err = SPINNAKER_ERR_SUCCESS;
//
// Turn trigger mode back off
//
// *** NOTES ***
// Once all images have been captured, it is important to turn trigger
// mode back off to restore the camera to a clean state.
//
{
printf("Unable to disable trigger mode. Aborting with error %d...\n\n", err);
return err;
}
printf("Trigger mode disabled...\n\n");
return err;
}
// This function prints the device information of the camera from the transport
// layer; please see NodeMapInfo_C example for more in-depth comments on
// printing device information from the nodemap.
spinError PrintDeviceInfo(spinCamera hCamera)
{
spinError err = SPINNAKER_ERR_SUCCESS;
unsigned int i = 0;
printf("\n*** DEVICE INFORMATION ***\n\n");
// Retrieve nodemap
spinNodeMapHandle hNodeMap = NULL;
err = spinCameraGetTLDeviceNodeMap(hCamera, &hNodeMap);
{
printf("Unable to retrieve nodemap. Non-fatal error %d...\n\n", err);
return err;
}
// Retrieve device information category node
spinNodeHandle hDeviceInformation = NULL;
err = spinNodeMapGetNode(hNodeMap, "DeviceInformation", &hDeviceInformation);
{
printf("Unable to retrieve node. Non-fatal error %d...\n\n", err);
return err;
}
// Retrieve number of nodes within device information node
size_t numFeatures = 0;
err = spinCategoryGetNumFeatures(hDeviceInformation, &numFeatures);
{
printf("Unable to retrieve number of nodes. Non-fatal error %d...\n\n", err);
return err;
}
// Iterate through nodes and print information
for (i = 0; i < numFeatures; i++)
{
spinNodeHandle hFeatureNode = NULL;
err = spinCategoryGetFeatureByIndex(hDeviceInformation, i, &hFeatureNode);
{
printf("Unable to retrieve node. Non-fatal error %d...\n\n", err);
continue;
}
spinNodeType featureType = UnknownNode;
char featureName[MAX_BUFF_LEN];
size_t lenFeatureName = MAX_BUFF_LEN;
err = spinNodeGetName(hFeatureNode, featureName, &lenFeatureName);
{
strcpy(featureName, "Unknown name");
}
if (IsReadable(hFeatureNode, featureName))
{
err = spinNodeGetType(hFeatureNode, &featureType);
{
printf("Unable to retrieve node type. Non-fatal error %d...\n\n", err);
continue;
}
}
else
{
printf("%s: Node not readable\n", featureName);
continue;
}
char featureValue[MAX_BUFF_LEN];
size_t lenFeatureValue = MAX_BUFF_LEN;
err = spinNodeToString(hFeatureNode, featureValue, &lenFeatureValue);
{
strcpy(featureValue, "Unknown value");
}
printf("%s: %s\n", featureName, featureValue);
}
printf("\n");
return err;
}
// This function acquires and saves 10 images from a device; please see
// Acquisition_C example for more in-depth comments on the acquisition of
// images.
spinError AcquireImages(spinCamera hCam, quickSpin qs, quickSpinTLDevice qsD)
{
spinError err = SPINNAKER_ERR_SUCCESS;
printf("\n*** IMAGE ACQUISITION ***\n\n");
// Set acquisition mode to continuous
{
printf("Unable to set acquisition mode to continuous. Aborting with error %d...\n\n", err);
return err;
}
printf("Acquisition mode set to continuous...\n");
// Begin acquiring images
{
printf("Unable to begin image acquisition. Aborting with error %d...\n\n", err);
return err;
}
printf("Acquiring images...\n");
// Retrieve device serial number for filename
char deviceSerialNumber[MAX_BUFF_LEN];
size_t lenDeviceSerialNumber = MAX_BUFF_LEN;
err = spinStringGetValue(qsD.DeviceSerialNumber, deviceSerialNumber, &lenDeviceSerialNumber);
{
strcpy(deviceSerialNumber, "");
lenDeviceSerialNumber = 0;
}
else
{
printf("Device serial number retrieved as %s...\n", deviceSerialNumber);
}
printf("\n");
// Retrieve, convert, and save images
const unsigned int k_numImages = 10;
unsigned int imageCnt = 0;
//
// Create Image Processor context for post processing images
//
spinImageProcessor hImageProcessor = NULL;
err = spinImageProcessorCreate(&hImageProcessor);
{
printf("Unable to create image processor. Non-fatal error %d...\n\n", err);
}
//
// Set default image processor color processing method
//
// *** NOTES ***
// By default, if no specific color processing algorithm is set, the image
// processor will default to NEAREST_NEIGHBOR method.
//
{
printf("Unable to set image processor color processing method. Non-fatal error %d...\n\n", err);
}
for (imageCnt = 0; imageCnt < k_numImages; imageCnt++)
{
// Retrieve next image by trigger
spinImage hResultImage = NULL;
{
return err;
}
// Retrieve next received image
err = spinCameraGetNextImageEx(hCam, 1000, &hResultImage);
{
printf("Unable to retrieve next image. Aborting with error %d...\n\n", err);
}
// Ensure image completion
bool8_t isIncomplete = False;
bool8_t hasFailed = False;
err = spinImageIsIncomplete(hResultImage, &isIncomplete);
{
printf("Unable to determine image completion. Non-fatal error %d...\n\n", err);
hasFailed = True;
}
if (isIncomplete)
{
spinImageStatus imageStatus = SPINNAKER_IMAGE_STATUS_NO_ERROR;
err = spinImageGetStatus(hResultImage, &imageStatus);
{
printf("Unable to retrieve image status. Non-fatal error %d...\n\n", err);
}
else
{
printf("Image incomplete with image status %d...\n", imageStatus);
}
hasFailed = True;
}
// Release incomplete or failed image
if (hasFailed)
{
err = spinImageRelease(hResultImage);
{
printf("Unable to release image. Non-fatal error %d...\n\n", err);
}
continue;
}
// Print image information
size_t width = 0;
size_t height = 0;
err = spinImageGetWidth(hResultImage, &width);
{
printf("Unable to retrieve image width. Non-fatal error %d...\n", err);
}
err = spinImageGetHeight(hResultImage, &height);
{
printf("Unable to retrieve image height. Non-fatal error %d...\n", err);
}
printf("Grabbed image %u, width = %u, height = %u\n", imageCnt, (unsigned int)width, (unsigned int)height);
// Convert image to mono 8
spinImage hConvertedImage = NULL;
err = spinImageCreateEmpty(&hConvertedImage);
{
printf("Unable to create image. Non-fatal error %d...\n\n", err);
hasFailed = True;
}
err = spinImageProcessorConvert(hImageProcessor, hResultImage, hConvertedImage, PixelFormat_Mono8);
{
printf("Unable to convert image. Non-fatal error %d...\n\n", err);
hasFailed = True;
}
// Create unique file name
char filename[MAX_BUFF_LEN];
if (lenDeviceSerialNumber == 0)
{
sprintf(filename, "Trigger-C-%d.jpg", imageCnt);
}
else
{
sprintf(filename, "Trigger-C-%s-%d.jpg", deviceSerialNumber, imageCnt);
}
// Save image
err = spinImageSave(hConvertedImage, filename, SPINNAKER_IMAGE_FILE_FORMAT_JPEG);
{
printf("Unable to save image. Non-fatal error %d...\n", err);
}
else
{
printf("Image saved at %s\n\n", filename);
}
// Destroy converted image
err = spinImageDestroy(hConvertedImage);
{
printf("Unable to destroy image. Non-fatal error %d...\n\n", err);
}
// Release complete image
err = spinImageRelease(hResultImage);
{
printf("Unable to release image. Non-fatal error %d...\n\n", err);
}
}
//
// Destroy Image Processor context
//
// *** NOTES ***
// Image processor context needs to be destroyed after all image processing
// are complete to avoid memory leaks.
//
err = spinImageProcessorDestroy(hImageProcessor);
{
printf("Unable to destroy image processor. Non-fatal error %d...\n\n", err);
}
// End Acquisition
{
printf("Unable to end acquisition. Non-fatal error %d...\n\n", err);
}
return err;
}
// This function acts as the body of the example; please see NodeMapInfo_C
// example for more in-depth comments on setting up cameras.
spinError RunSingleCamera(spinCamera hCam)
{
spinError err = SPINNAKER_ERR_SUCCESS;
// Print device information
err = PrintDeviceInfo(hCam);
// Initialize camera
err = spinCameraInit(hCam);
{
printf("Unable to initialize camera. Aborting with error %d...\n\n", err);
return err;
}
// Pre-fetch TL device nodes
quickSpinTLDevice qsD;
err = quickSpinTLDeviceInit(hCam, &qsD);
{
printf("Unable to pre-fetch TL device nodes. Aborting with error %d...\n\n", err);
return err;
}
// Pre-fetch GenICam nodes
quickSpin qs;
err = quickSpinInit(hCam, &qs);
{
printf("Unable to pre-fetch GenICam nodes. Aborting with error %d...\n\n", err);
return err;
}
// Configure trigger
err = ConfigureTrigger(qs);
{
return err;
}
// Acquire images
err = AcquireImages(hCam, qs, qsD);
{
return err;
}
// Reset trigger
err = ResetTrigger(qs);
{
return err;
}
// Deinitialize camera
err = spinCameraDeInit(hCam);
{
printf("Unable to deinitialize camera. Non-fatal error %d...\n\n", err);
}
return err;
}
// Example entry point; please see Enumeration_C example for more in-depth
// comments on preparing and cleaning up the system.
int main(/*int argc, char** argv*/)
{
spinError errReturn = SPINNAKER_ERR_SUCCESS;
spinError err = SPINNAKER_ERR_SUCCESS;
unsigned int i = 0;
// Print application build information
printf("Application build date: %s %s \n\n", __DATE__, __TIME__);
// Retrieve singleton reference to system object
spinSystem hSystem = NULL;
err = spinSystemGetInstance(&hSystem);
{
printf("Unable to retrieve system instance. Aborting with error %d...\n\n", err);
return err;
}
// Print out current library version
spinLibraryVersion hLibraryVersion;
spinSystemGetLibraryVersion(hSystem, &hLibraryVersion);
printf(
"Spinnaker library version: %d.%d.%d.%d\n\n",
hLibraryVersion.major,
hLibraryVersion.minor,
hLibraryVersion.type,
hLibraryVersion.build);
// Retrieve list of cameras from the system
spinCameraList hCameraList = NULL;
err = spinCameraListCreateEmpty(&hCameraList);
{
printf("Unable to create camera list. Aborting with error %d...\n\n", err);
return err;
}
err = spinSystemGetCameras(hSystem, hCameraList);
{
printf("Unable to retrieve camera list. Aborting with error %d...\n\n", err);
return err;
}
// Retrieve number of cameras
size_t numCameras = 0;
err = spinCameraListGetSize(hCameraList, &numCameras);
{
printf("Unable to retrieve number of cameras. Aborting with error %d...\n\n", err);
return err;
}
printf("Number of cameras detected: %u\n\n", (unsigned int)numCameras);
// Finish if there are no cameras
if (numCameras == 0)
{
// Clear and destroy camera list before releasing system
err = spinCameraListClear(hCameraList);
{
printf("Unable to clear camera list. Aborting with error %d...\n\n", err);
return err;
}
err = spinCameraListDestroy(hCameraList);
{
printf("Unable to destroy camera list. Aborting with error %d...\n\n", err);
return err;
}
// Release system
err = spinSystemReleaseInstance(hSystem);
{
printf("Unable to release system instance. Aborting with error %d...\n\n", err);
return err;
}
printf("Not enough cameras!\n");
printf("Done! Press Enter to exit...\n");
getchar();
return -1;
}
// Run example on each camera
for (i = 0; i < numCameras; i++)
{
printf("\nRunning example for camera %d...\n", i);
// Select camera
spinCamera hCamera = NULL;
err = spinCameraListGet(hCameraList, i, &hCamera);
{
printf("Unable to retrieve camera from list. Aborting with error %d...\n\n", err);
errReturn = err;
}
else
{
// Run example
err = RunSingleCamera(hCamera);
{
errReturn = err;
}
}
// Release camera
err = spinCameraRelease(hCamera);
{
errReturn = err;
}
printf("Camera %d example complete...\n\n", i);
}
// Clear and destroy camera list before releasing system
err = spinCameraListClear(hCameraList);
{
printf("Unable to clear camera list. Aborting with error %d...\n\n", err);
return err;
}
err = spinCameraListDestroy(hCameraList);
{
printf("Unable to destroy camera list. Aborting with error %d...\n\n", err);
return err;
}
// Release system
err = spinSystemReleaseInstance(hSystem);
{
printf("Unable to release system instance. Aborting with error %d...\n\n", err);
return err;
}
printf("\nDone! Press Enter to exit...\n");
getchar();
return errReturn;
}
spinCameraRelease
SPINNAKERC_API spinCameraRelease(spinCamera hCamera)
Releases a camera.
AcquireImages
spinError AcquireImages(spinCamera hCam, quickSpin qs, quickSpinTLDevice qsD)
Definition: Trigger_C_QuickSpin.c:345
spinImageGetWidth
SPINNAKERC_API spinImageGetWidth(spinImage hImage, size_t *pWidth)
Retrieves the width of an image.
main
int main()
Definition: Trigger_C_QuickSpin.c:638
SPINNAKER_COLOR_PROCESSING_ALGORITHM_HQ_LINEAR
@ SPINNAKER_COLOR_PROCESSING_ALGORITHM_HQ_LINEAR
Well-balanced speed and quality.
Definition: SpinnakerDefsC.h:322
spinCameraListClear
SPINNAKERC_API spinCameraListClear(spinCameraList hCameraList)
Clears a camera list.
spinImageIsIncomplete
SPINNAKERC_API spinImageIsIncomplete(spinImage hImage, bool8_t *pbIsIncomplete)
Checks whether an image is incomplete.
spinCameraEndAcquisition
SPINNAKERC_API spinCameraEndAcquisition(spinCamera hCamera)
Has a camera stop acquiring images.
TriggerMode_On
@ TriggerMode_On
Definition: CameraDefsC.h:123
spinEnumerationSetEnumValue
SPINNAKERC_API spinEnumerationSetEnumValue(spinNodeHandle hEnumNode, size_t value)
Sets a new entry using its enum; note that enumeration entry int and enum values are different - int ...
ConfigureTrigger
spinError ConfigureTrigger(quickSpin qs)
Definition: Trigger_C_QuickSpin.c:74
spinCameraBeginAcquisition
SPINNAKERC_API spinCameraBeginAcquisition(spinCamera hCamera)
Has a camera start acquiring images.
spinImageCreateEmpty
SPINNAKERC_API spinImageCreateEmpty(spinImage *phImage)
Creates an empty image; images created this way must be destroyed.
spinSystemReleaseInstance
SPINNAKERC_API spinSystemReleaseInstance(spinSystem hSystem)
Releases the system; make sure handle is cleaned up properly by setting it to NULL after system is re...
spinImage
void * spinImage
Handle for image functionality.
Definition: SpinnakerDefsC.h:91
TriggerSource_Software
@ TriggerSource_Software
Definition: CameraDefsC.h:92
TriggerSource_Line0
@ TriggerSource_Line0
Definition: CameraDefsC.h:75
spinSystemGetCameras
SPINNAKERC_API spinSystemGetCameras(spinSystem hSystem, spinCameraList hCameraList)
Retrieves a list of detected (and enumerable) cameras on the system; camera lists must be created and...
spinStringGetValue
SPINNAKERC_API spinStringGetValue(spinNodeHandle hNode, char *pBuf, size_t *pBufLen)
Retrieves the value of a string node as a c-string.
spinNodeMapHandle
void * spinNodeMapHandle
Handle for nodemap functionality.
Definition: SpinnakerGenApiDefsC.h:39
SpinnakerC.h
spinEnumerationSetIntValue
SPINNAKERC_API spinEnumerationSetIntValue(spinNodeHandle hEnumNode, int64_t value)
Sets a new entry using its integer value retrieved from a call to spinEnumerationEntryGetIntValue(); ...
PrintDeviceInfo
spinError PrintDeviceInfo(spinCamera hCamera)
Definition: Trigger_C_QuickSpin.c:253
spinNodeGetType
SPINNAKERC_API spinNodeGetType(spinNodeHandle hNode, spinNodeType *pType)
Retrieves the type of a node (as an enum, spinNodeType)
spinNodeGetName
SPINNAKERC_API spinNodeGetName(spinNodeHandle hNode, char *pBuf, size_t *pBufLen)
Retrieves the name of a node (no whitespace)
spinCategoryGetNumFeatures
SPINNAKERC_API spinCategoryGetNumFeatures(spinNodeHandle hCategoryNode, size_t *pValue)
Retrieves the number of a features (or child nodes) or a category node.
spinImageGetHeight
SPINNAKERC_API spinImageGetHeight(spinImage hImage, size_t *pHeight)
Retrieves the height of an image.
spinImageDestroy
SPINNAKERC_API spinImageDestroy(spinImage hImage)
Destroys an image.
spinSystemGetLibraryVersion
SPINNAKERC_API spinSystemGetLibraryVersion(spinSystem hSystem, spinLibraryVersion *hLibraryVersion)
Get current library version of Spinnaker.
IsReadable
bool8_t IsReadable(spinNodeHandle hNode, char nodeName[])
Definition: Trigger_C_QuickSpin.c:58
spinCommandExecute
SPINNAKERC_API spinCommandExecute(spinNodeHandle hNode)
Executes the action associated to a command node.
spinSystem
void * spinSystem
Handle for system functionality.
Definition: SpinnakerDefsC.h:51
spinImageProcessor
void * spinImageProcessor
Handle for image processor functionality.
Definition: SpinnakerDefsC.h:107
spinCameraInit
SPINNAKERC_API spinCameraInit(spinCamera hCamera)
Initializes a camera, allowing for much more interaction.
False
static const bool8_t False
Definition: SpinnakerDefsC.h:36
spinImageProcessorConvert
SPINNAKERC_API spinImageProcessorConvert(spinImageProcessor hImageProcessor, spinImage hSrcImage, spinImage hDestImage, spinPixelFormatEnums destFormat)
Converts the source image buffer to the specified destination pixel format and stores the result in t...
spinImageProcessorSetColorProcessing
SPINNAKERC_API spinImageProcessorSetColorProcessing(spinImageProcessor hImageProcessor, spinColorProcessingAlgorithm colorAlgorithm)
Sets the color processing algorithm used at the time of the spinImageProcessorConvert() call,...
spinCameraListDestroy
SPINNAKERC_API spinCameraListDestroy(spinCameraList hCameraList)
Destroys a camera list.
quickSpinTLDeviceInit
SPINNAKERC_API quickSpinTLDeviceInit(spinCamera hCamera, quickSpinTLDevice *pQuickSpinTLDevice)
HARDWARE
@ HARDWARE
Definition: Trigger_C_QuickSpin.c:52
GrabNextImageByTrigger
spinError GrabNextImageByTrigger(quickSpin qs)
Definition: Trigger_C_QuickSpin.c:183
UnknownNode
@ UnknownNode
Definition: SpinnakerGenApiDefsC.h:85
_triggerType
_triggerType
Definition: Trigger_C.c:99
spinCameraList
void * spinCameraList
Handle for interface functionality.
Definition: SpinnakerDefsC.h:75
spinImageProcessorDestroy
SPINNAKERC_API spinImageProcessorDestroy(spinImageProcessor hImageProcessor)
Destroys a image list.
spinSystemGetInstance
SPINNAKERC_API spinSystemGetInstance(spinSystem *phSystem)
Retrieves an instance of the system object; the system is a singleton, so there will only ever be one...
AcquisitionMode_Continuous
@ AcquisitionMode_Continuous
Definition: CameraDefsC.h:67
SPINNAKER_IMAGE_FILE_FORMAT_JPEG
@ SPINNAKER_IMAGE_FILE_FORMAT_JPEG
JPEG.
Definition: SpinnakerDefsC.h:355
SPINNAKER_IMAGE_STATUS_NO_ERROR
@ SPINNAKER_IMAGE_STATUS_NO_ERROR
Image is returned from GetNextImage() call without any errors.
Definition: SpinnakerDefsC.h:388
spinCameraGetNextImageEx
SPINNAKERC_API spinCameraGetNextImageEx(spinCamera hCamera, uint64_t grabTimeout, spinImage *phImage)
Retrieves an image from a camera; manually set the timeout in milliseconds.
SOFTWARE
@ SOFTWARE
Definition: Trigger_C_QuickSpin.c:51
ResetTrigger
spinError ResetTrigger(quickSpin qs)
Definition: Trigger_C_QuickSpin.c:226
spinCameraListGet
SPINNAKERC_API spinCameraListGet(spinCameraList hCameraList, size_t index, spinCamera *phCamera)
Retrieves a camera from a camera list using an index.
quickSpinInit
SPINNAKERC_API quickSpinInit(spinCamera hCamera, quickSpin *pQuickSpin)
bool8_t
uint8_t bool8_t
Definition: SpinnakerDefsC.h:35
spinCamera
void * spinCamera
Handle for camera functionality.
Definition: SpinnakerDefsC.h:82
chosenTrigger
const triggerType chosenTrigger
Definition: Trigger_C_QuickSpin.c:55
spinNodeHandle
void * spinNodeHandle
Handle for node functionality.
Definition: SpinnakerGenApiDefsC.h:45
spinNodeIsReadable
SPINNAKERC_API spinNodeIsReadable(spinNodeHandle hNode, bool8_t *pbResult)
Checks whether a node is readable.
spinImageSave
SPINNAKERC_API spinImageSave(spinImage hImage, const char *pFilename, spinImageFileFormat format)
Saves an image using a specified file format (using an enum, spinImageFileFormat)
spinNodeMapGetNode
SPINNAKERC_API spinNodeMapGetNode(spinNodeMapHandle hNodeMap, const char *pName, spinNodeHandle *phNode)
Retrieves a node from the nodemap by name.
spinCameraListGetSize
SPINNAKERC_API spinCameraListGetSize(spinCameraList hCameraList, size_t *pSize)
Retrieves the number of cameras on a camera list.
TriggerSelector_FrameStart
@ TriggerSelector_FrameStart
Definition: CameraDefsC.h:60
spinCameraDeInit
SPINNAKERC_API spinCameraDeInit(spinCamera hCamera)
Deinitializes a camera, greatly reducing functionality.
spinCameraGetTLDeviceNodeMap
SPINNAKERC_API spinCameraGetTLDeviceNodeMap(spinCamera hCamera, spinNodeMapHandle *phNodeMap)
Retrieves the transport layer device nodemap from a camera.
spinImageProcessorCreate
SPINNAKERC_API spinImageProcessorCreate(spinImageProcessor *phImageProcessor)
Creates an image processor.
RunSingleCamera
spinError RunSingleCamera(spinCamera hCam)
Definition: Trigger_C_QuickSpin.c:570
True
static const bool8_t True
Definition: SpinnakerDefsC.h:37
spinCategoryGetFeatureByIndex
SPINNAKERC_API spinCategoryGetFeatureByIndex(spinNodeHandle hCategoryNode, size_t index, spinNodeHandle *phFeature)
Retrieves a node from a category node using an index.
spinImageRelease
SPINNAKERC_API spinImageRelease(spinImage hImage)
Releases an image.
spinImageGetStatus
SPINNAKERC_API spinImageGetStatus(spinImage hImage, spinImageStatus *pStatus)
Retrieves the image status of an image.
SPINNAKER_ERR_SUCCESS
@ SPINNAKER_ERR_SUCCESS
An error code of 0 means that the function has run without error.
Definition: SpinnakerDefsC.h:233
spinCameraListCreateEmpty
SPINNAKERC_API spinCameraListCreateEmpty(spinCameraList *phCameraList)
Creates an empty camera list (camera lists created this way must be destroyed)
spinNodeToString
SPINNAKERC_API spinNodeToString(spinNodeHandle hNode, char *pBuf, size_t *pBufLen)
Retrieves the value of any node type as a c-string.
PixelFormat_Mono8
@ PixelFormat_Mono8
Definition: CameraDefsC.h:732
MAX_BUFF_LEN
#define MAX_BUFF_LEN
Definition: Trigger_C_QuickSpin.c:45
TriggerMode_Off
@ TriggerMode_Off
Definition: CameraDefsC.h:122