Class Spinnaker::Producer¶
ClassList > Spinnaker > Producer
The producer object is used to retrieve the list of interfaces and cameras available.
#include <Producer.h>
Inherits the following classes: Spinnaker::IProducer
Public Attributes inherited from Spinnaker::IProducer¶
| Type | Name |
|---|---|
| TransportLayerSystem | TLSystem |
Public Functions¶
| Type | Name |
|---|---|
| virtual CameraList | GetCameras (bool updateInterfaces=true, bool updateCameras=true) |
| virtual InterfaceList | GetInterfaces (bool updateInterface=true) |
| virtual SpinnakerLogLevel | GetLoggingCallbackPriorityLevel () |
| virtual GenICam::gcstring | GetProducerFilePath () const |
| virtual GenApi::INodeMap & | GetTLNodeMap () const |
| virtual bool | IsCameraInUse () |
| virtual bool | IsInterfaceInUse () |
| virtual void | RegisterEventHandler (EventHandler & evtHandlerToRegister, bool updateInterface=false) |
| virtual void | RegisterLoggingEventHandler (LoggingEventHandler & handler) |
| 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 | SetLoggingCallbackPriorityLevel (SpinnakerLogLevel level) |
| virtual void | UnregisterAllLoggingEventHandlers () |
| virtual void | UnregisterEventHandler (EventHandler & evtHandlerToUnregister) |
| virtual void | UnregisterLoggingEventHandler (LoggingEventHandler & handler) |
| virtual bool | UpdateCameras (bool updateInterfaces=true) |
| virtual bool | UpdateInterfaceList () |
| virtual | ~Producer (void) |
Public Functions inherited from Spinnaker::IProducer¶
| Type | Name |
|---|---|
| virtual CameraList | GetCameras (bool updateInterface=true, bool updateCameras=true) = 0 |
| virtual InterfaceList | GetInterfaces (bool updateInterface=true) = 0 |
| virtual SpinnakerLogLevel | GetLoggingCallbackPriorityLevel () = 0 |
| virtual GenICam::gcstring | GetProducerFilePath () const = 0 |
| virtual GenApi::INodeMap & | GetTLNodeMap () const = 0 |
| virtual bool | IsCameraInUse () = 0 |
| virtual bool | IsInterfaceInUse () = 0 |
| virtual void | RegisterEventHandler (EventHandler & evtHandlerToRegister, bool updateInterface=false) = 0 |
| virtual void | RegisterLoggingEventHandler (LoggingEventHandler & handler) = 0 |
| virtual void | SendActionCommand (unsigned int deviceKey, unsigned int groupKey, unsigned int groupMask, unsigned long long actionTime, bool requestAck, unsigned int * pResultSize, ActionCommandResult results=NULL) = 0 |
| virtual void | SetLoggingCallbackPriorityLevel (SpinnakerLogLevel level) = 0 |
| virtual void | UnregisterAllLoggingEventHandlers () = 0 |
| virtual void | UnregisterEventHandler (EventHandler & evtHandlerToUnregister) = 0 |
| virtual void | UnregisterLoggingEventHandler (LoggingEventHandler & handler) = 0 |
| virtual bool | UpdateCameras (bool updateInterface=true) = 0 |
| virtual bool | UpdateInterfaceList () = 0 |
| virtual | ~IProducer () |
Protected Attributes inherited from Spinnaker::IProducer¶
| Type | Name |
|---|---|
| ProducerData * | m_pProducerData |
Protected Functions¶
| Type | Name |
|---|---|
| Producer () |
|
| virtual void | ReleaseInstance () |
| virtual void | StopInternalEventHandler () |
Protected Functions inherited from Spinnaker::IProducer¶
| Type | Name |
|---|---|
| IProducer () |
|
| IProducer (const IProducer &) |
|
| virtual void | ReleaseInstance () = 0 |
| virtual void | StopInternalEventHandler () = 0 |
| IProducer & | operator= (const IProducer &) |
Public Functions Documentation¶
function GetCameras¶
virtual CameraList Spinnaker::Producer::GetCameras (
bool updateInterfaces=true,
bool updateCameras=true
)
Returns a list of cameras that are available on the producer. 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 producerupdateCamerasDetermines whether or not UpdateCameras() is called before getting cameras from available interfaces on the producer
Returns:
An CameraList object that contains a list of all cameras.
Implements Spinnaker::IProducer::GetCameras
function GetInterfaces¶
Returns a list of interfaces available on the producer. 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::IProducer::GetInterfaces
function GetLoggingCallbackPriorityLevel¶
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 producer.
See also: SpinnakerLogLevel
Returns:
Level The threshold level
Implements Spinnaker::IProducer::GetLoggingCallbackPriorityLevel
function GetProducerFilePath¶
Get file path to the producer CTI file.
Returns:
std::string that represents the producer CTI file path.
Implements Spinnaker::IProducer::GetProducerFilePath
function GetTLNodeMap¶
Gets a nodeMap that is generated from a GenICam XML file for the producer.
Returns:
A reference to a INodeMap object.
Implements Spinnaker::IProducer::GetTLNodeMap
function IsCameraInUse¶
Checks if the producer is in use by any camera objects.
Returns:
Returns true if the producer is in use and false otherwise.
Implements Spinnaker::IProducer::IsCameraInUse
function IsInterfaceInUse¶
Checks if the producer is in use by any interface objects.
Returns:
Returns true if the producer is in use and false otherwise.
Implements Spinnaker::IProducer::IsInterfaceInUse
function RegisterEventHandler¶
virtual void Spinnaker::Producer::RegisterEventHandler (
EventHandler & evtHandlerToRegister,
bool updateInterface=false
)
Registers an event handler for the producer.
See also: SystemEventHandler
See also: InterfaceEventHandler
Parameters:
evtHandlerToRegisterThe event handler to register for the producerupdateInterfaceDetermines whether or not UpdateInterfaceList() is called before registering event for available interfaces on the producer
Implements Spinnaker::IProducer::RegisterEventHandler
function RegisterLoggingEventHandler¶
Registers a logging event.
See also: LoggingEventHandler
Parameters:
handlerThe logging event handler to register
Implements Spinnaker::IProducer::RegisterLoggingEventHandler
function SendActionCommand¶
virtual void Spinnaker::Producer::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 producer
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::IProducer::SendActionCommand
function SetLoggingCallbackPriorityLevel¶
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 producer.
See also: SpinnakerLogLevel
Parameters:
levelThe threshold level
Implements Spinnaker::IProducer::SetLoggingCallbackPriorityLevel
function UnregisterAllLoggingEventHandlers¶
Unregisters all previously registered logging events.
Implements Spinnaker::IProducer::UnregisterAllLoggingEventHandlers
function UnregisterEventHandler¶
Unregisters an event handler for the producer.
See also: SystemEventHandler
See also: InterfaceEventHandler
Parameters:
evtHandlerToUnregisterThe interface event handler to unregister from the producer
Implements Spinnaker::IProducer::UnregisterEventHandler
function UnregisterLoggingEventHandler¶
Unregisters a logging event.
See also: LoggingEventHandler
Parameters:
handlerThe logging event handler to unregister
Implements Spinnaker::IProducer::UnregisterLoggingEventHandler
function UpdateCameras¶
Updates the list of cameras on the producer. Note that Producer::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 producer
Returns:
True if cameras changed on interface and false otherwise.
Implements Spinnaker::IProducer::UpdateCameras
function UpdateInterfaceList¶
Updates the list of interfaces on the producer. If desired, local copies of InterfaceList should be updated by calling GetInterfaces.
See also: GetInterfaces()
Implements Spinnaker::IProducer::UpdateInterfaceList
function ~Producer¶
Default destructor.
Protected Functions Documentation¶
function Producer [1/2]¶
Default constructor.
function ReleaseInstance¶
Releases the interfaces that are enumerated from this producer.
Implements Spinnaker::IProducer::ReleaseInstance
function StopInternalEventHandler¶
Stops the internal event handler for the system.
Implements Spinnaker::IProducer::StopInternalEventHandler
The documentation for this class was generated from the following file C:/workspace/include/Producer.h