LabJackThread.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_DEVICES_LABJACK_LABJACKTHREAD_H
#define SURGSIM_DEVICES_LABJACK_LABJACKTHREAD_H
#include <memory>
#include "SurgSim/Framework/BasicThread.h"
#include "SurgSim/Devices/LabJack/LabJackScaffold.h"
namespace SurgSim
{
namespace Devices
{
class LabJackThread : public SurgSim::Framework::BasicThread
{
public:
explicit LabJackThread(LabJackScaffold* scaffold, LabJackScaffold::DeviceData* deviceData);
virtual ~LabJackThread();
protected:
bool doInitialize() override;
bool doStartUp() override;
bool doUpdate(double dt) override;
private:
LabJackScaffold* m_scaffold;
LabJackScaffold::DeviceData* m_deviceData;
};
}; // namespace Devices
}; // namespace SurgSim
#endif // SURGSIM_DEVICES_LABJACK_LABJACKTHREAD_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Devices::LabJackThread
A class implementing the thread context for communicating with LabJack devices.
Definition: LabJackThread.h:31
SurgSim::Devices::LabJackThread::doInitialize
bool doInitialize() override
Definition: LabJackThread.cpp:34
SurgSim::Devices::LabJackThread::LabJackThread
LabJackThread(LabJackScaffold *scaffold, LabJackScaffold::DeviceData *deviceData)
Definition: LabJackThread.cpp:22
SurgSim::Devices::LabJackThread::m_scaffold
LabJackScaffold * m_scaffold
Definition: LabJackThread.h:44
SurgSim::Devices::LabJackThread::m_deviceData
LabJackScaffold::DeviceData * m_deviceData
Definition: LabJackThread.h:45
SurgSim::Devices::LabJackThread::doStartUp
bool doStartUp() override
Definition: LabJackThread.cpp:39
SurgSim::Devices::LabJackThread::~LabJackThread
virtual ~LabJackThread()
Definition: LabJackThread.cpp:30
SurgSim::Devices::LabJackScaffold
A class that implements the behavior of LabJackDevice objects.
Definition: LabJackScaffold.h:41
SurgSim::Devices::LabJackThread::doUpdate
bool doUpdate(double dt) override
Implementation of actual work function for this thread, this has a default implementation to handle d...
Definition: LabJackThread.cpp:44
SurgSim::Framework::BasicThread
Basic thread implementation, tries to maintain a constant rate, supplies startup an initialization...
Definition: BasicThread.h:48
LabJackScaffold.h
SurgSim::Devices::LabJackScaffold::DeviceData
The per-device data.
Definition: LabJackScaffold.cpp:369
BasicThread.h