cport.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_CPORT
37 #define RC_GENICAM_API_CPORT
38 
39 #include "gentl_wrapper.h"
40 
41 #include <GenApi/GenApi.h>
42 
43 namespace rcg
44 {
45 
52 class CPort : public GenApi::IPort
53 {
54  public:
55 
56  CPort(std::shared_ptr<const GenTLWrapper> gentl, void **port);
57 
58  void Read(void *buffer, int64_t addr, int64_t length);
59  void Write(const void *buffer, int64_t addr, int64_t length);
61 
62  private:
63 
64  std::shared_ptr<const GenTLWrapper> gentl;
65  void **port;
66 };
67 
80 std::shared_ptr<GenApi::CNodeMapRef> allocNodeMap(std::shared_ptr<const GenTLWrapper> gentl,
81  void *port, CPort *cport, const char *xml=0);
82 
83 }
84 
85 #endif
void Read(void *buffer, int64_t addr, int64_t length)
Definition: cport.cc:58
This is the port definition that connects GenAPI to GenTL.
Definition: cport.h:52
__int64 int64_t
Definition: config-win32.h:21
void ** port
Definition: cport.h:65
void Write(const void *buffer, int64_t addr, int64_t length)
Definition: cport.cc:81
CPort(std::shared_ptr< const GenTLWrapper > gentl, void **port)
Definition: cport.cc:53
std::shared_ptr< const GenTLWrapper > gentl
Definition: cport.h:64
Main include file for using GenApi with smart pointers.
GenApi::EAccessMode GetAccessMode() const
Definition: cport.cc:104
std::shared_ptr< GenApi::CNodeMapRef > allocNodeMap(std::shared_ptr< const GenTLWrapper > gentl, void *port, CPort *cport, const char *xml)
Convenience function that returns a GenICam node map from the given port.
Definition: cport.cc:133
GENICAM_INTERFACE GENAPI_DECL_ABSTRACT IPort
Interface for ports.
Definition: IPort.h:57
enum GENAPI_NAMESPACE::_EAccessMode EAccessMode
access mode of a node
Definition: buffer.cc:47


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40