Spinnaker C++
2.6.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
System Class Reference

The system object is used to retrieve the list of interfaces and cameras available. More...

Inheritance diagram for System:
ISystem

Public Member Functions

virtual ~System ()
 Default destructor. More...
 
virtual void ReleaseInstance ()
 This call releases the referenced instance of the System Singleton. More...
 
virtual InterfaceList GetInterfaces (bool updateInterface=true)
 Returns a list of interfaces available on the system. More...
 
virtual void UpdateInterfaceList ()
 Updates the list of interfaces on the system. More...
 
virtual CameraList GetCameras (bool updateInterfaces=true, bool updateCameras=true)
 Returns a list of cameras that are available on the system. More...
 
virtual bool UpdateCameras (bool updateInterfaces=true)
 Updates the list of cameras on the system. More...
 
void RegisterEventHandler (EventHandler &evtHandlerToRegister)
 Registers an event handler for the system. More...
 
void UnregisterEventHandler (EventHandler &evtHandlerToUnregister)
 Unregisters an event handler for the system. More...
 
virtual void RegisterInterfaceEventHandler (EventHandler &evtHandlerToRegister, bool updateInterface=true)
 Registers event handlers for all available interfaces that are found on the system If new interfaces are detected by the system after RegisterInterfaceEventHandler() is called, those interfaces will be automatically registered with this event. More...
 
void UnregisterInterfaceEventHandler (EventHandler &evtHandlerToUnregister)
 Unregisters event handlers for all available interfaces that are found on the system. More...
 
virtual void RegisterLoggingEventHandler (LoggingEventHandler &handler)
 Registers a logging event. More...
 
virtual void UnregisterAllLoggingEventHandlers ()
 Unregisters all previously registered logging events. More...
 
virtual void UnregisterLoggingEventHandler (LoggingEventHandler &handler)
 Unregisters a logging event. More...
 
virtual void SetLoggingEventPriorityLevel (SpinnakerLogLevel level)
 Sets a threshold priority level for logging event. More...
 
virtual SpinnakerLogLevel GetLoggingEventPriorityLevel ()
 Retrieves the current logging event priority level. More...
 
virtual bool IsInUse ()
 Checks if the system is in use by any interface or camera objects. More...
 
virtual void SendActionCommand (unsigned int deviceKey, unsigned int groupKey, unsigned int groupMask, unsigned long long actionTime=0, unsigned int *pResultSize=0, ActionCommandResult results[]=NULL)
 Broadcast an Action Command to all devices on system. More...
 
virtual const LibraryVersion GetLibraryVersion ()
 Get current library version of Spinnaker. More...
 
virtual GenApi::INodeMapGetTLNodeMap () const
 Gets a reference to the system node map. More...
 
- Public Member Functions inherited from ISystem
virtual ~ISystem ()
 

Static Public Member Functions

static SystemPtr GetInstance ()
 Returns a pointer to a Singleton instance of a System object. More...
 

Protected Member Functions

 System ()
 Default constructor. More...
 
- Protected Member Functions inherited from ISystem
 ISystem ()
 
 ISystem (const ISystem &)
 
ISystemoperator= (const ISystem &)
 

Additional Inherited Members

- Public Attributes inherited from ISystem
TransportLayerSystem TLSystem
 

Detailed Description

The system object is used to retrieve the list of interfaces and cameras available.

Constructor & Destructor Documentation

virtual ~System ( )
virtual

Default destructor.

System ( )
protected

Default constructor.

Member Function Documentation

virtual CameraList GetCameras ( bool  updateInterfaces = true,
bool  updateCameras = true 
)
virtual

Returns a list of cameras that are available on the system.

This call returns both GigE Vision and Usb3 Vision cameras from all interfaces. The camera list object will reference count the cameras it returns. It is important that the camera list is destroyed or is cleared before calling system->ReleaseInstance() or else the call to system->ReleaseInstance() will result in an error message thrown that a reference to the camera is still held.

See Also
ReleaseInstance()
CameraList::Clear()
Parameters
updateInterfacesDetermines whether or not updateInterfaceList() is called before getting cameras from available interfaces on the system
updateCamerasDetermines whether or not UpdateCameras() is called before getting cameras from available interfaces on the system
Returns
An CameraList object that contains a list of all cameras.

Implements ISystem.

static SystemPtr GetInstance ( )
static
virtual InterfaceList GetInterfaces ( bool  updateInterface = true)
virtual

Returns a list of interfaces available on the system.

This call returns GigE and Usb2 and Usb3 interfaces. Note that on MacOS only active GigE interfaces will be stored in the returned InterfaceList.

See Also
UpdateInterfaceList()
Parameters
updateInterfaceDetermines whether or not UpdateInterfaceList() is called before getting available interfaces
Returns
An InterfaceList object that contains a list of all interfaces.

Implements ISystem.

virtual const LibraryVersion GetLibraryVersion ( )
virtual

Get current library version of Spinnaker.

Returns
A struct containing the current version of Spinnaker (major, minor, type, build).

Implements ISystem.

virtual SpinnakerLogLevel GetLoggingEventPriorityLevel ( )
virtual

Retrieves the current logging event priority level.

Spinnaker uses five levels of logging:

  • Error - failures that are non-recoverable without user intervention.
  • Warning - failures that are recoverable without user intervention.
  • Notice - information about events such as camera arrival and removal, initialization and deinitialization, starting and stopping image acquisition, and feature modification.
  • Info - information about recurring events that are generated regularly such as information on individual images.
  • Debug - information that can be used to troubleshoot the system.
See Also
SpinnakerLogLevel
Returns
Level The threshold level

Implements ISystem.

virtual GenApi::INodeMap& GetTLNodeMap ( ) const
virtual

Gets a reference to the system node map.

The system must be initialized by a call to System::GetInstance() first before a node map reference can be successfully acquired.

Returns
A reference to the System INodeMap.

Implements ISystem.

virtual bool IsInUse ( )
virtual

Checks if the system is in use by any interface or camera objects.

Returns
Returns true if the system is in use and false otherwise.

Implements ISystem.

void RegisterEventHandler ( EventHandler evtHandlerToRegister)
virtual

Registers an event handler for the system.

See Also
SystemEventHandler
Parameters
evtHandlerToRegisterThe event handler to register for the system

Implements ISystem.

virtual void RegisterInterfaceEventHandler ( EventHandler evtHandlerToRegister,
bool  updateInterface = true 
)
virtual

Registers event handlers for all available interfaces that are found on the system If new interfaces are detected by the system after RegisterInterfaceEventHandler() is called, those interfaces will be automatically registered with this event.

Note that only GEV interface arrivals and removals are currently handled.

See Also
InterfaceEventHandler
Parameters
evtHandlerToRegisterThe event handler to register for the available interfaces
updateInterfaceDetermines whether or not UpdateInterfaceList() is called before registering event for available interfaces on the system

Implements ISystem.

virtual void RegisterLoggingEventHandler ( LoggingEventHandler handler)
virtual

Registers a logging event.

Parameters
handlerThe logging event handler to register

Implements ISystem.

virtual void ReleaseInstance ( )
virtual

This call releases the referenced instance of the System Singleton.

After successfully releasing the System instance, the pointer returned by GetInstance() will be invalid. Once the final System instance is released, all remaining Spinnaker resources will be released. If the final System instance is released while an interface or camera reference is still held, this function will throw an error of type SPINNAKER_ERR_RESOURCE_IN_USE.

See Also
Error
GetInstance()

Implements ISystem.

virtual void SendActionCommand ( unsigned int  deviceKey,
unsigned int  groupKey,
unsigned int  groupMask,
unsigned long long  actionTime = 0,
unsigned int *  pResultSize = 0,
ActionCommandResult  results[] = NULL 
)
virtual

Broadcast an Action Command to all devices on system.

Parameters
deviceKeyThe Action Command's device key
groupKeyThe Action Command's group key
groupMaskThe Action Command's group mask
actionTime(Optional) Time when to assert a future action. Zero means immediate action.
pResultSize(Optional) The number of results in the results array. The value passed should be equal to the expected number of devices that acknowledge the command. Returns the number of received results. If this parameter is 0 or NULL, the function will return as soon as the command has been broadcasted.
results(Optional) An Array with *pResultSize elements to hold the action command result status. The buffer is filled starting from index 0. If received results are less than expected number of devices that acknowledge the command, remaining results are not changed. If received results are more than expected number of devices that acknowledge the command, extra results are ignored and not appended to array. This parameter is ignored if pResultSize is 0. Thus this parameter can be NULL if pResultSize is 0 or NULL.

Implements ISystem.

virtual void SetLoggingEventPriorityLevel ( SpinnakerLogLevel  level)
virtual

Sets a threshold priority level for logging event.

Logging events below such level will not trigger callbacks.

Spinnaker uses five levels of logging:

  • Error - failures that are non-recoverable without user intervention.
  • Warning - failures that are recoverable without user intervention.
  • Notice - information about events such as camera arrival and removal, initialization and deinitialization, starting and stopping image acquisition, and feature modification.
  • Info - information about recurring events that are generated regularly such as information on individual images.
  • Debug - information that can be used to troubleshoot the system.
See Also
SpinnakerLogLevel
Parameters
levelThe threshold level

Implements ISystem.

virtual void UnregisterAllLoggingEventHandlers ( )
virtual

Unregisters all previously registered logging events.

Implements ISystem.

void UnregisterEventHandler ( EventHandler evtHandlerToUnregister)
virtual

Unregisters an event handler for the system.

See Also
SystemEventHandler
Parameters
evtHandlerToUnregisterThe event handler to unregister from the system

Implements ISystem.

void UnregisterInterfaceEventHandler ( EventHandler evtHandlerToUnregister)
virtual

Unregisters event handlers for all available interfaces that are found on the system.

See Also
InterfaceEventHandler
Parameters
evtHandlerToUnregisterThe event handler to unregister from the available interfaces

Implements ISystem.

virtual void UnregisterLoggingEventHandler ( LoggingEventHandler handler)
virtual

Unregisters a logging event.

Parameters
handlerThe logging event handler to unregister

Implements ISystem.

virtual bool UpdateCameras ( bool  updateInterfaces = true)
virtual

Updates the list of cameras on the system.

Note that System::GetCameras() internally calls UpdateCameras() for each interface it enumerates. If the list changed between this call and the last time UpdateCameras was called then the return value will be true, otherwise it is false.

See Also
GetCameras()
Parameters
updateInterfacesDetermines whether or not UpdateInterfaceList() is called before updating cameras for available interfaces on the system
Returns
True if cameras changed on interface and false otherwise.

Implements ISystem.

virtual void UpdateInterfaceList ( )
virtual

Updates the list of interfaces on the system.

If desired, local copies of InterfaceList should be updated by calling GetInterfaces.

See Also
GetInterfaces()

Implements ISystem.


The documentation for this class was generated from the following file:
Contact Support Spinnaker® SDK Programmer's Guide and API Reference