SensorActorUnit.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarXCore::utils
17 * @author Kai Welke (welke@kit.edu)
18 * @date 2011
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
28 #include <RobotAPI/interface/units/UnitInterface.h>
29 
30 #include <mutex>
31 
32 namespace armarx
33 {
43  virtual public SensorActorUnitInterface,
44  virtual public Component
45  {
46  public:
54  ~SensorActorUnit() override;
55 
63  void init(const Ice::Current& c = Ice::emptyCurrent) override;
64 
75  void start(const Ice::Current& c = Ice::emptyCurrent) override;
76 
87  void stop(const Ice::Current& c = Ice::emptyCurrent) override;
88 
95  UnitExecutionState getExecutionState(const Ice::Current& c = Ice::emptyCurrent) override;
96 
102  void request(const Ice::Current& c = Ice::emptyCurrent) override;
103 
109  void release(const Ice::Current& c = Ice::emptyCurrent) override;
110 
111  protected:
112  void onExitComponent() override;
116  virtual void onInit() {};
117 
121  virtual void onStart() {};
122 
126  virtual void onStop() {};
127 
128  std::mutex unitMutex;
130  UnitExecutionState executionState;
131  };
132 }
133 
armarx::SensorActorUnit::onInit
virtual void onInit()
callback onInit for subclass hook.
Definition: SensorActorUnit.h:116
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
GfxTL::Identity
void Identity(MatrixXX< N, N, T > *a)
Definition: MatrixXX.h:523
armarx::SensorActorUnit::ownerId
Ice::Identity ownerId
Definition: SensorActorUnit.h:129
armarx::SensorActorUnit::executionState
UnitExecutionState executionState
Definition: SensorActorUnit.h:130
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
armarx::SensorActorUnit
Base Class for SensorActorUnits.
Definition: SensorActorUnit.h:42
ImportExport.h
armarx::SensorActorUnit::onStart
virtual void onStart()
callback onStart for subclass hook.
Definition: SensorActorUnit.h:121
ARMARXCORE_IMPORT_EXPORT
#define ARMARXCORE_IMPORT_EXPORT
Definition: ImportExport.h:38
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
Exception.h