Spinnaker SDK C++
4.1.0.338
 
 

 
Loading...
Searching...
No Matches

An interface object which holds a list of cameras. More...

#include <Interface.h>

Inheritance diagram for Interface:
IInterface

Public Member Functions

virtual ~Interface (void)
 Virtual Destructor.
 
CameraList GetCameras (bool updateCameras=true) const
 Returns a list of cameras available on this interface.
 
bool UpdateCameras ()
 Updates the list of cameras on this interface.
 
GenApi::INodeMapGetTLNodeMap () const
 Gets a nodeMap that is generated from a GenICam XML file for the GenTL interface Module.
 
void 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.
 
void UnregisterEventHandler (EventHandler &evtHandlerToUnregister)
 Unregisters an event handler for the interface.
 
bool IsCameraInUse () const
 Checks if the interface is in use by any camera objects.
 
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
 Broadcast an Action Command to all devices on interface.
 
bool IsValid ()
 IsValid Checks a flag to determine if interface is still valid for use.
 
- Public Member Functions inherited from IInterface
virtual ~IInterface ()
 
virtual CameraList GetCameras (bool updateCameras=true) const =0
 
virtual bool UpdateCameras ()=0
 
virtual GenApi::INodeMapGetTLNodeMap () const =0
 
virtual void RegisterEventHandler (EventHandler &evtHandlerToRegister)=0
 
virtual void UnregisterEventHandler (EventHandler &evtHandlerToUnregister)=0
 
virtual bool IsCameraInUse () const =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 bool IsValid ()=0
 

Friends

class InterfaceInternal
 

Additional Inherited Members

- Public Attributes inherited from IInterface
TransportLayerInterface TLInterface
 
- Protected Member Functions inherited from IInterface
 IInterface ()
 
 IInterface (const IInterface &)
 
IInterfaceoperator= (const IInterface &)
 
- Protected Attributes inherited from IInterface
InterfaceData * m_pInterfaceData
 

Detailed Description

An interface object which holds a list of cameras.

Constructor & Destructor Documentation

◆ ~Interface()

virtual ~Interface ( void  )
virtual

Virtual Destructor.

Member Function Documentation

◆ GetCameras()

CameraList GetCameras ( bool  updateCameras = true) const
virtual

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()
InterfaceList::Clear()
CameraList::Clear()
Parameters
updateCamerasA 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 IInterface.

◆ GetTLNodeMap()

GenApi::INodeMap & GetTLNodeMap ( ) const
virtual

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

Returns
A reference to a INodeMap object.

Implements IInterface.

◆ IsCameraInUse()

bool IsCameraInUse ( ) const
virtual

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

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

Implements IInterface.

◆ IsValid()

bool IsValid ( )
virtual

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

Returns
If interface is valid or not

Implements IInterface.

◆ RegisterEventHandler()

void RegisterEventHandler ( EventHandler evtHandlerToRegister)
virtual

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
evtHandlerToRegisterThe event handler to register for the interface

Implements IInterface.

◆ SendActionCommand()

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

Broadcast an Action Command to all devices on interface.

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 IInterface.

◆ UnregisterEventHandler()

void UnregisterEventHandler ( EventHandler evtHandlerToUnregister)
virtual

Unregisters an event handler for the interface.

See also
InterfaceEventHandler
Parameters
evtHandlerToUnregisterThe event handler to unregister from the interface

Implements IInterface.

◆ UpdateCameras()

bool UpdateCameras ( )
virtual

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()
GetCameras()
Returns
true if cameras changed on interface and false otherwise.

Implements IInterface.

Friends And Related Symbol Documentation

◆ InterfaceInternal

friend class InterfaceInternal
friend

The documentation for this class was generated from the following file: