Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CARTOGRAPHER_CLOUD_INTERNAL_TESTING_MOCK_MAP_BUILDER_CONTEXT_H
00018 #define CARTOGRAPHER_CLOUD_INTERNAL_TESTING_MOCK_MAP_BUILDER_CONTEXT_H
00019
00020 #include "cartographer/cloud/internal/map_builder_context_interface.h"
00021 #include "cartographer/mapping/local_slam_result_data.h"
00022 #include "glog/logging.h"
00023 #include "gmock/gmock.h"
00024 #include "gtest/gtest.h"
00025
00026 namespace cartographer {
00027 namespace cloud {
00028 namespace testing {
00029
00030 class MockMapBuilderContext : public MapBuilderContextInterface {
00031 public:
00032 MOCK_METHOD0(map_builder, mapping::MapBuilderInterface &());
00033 MOCK_METHOD0(
00034 sensor_data_queue,
00035 common::BlockingQueue<std::unique_ptr<MapBuilderContextInterface::Data>>
00036 &());
00037 MOCK_METHOD0(GetLocalSlamResultCallbackForSubscriptions,
00038 mapping::TrajectoryBuilderInterface::LocalSlamResultCallback());
00039 MOCK_METHOD1(AddSensorDataToTrajectory,
00040 void(const MapBuilderContextInterface::Data &));
00041 MOCK_METHOD2(SubscribeLocalSlamResults,
00042 MapBuilderContextInterface::LocalSlamSubscriptionId(
00043 int,
00044 MapBuilderContextInterface::LocalSlamSubscriptionCallback));
00045 MOCK_METHOD1(
00046 UnsubscribeLocalSlamResults,
00047 void(const MapBuilderContextInterface::LocalSlamSubscriptionId &));
00048 MOCK_METHOD1(SubscribeGlobalSlamOptimizations,
00049 int(GlobalSlamOptimizationCallback));
00050 MOCK_METHOD1(UnsubscribeGlobalSlamOptimizations, void(int));
00051 MOCK_METHOD1(NotifyFinishTrajectory, void(int));
00052 MOCK_METHOD0(local_trajectory_uploader, LocalTrajectoryUploaderInterface *());
00053
00054 MOCK_METHOD2(DoEnqueueSensorData, void(int, sensor::Data *));
00055 void EnqueueSensorData(int trajectory_id,
00056 std::unique_ptr<sensor::Data> data) override {
00057 DoEnqueueSensorData(trajectory_id, data.get());
00058 }
00059 MOCK_METHOD3(EnqueueLocalSlamResultData,
00060 void(int, const std::string &,
00061 const mapping::proto::LocalSlamResultData &));
00062 MOCK_METHOD2(RegisterClientIdForTrajectory, void(const std::string &, int));
00063 MOCK_METHOD2(CheckClientIdForTrajectory, bool(const std::string &, int));
00064 };
00065
00066 }
00067 }
00068 }
00069
00070 #endif // CARTOGRAPHER_CLOUD_INTERNAL_TESTING_MOCK_MAP_BUILDER_CONTEXT_H