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
00041 namespace rcg
00042 {
00043
00044 class Stream;
00045 class GenTLWrapper;
00046
00052 enum PAYLOADTYPE_INFO_IDS
00053 {
00054 PAYLOAD_TYPE_UNKNOWN = 0,
00055 PAYLOAD_TYPE_IMAGE = 1,
00056 PAYLOAD_TYPE_RAW_DATA = 2,
00057 PAYLOAD_TYPE_FILE = 3,
00058 PAYLOAD_TYPE_CHUNK_DATA = 4,
00059 PAYLOAD_TYPE_JPEG = 5,
00060 PAYLOAD_TYPE_JPEG2000 = 6,
00061 PAYLOAD_TYPE_H264 = 7,
00062 PAYLOAD_TYPE_CHUNK_ONLY = 8,
00063 PAYLOAD_TYPE_DEVICE_SPECIFIC = 9,
00064 PAYLOAD_TYPE_MULTI_PART = 10,
00065
00066 PAYLOAD_TYPE_CUSTOM_ID = 1000
00067 };
00068
00074 enum PIXELFORMAT_NAMESPACE_IDS
00075 {
00076 PIXELFORMAT_NAMESPACE_UNKNOWN = 0,
00077 PIXELFORMAT_NAMESPACE_GEV = 1,
00078 PIXELFORMAT_NAMESPACE_IIDC = 2,
00079 PIXELFORMAT_NAMESPACE_PFNC_16BIT = 3,
00080 PIXELFORMAT_NAMESPACE_PFNC_32BIT = 4,
00081
00082 PIXELFORMAT_NAMESPACE_CUSTOM_ID = 1000
00083 };
00084
00091 class Buffer
00092 {
00093 public:
00094
00100 Buffer(const std::shared_ptr<const GenTLWrapper> &gentl, Stream *parent);
00101
00107 void setHandle(void *handle);
00108
00115 std::shared_ptr<Stream> getParent() const;
00116
00123 void *getBase() const;
00124
00131 size_t getSize() const;
00132
00139 void *getUserPtr() const;
00140
00147 uint64_t getTimestamp() const;
00148
00156 bool getNewData() const;
00157
00165 bool getIsQueued() const;
00166
00174 bool getIsAcquiring() const;
00175
00183 bool getIsIncomplete() const;
00184
00192 std::string getTLType() const;
00193
00202 size_t getSizeFilled() const;
00203
00204 size_t getWidth() const;
00205 size_t getHeight() const;
00206 size_t getXOffset() const;
00207 size_t getYOffset() const;
00208 size_t getXPadding() const;
00209 size_t getYPadding() const;
00210 uint64_t getFrameID() const;
00211 bool getImagePresent() const;
00212 size_t getImageOffset() const;
00213 size_t getPayloadType() const;
00214 uint64_t getPixelFormat() const;
00215 uint64_t getPixelFormatNamespace() const;
00216 size_t getDeliveredImageHeight() const;
00217 size_t getDeliveredChunkPayloadSize() const;
00218 uint64_t getChunkLayoutID() const;
00219 std::string getFilename() const;
00220 bool isBigEndian() const;
00221 size_t getDataSize() const;
00222 uint64_t getTimestampNS() const;
00223 bool getDataLargerThanBuffer() const;
00224 bool getContainsChunkdata() const;
00225
00232 void *getHandle() const;
00233
00234 private:
00235
00236 Buffer(class Buffer &);
00237 Buffer &operator=(const Buffer &);
00238
00239 Stream *parent;
00240 std::shared_ptr<const GenTLWrapper> gentl;
00241 void *buffer;
00242 };
00243
00244 bool isHostBigEndian();
00245
00246 }
00247
00248 #endif