Class Spinnaker::System¶
ClassList > Spinnaker > System
The system object is used to retrieve the list of interfaces and cameras available.
#include <System.h>
Inherits the following classes: Spinnaker::ISystem
Public Attributes inherited from Spinnaker::ISystem¶
| Type | Name |
|---|---|
| TransportLayerSystem | TLSystem |
Public Functions¶
| Type | Name |
|---|---|
| virtual CameraList | GetCameras (bool updateInterfaces=true, bool updateCameras=true) |
| virtual InterfaceList | GetInterfaces (bool updateInterface=true) |
| virtual const LibraryVersion | GetLibraryVersion () |
| virtual SpinnakerLogLevel | GetLoggingEventPriorityLevel () |
| virtual ProducerList | GetProducers (bool updateProducers=true) |
| virtual GenApi::INodeMap & | GetTLNodeMap () const |
| virtual bool | IsInUse () |
| virtual void | RegisterEventHandler (EventHandler & evtHandlerToRegister, bool updateInterface=false) |
| virtual void | RegisterLoggingEventHandler (LoggingEventHandler & handler) |
| virtual void | ReleaseInstance () |
| virtual void | SendActionCommand (unsigned int deviceKey, unsigned int groupKey, unsigned int groupMask, unsigned long long actionTime=0, bool requestAck=false, unsigned int * pResultSize=0, ActionCommandResult results=NULL) |
| virtual void | SetLoggingEventPriorityLevel (SpinnakerLogLevel level) |
| virtual void | UnregisterAllLoggingEventHandlers () |
| virtual void | UnregisterEventHandler (EventHandler & evtHandlerToUnregister) |
| virtual void | UnregisterLoggingEventHandler (LoggingEventHandler & handler) |
| virtual bool | UpdateCameras (bool updateInterfaces=true) |
| virtual void | UpdateInterfaceList () |
| virtual bool | UpdateProducers (GenICam::gcstring ctiPath="") |
| virtual | ~System () |
Public Functions inherited from Spinnaker::ISystem¶
| Type | Name |
|---|---|
| virtual CameraList | GetCameras (bool updateInterfaces=true, bool updateCameras=true) = 0 |
| virtual InterfaceList | GetInterfaces (bool updateInterface=true) = 0 |
| virtual const LibraryVersion | GetLibraryVersion () = 0 |
| virtual SpinnakerLogLevel | GetLoggingEventPriorityLevel () = 0 |
| virtual ProducerList | GetProducers (bool updateProducers=true) = 0 |
| virtual GenApi::INodeMap & | GetTLNodeMap () const = 0 |
| virtual bool | IsInUse () = 0 |
| virtual void | RegisterEventHandler (EventHandler & evtHandlerToRegister, bool updateInterface=false) = 0 |
| virtual void | RegisterLoggingEventHandler (LoggingEventHandler & handler) = 0 |
| virtual void | ReleaseInstance () = 0 |
| virtual void | SendActionCommand (unsigned int deviceKey, unsigned int groupKey, unsigned int groupMask, unsigned long long actionTime=0, bool requestAck=false, unsigned int * pResultSize=0, ActionCommandResult results=NULL) = 0 |
| virtual void | SetLoggingEventPriorityLevel (SpinnakerLogLevel level) = 0 |
| virtual void | UnregisterAllLoggingEventHandlers () = 0 |
| virtual void | UnregisterEventHandler (EventHandler & evtHandlerToUnregister) = 0 |
| virtual void | UnregisterLoggingEventHandler (LoggingEventHandler & handler) = 0 |
| virtual bool | UpdateCameras (bool updateInterfaces=true) = 0 |
| virtual void | UpdateInterfaceList () = 0 |
| virtual bool | UpdateProducers (GenICam::gcstring ctiPath="") = 0 |
| virtual | ~ISystem () |
Public Static Functions¶
| Type | Name |
|---|---|
| SystemPtr | GetInstance () |
Protected Functions¶
| Type | Name |
|---|---|
| System () |
Protected Functions inherited from Spinnaker::ISystem¶
| Type | Name |
|---|---|
| ISystem () |
|
| ISystem (const ISystem &) |
|
| ISystem & | operator= (const ISystem &) |
Public Functions Documentation¶
function GetCameras¶
virtual CameraList Spinnaker::System::GetCameras (
bool updateInterfaces=true,
bool updateCameras=true
)
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()
See also: CameraList::Clear()
Parameters:
updateInterfacesDetermines whether or not updateInterfaceList() is called before getting cameras from available interfaces on the systemupdateCamerasDetermines 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 Spinnaker::ISystem::GetCameras
function GetInterfaces¶
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 Spinnaker::ISystem::GetInterfaces
function GetLibraryVersion¶
Get current library version of Spinnaker.
Returns:
A struct containing the current version of Spinnaker (major, minor, type, build).
Implements Spinnaker::ISystem::GetLibraryVersion
function GetLoggingEventPriorityLevel¶
Retrieves the current logging event priority level.
Spinnaker uses multiple levels of logging: * Fatal - failures that are non-recoverable without user intervention. * Error - failures that may or may not be recoverable without user intervention (use case dependent). * 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 Spinnaker::ISystem::GetLoggingEventPriorityLevel
function GetProducers¶
Returns a list of producers available on the system.
See also: UpdateProducers()
Parameters:
updateProducersDetermines whether or not UpdateProducers() is called before getting available producers
Returns:
An ProducerList object that contains a list of all producers.
Implements Spinnaker::ISystem::GetProducers
function GetTLNodeMap¶
Gets a reference to the Spinnaker Producer 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 Spinnaker Producer INodeMap.
Implements Spinnaker::ISystem::GetTLNodeMap
function IsInUse¶
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 Spinnaker::ISystem::IsInUse
function RegisterEventHandler¶
virtual void Spinnaker::System::RegisterEventHandler (
EventHandler & evtHandlerToRegister,
bool updateInterface=false
)
Registers an event handler for the system
See also: SystemEventHandler
See also: InterfaceEventHandler
Parameters:
evtHandlerToRegisterThe event handler to register for the systemupdateInterfaceDetermines whether or not UpdateInterfaceList() is called before registering event for available interfaces on the system
Implements Spinnaker::ISystem::RegisterEventHandler
function RegisterLoggingEventHandler¶
Registers a logging event.
See also: LoggingEventHandler
Parameters:
handlerThe logging event handler to register
Implements Spinnaker::ISystem::RegisterLoggingEventHandler
function ReleaseInstance¶
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
See also: GetInstance()
Implements Spinnaker::ISystem::ReleaseInstance
function SendActionCommand¶
virtual void Spinnaker::System::SendActionCommand (
unsigned int deviceKey,
unsigned int groupKey,
unsigned int groupMask,
unsigned long long actionTime=0,
bool requestAck=false,
unsigned int * pResultSize=0,
ActionCommandResult results=NULL
)
Broadcast an Action Command to all devices on system
Parameters:
deviceKeyThe Action Command's device keygroupKeyThe Action Command's group keygroupMaskThe Action Command's group maskactionTime(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 Spinnaker::ISystem::SendActionCommand
function SetLoggingEventPriorityLevel¶
Sets a threshold priority level for logging event. Logging events below such level will not trigger callbacks.
Spinnaker uses multiple levels of logging: * Fatal - failures that are non-recoverable without user intervention. * Error - failures that may or may not be recoverable without user intervention (use case dependent). * 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 Spinnaker::ISystem::SetLoggingEventPriorityLevel
function UnregisterAllLoggingEventHandlers¶
Unregisters all previously registered logging events.
Implements Spinnaker::ISystem::UnregisterAllLoggingEventHandlers
function UnregisterEventHandler¶
Unregisters an event handler for the system
See also: SystemEventHandler
See also: InterfaceEventHandler
Parameters:
evtHandlerToUnregisterThe event handler to unregister from the system
Implements Spinnaker::ISystem::UnregisterEventHandler
function UnregisterLoggingEventHandler¶
Unregisters a logging event.
See also: LoggingEventHandler
Parameters:
handlerThe logging event handler to unregister
Implements Spinnaker::ISystem::UnregisterLoggingEventHandler
function UpdateCameras¶
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 Spinnaker::ISystem::UpdateCameras
function UpdateInterfaceList¶
Updates the list of interfaces on the system. If desired, local copies of InterfaceList should be updated by calling GetInterfaces.
See also: GetInterfaces()
Implements Spinnaker::ISystem::UpdateInterfaceList
function UpdateProducers¶
Updates the list of GenICam producers discoverable by the system given a producer library path. Only producers with the "cti" extension representing "Common Transport Interface" will be loaded. Spinnaker GenTL producer will be loaded by default.
Please see section "Working with GenICam GenTL Devices" in the Spinnaker C++ API Documentation for more information on GenTL producers.
Note: Only the Teledyne CoaXPress producer is supported at this time.
Producer loading will behave as follows: * System loads all third party CTIs found in GENICAM_GENTL path when an empty path is provided * System loads a specific producer when the full path to producer is provided * System loads a specific producer based on GENICAM_GENTL paths when only the CTI file name is provided
Parameters:
ctiPathThe CTI file name or full path including the CTI file name to load in the system
Returns:
True if new producers have loaded and false otherwise.
Implements Spinnaker::ISystem::UpdateProducers
function ~System¶
Default destructor.
Public Static Functions Documentation¶
function GetInstance¶
Returns a pointer to a Singleton instance of a System object. The System object may be used to get cameras or interfaces. When an application is done using the cameras it is necessary to free the System by calling ReleaseInstance().
See also: ReleaseInstance()
Returns:
A const ref to a system object.
Protected Functions Documentation¶
function System [1/2]¶
Default constructor.
The documentation for this class was generated from the following file C:/workspace/include/System.h