stcamera_node.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (C) 2018, OMRON SENTECH. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  * * Redistributions of source code must retain the above copyright notice,
9  * this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the names of OMRON SENTECH nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  *****************************************************************************/
29 
36 #ifndef STCAMERA_STCAMERA_NODE_H
37 #define STCAMERA_STCAMERA_NODE_H
38 
39 #include <ros/ros.h>
40 #include <StApi_TL.h>
41 
44 
45 #include <omronsentech_camera/GenTLInfo.h>
46 #include <omronsentech_camera/DeviceConnection.h>
47 #include <omronsentech_camera/GetDeviceList.h>
48 #include <omronsentech_camera/GetModuleList.h>
49 #include <omronsentech_camera/GetSDKInfo.h>
50 #include <omronsentech_camera/GetGigEIPi.h>
51 #include <omronsentech_camera/SetGigEIPi.h>
52 
53 namespace stcamera
54 {
56  typedef std::map<std::string, omronsentech_camera::DeviceConnection>
58 
65  {
66  public:
67 
70  StCameraNode();
71 
77 
80  virtual ~StCameraNode();
81 
86  virtual void init();
87 
93  virtual void spin();
94 
95  protected:
96 
105  bool initializeCamera(StApi::IStInterface *p_iface,
106  const StApi::IStDeviceInfo *p_devinfo);
107 
108 
116  omronsentech_camera::GetDeviceList::Request &req,
117  omronsentech_camera::GetDeviceList::Response &res);
118 
126  omronsentech_camera::GetModuleList::Request &req,
127  omronsentech_camera::GetModuleList::Response &res);
128 
134  bool getSDKInfoCallback(omronsentech_camera::GetSDKInfo::Request &req,
135  omronsentech_camera::GetSDKInfo::Response &res);
136 
143  bool getGigEIPCallback(omronsentech_camera::GetGigEIPi::Request &req,
144  omronsentech_camera::GetGigEIPi::Response &res);
145 
152  bool setGigEIPCallback(omronsentech_camera::SetGigEIPi::Request &req,
153  omronsentech_camera::SetGigEIPi::Response &res);
154 
157 
161 
165 
168 
172 
183 
185  StApi::CStApiAutoInit stapi_autoinit_;
186 
188  StApi::CIStSystemPtrArray stapi_systems_;
189 
190  private:
191 
200  omronsentech_camera::DeviceConnection fillDeviceConnectionData(
201  const StApi::IStSystemInfo *p_tlinfo,
202  StApi::IStInterface *p_iface,
203  const StApi::IStDeviceInfo *p_devinfo,
204  std::string device_namespace = "",
205  bool connected = false);
206 
209 
211  std::mutex mtx_map_camera_;
212  };
213 }
214 #endif
bool getSDKInfoCallback(omronsentech_camera::GetSDKInfo::Request &req, omronsentech_camera::GetSDKInfo::Response &res)
ros::Publisher msg_device_connection_
ros::ServiceServer srv_get_gige_ip_i_
StApi::CStApiAutoInit stapi_autoinit_
bool getModuleListCallback(omronsentech_camera::GetModuleList::Request &req, omronsentech_camera::GetModuleList::Response &res)
ros::NodeHandle nh_
bool setGigEIPCallback(omronsentech_camera::SetGigEIPi::Request &req, omronsentech_camera::SetGigEIPi::Response &res)
Class implementation for stcamera_node.
Definition: stcamera_node.h:64
Base class to control a connected camera.
bool getGigEIPCallback(omronsentech_camera::GetGigEIPi::Request &req, omronsentech_camera::GetGigEIPi::Response &res)
bool initializeCamera(StApi::IStInterface *p_iface, const StApi::IStDeviceInfo *p_devinfo)
std::map< std::string, omronsentech_camera::DeviceConnection > MapDeviceConnection
Definition: stcamera_node.h:57
std::map< std::string, StCameraInterface * > MapCameraInterface
MapCameraInterface map_camera_
StApi::CIStSystemPtrArray stapi_systems_
ros::ServiceServer srv_get_sdk_info_
bool getDeviceListCallback(omronsentech_camera::GetDeviceList::Request &req, omronsentech_camera::GetDeviceList::Response &res)
MapDeviceConnection map_connection_
std::mutex mtx_update_device_list_
Class to handle ROS parameter.
Definition: stparameter.h:51
Class to handle ROS parameter.
ros::ServiceServer srv_get_device_list_
omronsentech_camera::DeviceConnection fillDeviceConnectionData(const StApi::IStSystemInfo *p_tlinfo, StApi::IStInterface *p_iface, const StApi::IStDeviceInfo *p_devinfo, std::string device_namespace="", bool connected=false)
ros::ServiceServer srv_set_gige_ip_i_
ros::ServiceServer srv_get_module_list_


omronsentech_camera
Author(s): OSE ROS Support
autogenerated on Tue Jul 2 2019 19:28:17