Ignition Gazebo

API Reference

6.6.0
DoorTimer Class Reference

Timer that's used to keep a door open. It has a configurable default wait duration that when exceeded, it calls a function to let the state machine know to transition to the next state. The timer also checks whether the doorway is blocked, in which case it keeps the door open until whatever blocks the doorway moves out of the way. More...

#include <DoorTimer.hh>

Public Member Functions

 DoorTimer (const std::chrono::steady_clock::duration &_waitDuration)
 Constructor. More...
 
 ~DoorTimer ()
 Destructor. More...
 
void Configure (const std::chrono::steady_clock::duration &_startTime, const std::function< void()> &_timeoutCallback)
 Starts the timer and sets the timeout time based on the given start time. More...
 
void Update (const UpdateInfo &_info, bool _isDoorwayBlocked)
 Checks whether the timer has timed out. More...
 

Detailed Description

Timer that's used to keep a door open. It has a configurable default wait duration that when exceeded, it calls a function to let the state machine know to transition to the next state. The timer also checks whether the doorway is blocked, in which case it keeps the door open until whatever blocks the doorway moves out of the way.

Constructor & Destructor Documentation

◆ DoorTimer()

DoorTimer ( const std::chrono::steady_clock::duration &  _waitDuration)

Constructor.

Parameters
[in]_waitDurationDuration

◆ ~DoorTimer()

~DoorTimer ( )

Destructor.

Member Function Documentation

◆ Configure()

void Configure ( const std::chrono::steady_clock::duration &  _startTime,
const std::function< void()> &  _timeoutCallback 
)

Starts the timer and sets the timeout time based on the given start time.

Parameters
[in]_startTimeStart time
[in]_timeoutCallbackFunction to call upon timeout

◆ Update()

void Update ( const UpdateInfo _info,
bool  _isDoorwayBlocked 
)

Checks whether the timer has timed out.

Parameters
[in]_infoCurrent simulation step info
[in]_isDoorwayBlockedFlag that indicates whether the doorway is blocked

The documentation for this class was generated from the following file: