MockInputOutput.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_TESTING_MOCKINPUTOUTPUT_H
17 #define SURGSIM_TESTING_MOCKINPUTOUTPUT_H
18 
23 
24 namespace SurgSim
25 {
26 namespace Testing
27 {
28 
30 {
31 public:
33 
34  virtual void initializeInput(const std::string& device, const SurgSim::DataStructures::DataGroup& inputData);
35  virtual void handleInput(const std::string& device, const SurgSim::DataStructures::DataGroup& inputData);
36  virtual bool requestOutput(const std::string& device, SurgSim::DataStructures::DataGroup* outputData);
37 
43 };
44 
45 };
46 };
47 #endif // SURGSIM_TESTING_MOCKINPUTOUTPUT_H
Definition: DriveElementFromInputBehavior.cpp:27
virtual void handleInput(const std::string &device, const SurgSim::DataStructures::DataGroup &inputData)
Notifies the consumer that the application input coming from the device has been updated.
Definition: MockInputOutput.cpp:44
SurgSim::DataStructures::OptionalValue< SurgSim::DataStructures::DataGroup > m_output
Definition: MockInputOutput.h:42
Interface for a producer that generates device output updates (forces, status LED state...
Definition: OutputProducerInterface.h:33
SurgSim::DataStructures::DataGroup m_lastReceivedInput
Definition: MockInputOutput.h:41
virtual bool requestOutput(const std::string &device, SurgSim::DataStructures::DataGroup *outputData)
Asks the producer to provide output state to the device.
Definition: MockInputOutput.cpp:32
Definition: MockInputOutput.h:29
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
int m_numTimesInitializedInput
Definition: MockInputOutput.h:38
Interface for a consumer that monitors device and signal state updates (pose, buttons, etc).
Definition: InputConsumerInterface.h:33
MockInputOutput()
Definition: MockInputOutput.cpp:25
A collection of NamedData objects.
Definition: DataGroup.h:66
virtual void initializeInput(const std::string &device, const SurgSim::DataStructures::DataGroup &inputData)
Set the initial input data group.
Definition: MockInputOutput.cpp:50
int m_numTimesReceivedInput
Definition: MockInputOutput.h:39
int m_numTimesRequestedOutput
Definition: MockInputOutput.h:40