The stream class encapsulates a Genicam stream.
More...
#include <stream.h>
The stream class encapsulates a Genicam stream.
NOTE: A GenTLException is thrown in case of a severe error.
Definition at line 55 of file stream.h.
rcg::Stream::Stream |
( |
const std::shared_ptr< Device > & |
parent, |
|
|
const std::shared_ptr< const GenTLWrapper > & |
gentl, |
|
|
const char * |
id |
|
) |
| |
Constructs a stream class.
Streams must only be created by the device class.
Definition at line 54 of file stream.cc.
rcg::Stream::Stream |
( |
class Stream & |
| ) |
|
|
private |
void rcg::Stream::attachBuffers |
( |
bool |
enable | ) |
|
Enabling or disabling attaching the grabbed buffer to the remote device nodemap.
This only has an effect if chunks are enabled (i.e. ChunkModeActive=true).
- Parameters
-
enable | Enables or disables attaching grabbed buffers to the nodemap. |
Definition at line 138 of file stream.cc.
void rcg::Stream::close |
( |
| ) |
|
Closes the stream.
Each call of open() must be followed by a call to close() at some point in time.
Definition at line 116 of file stream.cc.
size_t rcg::Stream::getBufAlignment |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Buffer alignment in bytes.
Definition at line 505 of file stream.cc.
size_t rcg::Stream::getBufAnnounceMin |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Min number of buffers to announce before acq can start, if known.
Definition at line 499 of file stream.cc.
bool rcg::Stream::getDefinesPayloadsize |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Flag that indicated that this data stream defines a payload size independent from the remote device.
Definition at line 463 of file stream.cc.
void * rcg::Stream::getHandle |
( |
| ) |
const |
Get internal stream handle.
- Returns
- Internal handle.
Definition at line 523 of file stream.cc.
const std::string & rcg::Stream::getID |
( |
| ) |
const |
Get the internal ID of this stream.
- Returns
- ID.
Definition at line 88 of file stream.cc.
bool rcg::Stream::getIsGrabbing |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Flag indicating whether the acquisition engine is started or not.
Definition at line 457 of file stream.cc.
Returns the node map of this object.
NOTE: open() must be called before calling this method. The returned pointer remains valid until close() of this object is called.
- Returns
- Node map of this object.
Definition at line 511 of file stream.cc.
size_t rcg::Stream::getNumAnnounced |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Number of announced buffers.
Definition at line 427 of file stream.cc.
size_t rcg::Stream::getNumAwaitDelivery |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Number of buffers in the output queue.
Definition at line 439 of file stream.cc.
size_t rcg::Stream::getNumChunksMax |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Max number of chunks in a buffer, if known.
Definition at line 493 of file stream.cc.
uint64_t rcg::Stream::getNumDelivered |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Number of delivered buffers since last acquisition start.
Definition at line 415 of file stream.cc.
size_t rcg::Stream::getNumQueued |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Number of buffers in the input pool.
Definition at line 433 of file stream.cc.
uint64_t rcg::Stream::getNumStarted |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Number of buffers started in the acquisition engine.
Definition at line 445 of file stream.cc.
uint64_t rcg::Stream::getNumUnderrun |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Number of lost buffers due to queue underrun.
Definition at line 421 of file stream.cc.
std::shared_ptr< Device > rcg::Stream::getParent |
( |
| ) |
const |
Returns the pointer to the parent device object.
- Returns
- Pointer to parent device object.
Definition at line 83 of file stream.cc.
size_t rcg::Stream::getPayloadSize |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Size of the expected data in bytes.
Definition at line 451 of file stream.cc.
std::string rcg::Stream::getTLType |
( |
| ) |
|
Returns some information about the stream.
NOTE: open() must have called before calling this method.
- Returns
- Transport layer technology that is supported.
Definition at line 469 of file stream.cc.
Wait for the next image or data and return it in a buffer object.
The buffer is valid until the next call to grab.
- Parameters
-
timeout | Timeout in ms. A value < 0 sets waiting time to infinite. |
- Returns
- Pointer to received buffer or 0 in case of an error or interrupt.
Definition at line 321 of file stream.cc.
void rcg::Stream::open |
( |
| ) |
|
Opens the stream for working with it.
The stream may be opened multiple times. However, for each open(), the close() method must be called as well.
Definition at line 93 of file stream.cc.
void rcg::Stream::startStreaming |
( |
int |
na = -1 | ) |
|
Allocates buffers and registers internal events if necessary and starts streaming.
- Parameters
-
na | Number of buffers to acquire. Set <= 0 for infinity. |
Definition at line 154 of file stream.cc.
void rcg::Stream::stopStreaming |
( |
| ) |
|
std::shared_ptr<CPort> rcg::Stream::cport |
|
private |
std::string rcg::Stream::id |
|
private |
std::recursive_mutex rcg::Stream::mtx |
|
private |
std::shared_ptr<Device> rcg::Stream::parent |
|
private |
void* rcg::Stream::stream |
|
private |
The documentation for this class was generated from the following files: