55 const std::shared_ptr<const GenTLWrapper> &_gentl,
const char *_id) :
95 std::lock_guard<std::recursive_mutex> lock(
mtx);
99 if (
parent->getHandle() != 0)
109 throw GenTLException(
"Stream::open(): Device must be opened before open before opening a stream");
118 std::lock_guard<std::recursive_mutex> lock(
mtx);
142 if (
parent->getHandle() != 0)
144 std::shared_ptr<GenApi::CNodeMapRef> rnodemap=
parent->getRemoteNodeMap();
161 std::lock_guard<std::recursive_mutex> lock(
mtx);
167 throw GenTLException(
"Stream::startStreaming(): Stream is not open");
179 std::shared_ptr<GenApi::CNodeMapRef> nmap=
parent->getRemoteNodeMap();
200 size=
static_cast<size_t>(pp->GetValue());
209 for (
size_t i=0; i<
bn; i++)
240 n=
static_cast<uint64_t
>(nacquire);
283 std::lock_guard<std::recursive_mutex> lock(
mtx);
300 for (
size_t i=0; i<
bn; i++)
314 std::shared_ptr<GenApi::CNodeMapRef> nmap=
parent->getRemoteNodeMap();
329 size_t size=
sizeof(ret);
339 return static_cast<int>(ret);
344 std::lock_guard<std::recursive_mutex> lock(
mtx);
349 timeout=
static_cast<uint64_t
>(_timeout);
376 memset(&data, 0, size);
402 template<
class T>
inline T getStreamValue(
const std::shared_ptr<const GenTLWrapper> &
gentl,
408 size_t size=
sizeof(T);
412 gentl->DSGetInfo(stream, cmd, &type, &ret, &size);
418 inline bool getStreamBool(
const std::shared_ptr<const GenTLWrapper> &gentl,
424 size_t size=
sizeof(ret);
428 gentl->DSGetInfo(stream, cmd, &type, &ret, &size);
438 std::lock_guard<std::recursive_mutex> lock(
mtx);
444 std::lock_guard<std::recursive_mutex> lock(
mtx);
450 std::lock_guard<std::recursive_mutex> lock(
mtx);
456 std::lock_guard<std::recursive_mutex> lock(
mtx);
462 std::lock_guard<std::recursive_mutex> lock(
mtx);
468 std::lock_guard<std::recursive_mutex> lock(
mtx);
474 std::lock_guard<std::recursive_mutex> lock(
mtx);
480 std::lock_guard<std::recursive_mutex> lock(
mtx);
486 std::lock_guard<std::recursive_mutex> lock(
mtx);
492 std::lock_guard<std::recursive_mutex> lock(
mtx);
497 size_t size=
sizeof(tmp);
516 std::lock_guard<std::recursive_mutex> lock(
mtx);
522 std::lock_guard<std::recursive_mutex> lock(
mtx);
528 std::lock_guard<std::recursive_mutex> lock(
mtx);
534 std::lock_guard<std::recursive_mutex> lock(
mtx);
struct S_EVENT_NEW_BUFFER EVENT_NEW_BUFFER_DATA
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
void * getHandle() const
Get internal stream handle.
GENICAM_INTERFACE IInteger
Interface for integer properties.
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 startStreaming(int nacquire=-1)
Allocates four buffers, registers internal events and starts streaming of nacquire buffers...
size_t getNumAnnounced()
Returns some information about the stream.
void stopStreaming()
Stops streaming.
void attachBuffers(bool enable)
Enabling or disabling attaching the grabbed buffer to the remote device nodemap.
bool IsReadable(EAccessMode AccessMode)
Tests if readable.
uint64_t getNumStarted()
Returns some information about the stream.
std::shared_ptr< const GenTLWrapper > gentl
void * getHandle() const
Get internal stream handle.
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.
std::shared_ptr< Device > getParent() const
Returns the pointer to the parent device object.
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 setNodemap(const std::shared_ptr< GenApi::CNodeMapRef > nodemap, const std::string &tltype)
Set the device nodemap.
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.
const std::string & getID() const
Get the internal ID of this stream.
bool IsWritable(EAccessMode AccessMode)
Tests if writable.
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.
int getAvailableBufferCount()
Returns the number ob buffers that are currently available for grabbing.
size_t getBufAlignment()
Returns some information about the stream.