54 const std::shared_ptr<const GenTLWrapper> &_gentl,
const char *_id) :
94 std::lock_guard<std::recursive_mutex> lock(
mtx);
98 if (
parent->getHandle() != 0)
108 throw GenTLException(
"Stream::open(): Device must be opened before open before opening a stream");
117 std::lock_guard<std::recursive_mutex> lock(
mtx);
137 std::lock_guard<std::recursive_mutex> lock(
mtx);
143 throw GenTLException(
"Stream::startStreaming(): Stream is not open");
162 std::shared_ptr<GenApi::CNodeMapRef> nmap=
parent->getRemoteNodeMap();
167 size=
static_cast<size_t>(p->GetValue());
176 for (
size_t i=0; i<
bn; i++)
207 n=
static_cast<uint64_t
>(na);
241 std::lock_guard<std::recursive_mutex> lock(
mtx);
271 std::lock_guard<std::recursive_mutex> lock(
mtx);
276 timeout=
static_cast<uint64_t
>(_timeout);
303 memset(&data, 0, size);
329 template<
class T>
inline T getStreamValue(
const std::shared_ptr<const GenTLWrapper> &
gentl,
335 size_t size=
sizeof(T);
339 gentl->DSGetInfo(stream, cmd, &type, &ret, &size);
345 inline bool getStreamBool(
const std::shared_ptr<const GenTLWrapper> &gentl,
351 size_t size=
sizeof(ret);
355 gentl->DSGetInfo(stream, cmd, &type, &ret, &size);
365 std::lock_guard<std::recursive_mutex> lock(
mtx);
371 std::lock_guard<std::recursive_mutex> lock(
mtx);
377 std::lock_guard<std::recursive_mutex> lock(
mtx);
383 std::lock_guard<std::recursive_mutex> lock(
mtx);
389 std::lock_guard<std::recursive_mutex> lock(
mtx);
395 std::lock_guard<std::recursive_mutex> lock(
mtx);
401 std::lock_guard<std::recursive_mutex> lock(
mtx);
407 std::lock_guard<std::recursive_mutex> lock(
mtx);
413 std::lock_guard<std::recursive_mutex> lock(
mtx);
419 std::lock_guard<std::recursive_mutex> lock(
mtx);
424 size_t size=
sizeof(tmp);
443 std::lock_guard<std::recursive_mutex> lock(
mtx);
449 std::lock_guard<std::recursive_mutex> lock(
mtx);
455 std::lock_guard<std::recursive_mutex> lock(
mtx);
461 std::lock_guard<std::recursive_mutex> lock(
mtx);
uint64_t getNumDelivered()
Returns some information about the stream.
const Buffer * grab(int64_t timeout=-1)
Wait for the next image or data and return it in a buffer object.
std::shared_ptr< GenApi::CNodeMapRef > nodemap
size_t getNumAwaitDelivery()
Returns some information about the stream.
This is the port definition that connects GenAPI to GenTL.
std::string getTLType()
Returns some information about the stream.
void * getHandle() const
Get internal stream handle.
struct S_EVENT_NEW_BUFFER EVENT_NEW_BUFFER_DATA
size_t getNumAnnounced()
Returns some information about the stream.
std::shared_ptr< Device > getParent() const
Returns the pointer to the parent device object.
void stopStreaming()
Stops streaming.
const std::string & getID() const
Get the internal ID of this stream.
bool IsReadable(EAccessMode AccessMode)
Tests if readable.
uint64_t getNumStarted()
Returns some information about the stream.
interface GENAPI_DECL_ABSTRACT IInteger
Interface for integer properties.
std::shared_ptr< const GenTLWrapper > gentl
void startStreaming(int na=-1)
Allocates buffers and registers internal events if necessary and starts streaming.
size_t getNumChunksMax()
Returns some information about the stream.
size_t getNumQueued()
Returns some information about the stream.
bool getDefinesPayloadsize()
Returns some information about the stream.
The buffer class encapsulates a Genicam buffer that is provided by a stream.
size_t getPayloadSize()
Returns some information about the stream.
Encapsulates a GenApi pointer dealing with the dynamic_cast automatically.
Stream(const std::shared_ptr< Device > &parent, const std::shared_ptr< const GenTLWrapper > &gentl, const char *id)
Constructs a stream class.
std::shared_ptr< CPort > cport
bool getIsGrabbing()
Returns some information about the stream.
void * getHandle() const
Get internal stream handle.
std::shared_ptr< Device > parent
std::shared_ptr< GenApi::CNodeMapRef > allocNodeMap(std::shared_ptr< const GenTLWrapper > gentl, void *port, CPort *cport, const char *xml)
Convenience function that returns a GenICam node map from the given port.
std::shared_ptr< GenApi::CNodeMapRef > getNodeMap()
Returns the node map of this object.
void open()
Opens the stream for working with it.
void setHandle(void *handle)
Set the buffer handle that this object should manage.
void close()
Closes the stream.
uint64_t getNumUnderrun()
Returns some information about the stream.
size_t getBufAnnounceMin()
Returns some information about the stream.
size_t getBufAlignment()
Returns some information about the stream.