hfl110dcu-test.cpp
Go to the documentation of this file.
1 // Copyright 2020 Continental AG
2 // All rights reserved.
3 //
4 // Software License Agreement (BSD License 2.0)
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions
8 // are met:
9 //
10 // * Redistributions of source code must retain the above copyright
11 // notice, this list of conditions and the following disclaimer.
12 // * Redistributions in binary form must reproduce the above
13 // copyright notice, this list of conditions and the following
14 // disclaimer in the documentation and/or other materials provided
15 // with the distribution.
16 // * Neither the name of Continental AG nor the names of its
17 // contributors may be used to endorse or promote products derived
18 // from this software without specific prior written permission.
19 //
20 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 // POSSIBILITY OF SUCH DAMAGE.
32 
38 #include <gtest/gtest.h>
39 
40 #include <string>
41 #include <vector>
42 
44 #include "ros/ros.h"
50 
51 TEST(HFL110DCUTestSuite, testTEST)
52 {
53  ASSERT_EQ("true", "true");
54 }
55 
56 TEST(HFL110DCUTestSuite, testDefaultParams)
57 {
58  // TODO(evan_flynn): this assumes the launch file defaults are set to HFL110DCU and left
59  // for model and frame_id
60  ros::NodeHandle nh("hfl110dcu_01");
61  std::string model, version, frame_id, parent_frame, interface;
62  std::string camera_ip, computer_ip;
63  int frame_port, object_port;
64 
65  nh.getParam("model", model);
66  nh.getParam("version", version);
67  nh.getParam("frame_id", frame_id);
68  nh.getParam("parent_frame", parent_frame);
69  nh.getParam("ethernet_interface", interface);
70  nh.getParam("camera_ip_address", camera_ip);
71  nh.getParam("computer_ip_address", computer_ip);
72  nh.getParam("frame_data_port", frame_port);
73  nh.getParam("object_data_port", object_port);
74 
75  ASSERT_EQ(model, "hfl110dcu");
76  ASSERT_EQ(version, "v1");
77  ASSERT_EQ(frame_id, "hfl110dcu_01");
78  ASSERT_EQ(interface, "eno1");
79  ASSERT_EQ(camera_ip, "192.168.10.21");
80  ASSERT_EQ(computer_ip, "192.168.10.5");
81  ASSERT_EQ(frame_port, 57410);
82  ASSERT_EQ(object_port, 57411);
83 }
84 
This file defines the CameraCommander class.
TEST(HFL110DCUTestSuite, testTEST)
bool getParam(const std::string &key, std::string &s) const


hfl_driver
Author(s): Evan Flynn , Maxton Ginier , Gerardo Bravo , Moises Diaz
autogenerated on Sat Mar 20 2021 02:27:31