This example demonstrates the retrieval of information from both the transport layer and the camera. Because the focus of this example is node access, which is where QuickSpin and regular Spinnaker differ, this example differs from NodeMapInfo_C quite a bit.
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.
#include "stdio.h"
#include "string.h"
#define MAX_BUFF_LEN 256
#define MAX_CHARS 35
{
if (spinNodeHandler != NULL)
{
{
{
printf("%s\n", nodeInfoItem);
return;
}
else
{
printf("Unable to convert node information due to error %d...\n", err);
return;
}
}
}
printf("unavailable\n");
}
{
quickSpinTLDevice qsD;
{
printf("Unable to pre-fetch TL device nodes. Aborting with error %d...\n\n", err);
return err;
}
printf("Device serial number: ");
printf("Device vendor name: ");
printf("Device display name: ");
printf("\n");
return err;
}
{
quickSpinTLStream qsS;
{
printf("Unable to pre-fetch TL stream nodes. Aborting with error %d...\n\n", err);
return err;
}
printf("Stream ID: ");
printf("Stream type: ");
printf("\n");
return err;
}
{
quickSpinTLInterface qsI;
{
printf("Unable to pre-fetch TL interface nodes. Aborting with error %d...\n\n", err);
return err;
}
printf("Interface display name: ");
printf("Interface ID: ");
printf("Interface type: ");
printf("Host adapter name: ");
printf("Host adapter vendor: ");
printf("Host adapter driver version: ");
printf("\n");
return err;
}
{
quickSpin qs;
{
printf("Unable to pre-fetch TL device nodes. Aborting with error %d...\n\n", err);
return err;
}
printf("Exposure time: ");
printf("Black level: ");
printf("Height: ");
printf("\n");
return err;
}
{
unsigned int i = 0;
printf("Application build date: %s %s \n\n", __DATE__, __TIME__);
{
printf("Unable to retrieve system instance. Aborting with error %d...\n\n", err);
return err;
}
spinLibraryVersion hLibraryVersion;
printf(
"Spinnaker library version: %d.%d.%d.%d\n\n",
hLibraryVersion.major,
hLibraryVersion.minor,
hLibraryVersion.type,
hLibraryVersion.build);
{
printf("Unable to create interface list. Aborting with error %d...\n\n", err);
return err;
}
{
printf("Unable to retrieve interface list. Aborting with error %d...\n\n", err);
return err;
}
size_t numInterfaces = 0;
{
printf("Unable to retrieve number of interfaces. Aborting with error %d...\n\n", err);
return err;
}
printf("Number of interfaces detected: %u\n\n", (unsigned int)numInterfaces);
{
printf("Unable to create camera list. Aborting with error %d...\n\n", err);
return err;
}
{
printf("Unable to retrieve camera list. Aborting with error %d...\n\n", err);
return err;
}
size_t numCameras = 0;
{
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);
printf("\n*** PRINTING INTERFACE INFORMATION ***\n\n");
for (i = 0; i < numInterfaces; i++)
{
{
errReturn = err;
}
{
errReturn = err;
}
{
errReturn = err;
}
}
printf("\n*** PRINTING TRANSPORT LAYER DEVICE INFORMATION ***\n\n");
for (i = 0; i < numCameras; i++)
{
{
errReturn = err;
}
{
errReturn = err;
}
{
errReturn = err;
}
}
printf("\n*** PRINTING TRANSPORT LAYER STREAM INFORMATION ***\n\n");
for (i = 0; i < numCameras; i++)
{
{
errReturn = err;
}
{
errReturn = err;
}
{
errReturn = err;
}
}
printf("\n*** PRINTING GENICAM INFORMATION ***\n\n");
for (i = 0; i < numCameras; i++)
{
{
errReturn = err;
}
{
errReturn = err;
}
{
errReturn = err;
}
{
errReturn = err;
}
{
errReturn = err;
}
}
{
printf("Unable to clear camera list. Aborting with error %d...\n\n", err);
return err;
}
{
printf("Unable to destroy camera list. Aborting with error %d...\n\n", err);
return err;
}
{
printf("Unable to clean interface list. Aborting with error %d...\n\n", err);
return err;
}
{
printf("Unable to destroy interface list. Aborting with error %d...\n\n", err);
return err;
}
{
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;
}