Go to the documentation of this file.
55 const std::shared_ptr<const GenTLWrapper> &_gentl,
const char *_id) :
100 std::lock_guard<std::recursive_mutex> lock(
mtx);
104 if (
parent->getHandle() != 0)
114 throw GenTLException(
"Stream::open(): Device must be opened before open before opening a stream");
123 std::lock_guard<std::recursive_mutex> lock(
mtx);
155 if (
parent->getHandle() != 0)
157 std::shared_ptr<GenApi::CNodeMapRef> rnodemap=
parent->getRemoteNodeMap();
174 std::lock_guard<std::recursive_mutex> lock(
mtx);
180 throw GenTLException(
"Stream::startStreaming(): Stream is not open");
192 std::shared_ptr<GenApi::CNodeMapRef> nmap=
parent->getRemoteNodeMap();
213 size=
static_cast<size_t>(pp->GetValue());
222 for (
size_t i=0; i<
bn; i++)
253 n=
static_cast<uint64_t
>(nacquire);
296 std::lock_guard<std::recursive_mutex> lock(
mtx);
313 for (
size_t i=0; i<
bn; i++)
327 std::shared_ptr<GenApi::CNodeMapRef> nmap=
parent->getRemoteNodeMap();
342 size_t size=
sizeof(ret);
352 return static_cast<int>(ret);
357 std::lock_guard<std::recursive_mutex> lock(
mtx);
362 timeout=
static_cast<uint64_t
>(_timeout);
389 memset(&data, 0, size);
415 template<
class T>
inline T getStreamValue(
const std::shared_ptr<const GenTLWrapper> &gentl,
421 size_t size=
sizeof(T);
425 gentl->DSGetInfo(stream, cmd, &type, &ret, &size);
431 inline bool getStreamBool(
const std::shared_ptr<const GenTLWrapper> &gentl,
437 size_t size=
sizeof(ret);
441 gentl->DSGetInfo(stream, cmd, &type, &ret, &size);
451 std::lock_guard<std::recursive_mutex> lock(
mtx);
457 std::lock_guard<std::recursive_mutex> lock(
mtx);
463 std::lock_guard<std::recursive_mutex> lock(
mtx);
469 std::lock_guard<std::recursive_mutex> lock(
mtx);
475 std::lock_guard<std::recursive_mutex> lock(
mtx);
481 std::lock_guard<std::recursive_mutex> lock(
mtx);
487 std::lock_guard<std::recursive_mutex> lock(
mtx);
493 std::lock_guard<std::recursive_mutex> lock(
mtx);
499 std::lock_guard<std::recursive_mutex> lock(
mtx);
505 std::lock_guard<std::recursive_mutex> lock(
mtx);
510 size_t size=
sizeof(tmp);
529 std::lock_guard<std::recursive_mutex> lock(
mtx);
535 std::lock_guard<std::recursive_mutex> lock(
mtx);
541 std::lock_guard<std::recursive_mutex> lock(
mtx);
547 std::lock_guard<std::recursive_mutex> lock(
mtx);
GENICAM_INTERFACE IInteger
Interface for integer properties.
size_t getNumAnnounced()
Returns some information about the stream.
bool IsWritable(EAccessMode AccessMode)
Tests if writable.
void startStreaming(int nacquire=-1)
Allocates four buffers, registers internal events and starts streaming of nacquire buffers.
size_t getNumQueued()
Returns some information about the stream.
void setNodemap(const std::shared_ptr< GenApi::CNodeMapRef > nodemap, const std::string &tltype)
Set the device nodemap.
The buffer class encapsulates a Genicam buffer that is provided by a stream.
@ STREAM_INFO_IS_GRABBING
void setHandle(void *handle)
Set the buffer handle that this object should manage.
void close()
Closes the stream.
void * getHandle() const
Get internal stream handle.
uint64_t getNumStarted()
Returns some information about the stream.
@ STREAM_INFO_BUF_ANNOUNCE_MIN
void attachBuffers(bool enable)
Enabling or disabling attaching the grabbed buffer to the remote device nodemap.
int getAvailableBufferCount()
Returns the number ob buffers that are currently available for grabbing.
void stopStreaming()
Stops streaming.
size_t getNumChunksMax()
Returns some information about the stream.
@ STREAM_INFO_DEFINES_PAYLOADSIZE
@ STREAM_INFO_NUM_DELIVERED
void * getHandle() const
Get internal stream handle.
This is the port definition that connects GenAPI to GenTL.
std::shared_ptr< GenApi::CNodeMapRef > getNodeMap()
Returns the node map of this object.
@ STREAM_INFO_NUM_STARTED
@ ACQ_START_FLAGS_DEFAULT
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.
@ STREAM_INFO_BUF_ALIGNMENT
@ STREAM_INFO_NUM_UNDERRUN
@ STREAM_INFO_PAYLOAD_SIZE
@ STREAM_INFO_NUM_CHUNKS_MAX
bool getDefinesPayloadsize()
Returns some information about the stream.
std::shared_ptr< Device > getParent() const
Returns the pointer to the parent device object.
size_t getBufAlignment()
Returns some information about the stream.
bool IsReadable(EAccessMode AccessMode)
Tests if readable.
const std::string & getID() const
Get the internal ID of this stream.
bool getIsGrabbing()
Returns some information about the stream.
@ STREAM_INFO_NUM_AWAIT_DELIVERY
Stream(const std::shared_ptr< Device > &parent, const std::shared_ptr< const GenTLWrapper > &gentl, const char *id)
Constructs a stream class.
void open()
Opens the stream for working with it.
Encapsulates a GenApi pointer dealing with the dynamic_cast automatically.
size_t getBufAnnounceMin()
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.
@ STREAM_INFO_NUM_ANNOUNCED
std::shared_ptr< CPort > cport
struct S_EVENT_NEW_BUFFER EVENT_NEW_BUFFER_DATA
uint64_t getNumUnderrun()
Returns some information about the stream.
std::string getTLType()
Returns some information about the stream.
uint64_t getNumDelivered()
Returns some information about the stream.
std::shared_ptr< Device > parent
std::shared_ptr< GenApi::CNodeMapRef > nodemap
size_t getNumAwaitDelivery()
Returns some information about the stream.
std::shared_ptr< const GenTLWrapper > gentl
size_t getPayloadSize()
Returns some information about the stream.
rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:12