RaptorEagleCCD::_cameraStatus is now usefull

This commit is contained in:
Timur A. Fatkhullin 2024-12-19 08:31:55 +03:00
parent 3fee70b445
commit 50e457f046
3 changed files with 9 additions and 9 deletions

View File

@ -1178,8 +1178,8 @@ void RaptorEagleCCD::initAttrComm()
addAttribute( addAttribute(
CAMERA_ATTR_CAMERA_STATUS, CAMERA_ATTR_CAMERA_STATUS,
[this]() { [this]() {
logTrace("Return current camera status as {}", _cameraStatus); logTrace("Return current camera status as {}", _cameraStatus.load());
return _cameraStatus; return _cameraStatus.load();
}, },
[this](const std::string_view& status) { [this](const std::string_view& status) {
logDebug("Try to set current status to {}", status); logDebug("Try to set current status to {}", status);
@ -1191,7 +1191,7 @@ void RaptorEagleCCD::initAttrComm()
} }
_cameraStatus = status; _cameraStatus = status;
logDebug("Camera status is {}", _cameraStatus); logDebug("Camera status is {}", _cameraStatus.load());
}, },
adc::utils::AdcDefaultValueConverter<>::serialize<attribute_t::serialized_t, std::string_view>, adc::utils::AdcDefaultValueConverter<>::serialize<attribute_t::serialized_t, std::string_view>,
[&comp_case_ignore](const attribute_t::serialized_t& v) { [&comp_case_ignore](const attribute_t::serialized_t& v) {

View File

@ -246,11 +246,11 @@ private:
// attributes inner variables // attributes inner variables
std::atomic_size_t _frameNumbers; std::atomic_size_t _frameNumbers;
std::string _currentFitsFile; // current acquisition FITS filename std::string _currentFitsFile; // current acquisition FITS filename
std::string _currentTemplateFile; // CFITSIO template filename std::string _currentTemplateFile; // CFITSIO template filename
std::vector<std::string> _currentFitsKeywords{}; // current acquisition FITS keywords std::vector<std::string> _currentFitsKeywords{}; // current acquisition FITS keywords
std::vector<std::string> _permanentFitsKeywords{}; // permanent user FITS keywords std::vector<std::string> _permanentFitsKeywords{}; // permanent user FITS keywords
std::string_view _cameraStatus = CAMERA_ATTR_CAMERA_STATUS_IDLE; // camera current status std::atomic<std::string_view> _cameraStatus = CAMERA_ATTR_CAMERA_STATUS_IDLE; // camera current status
// std::list<std::unique_ptr<ushort>> _acqRingBuffer; // std::list<std::unique_ptr<ushort>> _acqRingBuffer;
std::list<std::pair<std::unique_ptr<ushort>, size_t>> _acqRingBuffer; std::list<std::pair<std::unique_ptr<ushort>, size_t>> _acqRingBuffer;

View File

@ -16,7 +16,7 @@ int main(int argc, char* argv[])
int exit_code = 0; int exit_code = 0;
asio::io_context ctx; asio::io_context ctx;
std::vector<std::thread> threads; std::vector<std::thread> threads;
std::size_t Nthreads = 2; std::size_t Nthreads = 3;
/* COMMANDLINE OPTS */ /* COMMANDLINE OPTS */
cxxopts::Options options(argv[0], "ADC-library test device network server (ASIO implementation)\n"); cxxopts::Options options(argv[0], "ADC-library test device network server (ASIO implementation)\n");