Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lennard Hofmann
RobotAPI
Commits
01f89f3d
Commit
01f89f3d
authored
6 years ago
by
Raphael Grimm
Browse files
Options
Downloads
Patches
Plain Diff
Add doxygen
parent
37c10dca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleBase.h
+161
-35
161 additions, 35 deletions
...ts/units/RobotUnit/RobotUnitModules/RobotUnitModuleBase.h
with
161 additions
and
35 deletions
source/RobotAPI/components/units/RobotUnit/RobotUnitModules/RobotUnitModuleBase.h
+
161
−
35
View file @
01f89f3d
...
...
@@ -260,34 +260,78 @@ namespace armarx
// //////////////////////////////////////////////////////////////////////////////////////// //
protected
:
//ManagedIceObject life cycle
/// @see \ref ManagedIceObject::onInitComponent
/**
* @brief \note This function is protected with \ref getGuard()
* @see \ref ManagedIceObject::onInitComponent
*/
virtual
void
onInitComponent
()
final
;
/// @see \ref ManagedIceObject::onConnectComponent
/**
* @brief \warning This function is not protected with \ref getGuard()
* @see \ref ManagedIceObject::onConnectComponent
*/
virtual
void
onConnectComponent
()
final
;
/// @see \ref ManagedIceObject::onDisconnectComponent
/**
* @brief \warning This function is not protected with \ref getGuard()
* @see \ref ManagedIceObject::onDisconnectComponent
*/
virtual
void
onDisconnectComponent
()
final
;
/// @see \ref ManagedIceObject::onExitComponent
/**
* @brief \note This function is protected with \ref getGuard()
* @see \ref ManagedIceObject::onExitComponent
*/
virtual
void
onExitComponent
()
final
;
//ManagedIceObject life cycle module hooks
/// @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called before \ref onInitRobotUnit was called)
/**
* @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called before \ref onInitRobotUnit was called)
* \note This function is protected with \ref getGuard()
* @see onInitComponent
*/
void
_preOnInitRobotUnit
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called after \ref onInitRobotUnit was called)
/**
* @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called after \ref onInitRobotUnit was called)
* \note This function is protected with \ref getGuard()
* @see onInitComponent
*/
void
_postOnInitRobotUnit
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called before \ref onConnectRobotUnit was called)
/**
* @brief Hook for deriving RobotUnitModules called in \ref onConnectComponent (called before \ref onConnectRobotUnit was called)
* \warning This function is not protected with \ref getGuard()
* @see onConnectComponent
*/
void
_preOnConnectRobotUnit
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called after \ref onConnectRobotUnit was called)
/**
* @brief Hook for deriving RobotUnitModules called in \ref onConnectComponent (called after \ref onConnectRobotUnit was called)
* \warning This function is not protected with \ref getGuard()
* @see onConnectComponent
*/
void
_postOnConnectRobotUnit
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called before \ref onDisconnectRobotUnit was called)
/**
* @brief Hook for deriving RobotUnitModules called in \ref onDisconnectComponent (called before \ref onDisconnectRobotUnit was called)
* \warning This function is not protected with \ref getGuard()
* @see onDisconnectComponent
*/
void
_preOnDisconnectRobotUnit
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called after \ref onDisconnectRobotUnit was called)
/**
* @brief Hook for deriving RobotUnitModules called in \ref onDisconnectComponent (called after \ref onDisconnectRobotUnit was called)
* \warning This function is not protected with \ref getGuard()
* @see onDisconnectComponent
*/
void
_postOnDisconnectRobotUnit
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called before \ref onExitRobotUnit was called)
/**
* @brief Hook for deriving RobotUnitModules called in \ref onExitComponent (called before \ref onExitRobotUnit was called)
* \note This function is protected with \ref getGuard()
* @see onExitComponent
*/
void
_preOnExitRobotUnit
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref onInitComponent (called after \ref onExitRobotUnit was called)
/**
* @brief Hook for deriving RobotUnitModules called in \ref onExitComponent (called after \ref onExitRobotUnit was called)
* \note This function is protected with \ref getGuard()
* @see onExitComponent
*/
void
_postOnExitRobotUnit
(){}
// //////////////////////////////////////////////////////////////////////////////////////// //
// ////////////////////// other ManagedIceObject / Component methods ////////////////////// //
...
...
@@ -319,41 +363,106 @@ namespace armarx
void
setRobotUnitState
(
RobotUnitState
s
);
protected
:
//state transitions
/// @brief Transition \ref RobotUnitState::InitializingComponent -> \ref RobotUnitState::InitializingDevices
/**
* @brief Transition \ref RobotUnitState::InitializingComponent -> \ref RobotUnitState::InitializingDevices
* \note This function is protected with \ref getGuard()
* @see _preFinishComponentInitialization
* @see _postFinishComponentInitialization
*/
virtual
void
finishComponentInitialization
();
/// @brief Transition \ref RobotUnitState::InitializingDevices -> \ref RobotUnitState::InitializingUnits
/**
* @brief Transition \ref RobotUnitState::InitializingDevices -> \ref RobotUnitState::InitializingUnits
* \note This function is protected with \ref getGuard()
* @see _preFinishDeviceInitialization
* @see _postFinishDeviceInitialization
*/
virtual
void
finishDeviceInitialization
();
/// @brief Transition \ref RobotUnitState::InitializingUnits -> \ref RobotUnitState::WaitingForRTThreadInitialization
/**
* @brief Transition \ref RobotUnitState::InitializingUnits -> \ref RobotUnitState::WaitingForRTThreadInitialization
* \note This function is protected with \ref getGuard()
* @see _preFinishUnitInitialization
* @see _postFinishUnitInitialization
*/
virtual
void
finishUnitInitialization
();
/// @brief Transition \ref RobotUnitState::InitializingControlThread -> \ref RobotUnitState::Running
/**
* @brief Transition \ref RobotUnitState::InitializingControlThread -> \ref RobotUnitState::Running
* \note This function is protected with \ref getGuard()
* @see _preFinishControlThreadInitialization
* @see _postFinishControlThreadInitialization
*/
virtual
void
finishControlThreadInitialization
();
/// @brief Transition \ref RobotUnitState::Running -> \ref RobotUnitState::Exiting
/**
* @brief Transition \ref RobotUnitState::Running -> \ref RobotUnitState::Exiting
* \note This function is protected with \ref getGuard()
* @see _preFinishRunning
* @see _postFinishRunning
*/
virtual
void
finishRunning
();
//state transition module hooks
/// @brief Hook for deriving RobotUnitModules called in \ref finishComponentInitialization (called before the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishComponentInitialization (called before the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishComponentInitialization
*/
void
_preFinishComponentInitialization
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref finishComponentInitialization (called after the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishComponentInitialization (called after the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishComponentInitialization
*/
void
_postFinishComponentInitialization
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref finishDeviceInitialization (called before the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishDeviceInitialization (called before the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishDeviceInitialization
*/
void
_preFinishDeviceInitialization
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref finishDeviceInitialization (called after the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishDeviceInitialization (called after the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishDeviceInitialization
*/
void
_postFinishDeviceInitialization
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref finishUnitInitialization (called before the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishUnitInitialization (called before the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishUnitInitialization
*/
void
_preFinishUnitInitialization
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref finishUnitInitialization (called after the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishUnitInitialization (called after the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishUnitInitialization
*/
void
_postFinishUnitInitialization
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref finishControlThreadInitialization (called before the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishControlThreadInitialization (called before the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishControlThreadInitialization
*/
void
_preFinishControlThreadInitialization
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref finishControlThreadInitialization (called after the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishControlThreadInitialization (called after the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishControlThreadInitialization
*/
void
_postFinishControlThreadInitialization
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref finishRunning (called before the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishRunning (called before the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishRunning
*/
void
_preFinishRunning
(){}
/// @brief Hook for deriving RobotUnitModules called in \ref finishRunning (called after the state has changed)
/**
* @brief Hook for deriving RobotUnitModules called in \ref finishRunning (called after the state has changed)
* \note This function is protected with \ref getGuard()
* @see finishRunning
*/
void
_postFinishRunning
(){}
// //////////////////////////////////////////////////////////////////////////////////////// //
// /////////////////////////////////////// utility //////////////////////////////////////// //
...
...
@@ -439,14 +548,31 @@ namespace armarx
// //////////////////////////////////////////////////////////////////////////// //
// /////////////////////////// robot unit impl hooks ////////////////////////// //
// //////////////////////////////////////////////////////////////////////////// //
/// @brief called in RobotUnit::onInitComponent()
virtual
void
onInitRobotUnit
(){}
/// @brief called in RobotUnit::onConnectComponent()
virtual
void
onConnectRobotUnit
(){}
/// @brief called in RobotUnit::onDisconnecComponent()
virtual
void
onDisconnectRobotUnit
(){}
/// @brief called in RobotUnit::onExitComponent() before calling RobotUnit::finishRunning
virtual
void
onExitRobotUnit
(){}
/**
* @brief called in onInitComponent
* \note This function is protected with \ref getGuard()
* @see onInitComponent
*/
virtual
void
onInitRobotUnit
()
{}
/**
* @brief called in onConnectComponent
* \warning This function is not protected with \ref getGuard()
* @see onConnectComponent
*/
virtual
void
onConnectRobotUnit
()
{}
/**
* @brief called in onDisconnecComponent
* \warning This function is not protected with \ref getGuard()
* @see onDisconnecComponent
*/
virtual
void
onDisconnectRobotUnit
()
{}
/**
* @brief called in onExitComponent before calling finishRunning
* \note This function is protected with \ref getGuard()
* @see finishRunning
* @see onExitComponent
*/
virtual
void
onExitRobotUnit
()
{}
/// @brief Implementations have to join their \ref ControlThread in this hook. (used by RobotUnit::finishRunning())
virtual
void
joinControlThread
()
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment