mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-30 18:02:23 +02:00
Seems compiling and no crash
This commit is contained in:
@@ -5,8 +5,8 @@ target_include_directories(jfj-combined-lib PUBLIC include/)
|
||||
target_link_libraries(jfj-combined-lib external core-buffer-lib)
|
||||
|
||||
add_executable(jfj-combined src/main.cpp)
|
||||
set_target_properties(jfj-combined PROPERTIES OUTPUT_NAME jf_combined)
|
||||
target_link_libraries(jfj-combined jfj-combined-lib zmq rt)
|
||||
set_target_properties(jfj-combined PROPERTIES OUTPUT_NAME jfj_combined)
|
||||
target_link_libraries(jfj-combined jfj-combined-lib zmq rt pthread)
|
||||
|
||||
enable_testing()
|
||||
add_subdirectory(test/)
|
||||
|
||||
@@ -87,7 +87,7 @@ uint64_t JfjFrameWorker::get_frame_from_udp(ModuleFrame& metadata, char* frame_b
|
||||
}
|
||||
|
||||
void JfjFrameWorker::run(){
|
||||
|
||||
std::cout << "Running worker loop" << std::endl;
|
||||
|
||||
// Might be better creating a structure for double buffering
|
||||
ModuleFrame frameMeta;
|
||||
|
||||
@@ -18,7 +18,7 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
|
||||
|
||||
|
||||
std::cout << "Creating frame cache..." << std::endl;
|
||||
FrameCache cache(32, 3, JFJOCH_DATA_BYTES_PER_MODULE, &dummy_sender);
|
||||
|
||||
|
||||
@@ -29,9 +29,15 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
|
||||
|
||||
|
||||
std::cout << "Creating workers..." << std::endl;
|
||||
JfjFrameWorker W0(5005, 0, push_cb);
|
||||
JfjFrameWorker W1(5006, 1, push_cb);
|
||||
JfjFrameWorker W2(5007, 2, push_cb);
|
||||
|
||||
|
||||
std::thread T0(&JfjFrameWorker::run, &W0);
|
||||
|
||||
|
||||
T0.join();
|
||||
std::cout << "Exiting program..." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user