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 quite a bit.
using namespace std;
{
if (pNode != NULL && IsReadable(pNode))
{
cout << pNode->ToString() << endl;
return;
}
cout << "unavailable" << endl;
}
{
int result = 0;
try
{
cout << "Device serial number: ";
cout << "Device vendor name: ";
cout << "Device display name: ";
cout << endl;
}
{
cout <<
"Error: " << e.
what() << endl;
result = -1;
}
return result;
}
{
int result = 0;
try
{
cout << "Stream ID: ";
cout << "Stream type: ";
cout << endl;
}
{
cout <<
"Error: " << e.
what() << endl;
result = -1;
}
return result;
}
{
int result = 0;
try
{
cout << "Interface display name: ";
cout << "Interface ID: ";
cout << "Interface type: ";
cout << "Host adapter name: ";
cout << "Host adapter vendor: ";
cout << "Host adapter driver version: ";
PrintNodeInfo(&pInterface->TLInterface.HostAdapterDriverVersion);
cout << endl;
}
{
cout <<
"Error: " << e.
what() << endl;
result = -1;
}
return result;
}
{
int result = 0;
try
{
cout << "Exposure time: ";
cout << "Black level: ";
cout << "Height: ";
cout << endl;
}
{
cout <<
"Error: " << e.
what() << endl;
result = -1;
}
return result;
}
{
int result = 0;
cout << "Application build date: " << __DATE__ << " " << __TIME__ << endl << endl;
const LibraryVersion spinnakerLibraryVersion = system->GetLibraryVersion();
cout <<
"Spinnaker library version: " << spinnakerLibraryVersion.
major <<
"." << spinnakerLibraryVersion.
minor
<<
"." << spinnakerLibraryVersion.
type <<
"." << spinnakerLibraryVersion.
build << endl
<< endl;
unsigned int numCameras = camList.
GetSize();
cout << "Number of cameras detected: " << numCameras << endl << endl;
unsigned int numInterfaces = interfaceList.
GetSize();
cout << "Number of interfaces detected: " << numInterfaces << endl << endl;
cout << endl << "*** PRINTING INTERFACE INFORMATION ***" << endl << endl;
for (unsigned int i = 0; i < numInterfaces; i++)
{
}
cout << endl << "*** PRINTING TRANSPORT LAYER DEVICE INFORMATION ***" << endl << endl;
for (unsigned int i = 0; i < numCameras; i++)
{
}
cout << endl << "*** PRINTING TRANSPORT LAYER STREAMING INFORMATION ***" << endl << endl;
for (unsigned int i = 0; i < numCameras; i++)
{
}
cout << endl << "*** PRINTING GENICAM INFORMATION ***" << endl << endl;
for (unsigned int i = 0; i < numCameras; i++)
{
}
system->ReleaseInstance();
cout << endl << "Done! Press Enter to exit..." << endl;
getchar();
return result;
}
int main(int, char **)
Definition Acquisition.cpp:527
int PrintTransportLayerStreamInfo(CameraPtr pCamera)
Definition NodeMapInfo_QuickSpin.cpp:117
int PrintTransportLayerDeviceInfo(CameraPtr pCamera)
Definition NodeMapInfo_QuickSpin.cpp:68
int PrintGenICamDeviceInfo(CameraPtr pCamera)
Definition NodeMapInfo_QuickSpin.cpp:228
void PrintNodeInfo(CValuePtr pNode)
Definition NodeMapInfo_QuickSpin.cpp:49
int PrintTransportLayerInterfaceInfo(const InterfacePtr &pInterface)
Definition NodeMapInfo_QuickSpin.cpp:155
Used to hold a list of camera objects.
Definition CameraList.h:42
void Clear()
Clears the list of cameras and destroys their corresponding reference counted objects.
CameraPtr GetByIndex(unsigned int index) const
Returns a pointer to a camera object at the "index".
unsigned int GetSize() const
Returns the size of the camera list.
A reference tracked pointer to a camera object.
Definition CameraPtr.h:44
The Exception object represents an error that is returned from the library.
Definition Exception.h:51
virtual const char * what() const
virtual override for what().
Encapsulates a GenApi pointer dealing with the dynamic_cast automatically.
Definition Pointer.h:75
A list of the available interfaces on the system.
Definition InterfaceList.h:42
void Clear()
Clears the list of interfaces and destroys their corresponding objects.
InterfacePtr GetByIndex(unsigned int index) const
Returns a pointer to an Interface object at the "index".
unsigned int GetSize() const
Returns the size of the interface list.
A reference tracked pointer to the interface object.
Definition InterfacePtr.h:44
A reference tracked pointer to a system object.
Definition SystemPtr.h:44
Definition Autovector.h:36
Provides easier access to the current version of Spinnaker.
Definition SpinnakerDefs.h:657
unsigned int minor
Minor version of the library.
Definition SpinnakerDefs.h:662
unsigned int major
Major version of the library.
Definition SpinnakerDefs.h:659
unsigned int type
Version type of the library.
Definition SpinnakerDefs.h:665
unsigned int build
Build number of the library.
Definition SpinnakerDefs.h:668