Class StCameraNodeImpl

Class Documentation

class StCameraNodeImpl

Class implementation for stcamera.

This class implements the stcamera.

Public Functions

explicit StCameraNodeImpl(StCameraNode *p_stcamera_node)
~StCameraNodeImpl()
void DetectingAndOpenningDevices()

Function called inside process loop. In this function, device availability is checked. Any device lost will be announced through device_connection topic. Any new found device will be processed through calling initializeCamera() .

bool initializeCamera(StApi::IStInterface *p_iface, const StApi::IStDeviceInfo *p_devinfo)

Function to initialize a camera. In this function, whether connection to the given camera is allowed will be checked.

Parameters:
  • p_iface[in] Pointer to the IStInterface of the camera.

  • p_devinfo[in] Pointer to the IStDeviceInfo of the device.

Returns:

True if the camera is successfully initialized. False otherwise.

bool getDeviceListCallback(const std::shared_ptr<stcamera_msgs::srv::GetDeviceList_Request> req, std::shared_ptr<stcamera_msgs::srv::GetDeviceList_Response> res)

ROS service callback for obtaining list of all detected devices including the disallowed camera to connect.

Parameters:
  • req[in] ROS service request

  • res[out] ROS service response

Returns:

Always true.

bool getSDKInfoCallback(const std::shared_ptr<stcamera_msgs::srv::GetSDKInfo_Request> req, std::shared_ptr<stcamera_msgs::srv::GetSDKInfo_Response> res)

ROS service callback for obtaining SentechSDK and GenTL information.

Parameters:
  • req[in] ROS service request

  • res[out] ROS service response

Returns:

Always true.

bool getModuleListCallback(const std::shared_ptr<stcamera_msgs::srv::GetModuleList_Request> req, std::shared_ptr<stcamera_msgs::srv::GetModuleList_Response> res)

ROS service callback for obtaining all module name: System, Interface, LocalDevice, RemoteDevice, DataStream.

Parameters:
  • req[in] ROS service request

  • res[out] ROS service response

Returns:

Always true.

void initSystemsAndInterfaces()

Protected Functions

inline const std::string &getTextForMsg() const
inline rclcpp::Logger get_logger()

Protected Attributes

rclcpp::Clock clock_

Clock

MapCameraInterface map_camera_

Store the list of allowed camera or connected camera and the corresponding instances.

MapDeviceConnection map_connection_

Store the list of all detected camera (including disallowed to connect) and the camera information.

StApi::CStApiAutoInit stapi_autoinit_

Variable for auto initialization of SentechSDK

StApi::CIStSystemPtrArray stapi_systems_

List of GenTL instances used by SentechSDK

StCameraNode *p_stcamera_node_
const std::string stcamera_node_text_