Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef RC_GENICAM_API_BUFFER
00037 #define RC_GENICAM_API_BUFFER
00038
00039 #include <memory>
00040 #include <string>
00041
00042 namespace rcg
00043 {
00044
00045 class Stream;
00046 class GenTLWrapper;
00047
00053 enum PAYLOADTYPE_INFO_IDS
00054 {
00055 PAYLOAD_TYPE_UNKNOWN = 0,
00056 PAYLOAD_TYPE_IMAGE = 1,
00057 PAYLOAD_TYPE_RAW_DATA = 2,
00058 PAYLOAD_TYPE_FILE = 3,
00059 PAYLOAD_TYPE_CHUNK_DATA = 4,
00060 PAYLOAD_TYPE_JPEG = 5,
00061 PAYLOAD_TYPE_JPEG2000 = 6,
00062 PAYLOAD_TYPE_H264 = 7,
00063 PAYLOAD_TYPE_CHUNK_ONLY = 8,
00064 PAYLOAD_TYPE_DEVICE_SPECIFIC = 9,
00065 PAYLOAD_TYPE_MULTI_PART = 10,
00066
00067 PAYLOAD_TYPE_CUSTOM_ID = 1000
00068 };
00069
00075 enum PIXELFORMAT_NAMESPACE_IDS
00076 {
00077 PIXELFORMAT_NAMESPACE_UNKNOWN = 0,
00078 PIXELFORMAT_NAMESPACE_GEV = 1,
00079 PIXELFORMAT_NAMESPACE_IIDC = 2,
00080 PIXELFORMAT_NAMESPACE_PFNC_16BIT = 3,
00081 PIXELFORMAT_NAMESPACE_PFNC_32BIT = 4,
00082
00083 PIXELFORMAT_NAMESPACE_CUSTOM_ID = 1000
00084 };
00085
00091 enum PARTDATATYPE_IDS
00092 {
00093 PART_DATATYPE_UNKNOWN = 0,
00094 PART_DATATYPE_2D_IMAGE = 1,
00095 PART_DATATYPE_2D_PLANE_BIPLANAR = 2,
00096 PART_DATATYPE_2D_PLANE_TRIPLANAR = 3,
00097 PART_DATATYPE_2D_PLANE_QUADPLANAR = 4,
00098 PART_DATATYPE_3D_IMAGE = 5,
00099 PART_DATATYPE_3D_PLANE_BIPLANAR = 6,
00100 PART_DATATYPE_3D_PLANE_TRIPLANAR = 7,
00101 PART_DATATYPE_3D_PLANE_QUADPLANAR = 8,
00102 PART_DATATYPE_CONFIDENCE_MAP = 9,
00103 PART_DATATYPE_CHUNKDATA = 10,
00104
00105 PART_DATATYPE_CUSTOM_ID = 1000
00106 };
00107
00115 class Buffer
00116 {
00117 public:
00118
00124 Buffer(const std::shared_ptr<const GenTLWrapper> &gentl, Stream *parent);
00125
00133 void setHandle(void *handle);
00134
00142 std::uint32_t getNumberOfParts() const;
00143
00150 void *getGlobalBase() const;
00151
00158 size_t getGlobalSize() const;
00159
00166 void *getBase(std::uint32_t part) const;
00167
00174 size_t getSize(std::uint32_t part) const;
00175
00182 void *getUserPtr() const;
00183
00190 uint64_t getTimestamp() const;
00191
00199 bool getNewData() const;
00200
00208 bool getIsQueued() const;
00209
00217 bool getIsAcquiring() const;
00218
00226 bool getIsIncomplete() const;
00227
00234 std::string getTLType() const;
00235
00244 size_t getSizeFilled() const;
00245
00253 size_t getPartDataType(uint32_t part) const;
00254
00262 size_t getWidth(std::uint32_t part) const;
00263
00271 size_t getHeight(std::uint32_t part) const;
00272
00281 size_t getXOffset(std::uint32_t part) const;
00282
00291 size_t getYOffset(std::uint32_t part) const;
00292
00300 size_t getXPadding(std::uint32_t part) const;
00301
00308 size_t getYPadding() const;
00309
00317 uint64_t getFrameID() const;
00318
00326 bool getImagePresent(std::uint32_t part) const;
00327
00334 size_t getPayloadType() const;
00335
00345 uint64_t getPixelFormat(std::uint32_t part) const;
00346
00355 uint64_t getPixelFormatNamespace(std::uint32_t part) const;
00356
00365 uint64_t getPartSourceID(std::uint32_t part) const;
00366
00376 size_t getDeliveredImageHeight(std::uint32_t part) const;
00377
00384 size_t getDeliveredChunkPayloadSize() const;
00385
00394 uint64_t getChunkLayoutID() const;
00395
00402 std::string getFilename() const;
00403
00410 bool isBigEndian() const;
00411
00421 size_t getDataSize() const;
00422
00429 uint64_t getTimestampNS() const;
00430
00437 bool getDataLargerThanBuffer() const;
00438
00445 bool getContainsChunkdata() const;
00446
00453 void *getHandle() const;
00454
00455 private:
00456
00457 Buffer(class Buffer &);
00458 Buffer &operator=(const Buffer &);
00459
00460 Stream *parent;
00461 std::shared_ptr<const GenTLWrapper> gentl;
00462 void *buffer;
00463 bool multipart;
00464 };
00465
00466 bool isHostBigEndian();
00467
00468 }
00469
00470 #endif