All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
rc_genicam_api/config.h
Go to the documentation of this file.
1 /*
2  * This file is part of the rc_genicam_api package.
3  *
4  * Copyright (c) 2017 Roboception GmbH
5  * All rights reserved
6  *
7  * Author: Heiko Hirschmueller
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright notice,
16  * this list of conditions and the following disclaimer in the documentation
17  * and/or other materials provided with the distribution.
18  *
19  * 3. Neither the name of the copyright holder nor the names of its contributors
20  * may be used to endorse or promote products derived from this software without
21  * specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  */
35 
36 #ifndef RC_GENICAM_API_CONFIG
37 #define RC_GENICAM_API_CONFIG
38 
39 #include <GenApi/GenApi.h>
40 #include <GenApi/ChunkAdapter.h>
41 
42 #include <memory>
43 #include <string>
44 #include <vector>
45 
46 /*
47  This module provides convenience functions for setting and retrieving values
48  from a GenICam nodemap.
49 */
50 
51 namespace rcg
52 {
53 
65 bool callCommand(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
66  bool exception=false);
67 
80 bool setBoolean(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
81  bool value, bool exception=false);
82 
95 bool setInteger(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
96  int64_t value, bool exception=false);
97 
110 bool setIPV4Address(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
111  const char *value, bool exception);
112 
125 bool setFloat(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
126  double value, bool exception=false);
127 
140 bool setEnum(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
141  const char *value, bool exception=false);
142 
156 size_t setRegister(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
157  const uint8_t *buffer, size_t len, bool exception=false);
158 
174 bool setString(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
175  const char *value, bool exception=false);
176 
188 bool getBoolean(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
189  bool exception=false, bool igncache=false);
190 
207 int64_t getInteger(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
208  int64_t *vmin=0, int64_t *vmax=0, bool exception=false, bool igncache=false);
209 
226 double getFloat(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
227  double *vmin=0, double *vmax=0, bool exception=false, bool igncache=false);
228 
239 std::string getEnum(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
240  bool exception=false);
241 
255 std::string getEnum(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
256  std::vector<std::string> &list, bool exception=false);
257 
273 size_t getRegister(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
274  uint8_t *buffer, size_t len, size_t *total=0, bool exception=false, bool igncache=false);
275 
293 std::string getString(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
294  bool exception=false, bool igncache=false);
295 
306 void checkFeature(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
307  const char *value, bool igncache=false);
308 
328 std::shared_ptr<GenApi::CChunkAdapter> getChunkAdapter(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap,
329  const std::string &tltype);
330 
331 
349 class Buffer;
350 
351 std::string getComponetOfPart(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap,
352  const Buffer *buffer, uint32_t part);
353 
364 std::string loadFile(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
365  bool exception=false);
366 
379 bool saveFile(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
380  const std::string &data, bool exception=false);
381 
392 bool loadStreamableParameters(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
393  bool exception=false);
394 
405 bool saveStreamableParameters(const std::shared_ptr<GenApi::CNodeMapRef> &nodemap, const char *name,
406  bool exception=false);
407 
408 }
409 
410 #endif
rcg::setIPV4Address
bool setIPV4Address(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const char *value, bool exception)
Set the value of an integer feature of the given nodemap from an IP address.
Definition: config.cc:199
rcg::setFloat
bool setFloat(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, double value, bool exception)
Set the value of a float feature of the given nodemap.
Definition: config.cc:256
GenApi.h
Main include file for using GenApi with smart pointers.
rcg::getFloat
double getFloat(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, double *vmin, double *vmax, bool exception, bool igncache)
Get the value of a double feature of the given nodemap.
Definition: config.cc:696
rcg::getRegister
size_t getRegister(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, uint8_t *buffer, size_t len, size_t *total, bool exception, bool igncache)
Read value of type register.
Definition: config.cc:865
rcg::getBoolean
bool getBoolean(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception, bool igncache)
Get the value of a boolean feature of the given nodemap.
Definition: config.cc:589
rcg::setRegister
size_t setRegister(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const uint8_t *buffer, size_t len, bool exception)
Set value of type register.
Definition: config.cc:366
rcg::setBoolean
bool setBoolean(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool value, bool exception)
Set the value of a boolean feature of the given nodemap.
Definition: config.cc:107
rcg::loadFile
std::string loadFile(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception)
Loads the contents of a file via the GenICam FileAccessControl interface.
Definition: config.cc:1159
rcg
Definition: buffer.cc:47
rcg::callCommand
bool callCommand(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception)
Calls the given command.
Definition: config.cc:61
rcg::getChunkAdapter
std::shared_ptr< GenApi::CChunkAdapter > getChunkAdapter(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const std::string &tltype)
NOTE: This function is deprecated.
Definition: config.cc:1053
rcg::saveStreamableParameters
bool saveStreamableParameters(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception)
Store all streamable parameters from the nodemap into the file.
Definition: config.cc:1305
rcg::getEnum
std::string getEnum(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception)
Get the value of an enumeration of the given nodemap.
Definition: config.cc:747
rcg::loadStreamableParameters
bool loadStreamableParameters(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception)
Load all streamable parameters from file into the nodemap.
Definition: config.cc:1267
rcg::saveFile
bool saveFile(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const std::string &data, bool exception)
Loads the contents of the given string as a file via the GenICam FileAccessControl interface.
Definition: config.cc:1221
rcg::setInteger
bool setInteger(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, int64_t value, bool exception)
Set the value of an integer feature of the given nodemap.
Definition: config.cc:153
rcg::checkFeature
void checkFeature(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const char *value, bool igncache)
Checks the value of given feature and throws an exception in case of a mismatch.
Definition: config.cc:1040
rcg::setString
bool setString(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const char *value, bool exception)
Set the value of a feature of the given nodemap.
Definition: config.cc:413
int64_t
__int64 int64_t
Definition: config-win32.h:21
rcg::setEnum
bool setEnum(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const char *value, bool exception)
Set the value of an enumeration of the given nodemap.
Definition: config.cc:302
rcg::getComponetOfPart
std::string getComponetOfPart(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const Buffer *buffer, uint32_t ipart)
Definition: config.cc:1077
rcg::getInteger
int64_t getInteger(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, int64_t *vmin, int64_t *vmax, bool exception, bool igncache)
Get the value of an integer feature of the given nodemap.
Definition: config.cc:634
rcg::getString
std::string getString(const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception, bool igncache)
Get the value of a feature of the given nodemap.
Definition: config.cc:918
ChunkAdapter.h
Declaration of the CChunkAdapter class.


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:11