Represents a GenTL buffer module. More...
#include <peak/buffer/peak_buffer.hpp>
Public Member Functions | |
| Buffer ()=delete | |
| ~Buffer () override=default | |
| Buffer (const Buffer &other)=delete | |
| Buffer & | operator= (const Buffer &other)=delete |
| Buffer (Buffer &&other)=delete | |
| Buffer & | operator= (Buffer &&other)=delete |
| PEAK_COMMON_NO_DISCARD ImageView | ToImageView () |
| Create an ImageView from this buffer. | |
| PEAK_COMMON_NO_DISCARD ImageView | ToImageView (MetadataExtractionMode mode) |
| Create an ImageView from this buffer with a specific metadata extraction mode. | |
| PEAK_COMMON_NO_DISCARD std::vector< std::shared_ptr< BufferChunk > > | Chunks () |
| Returns the buffer's chunks if it contains chunks. | |
| PEAK_COMMON_NO_DISCARD std::vector< std::shared_ptr< BufferPart > > | Parts () |
| Returns all buffer parts for multipart buffers. | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< DataStream > | ParentDataStream () const |
| Returns the parent data stream. | |
Info Commands | |
Information based on GenTL BUFFER_INFO_CMD. | |
| PEAK_COMMON_NO_DISCARD RawInformation | Info (int32_t infoCommand) const |
| Delivers information based on the given GenTL info command. | |
| PEAK_COMMON_NO_DISCARD std::string | TLType () const |
| Returns the TL (transport layer) type. | |
| PEAK_COMMON_NO_DISCARD void * | BasePtr () const |
| Returns the base pointer. | |
| PEAK_COMMON_NO_DISCARD size_t | Size () const |
| Returns the size of the buffer in bytes. | |
| PEAK_COMMON_NO_DISCARD void * | UserPtr () const |
| Returns the pointer to custom user data attached to the buffer. | |
| PEAK_COMMON_NO_DISCARD BufferPayloadType | PayloadType () const |
| Returns the payload type. | |
| PEAK_COMMON_NO_DISCARD uint64_t | PixelFormat () const |
| Returns the pixel format of the data. | |
| PEAK_COMMON_NO_DISCARD peak::common::PixelFormatInfo | PixelFormatInfo () const |
| Returns the pixel format info of the data. | |
| PEAK_COMMON_NO_DISCARD peak::core::PixelFormatNamespace | PixelFormatNamespace () const |
| Returns the pixel format namespace, to allow interpretation of the PixelFormat(). | |
| PEAK_COMMON_NO_DISCARD Endianness | PixelEndianness () const |
| Returns the pixel endianness. | |
| PEAK_COMMON_NO_DISCARD size_t | ExpectedDataSize () const |
| Returns the expected data size. | |
| PEAK_COMMON_NO_DISCARD size_t | DeliveredDataSize () const |
| Returns the delivered data size. | |
| PEAK_COMMON_NO_DISCARD uint64_t | FrameID () const |
| Returns the identifier of the current frame. | |
| PEAK_COMMON_NO_DISCARD size_t | ImageOffset () const |
| Returns the offset of the image data from the beginning of the delivered buffer in bytes. | |
| PEAK_COMMON_NO_DISCARD size_t | DeliveredImageHeight () const |
| Returns the delivered image height. | |
| PEAK_COMMON_NO_DISCARD size_t | DeliveredChunkPayloadSize () const |
| Returns the delivered chunk payload size. | |
| PEAK_COMMON_NO_DISCARD uint64_t | ChunkLayoutID () const |
| Returns the chunk layout ID. | |
| PEAK_COMMON_NO_DISCARD std::string | FileName () const |
| Retrieves the file name. | |
| PEAK_COMMON_NO_DISCARD size_t | Width () const |
| Returns the width. | |
| PEAK_COMMON_NO_DISCARD size_t | Height () const |
| Returns the height. | |
| PEAK_COMMON_NO_DISCARD peak::common::Size | ImageSize () const |
| Returns the size of the image. | |
| PEAK_COMMON_NO_DISCARD size_t | XOffset () const |
| Returns the x offset of the data in the buffer in number of pixels from the image origin to handle areas of interest. | |
| PEAK_COMMON_NO_DISCARD size_t | YOffset () const |
| Returns the y offset of the data in the buffer in number of lines from the image origin to handle areas of interest. | |
| PEAK_COMMON_NO_DISCARD size_t | XPadding () const |
| Returns the x padding of the data in the buffer in number of bytes. | |
| PEAK_COMMON_NO_DISCARD size_t | YPadding () const |
| Returns the y padding of the data in the buffer in number of bytes. | |
| PEAK_COMMON_NO_DISCARD uint64_t | Timestamp_ticks () const |
| Returns the timestamp. | |
| PEAK_COMMON_NO_DISCARD uint64_t | Timestamp_ns () const |
| Returns the timestamp associated with when the image was recorded. | |
| PEAK_COMMON_NO_DISCARD bool | IsQueued () const |
| Checks whether the buffer is queued or not. | |
| PEAK_COMMON_NO_DISCARD bool | IsAcquiring () const |
| Checks whether the buffer is currently being filled. | |
| PEAK_COMMON_NO_DISCARD bool | IsIncomplete () const |
| Checks whether the buffer is incomplete or not. | |
| PEAK_COMMON_NO_DISCARD bool | HasNewData () const |
| Checks whether the buffer has new data since the last delivery. | |
| PEAK_COMMON_NO_DISCARD bool | HasImage () const |
| Checks whether the buffer contains image data. | |
| PEAK_COMMON_NO_DISCARD bool | HasChunks () const |
| Checks whether the buffer contains chunks. | |
| PEAK_COMMON_NO_DISCARD bool | HasParts () const |
| Checks whether the buffer contains parts. | |
| PEAK_COMMON_NO_DISCARD uint64_t | SystemTimestamp_ns () const |
| Returns the system timestamp corresponding to this buffer. | |
| Public Member Functions inherited from peak::core::EventSupportingModule | |
| EventSupportingModule ()=default | |
| ~EventSupportingModule () override=default | |
| EventSupportingModule (const EventSupportingModule &other)=delete | |
| EventSupportingModule & | operator= (const EventSupportingModule &other)=delete |
| EventSupportingModule (EventSupportingModule &&other)=delete | |
| EventSupportingModule & | operator= (EventSupportingModule &&other)=delete |
| PEAK_COMMON_NO_DISCARD std::unique_ptr< EventController > | EnableEvents (EventType type) |
| Enables events of the given event type. | |
| Public Member Functions inherited from peak::core::Module | |
| Module ()=default | |
| virtual | ~Module ()=default |
| Module (const Module &other)=delete | |
| Module & | operator= (const Module &other)=delete |
| Module (Module &&other)=delete | |
| Module & | operator= (Module &&other)=delete |
| PEAK_COMMON_NO_DISCARD std::vector< std::shared_ptr< NodeMap > > | NodeMaps () const |
| Returns the module's node maps. | |
| PEAK_COMMON_NO_DISCARD std::shared_ptr< class Port > | Port () const |
| Returns the module's port. | |
Friends | |
| class | DataStream |
Represents a GenTL buffer module.
This class allows to query information about a GenTL buffer module and to enumerate its chunks or parts.
|
delete |
|
overridedefault |
|
delete |
|
delete |
|
inline |
Returns the base pointer.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the chunk layout ID.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the buffer's chunks if it contains chunks.
Check if the buffer has chunks with HasChunks().
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the delivered chunk payload size.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the delivered data size.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the delivered image height.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the expected data size.
| InternalErrorException | An internal error has occurred. |
|
inline |
Retrieves the file name.
Returns the file name if the payload contains a file. For example, in GigE Vision, this corresponds to information provided in the image stream data leader. Implementations for other technologies should provide similar functionality as appropriate.
As this is based on GigE Vision, the file name is UTF-8 encoded, consistent with the GigE Vision specification.
| InternalErrorException | If an internal error occurs. |
|
inline |
Returns the identifier of the current frame.
The frame ID is a sequentially incremented value that increases by one from one frame to the next. It serves as a means to detect missing or out-of-order frames in a stream. Once the maximum value supported by the device and transport layer is reached, the frame ID wraps back to zero. The exact wrap-around point is not fixed and depends on both the device and the transport layer in use.
| InternalErrorException | If an internal error occurs. |
|
inline |
Checks whether the buffer contains chunks.
If HasChunks() is true, check the BufferChunks using Chunks().
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the buffer contains image data.
See GenTL BUFFER_INFO_IMAGEPRESENT.
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the buffer has new data since the last delivery.
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the buffer contains parts.
If HasParts() is true, check the BufferParts using Parts().
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the height.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the offset of the image data from the beginning of the delivered buffer in bytes.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the size of the image.
| InternalErrorException | An internal error has occurred. |
|
inline |
Delivers information based on the given GenTL info command.
| [in] | infoCommand | The GenTL info command. |
This function can be used to query information going beyond the predefined info functions, based on the GenTL info commands of the corresponding module.
Example (error handling is omitted):
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the buffer is currently being filled.
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the buffer is incomplete or not.
Incomplete buffers can happen when an error occurred while the buffer was being filled.
| InternalErrorException | An internal error has occurred. |
|
inline |
Checks whether the buffer is queued or not.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the parent data stream.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns all buffer parts for multipart buffers.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the payload type.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the pixel endianness.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the pixel format of the data.
The interpretation of the pixel format depends on the namespace the pixel format belongs to. This can be inquired using PixelFormatNamespace().
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the pixel format info of the data.
The interpretation of the pixel format depends on the namespace the pixel format belongs to. This can be inquired using PixelFormatNamespace().
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the pixel format namespace, to allow interpretation of the PixelFormat().
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the size of the buffer in bytes.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the system timestamp corresponding to this buffer.
Provides the system timestamp, expressed as nanoseconds since the Unix epoch (00:00:00 UTC on January 1, 1970), corresponding to the device timestamp of this buffer. This allows buffers to be associated with a system time, for example for logging or correlation with other system events.
The effective accuracy of the system timestamp is subject to various platform- and environment-specific influences, such as system and device clock resolution, operating system scheduling behavior, system load, and network characteristics (e.g. size and traffic load). As such, a deterministic timestamp precision cannot be specified.
Internal measurements under representative conditions indicate that the timestamp deviation is most commonly on the order of 1–2 ms and typically remains below 10 ms, even under high network load.
| InternalErrorException | if an internal error occurs. |
|
inline |
Returns the timestamp associated with when the image was recorded.
The timestamp is expressed in nanoseconds and is relative to a reference point (t = 0) defined by the transport layer and the device. This reference point is not known to the caller. The timestamp does not represent an absolute wall-clock time, but instead the elapsed time since that reference. The difference between timestamps of consecutive images indicates the time interval between their recordings.
Depending on the transport layer, timestamp information might not be provided.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the timestamp.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the TL (transport layer) type.
| InternalErrorException | An internal error has occurred. |
|
inline |
Create an ImageView from this buffer.
Uses the default metadata extraction mode MetadataExtractionMode::Minimal.
|
inline |
Create an ImageView from this buffer with a specific metadata extraction mode.
| mode | Metadata extraction mode (see MetadataExtractionMode). |
|
inline |
Returns the pointer to custom user data attached to the buffer.
Pointer to user data provided at buffer announcement using DataStream::AnnounceBuffer() / DataStream::AllocAndAnnounceBuffer(). This pointer can be used to identify or to attach custom user data to the buffer.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the width.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the x offset of the data in the buffer in number of pixels from the image origin to handle areas of interest.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the x padding of the data in the buffer in number of bytes.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the y offset of the data in the buffer in number of lines from the image origin to handle areas of interest.
| InternalErrorException | An internal error has occurred. |
|
inline |
Returns the y padding of the data in the buffer in number of bytes.
| InternalErrorException | An internal error has occurred. |
|
friend |