EasyManua.ls Logo

Euresys Coaxlink - Relevant Files

Euresys Coaxlink
45 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Coaxlink Programmer's Guide Euresys::EGrabber
int main() {
try {
EGenTL gentl;
MyGrabber grabber(gentl);
while (true) {
}
} catch (const std::exception &e) {
std::cout << "error: " << e.what() << std::endl;
}
}
1. In onNewBufferEvent, create a temporary ScopedBuffer object buf. The ScopedBuffer constructor
takes two arguments:
the grabber owning the buffer: since we are in a class derived from EGrabber, we simply pass *this;
information about the buffer: this is provided in data.
2. Retrieve the timestamp of the buffer, which is defined as the time at which the camera started to send data to
the frame grabber.
3. As explained in the section about event identification, new buffer events are slightly different from the other kinds
of events: they are standard (as per GenTL), and don't have an associated numid.
As a consequence, the NewBufferData structure passed to onNewBufferEvent doesn't have a numid field. It
does, however, have a timestamp field indicating the time at which the driver was notified that data transfer to
the buffer was complete. This event timestamp is inevitably greater than the buffer timestamp retrieved in step 2.
4. We reach the end of the block where the local variable buf has been created. It gets out of scope and is destroyed:
the ScopedBuffer destructor is called. This causes the GenTL buffer contained in buf to be re-queued (given
back) to the data stream of the grabber.
Example of program output:
event timestamp: 77185931621 us, buffer timestamp: 77185919807 us
event timestamp: 77185951618 us, buffer timestamp: 77185939809 us
event timestamp: 77185971625 us, buffer timestamp: 77185959810 us
event timestamp: 77185991611 us, buffer timestamp: 77185979812 us
event timestamp: 77186011605 us, buffer timestamp: 77185999808 us
event timestamp: 77186031622 us, buffer timestamp: 77186019809 us
event timestamp: 77186051614 us, buffer timestamp: 77186039810 us
event timestamp: 77186071611 us, buffer timestamp: 77186059811 us
event timestamp: 77186091602 us, buffer timestamp: 77186079812 us
event timestamp: 77186111607 us, buffer timestamp: 77186099814 us
Relevant files
include/EGrabber.h
Main header. Includes all the other headers except include/RGBConverter.h. Defines
Euresys::EGrabber, Euresys::Buffer, Euresys::ScopedBuffer
include/EGrabberTypes.h
Defines data types related to Euresys::EGrabber
include/EGenTL.h
Defines Euresys::EGenTL
include/GenTL_v1_5.h
Standard GenTL header. Defines standard types, functions and constants
include/GenTL_v1_5_EuresysCustom.h
Defines Coaxlink-specific constants
include/RGBConverter.h
Defines Euresys::RGBConverter helper class
24

Related product manuals