Source
xxxxxxxxxx
void DisplayLineScatterError(std::shared_ptr<plotter_t> plotter, casacore::String &plottype, casacore::Vector<casacore::Float> &xdata, casacore::Vector<casacore::Float> &ydata, casacore::String &errortype, casacore::Vector<casacore::Float> &error, casacore::String label, casacore::String color, int frame);
//# FlagAgentDisplay.h: This file contains the interface definition of the FlagAgentDisplay class.
//#
//# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
//# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved.
//# Copyright (C) European Southern Observatory, 2011, All rights reserved.
//#
//# This library is free software; you can redistribute it and/or
//# modify it under the terms of the GNU Lesser General Public
//# License as published by the Free software Foundation; either
//# version 2.1 of the License, or (at your option) any later version.
//#
//# This library is distributed in the hope that it will be useful,
//# but WITHOUT ANY WARRANTY, without even the implied warranty of
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
//# Lesser General Public License for more details.
//#
//# You should have received a copy of the GNU Lesser General Public
//# License along with this library; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
//# MA 02111-1307 USA
//# $Id: $
namespace casa { //# NAMESPACE CASA - BEGIN
struct grpcFlagAgentState {
grpcFlagAgentState( );
// GUI parameters
std::string userChoice_p;
std::string userFixA1_p, userFixA2_p;
casacore::Int skipScan_p, skipSpw_p, skipField_p;
std::string antenna1_p;
std::string antenna2_p;
std::mutex set_values; // protect state within object
bool input_received; // state object has received input
bool input_needed; // chaged to true when the controlling
// thread is waiting for input
std::promise<bool> output; // control thread needs input
};
class grpcFlagAgentResponse : public ::rpc::gui::plotserver_events::Service {
public:
grpcFlagAgentResponse( std::shared_ptr<grpcFlagAgentState> s ) : state(s) { }
::grpc::Status button( ::grpc::ServerContext *context,
const ::rpc::gui::ButtonEvent *req,
::google::protobuf::Empty* );
::grpc::Status check( ::grpc::ServerContext *context,
const ::rpc::gui::CheckEvent *req,
::google::protobuf::Empty* );
::grpc::Status radio( ::grpc::ServerContext *context,
const ::rpc::gui::RadioEvent *req,
::google::protobuf::Empty* );
::grpc::Status linetext( ::grpc::ServerContext *context,
const ::rpc::gui::LineTextEvent *req,
::google::protobuf::Empty* );
::grpc::Status slidevalue( ::grpc::ServerContext *context,
const ::rpc::gui::SlideValueEvent *req,
::google::protobuf::Empty* );
::grpc::Status exiting( ::grpc::ServerContext *context,
const ::google::protobuf::Empty*,
::google::protobuf::Empty* );
::grpc::Status closing( ::grpc::ServerContext *context,
const ::rpc::gui::ClosingEvent *req,
::google::protobuf::Empty* );
protected:
std::shared_ptr<grpcFlagAgentState> state;
};
class FlagAgentDisplay : public FlagAgentBase {
public:
FlagAgentDisplay(FlagDataHandler *dh, casacore::Record config, casacore::Bool writePrivateFlagCube = false);
~FlagAgentDisplay();
// Make plots and either display or write to a file
casacore::Bool displayReports(FlagReport &combinedReport);
// Get a report/summary
FlagReport getReport();