deployer-funcs.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright (c) 2008 S Roderick <xxxkiwi DOT xxxnet AT macxxx DOT comxxx>
3  (remove the x's above)
4 
5  ***************************************************************************
6  * This library is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU Lesser General Public *
8  * License as published by the Free Software Foundation; either *
9  * version 2.1 of the License, or (at your option) any later version. *
10  * *
11  * This library is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the Free Software *
18  * Foundation, Inc., 59 Temple Place, *
19  * Suite 330, Boston, MA 02111-1307 USA *
20  ***************************************************************************/
21 
22 #ifndef ORO_DEPLOYER_FUNCS_HPP
23 #define ORO_DEPLOYER_FUNCS_HPP
24 
25 #include <string>
26 #include <boost/program_options.hpp>
27 #include <rtt/rtt-config.h>
28 
29 namespace OCL
30 {
31 
53 extern int deployerParseCmdLine(
54  int argc,
55  char** argv,
56  std::string& siteFile,
57  std::vector<std::string>& scriptFiles,
58  std::string& name,
59  bool& requireNameService,
60  bool& deploymentOnlyChecked,
61  int& minNumberCPU,
62  boost::program_options::variables_map& vm,
63  boost::program_options::options_description* otherOptions=NULL);
64 
65 
77 extern int enforceMinNumberCPU(const int minNumberCPU);
78 
79 #ifdef ORO_BUILD_RTALLOC
80 
85 struct memorySize
86 {
87 public:
88  memorySize() :
89  size(0)
90  {}
91  memorySize(size_t s) :
92  size(s)
93  {}
94  size_t size;
95 };
96 
100 inline std::ostream& operator<<(std::ostream& os, memorySize m)
101 {
102  os << m.size;
103  return os;
104 }
105 
108 extern boost::program_options::options_description deployerRtallocOptions(
109  memorySize& rtallocMemorySize);
110 
112 class TLSFMemoryPool
113 {
114 public:
116  TLSFMemoryPool();
118  ~TLSFMemoryPool();
119 
126  bool initialize(const size_t memSize);
127 
131  void shutdown();
132 
133 protected:
135  void* rtMem;
136 };
137 
141 extern void deployerDumpTLSF();
142 
143 #if defined(ORO_BUILD_LOGGING) && defined(OROSEM_LOG4CPP_LOGGING)
144 
146 extern boost::program_options::options_description deployerRttLog4cppOptions(
147  std::string& rttLog4cppConfigFile);
148 
157 extern int deployerConfigureRttLog4cppCategory(const std::string& rttLog4cppConfigFile);
158 
159 #endif
160 
161 #endif
162 
163 // namespace
164 }
165 
166 #endif
std::ostream & operator<<(std::ostream &os, comcol f)
int deployerParseCmdLine(int argc, char **argv, std::string &siteFile, std::vector< std::string > &scriptFiles, std::string &name, bool &requireNameService, bool &deploymentOnlyChecked, int &minNumberCPU, po::variables_map &vm, po::options_description *otherOptions)
int enforceMinNumberCPU(const int minNumberCPU)


ocl
Author(s): OCL Development Team
autogenerated on Mon Mar 23 2020 04:47:19