system.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of the rc_genicam_api package.
00003  *
00004  * Copyright (c) 2017 Roboception GmbH
00005  * All rights reserved
00006  *
00007  * Author: Heiko Hirschmueller
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions are met:
00011  *
00012  * 1. Redistributions of source code must retain the above copyright notice,
00013  * this list of conditions and the following disclaimer.
00014  *
00015  * 2. Redistributions in binary form must reproduce the above copyright notice,
00016  * this list of conditions and the following disclaimer in the documentation
00017  * and/or other materials provided with the distribution.
00018  *
00019  * 3. Neither the name of the copyright holder nor the names of its contributors
00020  * may be used to endorse or promote products derived from this software without
00021  * specific prior written permission.
00022  *
00023  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00024  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00025  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00026  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
00027  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00028  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00029  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00030  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00031  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00032  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00033  * POSSIBILITY OF SUCH DAMAGE.
00034  */
00035 
00036 #ifndef RC_GENICAM_API_SYSTEM
00037 #define RC_GENICAM_API_SYSTEM
00038 
00039 #include <GenApi/GenApi.h>
00040 
00041 #include <memory>
00042 #include <vector>
00043 #include <mutex>
00044 
00045 namespace rcg
00046 {
00047 
00048 class GenTLWrapper;
00049 class Interface;
00050 class CPort;
00051 
00058 class System : public std::enable_shared_from_this<System>
00059 {
00060   public:
00061 
00062     ~System();
00063 
00077     static std::vector<std::shared_ptr<System> > getSystems();
00078 
00084     static void clearSystems();
00085 
00092     const std::string &getFilename() const;
00093 
00100     void open();
00101 
00107     void close();
00108 
00117     std::vector<std::shared_ptr<Interface> > getInterfaces();
00118 
00125     std::string getID();
00126 
00133     std::string getVendor();
00134 
00141     std::string getModel();
00142 
00149     std::string getVersion();
00150 
00157     std::string getTLType();
00158 
00165     std::string getName();
00166 
00173     std::string getPathname();
00174 
00181     std::string getDisplayName();
00182 
00189     bool isCharEncodingASCII();
00190 
00197     int getMajorVersion();
00198 
00205     int getMinorVersion();
00206 
00216     std::shared_ptr<GenApi::CNodeMapRef> getNodeMap();
00217 
00224     void *getHandle() const;
00225 
00226   private:
00227 
00228     System(const std::string &_filename);
00229     System(class System &); // forbidden
00230     System &operator=(const System &); // forbidden
00231 
00232     std::string filename;
00233     std::shared_ptr<const GenTLWrapper> gentl;
00234 
00235     std::mutex mtx;
00236 
00237     int n_open;
00238     void *tl;
00239 
00240     std::shared_ptr<CPort> cport;
00241     std::shared_ptr<GenApi::CNodeMapRef> nodemap;
00242 
00243     std::vector<std::weak_ptr<Interface> > ilist;
00244 };
00245 
00246 }
00247 
00248 #endif


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Thu Jun 6 2019 18:42:47