SMACC2
Loading...
Searching...
No Matches
smacc2
include
smacc2
client_behaviors
cb_wait_action_server.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 <
smacc2/client_bases/smacc_action_client_base.hpp
>
24
#include <
smacc2/smacc_asynchronous_client_behavior.hpp
>
25
26
namespace
smacc2
27
{
28
namespace
client_behaviors
29
{
30
using namespace
smacc2::client_bases
;
31
32
// waits the action server is available in the current orthogonal
33
class
CbWaitActionServer
:
public
smacc2::SmaccAsyncClientBehavior
34
{
35
public
:
36
CbWaitActionServer
(std::chrono::milliseconds
timeout
);
37
virtual
~CbWaitActionServer
();
38
39
template
<
typename
TOrthogonal,
typename
TSourceObject>
40
void
onOrthogonalAllocation
()
41
{
42
SmaccAsyncClientBehavior::onOrthogonalAllocation<TOrthogonal, TSourceObject>();
43
this->
requiresClient
(
client_
);
44
}
45
46
void
onEntry
()
override
;
47
48
private
:
49
ISmaccActionClient
*
client_
;
50
std::chrono::milliseconds
timeout_
;
51
};
52
}
// namespace client_behaviors
53
}
// namespace smacc2
smacc2::ISmaccClientBehavior::requiresClient
void requiresClient(SmaccClientType *&storage)
Definition
smacc_client_behavior_impl.hpp:67
smacc2::SmaccAsyncClientBehavior
Definition
smacc_asynchronous_client_behavior.hpp:56
smacc2::client_bases::ISmaccActionClient
Definition
smacc_action_client.hpp:35
smacc2::client_behaviors::CbWaitActionServer
Definition
cb_wait_action_server.hpp:34
smacc2::client_behaviors::CbWaitActionServer::client_
ISmaccActionClient * client_
Definition
cb_wait_action_server.hpp:49
smacc2::client_behaviors::CbWaitActionServer::onEntry
void onEntry() override
Definition
cb_wait_action_server.cpp:31
smacc2::client_behaviors::CbWaitActionServer::~CbWaitActionServer
virtual ~CbWaitActionServer()
Definition
cb_wait_action_server.cpp:29
smacc2::client_behaviors::CbWaitActionServer::timeout_
std::chrono::milliseconds timeout_
Definition
cb_wait_action_server.hpp:50
smacc2::client_behaviors::CbWaitActionServer::onOrthogonalAllocation
void onOrthogonalAllocation()
Definition
cb_wait_action_server.hpp:40
smacc2::client_bases
Definition
smacc_action_client.hpp:31
smacc2
Definition
callback_counter_semaphore.hpp:30
smacc_action_client_base.hpp
smacc_asynchronous_client_behavior.hpp
smacc2::default_events::EvTopicMessage
Definition
smacc_default_events.hpp:155
Generated by
1.9.8