input_sensor_factory.h
Go to the documentation of this file.
1 /******************************************************************************
2 Copyright (c), 2023 - Analog Devices Inc. All Rights Reserved.
3 This software is PROPRIETARY & CONFIDENTIAL to Analog Devices, Inc.
4 and its licensors.
5 ******************************************************************************/
6 
7 #ifndef INPUT_SENSOR_FACTORY_H
8 #define INPUT_SENSOR_FACTORY_H
9 #ifdef ENABLE_ADTF31XX_SENSOR
10 #include "input_sensor_adtf31xx.h"
11 #endif
13 #include "input_sensor.h"
14 
20 {
21 public:
28  static IInputSensor* getInputSensor(int input_sensor_type)
29  {
30  switch (input_sensor_type)
31  {
32  case 0:
33 // Camera
34 #ifdef ENABLE_ADTF31XX_SENSOR
35  return new InputSensorADTF31XX;
36 #else
37  ROS_ERROR(
38  "Since the ROS node is now executing on the host, the value of arg_input_sensor_mode = 0 is not supported."
39  "Please check for argument arg_input_sensor_mode in related launch files.");
40  return nullptr;
41 #endif
42  break;
43  case 1:
44  // File mode is depricated
45  ROS_ERROR("File mode is deprecated, use ROS Bag Bin mode instead.");
46  return nullptr;
47  case 2:
48  // ROS Bag Bin
49  return new InputSensorFileRosbagBin;
50  break;
51  case 3:
52  // Sensor via Network
53 #ifdef ENABLE_ADTF31XX_SENSOR
54  return new InputSensorADTF31XX;
55 #else
56  ROS_ERROR(
57  "Since the ROS node is now executing on the host, the value of arg_input_sensor_mode = 0/3 is not "
58  "supported."
59  "Please check for argument arg_input_sensor_mode in related launch files.");
60  return nullptr;
61 #endif
62 
63  default:
64  ROS_INFO_STREAM("Not a valid senor type.");
65  return nullptr;
66  }
67  }
68 };
69 #endif
InputSensorADTF31XX
This is input class for sensor as camera.
Definition: input_sensor_adtf31xx.h:20
InputSensorFileRosbagBin
This is input class for sensor as camera.
Definition: input_sensor_file_rosbagbin.h:18
input_sensor_adtf31xx.h
input_sensor.h
IInputSensor
This is input base class.
Definition: input_sensor.h:18
ROS_INFO_STREAM
#define ROS_INFO_STREAM(args)
input_sensor_file_rosbagbin.h
ROS_ERROR
#define ROS_ERROR(...)
InputSensorFactory
This class is input sensor factory.
Definition: input_sensor_factory.h:19
InputSensorFactory::getInputSensor
static IInputSensor * getInputSensor(int input_sensor_type)
Get the Input Sensor object.
Definition: input_sensor_factory.h:32


adi_3dtof_adtf31xx
Author(s):
autogenerated on Sat May 17 2025 02:12:30