ItalaApi  1.3.3
Public Member Functions | List of all members
Itala::IDevice Struct Referenceabstract
Inheritance diagram for Itala::IDevice:
Itala::IDisposable

Public Member Functions

virtual GenApi::INodeMap & GetNodeMap () const =0
 
virtual GenApi::INodeMap & GetTLDeviceNodeMap () const =0
 
virtual GenApi::INodeMap & GetDatastreamNodeMap () const =0
 
virtual void StartAcquisition (uint64_t bufferCount, uint64_t numFrames) const =0
 
virtual void StartAcquisition () const =0
 
virtual void StopAcquisition () const =0
 
virtual IImageGetNextImage (int64_t timeout)=0
 
virtual void EnableEvents ()=0
 
virtual void DisableEvents ()=0
 
virtual void RegisterHandler (Itala::DeviceEventHandler *handler)=0
 
virtual void DeregisterHandler ()=0
 
virtual uint64_t GetTimestampFrequency () const =0
 
virtual DeviceInfo GetInfo () const =0
 
- Public Member Functions inherited from Itala::IDisposable
virtual void Dispose ()=0
 

Detailed Description

Interface representing a device. Provides functions for image acquisition, camera configuration and event handling. It encloses the functionalities of GenTL's Datastream and Local Device modules. The ownership of the device instance belongs to the client code, so it needs to be disoposed via IDevice::Dispose when it's no longer required.

Member Function Documentation

◆ GetNodeMap()

virtual GenApi::INodeMap& Itala::IDevice::GetNodeMap ( ) const
pure virtual

Get the GenICam nodemap of the physical device. The nodemap instance is accessible via GenApi library and allows the user to configure the behaviour of the camera. The nodemap is owned by ItalaApi, so it's returned by reference.

Returns
Reference to the device nodemap.

◆ GetTLDeviceNodeMap()

virtual GenApi::INodeMap& Itala::IDevice::GetTLDeviceNodeMap ( ) const
pure virtual

Get the GenICam nodemap of GenTL's Local Device module. The nodemap instance is accessible via GenApi library and allows the user to configure the behaviour of the module. The nodemap is owned by ItalaApi, hence it's returned by reference.

Returns
Reference to GenTL Local Device module's nodemap.

◆ GetDatastreamNodeMap()

virtual GenApi::INodeMap& Itala::IDevice::GetDatastreamNodeMap ( ) const
pure virtual

Get the GenICam nodemap of GenTL's Datastream module. The nodemap instance is accessible via GenApi library and allows the user to configure the behaviour of the module. The nodemap is owned by ItalaApi and it's returned by reference.

Returns
reference to GenTL Datastream module's nodemap.

◆ StartAcquisition() [1/2]

virtual void Itala::IDevice::StartAcquisition ( uint64_t  bufferCount,
uint64_t  numFrames 
) const
pure virtual

Starts the image acquisition on the device. A number of buffers equal to bufferCount is allocated and kept in the acquisition engine input pool. Internally, the acquisition engine picks buffers from the input pool and fills them with new data, before pushing them to the output queue, in accordance with the policy defined by the GenTL SFNC standard feature "StreamBufferHandlingMode" (configurable through the Datastream nodemap). The acquisition engine keeps running until numFrames frames are pushed to the output queue (i.e. until the specified amount of frames is available to the user). The AcquisitionStart GenICam command is automatically executed and all the acquisition critical features are automatically locked by ItalaApi. The client code must not perform these two operations.

Parameters
bufferCountnumber of buffers to be used for acquisition
numFramesnumber of frames to be acquired. If 0, the acquisition runs continuously until IDevice::StopAcquisition is called.

◆ StartAcquisition() [2/2]

virtual void Itala::IDevice::StartAcquisition ( ) const
pure virtual

Starts a continuous acquisition by calling IDevice::StartAcquisition with a default count of 16 image buffers (so a maximum of 16 images can be grabbed and kept simultaneously without disposing them).

◆ StopAcquisition()

virtual void Itala::IDevice::StopAcquisition ( ) const
pure virtual

The image acquisition is stopped and all the resources deallocated. The AcquisitionStop GenICam command is automatically executed and all the acquisition critical features are automatically unlocked by ItalaApi. The client code must not perform these last two operations since they're automatically managed internally.

◆ GetNextImage()

virtual IImage* Itala::IDevice::GetNextImage ( int64_t  timeout)
pure virtual

Grabs the first available image buffer in the output queue of the acquisition engine. If the specified timeout expires, a TimeoutException occurs. When an image buffer is grabbed, it's removed from the acquisition engine and delivered to the client code so that its data can be used. When the image buffer is no longer required by the client code, it must be disposed with IImage::Dispose. This way, the image buffer is reintroduced in the acquisition engine and filled again if the acquisition is still running. Infact, if N grabbed image buffers are held by the client code, the number of buffers available to the acquisition engine is smaller by N buffers. When all available image buffers are held by the client code without being disposed, a timeout exception occurs on grab, since no filled image buffers are present.

Parameters
timeoutthe amount of time in millisecond to wait for a new image
Returns
The pointer to the grabber image buffer

◆ EnableEvents()

virtual void Itala::IDevice::EnableEvents ( )
pure virtual

Starts the event functionality. The event listening thread is started and ItalaApi waits for incoming events from the device (which requires a separate configuration via GenApi for event initialization).

◆ DisableEvents()

virtual void Itala::IDevice::DisableEvents ( )
pure virtual

Stops the event functionality. The event listening thread is stopped.

◆ RegisterHandler()

virtual void Itala::IDevice::RegisterHandler ( Itala::DeviceEventHandler handler)
pure virtual

Subscribes a DeviceEventHandler instance to the current device. The implementation must be provided by the client code.

Parameters
handlerof the device event handler.

◆ DeregisterHandler()

virtual void Itala::IDevice::DeregisterHandler ( )
pure virtual

Removes the device event handler instance registered.

◆ GetTimestampFrequency()

virtual uint64_t Itala::IDevice::GetTimestampFrequency ( ) const
pure virtual

Get the tick frequency of the device timestamp counter in ticks per second. The counter is used, for instance, to assign timestamps to the individual acquired images;

Returns
Timestamp's frequency in tick per seconds.

◆ GetInfo()

virtual DeviceInfo Itala::IDevice::GetInfo ( ) const
pure virtual

Get the informatin object of the device.

Returns
The DeviceInfo object.

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