nidas v1.2.3
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
33namespace nidas { namespace core {
34
35using namespace XmlRpc;
36
37class DSMServer;
38
44{
45public:
46 DSMServerIntf() : XmlRpcThread("DSMServerIntf"),_server(0) {}
47
49 {
50 _server = val;
51 }
52
58 {
59 return _server;
60 }
61
65 int run();
66
67private:
68
73
78
80
81};
82
84class GetDsmList : public XmlRpcServerMethod
85{
86public:
87 GetDsmList(XmlRpcServer* s,DSMServerIntf* intf) :
88 XmlRpcServerMethod("GetDsmList", s),_serverIntf(intf) {}
89 void execute(XmlRpcValue& params, XmlRpcValue& result);
90 std::string help() { return std::string("help GetDsmList"); }
91private:
93
98
103
104};
105
107class GetAdsFileName : public XmlRpcServerMethod
108{
109public:
110 GetAdsFileName(XmlRpcServer* s,DSMServerIntf* intf) :
111 XmlRpcServerMethod("GetAdsFileName", s),_serverIntf(intf) {}
112 void execute(XmlRpcValue& params, XmlRpcValue& result);
113 std::string help() { return std::string("help GetAdsFileName"); }
114private:
116
121
126};
127
128}} // namespace nidas namespace core
129
130#endif
A thread that provides XML-based Remote Procedure Calls to web interfaces from the DSMServer.
Definition DSMServerIntf.h:44
DSMServerIntf(const DSMServerIntf &)
No copying.
void setDSMServer(DSMServer *val)
Definition DSMServerIntf.h:48
DSMServerIntf()
Definition DSMServerIntf.h:46
DSMServer * getDSMServer()
The DSMServer is valid once the Project document has been parsed and an appropriate DSMServer is foun...
Definition DSMServerIntf.h:57
int run()
Definition DSMServerIntf.cc:94
DSMServer * _server
Definition DSMServerIntf.h:79
DSMServerIntf & operator=(const DSMServerIntf &)
No assignment.
A provider of services to a DSM.
Definition DSMServer.h:50
gets the name of the current .ads file
Definition DSMServerIntf.h:108
void execute(XmlRpcValue &params, XmlRpcValue &result)
Definition DSMServerIntf.cc:69
GetAdsFileName(XmlRpcServer *s, DSMServerIntf *intf)
Definition DSMServerIntf.h:110
GetAdsFileName(const GetAdsFileName &)
No copying.
GetAdsFileName & operator=(const GetAdsFileName &)
No assignment.
std::string help()
Definition DSMServerIntf.h:113
DSMServerIntf * _serverIntf
Definition DSMServerIntf.h:115
gets a list of DSMs and their locations from the configuration
Definition DSMServerIntf.h:85
GetDsmList(XmlRpcServer *s, DSMServerIntf *intf)
Definition DSMServerIntf.h:87
DSMServerIntf * _serverIntf
Definition DSMServerIntf.h:92
std::string help()
Definition DSMServerIntf.h:90
GetDsmList & operator=(const GetDsmList &)
No assignment.
GetDsmList(const GetDsmList &)
No copying.
void execute(XmlRpcValue &params, XmlRpcValue &result)
Definition DSMServerIntf.cc:51
A thread that provides XML-based Remote Procedure Calls to web interfaces.
Definition XmlRpcThread.h:40
Sample * getSample(sampleType type, unsigned int len)
A convienence method for getting a sample of an enumerated type from a pool.
Definition Sample.cc:70
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31