IDS peak genericC++ v1.7.3
Loading...
Searching...
No Matches
peak_buffer.hpp
Go to the documentation of this file.
1
11#pragma once
12
13
19#include <peak/dll_interface/peak_dll_interface_util.hpp>
20
21#include <cstddef>
22#include <cstdint>
23#include <memory>
24#include <string>
25#include <vector>
26
27
28namespace peak
29{
30namespace core
31{
32
39{
40 Unknown,
41 Image,
42 RawData,
43 File,
44 Chunk,
45 JPEG,
47 H264,
51
52 Custom = 1000
53};
54
61{
62 GEV = 1,
63 IIDC,
66
67 Custom = 1000
68};
69
70class DataStream;
71class NodeMap;
72
78class Buffer
80 , public std::enable_shared_from_this<Buffer>
81{
82public:
83 Buffer() = delete;
84 ~Buffer() override = default;
85 Buffer(const Buffer& other) = delete;
86 Buffer& operator=(const Buffer& other) = delete;
87 Buffer(Buffer&& other) = delete;
88 Buffer& operator=(Buffer&& other) = delete;
89
96
97 RawInformation Info(int32_t infoCommand) const;
98
100 std::string TLType() const;
101
111 void* BasePtr() const;
112
122 size_t Size() const;
123
137 void* UserPtr() const;
138
149
162 uint64_t PixelFormat() const;
163
174
185
195 size_t ExpectedDataSize() const;
196
206 size_t DeliveredDataSize() const;
207
217 uint64_t FrameID() const;
218
228 size_t ImageOffset() const;
229
239 size_t DeliveredImageHeight() const;
240
250 size_t DeliveredChunkPayloadSize() const;
251
261 uint64_t ChunkLayoutID() const;
262
272 std::string FileName() const;
273
283 size_t Width() const;
284
294 size_t Height() const;
295
306 size_t XOffset() const;
307
318 size_t YOffset() const;
319
329 size_t XPadding() const;
330
340 size_t YPadding() const;
341
351 uint64_t Timestamp_ticks() const;
352
362 uint64_t Timestamp_ns() const;
363
374 bool IsQueued() const;
375
387 bool IsAcquiring() const;
388
401 bool IsIncomplete() const;
402
413 bool HasNewData() const;
414
427 bool HasImage() const;
428
441 bool HasChunks() const;
442
444
456 std::vector<std::shared_ptr<BufferChunk>> Chunks();
457
467 std::vector<std::shared_ptr<BufferPart>> Parts();
468
478 std::shared_ptr<DataStream> ParentDataStream() const;
479
480private:
481 PEAK_MODULE_HANDLE ModuleHandle() const override;
482 PEAK_EVENT_SUPPORTING_MODULE_HANDLE EventSupportingModuleHandle() const override;
483
484 void Revoke();
485
486 friend NodeMap;
487 friend ClassCreator<Buffer>;
488 Buffer(PEAK_BUFFER_HANDLE bufferHandle, const std::weak_ptr<DataStream>& parentDataStream);
489 PEAK_BUFFER_HANDLE m_backendHandle;
490
491 std::weak_ptr<DataStream> m_parentDataStream;
492
493 friend class DataStream;
494};
495
496} /* namespace core */
497} /* namespace peak */
498
499/* Implementation */
500namespace peak
501{
502namespace core
503{
504
505inline std::string ToString(BufferPayloadType entry)
506{
507 std::string entryString;
508
509 if (entry == BufferPayloadType::Unknown)
510 {
511 entryString = "Unknown";
512 }
513 else if (entry == BufferPayloadType::Image)
514 {
515 entryString = "Image";
516 }
517 else if (entry == BufferPayloadType::RawData)
518 {
519 entryString = "RawData";
520 }
521 else if (entry == BufferPayloadType::File)
522 {
523 entryString = "File";
524 }
525 else if (entry == BufferPayloadType::Chunk)
526 {
527 entryString = "Chunk";
528 }
529 else if (entry == BufferPayloadType::JPEG)
530 {
531 entryString = "JPEG";
532 }
533 else if (entry == BufferPayloadType::JPEG2000)
534 {
535 entryString = "JPEG2000";
536 }
537 else if (entry == BufferPayloadType::H264)
538 {
539 entryString = "H264";
540 }
541 else if (entry == BufferPayloadType::ChunkOnly)
542 {
543 entryString = "ChunkOnly";
544 }
545 else if (entry == BufferPayloadType::DeviceSpecific)
546 {
547 entryString = "DeviceSpecific";
548 }
549 else if (entry == BufferPayloadType::MultiPart)
550 {
551 entryString = "MultiPart";
552 }
553 else if (entry >= BufferPayloadType::Custom)
554 {
555 entryString = "Custom";
556 }
557
558 return entryString;
559}
560
561inline std::string ToString(PixelFormatNamespace entry)
562{
563 std::string entryString;
564
565 if (entry == PixelFormatNamespace::GEV)
566 {
567 entryString = "GEV";
568 }
569 else if (entry == PixelFormatNamespace::IIDC)
570 {
571 entryString = "IIDC";
572 }
573 else if (entry == PixelFormatNamespace::PFNC16Bit)
574 {
575 entryString = "PFNC16Bit";
576 }
577 else if (entry == PixelFormatNamespace::PFNC32Bit)
578 {
579 entryString = "PFNC32Bit";
580 }
581 else if (entry >= PixelFormatNamespace::Custom)
582 {
583 entryString = "Custom";
584 }
585
586 return entryString;
587}
588
589inline Buffer::Buffer(PEAK_BUFFER_HANDLE bufferHandle, const std::weak_ptr<DataStream>& parentDataStream)
590 : m_backendHandle(bufferHandle)
591 , m_parentDataStream(parentDataStream)
592{}
593
594inline RawInformation Buffer::Info(int32_t infoCommand) const
595{
596 return QueryRawInformationFromCInterfaceFunction([&](int32_t* dataType, uint8_t* buffer, size_t* bufferSize) {
597 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetInfo(m_backendHandle, infoCommand, dataType, buffer, bufferSize);
598 });
599}
600
601inline std::string Buffer::TLType() const
602{
603 return QueryStringFromCInterfaceFunction([&](char* tlType, size_t* tlTypeSize) {
604 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetTLType(m_backendHandle, tlType, tlTypeSize);
605 });
606}
607
608inline void* Buffer::BasePtr() const
609{
610 return QueryNumericFromCInterfaceFunction<void*>(
611 [&](void** basePtr) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetBasePtr(m_backendHandle, basePtr); });
612}
613
614inline size_t Buffer::Size() const
615{
616 return QueryNumericFromCInterfaceFunction<size_t>(
617 [&](size_t* size) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetSize(m_backendHandle, size); });
618}
619
620inline void* Buffer::UserPtr() const
621{
622 return QueryNumericFromCInterfaceFunction<void*>(
623 [&](void** userPtr) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetUserPtr(m_backendHandle, userPtr); });
624}
625
627{
628 return static_cast<BufferPayloadType>(
629 QueryNumericFromCInterfaceFunction<PEAK_BUFFER_PAYLOAD_TYPE>([&](PEAK_BUFFER_PAYLOAD_TYPE* payloadType) {
630 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetPayloadType(m_backendHandle, payloadType);
631 }));
632}
633
634inline uint64_t Buffer::PixelFormat() const
635{
636 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* pixelFormat) {
637 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetPixelFormat(m_backendHandle, pixelFormat);
638 });
639}
640
642{
643 return static_cast<peak::core::PixelFormatNamespace>(
644 QueryNumericFromCInterfaceFunction<PEAK_PIXEL_FORMAT_NAMESPACE>(
645 [&](PEAK_PIXEL_FORMAT_NAMESPACE* pixelFormatNamespace) {
647 m_backendHandle, pixelFormatNamespace);
648 }));
649}
650
652{
653 return static_cast<Endianness>(
654 QueryNumericFromCInterfaceFunction<PEAK_ENDIANNESS>([&](PEAK_ENDIANNESS* pixelEndianness) {
655 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetPixelEndianness(m_backendHandle, pixelEndianness);
656 }));
657}
658
659inline size_t Buffer::ExpectedDataSize() const
660{
661 return QueryNumericFromCInterfaceFunction<size_t>([&](size_t* expectedDataSize) {
662 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetExpectedDataSize(m_backendHandle, expectedDataSize);
663 });
664}
665
666inline size_t Buffer::DeliveredDataSize() const
667{
668 return QueryNumericFromCInterfaceFunction<size_t>([&](size_t* deliveredDataSize) {
669 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetDeliveredDataSize(m_backendHandle, deliveredDataSize);
670 });
671}
672
673inline uint64_t Buffer::FrameID() const
674{
675 return QueryNumericFromCInterfaceFunction<uint64_t>(
676 [&](uint64_t* frameId) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetFrameID(m_backendHandle, frameId); });
677}
678
679inline size_t Buffer::ImageOffset() const
680{
681 return QueryNumericFromCInterfaceFunction<size_t>([&](size_t* imageOffset) {
682 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetImageOffset(m_backendHandle, imageOffset);
683 });
684}
685
686inline size_t Buffer::DeliveredImageHeight() const
687{
688 return QueryNumericFromCInterfaceFunction<size_t>([&](size_t* deliveredImageHeight) {
689 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetDeliveredImageHeight(m_backendHandle, deliveredImageHeight);
690 });
691}
692
694{
695 return QueryNumericFromCInterfaceFunction<size_t>([&](size_t* deliveredChunkPayloadSize) {
697 m_backendHandle, deliveredChunkPayloadSize);
698 });
699}
700
701inline uint64_t Buffer::ChunkLayoutID() const
702{
703 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* chunkLayoutId) {
704 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetChunkLayoutID(m_backendHandle, chunkLayoutId);
705 });
706}
707
708inline std::string Buffer::FileName() const
709{
710 return QueryStringFromCInterfaceFunction([&](char* fileName, size_t* fileNameSize) {
711 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetFileName(m_backendHandle, fileName, fileNameSize);
712 });
713}
714
715inline size_t Buffer::Width() const
716{
717 return QueryNumericFromCInterfaceFunction<size_t>(
718 [&](size_t* width) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetWidth(m_backendHandle, width); });
719}
720
721inline size_t Buffer::Height() const
722{
723 return QueryNumericFromCInterfaceFunction<size_t>(
724 [&](size_t* height) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetHeight(m_backendHandle, height); });
725}
726
727inline size_t Buffer::XOffset() const
728{
729 return QueryNumericFromCInterfaceFunction<size_t>(
730 [&](size_t* xOffset) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetXOffset(m_backendHandle, xOffset); });
731}
732
733inline size_t Buffer::YOffset() const
734{
735 return QueryNumericFromCInterfaceFunction<size_t>(
736 [&](size_t* yOffset) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetYOffset(m_backendHandle, yOffset); });
737}
738
739inline size_t Buffer::XPadding() const
740{
741 return QueryNumericFromCInterfaceFunction<size_t>(
742 [&](size_t* xPadding) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetXPadding(m_backendHandle, xPadding); });
743}
744
745inline size_t Buffer::YPadding() const
746{
747 return QueryNumericFromCInterfaceFunction<size_t>(
748 [&](size_t* yPadding) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetYPadding(m_backendHandle, yPadding); });
749}
750
751inline uint64_t Buffer::Timestamp_ticks() const
752{
753 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* timestamp_ticks) {
754 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetTimestamp_ticks(m_backendHandle, timestamp_ticks);
755 });
756}
757
758inline uint64_t Buffer::Timestamp_ns() const
759{
760 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* timestamp_ns) {
761 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetTimestamp_ns(m_backendHandle, timestamp_ns);
762 });
763}
764
765inline bool Buffer::IsQueued() const
766{
767 return QueryNumericFromCInterfaceFunction<PEAK_BOOL8>([&](PEAK_BOOL8* isQueued) {
768 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetIsQueued(m_backendHandle, isQueued);
769 }) > 0;
770}
771
772inline bool Buffer::IsAcquiring() const
773{
774 return QueryNumericFromCInterfaceFunction<PEAK_BOOL8>([&](PEAK_BOOL8* isAcquiring) {
775 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetIsAcquiring(m_backendHandle, isAcquiring);
776 }) > 0;
777}
778
779inline bool Buffer::IsIncomplete() const
780{
781 return QueryNumericFromCInterfaceFunction<PEAK_BOOL8>([&](PEAK_BOOL8* isIncomplete) {
782 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetIsIncomplete(m_backendHandle, isIncomplete);
783 }) > 0;
784}
785
786inline bool Buffer::HasNewData() const
787{
788 return QueryNumericFromCInterfaceFunction<PEAK_BOOL8>([&](PEAK_BOOL8* hasNewData) {
789 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetHasNewData(m_backendHandle, hasNewData);
790 }) > 0;
791}
792
793inline bool Buffer::HasImage() const
794{
795 return QueryNumericFromCInterfaceFunction<PEAK_BOOL8>([&](PEAK_BOOL8* hasImage) {
796 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetHasImage(m_backendHandle, hasImage);
797 }) > 0;
798}
799
800inline bool Buffer::HasChunks() const
801{
802 return QueryNumericFromCInterfaceFunction<PEAK_BOOL8>([&](PEAK_BOOL8* hasChunks) {
803 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetHasChunks(m_backendHandle, hasChunks);
804 }) > 0;
805}
806
807inline std::vector<std::shared_ptr<BufferChunk>> Buffer::Chunks()
808{
809 CallAndCheckCInterfaceFunction([&] { return PEAK_C_ABI_PREFIX PEAK_Buffer_UpdateChunks(m_backendHandle); });
810
811 auto numChunks = QueryNumericFromCInterfaceFunction<size_t>([&](size_t* _numChunks) {
812 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetNumChunks(m_backendHandle, _numChunks);
813 });
814
815 std::vector<std::shared_ptr<BufferChunk>> chunks;
816 for (size_t x = 0; x < numChunks; ++x)
817 {
818 auto bufferChunkHandle = QueryNumericFromCInterfaceFunction<PEAK_BUFFER_CHUNK_HANDLE>(
819 [&](PEAK_BUFFER_CHUNK_HANDLE* _bufferChunkHandle) {
820 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetChunk(m_backendHandle, x, _bufferChunkHandle);
821 });
822
823 chunks.emplace_back(std::make_shared<ClassCreator<BufferChunk>>(bufferChunkHandle, shared_from_this()));
824 }
825
826 return chunks;
827}
828
829inline std::vector<std::shared_ptr<BufferPart>> Buffer::Parts()
830{
831 CallAndCheckCInterfaceFunction([&] { return PEAK_C_ABI_PREFIX PEAK_Buffer_UpdateParts(m_backendHandle); });
832
833 auto numParts = QueryNumericFromCInterfaceFunction<size_t>(
834 [&](size_t* _numParts) { return PEAK_C_ABI_PREFIX PEAK_Buffer_GetNumParts(m_backendHandle, _numParts); });
835
836 std::vector<std::shared_ptr<BufferPart>> parts;
837 for (size_t x = 0; x < numParts; ++x)
838 {
839 auto bufferPartHandle = QueryNumericFromCInterfaceFunction<PEAK_BUFFER_PART_HANDLE>(
840 [&](PEAK_BUFFER_PART_HANDLE* _bufferPartHandle) {
841 return PEAK_C_ABI_PREFIX PEAK_Buffer_GetPart(m_backendHandle, x, _bufferPartHandle);
842 });
843
844 parts.emplace_back(std::make_shared<ClassCreator<BufferPart>>(bufferPartHandle, shared_from_this()));
845 }
846
847 return parts;
848}
849
850inline std::shared_ptr<DataStream> Buffer::ParentDataStream() const
851{
852 return LockOrThrow(m_parentDataStream);
853}
854
855inline PEAK_MODULE_HANDLE Buffer::ModuleHandle() const
856{
857 auto moduleHandle = QueryNumericFromCInterfaceFunction<PEAK_MODULE_HANDLE>(
858 [&](PEAK_MODULE_HANDLE* _moduleHandle) {
859 return PEAK_C_ABI_PREFIX PEAK_Buffer_ToModule(m_backendHandle, _moduleHandle);
860 });
861
862 return moduleHandle;
863}
864
865inline PEAK_EVENT_SUPPORTING_MODULE_HANDLE Buffer::EventSupportingModuleHandle() const
866{
867 auto eventSupportingModuleHandle = QueryNumericFromCInterfaceFunction<PEAK_EVENT_SUPPORTING_MODULE_HANDLE>(
868 [&](PEAK_EVENT_SUPPORTING_MODULE_HANDLE* _eventSupportingModuleHandle) {
870 m_backendHandle, _eventSupportingModuleHandle);
871 });
872
873 return eventSupportingModuleHandle;
874}
875
876inline void Buffer::Revoke()
877{
878 m_parentDataStream.reset();
879}
880
881inline bool NodeMap::HasBufferSupportedChunks(const std::shared_ptr<Buffer>& buffer) const
882{
883 if (buffer == nullptr)
884 {
885 throw InvalidArgumentException("The given buffer is a nullptr!");
886 }
887
888 return QueryNumericFromCInterfaceFunction<PEAK_BOOL8>([&](PEAK_BOOL8* hasSupportedChunks) {
890 m_backendHandle, buffer->m_backendHandle, hasSupportedChunks);
891 }) > 0;
892}
893
894inline void NodeMap::UpdateChunkNodes(const std::shared_ptr<Buffer>& buffer)
895{
896 if (buffer == nullptr)
897 {
898 throw InvalidArgumentException("The given buffer is a nullptr!");
899 }
900
901 CallAndCheckCInterfaceFunction([&] {
902 return PEAK_C_ABI_PREFIX PEAK_NodeMap_UpdateChunkNodes(m_backendHandle, buffer->m_backendHandle);
903 });
904}
905
906} /* namespace core */
907} /* namespace peak */
Represents a GenTL buffer module.
Definition peak_buffer.hpp:81
bool IsQueued() const
Checks whether the buffer is queued or not.
Definition peak_buffer.hpp:765
size_t DeliveredImageHeight() const
Returns the delivered image height.
Definition peak_buffer.hpp:686
bool IsIncomplete() const
Checks whether the buffer is incomplete or not.
Definition peak_buffer.hpp:779
Buffer & operator=(Buffer &&other)=delete
void * BasePtr() const
Returns the base pointer.
Definition peak_buffer.hpp:608
uint64_t Timestamp_ticks() const
Returns the timestamp.
Definition peak_buffer.hpp:751
Buffer(Buffer &&other)=delete
uint64_t FrameID() const
Returns the frame ID.
Definition peak_buffer.hpp:673
bool IsAcquiring() const
Checks whether the buffer is currently being filled.
Definition peak_buffer.hpp:772
peak::core::PixelFormatNamespace PixelFormatNamespace() const
Returns the pixel format namespace, to allow interpretation of the PixelFormat().
Definition peak_buffer.hpp:641
bool HasNewData() const
Checks whether the buffer has new data since the last delivery.
Definition peak_buffer.hpp:786
size_t XOffset() const
Returns the x offset of the data in the buffer in number of pixels from the image origin to handle ar...
Definition peak_buffer.hpp:727
void * UserPtr() const
Returns the pointer to custom user data attached to the buffer.
Definition peak_buffer.hpp:620
RawInformation Info(int32_t infoCommand) const
Delivers information based on the given GenTL info command.
Definition peak_buffer.hpp:594
size_t Size() const
Returns the size of the buffer in bytes.
Definition peak_buffer.hpp:614
size_t XPadding() const
Returns the x padding of the data in the buffer in number of bytes.
Definition peak_buffer.hpp:739
size_t Height() const
Returns the height.
Definition peak_buffer.hpp:721
std::shared_ptr< DataStream > ParentDataStream() const
Returns the parent data stream.
Definition peak_buffer.hpp:850
size_t DeliveredDataSize() const
Returns the delivered data size.
Definition peak_buffer.hpp:666
bool HasImage() const
Checks whether the buffer contains image data.
Definition peak_buffer.hpp:793
std::vector< std::shared_ptr< BufferChunk > > Chunks()
Returns the buffer's chunks if it contains chunks.
Definition peak_buffer.hpp:807
uint64_t PixelFormat() const
Returns the pixel format of the data.
Definition peak_buffer.hpp:634
BufferPayloadType PayloadType() const
Returns the payload type.
Definition peak_buffer.hpp:626
uint64_t ChunkLayoutID() const
Returns the chunk layout ID.
Definition peak_buffer.hpp:701
size_t YOffset() const
Returns the y offset of the data in the buffer in number of lines from the image origin to handle are...
Definition peak_buffer.hpp:733
Endianness PixelEndianness() const
Returns the pixel endianness.
Definition peak_buffer.hpp:651
size_t ImageOffset() const
Returns the offset of the image data from the beginning of the delivered buffer in bytes.
Definition peak_buffer.hpp:679
std::string TLType() const
Returns the TL (transport layer) type.
Definition peak_buffer.hpp:601
size_t YPadding() const
Returns the y padding of the data in the buffer in number of bytes.
Definition peak_buffer.hpp:745
size_t DeliveredChunkPayloadSize() const
Returns the delivered chunk payload size.
Definition peak_buffer.hpp:693
size_t ExpectedDataSize() const
Returns the expected data size.
Definition peak_buffer.hpp:659
std::vector< std::shared_ptr< BufferPart > > Parts()
Returns all buffer parts for multipart buffers.
Definition peak_buffer.hpp:829
~Buffer() override=default
size_t Width() const
Returns the width.
Definition peak_buffer.hpp:715
Buffer(const Buffer &other)=delete
Buffer & operator=(const Buffer &other)=delete
uint64_t Timestamp_ns() const
Returns the timestamp.
Definition peak_buffer.hpp:758
std::string FileName() const
Returns the file name.
Definition peak_buffer.hpp:708
bool HasChunks() const
Checks whether the buffer contains chunks.
Definition peak_buffer.hpp:800
Represents a GenTL DataStream module.
Definition peak_data_stream.hpp:184
The base class for all modules being able to raise events.
Definition peak_event_supporting_module.hpp:34
The exception thrown for pass an invalid argument to a function.
Definition peak_exception.hpp:74
Represents a GenAPI node map.
Definition peak_node_map.hpp:62
void UpdateChunkNodes(const std::shared_ptr< Buffer > &buffer)
Updates chunk information in the NodeMap.
Definition peak_buffer.hpp:894
bool HasBufferSupportedChunks(const std::shared_ptr< Buffer > &buffer) const
Checks if the Buffer contains chunks corresponding to the NodeMap.
Definition peak_buffer.hpp:881
Endianness
Endianness of pixel data in a Buffer or the data in a Port.
Definition peak_common_enums.hpp:28
BufferPayloadType
Payload type of buffer.
Definition peak_buffer.hpp:39
PixelFormatNamespace
The namespace needed to interpret the pixel format value of the buffer.
Definition peak_buffer.hpp:61
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:32
PEAK_C_API PEAK_Buffer_GetPart(PEAK_BUFFER_HANDLE bufferHandle, size_t index, PEAK_BUFFER_PART_HANDLE *bufferPartHandle)
Asks the given buffer for the part with the given index.
PEAK_C_API PEAK_Buffer_GetHasChunks(PEAK_BUFFER_HANDLE bufferHandle, PEAK_BOOL8 *hasChunks)
Asks the given buffer whether it has chunks.
PEAK_C_API PEAK_Buffer_GetChunk(PEAK_BUFFER_HANDLE bufferHandle, size_t index, PEAK_BUFFER_CHUNK_HANDLE *bufferChunkHandle)
Asks the given buffer for the chunk with the given index.
PEAK_C_API PEAK_Buffer_GetYPadding(PEAK_BUFFER_HANDLE bufferHandle, size_t *yPadding)
Asks the given buffer for its Y padding.
PEAK_C_API PEAK_Buffer_GetFrameID(PEAK_BUFFER_HANDLE bufferHandle, uint64_t *frameId)
Asks the given buffer for its frame ID.
struct PEAK_MODULE * PEAK_MODULE_HANDLE
Definition peak_backend.h:403
PEAK_C_API PEAK_Buffer_GetIsIncomplete(PEAK_BUFFER_HANDLE bufferHandle, PEAK_BOOL8 *isIncomplete)
Asks the given buffer whether it is incomplete.
PEAK_C_API PEAK_Buffer_ToEventSupportingModule(PEAK_BUFFER_HANDLE bufferHandle, PEAK_EVENT_SUPPORTING_MODULE_HANDLE *eventSupportingModuleHandle)
Casts the given buffer to an event-supporting module.
PEAK_C_API PEAK_Buffer_GetSize(PEAK_BUFFER_HANDLE bufferHandle, size_t *size)
Asks the given buffer for its size.
PEAK_C_API PEAK_Buffer_GetNumChunks(PEAK_BUFFER_HANDLE bufferHandle, size_t *numChunks)
Asks the given buffer for its number of chunks.
struct PEAK_BUFFER_CHUNK * PEAK_BUFFER_CHUNK_HANDLE
Definition peak_backend.h:391
PEAK_C_API PEAK_Buffer_GetUserPtr(PEAK_BUFFER_HANDLE bufferHandle, void **userPtr)
Asks the given buffer for its user pointer.
PEAK_C_API PEAK_Buffer_UpdateParts(PEAK_BUFFER_HANDLE bufferHandle)
Tells the given buffer to update its parts.
PEAK_C_API PEAK_Buffer_GetTimestamp_ns(PEAK_BUFFER_HANDLE bufferHandle, uint64_t *timestamp_ns)
Asks the given buffer for its timestamp in nanoseconds.
struct PEAK_BUFFER * PEAK_BUFFER_HANDLE
Definition peak_backend.h:387
struct PEAK_EVENT_SUPPORTING_MODULE * PEAK_EVENT_SUPPORTING_MODULE_HANDLE
Definition peak_backend.h:459
PEAK_C_API PEAK_Buffer_GetTimestamp_ticks(PEAK_BUFFER_HANDLE bufferHandle, uint64_t *timestamp_ticks)
Asks the given buffer for its timestamp in ticks.
PEAK_C_API PEAK_Buffer_GetBasePtr(PEAK_BUFFER_HANDLE bufferHandle, void **basePtr)
Asks the given buffer for its base pointer.
PEAK_C_API PEAK_Buffer_GetPixelEndianness(PEAK_BUFFER_HANDLE bufferHandle, PEAK_ENDIANNESS *pixelEndianness)
Asks the given buffer for its pixel endianness.
PEAK_C_API PEAK_Buffer_GetImageOffset(PEAK_BUFFER_HANDLE bufferHandle, size_t *imageOffset)
Asks the given buffer for its image offset.
PEAK_C_API PEAK_Buffer_GetPayloadType(PEAK_BUFFER_HANDLE bufferHandle, PEAK_BUFFER_PAYLOAD_TYPE *payloadType)
Asks the given buffer for its payload type.
PEAK_C_API PEAK_Buffer_GetWidth(PEAK_BUFFER_HANDLE bufferHandle, size_t *width)
Asks the given buffer for its width.
struct PEAK_BUFFER_PART * PEAK_BUFFER_PART_HANDLE
Definition peak_backend.h:395
PEAK_C_API PEAK_Buffer_GetXOffset(PEAK_BUFFER_HANDLE bufferHandle, size_t *xOffset)
Asks the given buffer for its X offset.
PEAK_C_API PEAK_Buffer_UpdateChunks(PEAK_BUFFER_HANDLE bufferHandle)
Tells the given buffer to update its chunks.
PEAK_C_API PEAK_Buffer_GetDeliveredDataSize(PEAK_BUFFER_HANDLE bufferHandle, size_t *deliveredDataSize)
Asks the given buffer for its delivered data size.
PEAK_C_API PEAK_Buffer_GetInfo(PEAK_BUFFER_HANDLE bufferHandle, int32_t infoCommand, int32_t *infoDataType, uint8_t *info, size_t *infoSize)
Asks the given buffer for an information based on a specific command.
PEAK_C_API PEAK_Buffer_GetPixelFormatNamespace(PEAK_BUFFER_HANDLE bufferHandle, PEAK_PIXEL_FORMAT_NAMESPACE *pixelFormatNamespace)
Asks the given buffer for its pixel format namespace.
PEAK_C_API PEAK_Buffer_GetHasNewData(PEAK_BUFFER_HANDLE bufferHandle, PEAK_BOOL8 *hasNewData)
Asks the given buffer whether it has new data since the last delivery.
PEAK_C_API PEAK_Buffer_GetDeliveredChunkPayloadSize(PEAK_BUFFER_HANDLE bufferHandle, size_t *deliveredChunkPayloadSize)
Asks the given buffer for its delivered chunk payload size.
PEAK_C_API PEAK_NodeMap_GetHasBufferSupportedChunks(PEAK_NODE_MAP_HANDLE nodeMapHandle, PEAK_BUFFER_HANDLE bufferHandle, PEAK_BOOL8 *hasSupportedChunks)
Checks if the buffer contains chunks corresponding to the node map.
int8_t PEAK_BOOL8
Definition peak_backend.h:26
int32_t PEAK_ENDIANNESS
Definition peak_backend.h:155
PEAK_C_API PEAK_Buffer_GetHeight(PEAK_BUFFER_HANDLE bufferHandle, size_t *height)
Asks the given buffer for its height.
int32_t PEAK_PIXEL_FORMAT_NAMESPACE
Definition peak_backend.h:301
PEAK_C_API PEAK_NodeMap_UpdateChunkNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle, PEAK_BUFFER_HANDLE bufferHandle)
Updates chunk information in the node map.
PEAK_C_API PEAK_Buffer_ToModule(PEAK_BUFFER_HANDLE bufferHandle, PEAK_MODULE_HANDLE *moduleHandle)
Casts the given buffer to a module.
PEAK_C_API PEAK_Buffer_GetFileName(PEAK_BUFFER_HANDLE bufferHandle, char *fileName, size_t *fileNameSize)
Asks the given buffer for its file name.
PEAK_C_API PEAK_Buffer_GetDeliveredImageHeight(PEAK_BUFFER_HANDLE bufferHandle, size_t *deliveredImageHeight)
Asks the given buffer for its delivered image height.
PEAK_C_API PEAK_Buffer_GetExpectedDataSize(PEAK_BUFFER_HANDLE bufferHandle, size_t *expectedDataSize)
Asks the given buffer for its expected data size.
PEAK_C_API PEAK_Buffer_GetIsQueued(PEAK_BUFFER_HANDLE bufferHandle, PEAK_BOOL8 *isQueued)
Asks the given buffer whether it is queued.
PEAK_C_API PEAK_Buffer_GetYOffset(PEAK_BUFFER_HANDLE bufferHandle, size_t *yOffset)
Asks the given buffer for its Y offset.
PEAK_C_API PEAK_Buffer_GetTLType(PEAK_BUFFER_HANDLE bufferHandle, char *tlType, size_t *tlTypeSize)
Asks the given buffer for its TL type.
int32_t PEAK_BUFFER_PAYLOAD_TYPE
Definition peak_backend.h:82
PEAK_C_API PEAK_Buffer_GetIsAcquiring(PEAK_BUFFER_HANDLE bufferHandle, PEAK_BOOL8 *isAcquiring)
Asks the given buffer whether it is acquiring.
PEAK_C_API PEAK_Buffer_GetPixelFormat(PEAK_BUFFER_HANDLE bufferHandle, uint64_t *pixelFormat)
Asks the given buffer for its pixel format.
PEAK_C_API PEAK_Buffer_GetHasImage(PEAK_BUFFER_HANDLE bufferHandle, PEAK_BOOL8 *hasImage)
Asks the given buffer whether it is has an image.
PEAK_C_API PEAK_Buffer_GetXPadding(PEAK_BUFFER_HANDLE bufferHandle, size_t *xPadding)
Asks the given buffer for its X padding.
PEAK_C_API PEAK_Buffer_GetNumParts(PEAK_BUFFER_HANDLE bufferHandle, size_t *numParts)
Asks the given buffer for its number of parts.
PEAK_C_API PEAK_Buffer_GetChunkLayoutID(PEAK_BUFFER_HANDLE bufferHandle, uint64_t *chunkLayoutId)
Asks the given buffer for its chunk layout ID.
#define PEAK_C_ABI_PREFIX
Definition peak_dll_defines.h:16
The struct returned by all raw information functions.
Definition peak_common_structs.hpp:25