Skip to content

Class Spinnaker::Interface

ClassList > Spinnaker > Interface

An interface object which holds a list of cameras.

  • #include <Interface.h>

Inherits the following classes: Spinnaker::IInterface

Public Attributes inherited from Spinnaker::IInterface

See Spinnaker::IInterface

Type Name
TransportLayerInterface TLInterface

Public Functions

Type Name
virtual CameraList GetCameras (bool updateCameras=true) const
virtual ProducerPtr GetProducer () const
virtual GenApi::INodeMap & GetTLNodeMap () const
virtual bool IsCameraInUse () const
virtual bool IsValid ()
virtual void RegisterEventHandler (EventHandler & evtHandlerToRegister)
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) const
virtual void UnregisterAllLoggingEventHandlers ()
virtual void UnregisterEventHandler (EventHandler & evtHandlerToUnregister)
virtual bool UpdateCameras ()
virtual ~Interface (void)

Public Functions inherited from Spinnaker::IInterface

See Spinnaker::IInterface

Type Name
virtual CameraList GetCameras (bool updateCameras=true) const = 0
virtual ProducerPtr GetProducer () const = 0
virtual GenApi::INodeMap & GetTLNodeMap () const = 0
virtual bool IsCameraInUse () const = 0
virtual bool IsValid () = 0
virtual void RegisterEventHandler (EventHandler & evtHandlerToRegister) = 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) const = 0
virtual void UnregisterAllLoggingEventHandlers () = 0
virtual void UnregisterEventHandler (EventHandler & evtHandlerToUnregister) = 0
virtual bool UpdateCameras () = 0
virtual ~IInterface ()

Protected Attributes inherited from Spinnaker::IInterface

See Spinnaker::IInterface

Type Name
InterfaceData * m_pInterfaceData

Protected Functions inherited from Spinnaker::IInterface

See Spinnaker::IInterface

Type Name
IInterface ()
IInterface (const IInterface &)
IInterface & operator= (const IInterface &)

Public Functions Documentation

function GetCameras

virtual CameraList Spinnaker::Interface::GetCameras (
    bool updateCameras=true
) const

Returns a list of cameras available on this interface. This call returns either usb3 vision or gige vision cameras depending on the underlying transport layer of this interface. The camera list object will reference count the cameras that it holds. It is important that the CameraList is destroyed or is cleared before System::ReleaseInstance() can be called or an InterfaceList that holds this interface can be cleared.

See also: System::ReleaseInstance()

See also: InterfaceList::Clear()

See also: CameraList::Clear()

Parameters:

  • updateCameras A flag used to issue an updateCameras() call internally before getting the camera list

Returns:

An CameraList object that contains a list of cameras on this interface.

Implements Spinnaker::IInterface::GetCameras


function GetProducer

virtual ProducerPtr Spinnaker::Interface::GetProducer () const

Returns a producer from which this interface is enumerated.

Returns:

A Producer object.

Implements Spinnaker::IInterface::GetProducer


function GetTLNodeMap

virtual GenApi::INodeMap & Spinnaker::Interface::GetTLNodeMap () const

Gets a nodeMap that is generated from a GenICam XML file for the GenTL interface Module.

Returns:

A reference to a INodeMap object.

Implements Spinnaker::IInterface::GetTLNodeMap


function IsCameraInUse

virtual bool Spinnaker::Interface::IsCameraInUse () const

Checks if the interface is in use by any camera objects

Returns:

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

Implements Spinnaker::IInterface::IsCameraInUse


function IsValid

virtual bool Spinnaker::Interface::IsValid () 

IsValid Checks a flag to determine if interface is still valid for use.

Returns:

If interface is valid or not

Implements Spinnaker::IInterface::IsValid


function RegisterEventHandler

virtual void Spinnaker::Interface::RegisterEventHandler (
    EventHandler & evtHandlerToRegister
) 

Registers an event handler for the interface Event handlers are automatically cleaned up when an interface is removed, and must be registered to interfaces as they arrive. Note that GEV interfaces experience arrival/removal events when the IP information changes, similar to GEV cameras. Please refer to the EnumerationEvents example for recommended use.

See also: InterfaceEventHandler

Parameters:

  • evtHandlerToRegister The event handler to register for the interface

Implements Spinnaker::IInterface::RegisterEventHandler


function SendActionCommand

virtual void Spinnaker::Interface::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
) const

Broadcast an Action Command to all devices on interface

Parameters:

  • deviceKey The Action Command's device key
  • groupKey The Action Command's group key
  • groupMask The 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 Spinnaker::IInterface::SendActionCommand


function UnregisterAllLoggingEventHandlers

virtual void Spinnaker::Interface::UnregisterAllLoggingEventHandlers () 

Unregisters all previously registered logging events.

Implements Spinnaker::IInterface::UnregisterAllLoggingEventHandlers


function UnregisterEventHandler

virtual void Spinnaker::Interface::UnregisterEventHandler (
    EventHandler & evtHandlerToUnregister
) 

Unregisters an event handler for the interface

See also: InterfaceEventHandler

Parameters:

  • evtHandlerToUnregister The event handler to unregister from the interface

Implements Spinnaker::IInterface::UnregisterEventHandler


function UpdateCameras

virtual bool Spinnaker::Interface::UpdateCameras () 

Updates the list of cameras on this interface. This function needs to be called before any cameras can be discovered using GetCameras(). System::GetCameras() will automatically call this function for each interface it enumerates. If the list changed after the last time System::GetCameras() or UpdateCameras() was called then the return value will be true, otherwise it is false.

See also: System::GetCameras()

See also: GetCameras()

Returns:

true if cameras changed on interface and false otherwise.

Implements Spinnaker::IInterface::UpdateCameras


function ~Interface

virtual Spinnaker::Interface::~Interface (
    void
) 

Virtual Destructor



The documentation for this class was generated from the following file C:/workspace/include/Interface.h