SMACC2
Loading...
Searching...
No Matches
smacc2_client_library
lifecyclenode_client
include
lifecyclenode_client
client_behaviors
cb_configure.hpp
Go to the documentation of this file.
1
// Copyright 2021 RobosoftAI Inc.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
/*****************************************************************************************************************
16
*
17
* Authors: Pablo Inigo Blasco, Brett Aldrich
18
*
19
******************************************************************************************************************/
20
21
#pragma once
22
23
#include <
lifecyclenode_client/lifecyclenode_client.hpp
>
24
#include <
smacc2/smacc_asynchronous_client_behavior.hpp
>
25
26
namespace
cl_lifecyclenode
27
{
28
class
CbConfigure
:
public
smacc2::SmaccAsyncClientBehavior
29
{
30
public
:
31
CbConfigure
() {}
32
virtual
~CbConfigure
() {}
33
34
template
<
typename
TOrthogonal,
typename
TSourceObject>
35
void
onOrthogonalAllocation
()
36
{
37
smacc2::SmaccAsyncClientBehavior::onOrthogonalAllocation<TOrthogonal, TSourceObject>();
38
39
this->
requiresClient
(this->
lifecycleNodeClient_
);
40
41
lifecycleNodeClient_
->
onTransitionOnConfigureSuccess_
.connect(
42
[
this
]()
43
{
44
RCLCPP_INFO(
getLogger
(),
"CbConfigure: onTransitionOnConfigureSuccess_"
);
45
this->
postSuccessEvent
();
46
});
47
lifecycleNodeClient_
->
onTransitionOnConfigureFailure_
.connect([
this
]()
48
{ this->
postFailureEvent
(); });
49
lifecycleNodeClient_
->
onTransitionOnConfigureError_
.connect([
this
]()
50
{ this->
postFailureEvent
(); });
51
}
52
53
virtual
void
onEntry
()
override
{
lifecycleNodeClient_
->
configure
(); }
54
55
private
:
56
ClLifecycleNode
*
lifecycleNodeClient_
;
57
};
58
}
// namespace cl_lifecyclenode
cl_lifecyclenode::CbConfigure
Definition:
cb_configure.hpp:29
cl_lifecyclenode::CbConfigure::~CbConfigure
virtual ~CbConfigure()
Definition:
cb_configure.hpp:32
cl_lifecyclenode::CbConfigure::onEntry
virtual void onEntry() override
Definition:
cb_configure.hpp:53
cl_lifecyclenode::CbConfigure::lifecycleNodeClient_
ClLifecycleNode * lifecycleNodeClient_
Definition:
cb_configure.hpp:56
cl_lifecyclenode::CbConfigure::CbConfigure
CbConfigure()
Definition:
cb_configure.hpp:31
cl_lifecyclenode::CbConfigure::onOrthogonalAllocation
void onOrthogonalAllocation()
Definition:
cb_configure.hpp:35
cl_lifecyclenode::ClLifecycleNode
Definition:
lifecyclenode_client.hpp:193
cl_lifecyclenode::ClLifecycleNode::configure
void configure()
Definition:
lifecyclenode_client.cpp:60
cl_lifecyclenode::ClLifecycleNode::onTransitionOnConfigureFailure_
boost::signals2::signal< void()> onTransitionOnConfigureFailure_
Definition:
lifecyclenode_client.hpp:241
cl_lifecyclenode::ClLifecycleNode::onTransitionOnConfigureSuccess_
boost::signals2::signal< void()> onTransitionOnConfigureSuccess_
Definition:
lifecyclenode_client.hpp:240
cl_lifecyclenode::ClLifecycleNode::onTransitionOnConfigureError_
boost::signals2::signal< void()> onTransitionOnConfigureError_
Definition:
lifecyclenode_client.hpp:242
smacc2::ISmaccClientBehavior::getLogger
virtual rclcpp::Logger getLogger() const
Definition:
smacc_client_behavior_base.cpp:43
smacc2::ISmaccClientBehavior::requiresClient
void requiresClient(SmaccClientType *&storage)
Definition:
smacc_client_behavior_impl.hpp:67
smacc2::SmaccAsyncClientBehavior
Definition:
smacc_asynchronous_client_behavior.hpp:56
smacc2::SmaccAsyncClientBehavior::postSuccessEvent
void postSuccessEvent()
Definition:
smacc_client_async_behavior.cpp:151
smacc2::SmaccAsyncClientBehavior::postFailureEvent
void postFailureEvent()
Definition:
smacc_client_async_behavior.cpp:153
lifecyclenode_client.hpp
cl_lifecyclenode
Definition:
cb_activate.hpp:27
smacc_asynchronous_client_behavior.hpp
Generated by
1.9.5