Commit 55d1a182 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

Update filewriter "files/" request, use "status/files" for Eiger2

parent 718534b5
......@@ -154,6 +154,7 @@ namespace eigerapi
FILEWRITER_TIME,
FILEWRITER_BUFFER_FREE,
FILEWRITER_LS,
FILEWRITER_LS2,
STREAM_MODE,
STREAM_HEADER_DETAIL,
HEADER_BEAM_CENTER_X,
......
......@@ -64,6 +64,7 @@ static const char* CSTR_EIGERCONFIG = "config";
static const char* CSTR_EIGERSTATUS = "status";
static const char* CSTR_EIGERSTATUS_BOARD = "status/board_000";
static const char* CSTR_EIGERCOMMAND = "command";
static const char* CSTR_EIGERFILES = "files";
static const char* CSTR_SUBSYSTEMFILEWRITER = "filewriter";
static const char* CSTR_SUBSYSTEMSTREAM = "stream";
static const char* CSTR_SUBSYSTEMDETECTOR = "detector";
......@@ -162,7 +163,8 @@ ParamIndex ParamDescription[] = {
{Requests::FILEWRITER_ERROR, {"error", CSTR_SUBSYSTEMFILEWRITER, CSTR_EIGERSTATUS}},
{Requests::FILEWRITER_TIME, {"time", CSTR_SUBSYSTEMFILEWRITER, CSTR_EIGERSTATUS}},
{Requests::FILEWRITER_BUFFER_FREE, {"buffer_free", CSTR_SUBSYSTEMFILEWRITER, CSTR_EIGERSTATUS}},
{Requests::FILEWRITER_LS, {"files", CSTR_SUBSYSTEMFILEWRITER,NULL}},
{Requests::FILEWRITER_LS, {"", CSTR_SUBSYSTEMFILEWRITER, CSTR_EIGERFILES}},
{Requests::FILEWRITER_LS2, {"files", CSTR_SUBSYSTEMFILEWRITER, CSTR_EIGERSTATUS}},
// Stream settings
{Requests::STREAM_MODE, {"mode", CSTR_SUBSYSTEMSTREAM}},
{Requests::STREAM_HEADER_DETAIL, {"header_detail", CSTR_SUBSYSTEMSTREAM}},
......
......@@ -259,6 +259,12 @@ SavingCtrlObj::_PollingThread::~_PollingThread()
void SavingCtrlObj::_PollingThread::threadFunction()
{
DEB_MEMBER_FUNCT();
Camera::ApiGeneration api;
m_saving.m_cam.getApiGeneration(api);
Requests::PARAM_NAME ls_name = ((api == Camera::Eiger1) ? Requests::FILEWRITER_LS :
Requests::FILEWRITER_LS2);
AutoMutex lock(m_saving.m_cond.mutex());
while(!m_saving.m_quit)
......@@ -288,7 +294,7 @@ void SavingCtrlObj::_PollingThread::threadFunction()
Requests::Param::Value files;
//Ls request
std::shared_ptr<Requests::Param> ls_req =
m_requests->get_param(Requests::FILEWRITER_LS);
m_requests->get_param(ls_name);
try
{
files = ls_req->get();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment