nidas  v1.2-1520
DSMServerIntf.h
Go to the documentation of this file.
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2 // vim: set shiftwidth=4 softtabstop=4 expandtab:
3 /*
4  ********************************************************************
5  ** NIDAS: NCAR In-situ Data Acquistion Software
6  **
7  ** 2005, Copyright University Corporation for Atmospheric Research
8  **
9  ** This program is free software; you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation; either version 2 of the License, or
12  ** (at your option) any later version.
13  **
14  ** This program is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** The LICENSE.txt file accompanying this software contains
20  ** a copy of the GNU General Public License. If it is not found,
21  ** write to the Free Software Foundation, Inc.,
22  ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  **
24  ********************************************************************
25 */
26 
27 #ifndef NIDAS_CORE_DSMSERVERINTF_H
28 #define NIDAS_CORE_DSMSERVERINTF_H
29 
30 #include <iostream>
31 #include "XmlRpcThread.h"
32 
33 namespace nidas { namespace core {
34 
35 using namespace XmlRpc;
36 
37 class DSMServer;
38 
44 {
45 public:
46  DSMServerIntf() : XmlRpcThread("DSMServerIntf"),_server(0) {}
47 
49  {
50  _server = val;
51  }
52 
58  {
59  return _server;
60  }
61 
62  int run() throw(nidas::util::Exception);
63 
64 private:
65 
70 
74  DSMServerIntf& operator=(const DSMServerIntf&);
75 
76  DSMServer* _server;
77 
78 };
79 
81 class GetDsmList : public XmlRpcServerMethod
82 {
83 public:
84  GetDsmList(XmlRpcServer* s,DSMServerIntf* intf) :
85  XmlRpcServerMethod("GetDsmList", s),_serverIntf(intf) {}
86  void execute(XmlRpcValue& params, XmlRpcValue& result);
87  std::string help() { return std::string("help GetDsmList"); }
88 private:
89  DSMServerIntf* _serverIntf;
90 
94  GetDsmList(const GetDsmList&);
95 
99  GetDsmList& operator=(const GetDsmList&);
100 
101 };
102 
104 class GetAdsFileName : public XmlRpcServerMethod
105 {
106 public:
107  GetAdsFileName(XmlRpcServer* s,DSMServerIntf* intf) :
108  XmlRpcServerMethod("GetAdsFileName", s),_serverIntf(intf) {}
109  void execute(XmlRpcValue& params, XmlRpcValue& result);
110  std::string help() { return std::string("help GetAdsFileName"); }
111 private:
113 
118 
122  GetAdsFileName& operator=(const GetAdsFileName&);
123 };
124 
125 }} // namespace nidas namespace core
126 
127 #endif
DSMServerIntf()
Definition: DSMServerIntf.h:46
void setDSMServer(DSMServer *val)
Definition: DSMServerIntf.h:48
GetAdsFileName(XmlRpcServer *s, DSMServerIntf *intf)
Definition: DSMServerIntf.h:107
DSMServer * getDSMServer()
The DSMServer is valid once the Project document has been parsed and an appropriate DSMServer is foun...
Definition: DSMServerIntf.h:57
gets a list of DSMs and their locations from the configuration
Definition: DSMServerIntf.h:81
std::string help()
Definition: DSMServerIntf.h:110
GetDsmList(XmlRpcServer *s, DSMServerIntf *intf)
Definition: DSMServerIntf.h:84
gets the name of the current .ads file
Definition: DSMServerIntf.h:104
std::string help()
Definition: DSMServerIntf.h:87
DSMServerIntf * _serverIntf
Definition: DSMServerIntf.h:89
DSMServerIntf * _serverIntf
Definition: DSMServerIntf.h:112
A thread that provides XML-based Remote Procedure Calls to web interfaces from the DSMServer...
Definition: DSMServerIntf.h:43
A thread that provides XML-based Remote Procedure Calls to web interfaces.
Definition: XmlRpcThread.h:39
A provider of services to a DSM.
Definition: DSMServer.h:50