Skip to content

Commit

Permalink
add CommandAcquisitionModeContdStart();
Browse files Browse the repository at this point in the history
  • Loading branch information
Fixstars-momoko committed Aug 30, 2024
1 parent fa462d3 commit 9061bb0
Showing 1 changed file with 21 additions and 52 deletions.
73 changes: 21 additions & 52 deletions src/bb/image-io/rt_u3v.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,23 @@ class U3V {
return err_;
}

GError* CommandAcquisitionModeContdStart(){
for (auto i=0; i<devices_.size(); ++i) {
arv_device_set_string_feature_value(devices_[i].device_, "AcquisitionMode", arv_acquisition_mode_to_string(ARV_ACQUISITION_MODE_CONTINUOUS), &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode");

arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart");
}
return err_;
}

g_object_unref_t g_object_unref;

arv_get_major_version_t arv_get_major_version;
Expand Down Expand Up @@ -1059,19 +1076,7 @@ class U3VRealCam: public U3V{
* refer to https://github.com/AravisProject/aravis/blob/2ebaa8661761ea4bbc4df878aa67b4a9e1a9a3b9/docs/reference/aravis/porting-0.10.md
*/
if (order_filp_){
for (auto i=0; i<devices_.size(); ++i) {
arv_device_set_string_feature_value(devices_[i].device_, "AcquisitionMode", arv_acquisition_mode_to_string(ARV_ACQUISITION_MODE_CONTINUOUS), &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode");

arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart");
}
err_ = CommandAcquisitionModeContdStart();
}
//start streaming after AcquisitionStart
for (auto i=0; i<devices_.size(); ++i) {
Expand All @@ -1085,19 +1090,7 @@ class U3VRealCam: public U3V{
}

if (! order_filp_){
for (auto i=0; i<devices_.size(); ++i) {
arv_device_set_string_feature_value(devices_[i].device_, "AcquisitionMode", arv_acquisition_mode_to_string(ARV_ACQUISITION_MODE_CONTINUOUS), &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode");

arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart");
}
err_ = CommandAcquisitionModeContdStart();
}

for (auto i=0; i<devices_.size(); ++i) {
Expand Down Expand Up @@ -1570,19 +1563,7 @@ class U3VGenDC: public U3V{
* refer to https://github.com/AravisProject/aravis/blob/2ebaa8661761ea4bbc4df878aa67b4a9e1a9a3b9/docs/reference/aravis/porting-0.10.md
*/
if (order_filp_){
for (auto i=0; i<devices_.size(); ++i) {
arv_device_set_string_feature_value(devices_[i].device_, "AcquisitionMode", arv_acquisition_mode_to_string(ARV_ACQUISITION_MODE_CONTINUOUS), &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode");

arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart");
}
err_ = CommandAcquisitionModeContdStart();
}
//start streaming after AcquisitionStart
for (auto i=0; i<devices_.size(); ++i) {
Expand All @@ -1596,19 +1577,7 @@ class U3VGenDC: public U3V{
}

if (! order_filp_){
for (auto i=0; i<devices_.size(); ++i) {
arv_device_set_string_feature_value(devices_[i].device_, "AcquisitionMode", arv_acquisition_mode_to_string(ARV_ACQUISITION_MODE_CONTINUOUS), &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionMode");

arv_device_execute_command(devices_[i].device_, "AcquisitionStart", &err_);
if (err_) {
throw std::runtime_error(err_->message);
}
log::info("\tDevice/USB {}::{} : {}", i, "Command", "AcquisitionStart");
}
err_ = CommandAcquisitionModeContdStart();
}

for (auto i=0; i<devices_.size(); ++i) {
Expand Down

0 comments on commit 9061bb0

Please sign in to comment.