bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
DebugFunctions.h
1// DebugFunctions.h
2
3// This file is part of bes, A C++ back-end server implementation framework
4// for the OPeNDAP Data Access Protocol.
5
6// Copyright (c) 2013 OPeNDAP, Inc.
7// Author: Nathan Potter <ndp@opendap.org>
8//
9// This library is free software; you can redistribute it and/or
10// modify it under the terms of the GNU Lesser General Public
11// License as published by the Free Software Foundation; either
12// version 2.1 of the License, or (at your option) any later version.
13//
14// This library 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 GNU
17// Lesser General Public License for more details.
18//
19// You should have received a copy of the GNU Lesser General Public
20// License along with this library; if not, write to the Free Software
21// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22//
23// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
24
25#ifndef DEBUGFUNCTIONS_H_
26#define DEBUGFUNCTIONS_H_
27
28#include <stdlib.h>
29
30#include <libdap/BaseType.h>
31#include <libdap/DDS.h>
32#include <libdap/ServerFunction.h>
33#include "BESAbstractModule.h"
34
35namespace debug_function {
36
37
38class DebugFunctions: public BESAbstractModule {
39public:
40 DebugFunctions()
41 {
42 }
43 virtual ~DebugFunctions()
44 {
45 }
46 virtual void initialize(const string &modname);
47 virtual void terminate(const string &modname);
48
49 virtual void dump(ostream &strm) const;
50};
51
52
53
54
55
56/*****************************************************************************************
57 *
58 * Abort Function (Debug Functions)
59 *
60 * This server side function calls abort(). (boom)
61 *
62 */
63void abort_ssf(int argc, libdap::BaseType * argv[], libdap::DDS &dds, libdap::BaseType **btpp);
64class AbortFunc: public libdap::ServerFunction {
65public:
66 AbortFunc();
67 virtual ~AbortFunc(){}
68};
69
70/*****************************************************************************************
71 *
72 * Sleep Function (Debug Functions)
73 *
74 * This server side function calls sleep() for the number
75 * of millisecs passed in at argv[0]. (Zzzzzzzzzzzzzzz)
76 *
77 */
78void sleep_ssf(int argc, libdap::BaseType * argv[], libdap::DDS &dds, libdap::BaseType **btpp);
79class SleepFunc: public libdap::ServerFunction {
80public:
81 SleepFunc();
82 virtual ~SleepFunc(){}
83};
84
85
86/*****************************************************************************************
87 *
88 * SumUntil Function (Debug Functions)
89 *
90 * This server side function computes a sum until a the amount of
91 * of millisecs passed in at argv[0] has transpired. (++++++)
92 *
93 */
94void sum_until_ssf(int argc, libdap::BaseType * argv[], libdap::DDS &dds, libdap::BaseType **btpp);
95class SumUntilFunc: public libdap::ServerFunction {
96public:
97 SumUntilFunc();
98 virtual ~SumUntilFunc(){}
99
100};
101
102
103/*****************************************************************************************
104 *
105 * Error Function (Debug Functions)
106 *
107 * This server side function calls calls sleep() for the number
108 * of ms passed in at argv[0]. (Zzzzzzzzzzzzzzz)
109 *
110 */
111void error_ssf(int argc, libdap::BaseType * argv[], libdap::DDS &dds, libdap::BaseType **btpp);
112class ErrorFunc: public libdap::ServerFunction {
113public:
114 ErrorFunc();
115 virtual ~ErrorFunc(){}
116};
117
118} // namespace debug
119#endif /* DEBUGFUNCTIONS_H_ */
virtual void dump(ostream &strm) const
dumps information about this object
STL class.