ifw-ccf 6.0.0
 
Loading...
Searching...
No Matches
defines.hpp
Go to the documentation of this file.
1
6
7#ifndef CCF_PROTOCOLS_ARAVIS_LIB_DEFINES_HPP_H_
8#define CCF_PROTOCOLS_ARAVIS_LIB_DEFINES_HPP_H_
9
10#include <cstdint>
11
12#include <arv.h>
13#include <arvstream.h>
14
16
17
19
23
24 inline std::string SetupKey(const std::vector<std::string>& names) {
25 if (names.size() == 0) {
26 CCFTHROW("No names given");
27 }
28 std::string name;
29 if (names[0] != GetSetup().GetRootNodeName()) {
30 name += (GetSetup().GetRootNodeName() + ".");
31 }
32 for (auto it : names) {
33 name += (it + ".");
34 }
35 return name.substr(0, name.size() - 1);
36 }
37
39 const auto ARAVIS_INFINITE = 0xFFFFFFFF;
40
42 typedef struct {
43 // In:
44 ArvBuffer* aravis_buffer; // Object from Aravis. Shall be deleted.
45 const void* image_buffer; // Buffer for image/pixel data.
46 unsigned long image_buffer_size; // Size of ImageBuffer in bytes
47
48 void* ancillary_buffer; // NOT USED
49 // Camera Firmware >= 1.42 Only.
50 // Buffer to capture ancillary chunk mode data. See ChunkModeActive attr.
51 // This MUST be 0 if not in use.
52 // Chunk mode format:
53 // [Bytes 1 - 4] acquisition count.
54 // [Bytes 5 - 8] EF lens settings.
55 // [Bytes 9 - 12] exposure value.
56 // [Bytes 13 - 16] gain value.
57 // [Bytes 17 - 18] sync in levels.
58 // [Bytes 19 - 20] sync out levels.
59 // [Bytes 21 - 40] not implemented. 0.
60 // [Bytes 41 - 44] chunk ID. 1000.
61 // [Bytes 45 - 48] chunk length.
62
63 unsigned long ancillary_buffer_size; // Size of your ancillary buffer in bytes.
64 // See NonImagePayloadSize attr.
65 // Set to 0 for no buffer.
66
67 // Out:
68 ArvBufferStatus status; // Status of this frame
69 ArvBufferPayloadType payload; // Type of payload
70 ArvPixelFormat pixel_format; // Pixel format
71 uint64_t frame_id; // Frame ID
72 int64_t image_size; // Image size, in bytes
73 uint32_t ancillary_size; // Ancillary data size, in bytes
74 uint32_t bit_depth; // Number of significant bits
75 uint32_t frame_count; // Frame counter. Uses 16bit GigEVision BlockID. Rolls at 65535.
76
77 int32_t width; // Image width
78 int32_t height; // Image height
79 uint32_t offset_x; // Start of readout region (left)
80 uint32_t offset_y; // Start of readout region (top)
81
82 // cppcheck complains about storing a double in a struct which is memset
83 // so the timestamp is split into two unsigned ints
84 uint32_t timestamp_secs; // Time stamp in seconds
85 uint32_t timestamp_frac; // Fractional value of time stamp
86
87} ArvFrame;
88
101
103typedef struct {
104 ArvDatatype data_type; // Data type
105 unsigned long flags; // Currently not used
106 gint64 int_max;
107 gint64 int_min;
108 double float_max;
109 double float_min;
111
112}
113
114#endif // CCF_PROTOCOLS_ARAVIS_LIB_DEFINES_HPP_H_
#define CCFTHROW(msg)
Definition base.hpp:399
Global setup class for CCF applications. An Initialisation Setup, containing all the parameters shall...
Definition setup.hpp:24
static Setup & Instance()
Return reference to unique instance of the application class.
Definition setup.cpp:14
const std::string & GetRootNodeName() const
Return the name of the setup document root node name.
Definition setup.cpp:313
Definition comAdptAravis.cpp:30
ArvDatatype
Aravis data types defined.
Definition defines.hpp:90
@ ARV_DATA_TYPE_COMMAND
Definition defines.hpp:92
@ ARV_DATA_TYPE_INTEGER
Definition defines.hpp:95
@ _ARV_DATA_TYPE_FORCE_32
Definition defines.hpp:99
@ ARV_DATA_TYPE_BOOLEAN
Definition defines.hpp:94
@ ARV_DATA_TYPE_UNKNOWN
Definition defines.hpp:91
@ ARV_DATA_TYPE_FLOAT
Definition defines.hpp:97
@ ARV_DATA_TYPE_ENUM
Definition defines.hpp:93
@ ARV_DATA_TYPE_STRING
Definition defines.hpp:96
std::string SetupKey(const std::vector< std::string > &names)
Definition defines.hpp:24
ifw::ccf::common::Setup & GetSetup()
Definition defines.hpp:20
const auto ARAVIS_INFINITE
Never timeout.
Definition defines.hpp:39
Aravis attribute info.
Definition defines.hpp:103
ArvDatatype data_type
Definition defines.hpp:104
double float_min
Definition defines.hpp:109
unsigned long flags
Definition defines.hpp:105
double float_max
Definition defines.hpp:108
gint64 int_min
Definition defines.hpp:107
gint64 int_max
Definition defines.hpp:106
Image in which to store frames received.
Definition defines.hpp:42
int64_t image_size
Definition defines.hpp:72
unsigned long ancillary_buffer_size
Definition defines.hpp:63
unsigned long image_buffer_size
Definition defines.hpp:46
uint32_t bit_depth
Definition defines.hpp:74
uint32_t timestamp_frac
Definition defines.hpp:85
uint32_t ancillary_size
Definition defines.hpp:73
int32_t width
Definition defines.hpp:77
const void * image_buffer
Definition defines.hpp:45
void * ancillary_buffer
Definition defines.hpp:48
ArvBufferStatus status
Definition defines.hpp:68
ArvPixelFormat pixel_format
Definition defines.hpp:70
uint32_t timestamp_secs
Definition defines.hpp:84
uint32_t offset_y
Definition defines.hpp:80
ArvBufferPayloadType payload
Definition defines.hpp:69
uint32_t offset_x
Definition defines.hpp:79
uint32_t frame_count
Definition defines.hpp:75
uint64_t frame_id
Definition defines.hpp:71
ArvBuffer * aravis_buffer
Definition defines.hpp:44
int32_t height
Definition defines.hpp:78