# LBTS Class Reference

`#include <LBTS.hh>`

Inheritance diagram for LBTS:

[legend]

List of all members.

## Public Types
typedef std::pair < FederateHandle, FederationTime > | FederateClock
## Public Member Functions
| LBTS ()
| Constructor.
| ~LBTS ()
void | compute ()
| Compute the LBTS.
bool | exists (FederateHandle) const
| Check if a federate exists.
void | get (std::vector< FederateClock > &) const
| Get all the federate handle and time in a list of pairs.
void | insert (FederateHandle num_fed, FederationTime the_time)
| Insert a new federate and time.
void | remove (FederateHandle num_fed)
| Remove a federate.
void | setFederate (FederateHandle handle)
size_t | size () const
void | update (FederateHandle num_fed, FederationTime the_time)
| update a federate
## Protected Attributes
FederationTime | _LBTS
FederateHandle | MyFederateNumber
## Private Types
typedef std::map < FederateHandle, FederationTime > | ClockSet
## Private Attributes
ClockSet | clocks

## Detailed Description

Definition at line 41 of file LBTS.hh.

## Member Typedef Documentation

typedef std::pair<FederateHandle, FederationTime> FederateClock

Definition at line 44 of file LBTS.hh.

typedef std::map<FederateHandle, FederationTime> ClockSet`[private]`

Definition at line 63 of file LBTS.hh.

## Constructor & Destructor Documentation

LBTS | ( |  | ) |

Constructor.

LBTS is set to infinite in case of constrained federate without any regulating federate.

Definition at line 50 of file LBTS.cc.

~LBTS | ( |  | ) |

Definition at line 57 of file LBTS.cc.

## Member Function Documentation

void compute | ( |  | ) |

Compute the LBTS.

Definition at line 64 of file LBTS.cc.

References LBTS::_LBTS, LBTS::clocks, and LBTS::MyFederateNumber.

Referenced by LBTS::insert(), LBTS::remove(), and LBTS::update().

bool exists | ( | FederateHandle | federate | ) | const

Check if a federate exists.

Definition at line 85 of file LBTS.cc.

References LBTS::clocks.

Referenced by LBTS::insert().

void get | ( | std::vector< FederateClock > & | v | ) | const

Get all the federate handle and time in a list of pairs.

Parameters:

  | v | Output parameter, list receiving values

Definition at line 95 of file LBTS.cc.

References LBTS::clocks.

Referenced by Federation::add().

void insert | ( | FederateHandle | num_fed,
|  | FederationTime | the_time |
| ) |  |  |

Insert a new federate and time.

Definition at line 109 of file LBTS.cc.

References LBTS::clocks, LBTS::compute(), and LBTS::exists().

Referenced by Federation::addRegulator(), FederationManagement::joinFederationExecution(), and RTIA::processNetworkMessage().

Here is the call graph for this function:

void remove | ( | FederateHandle | num_fed | ) |

Remove a federate.

Definition at line 150 of file LBTS.cc.

References LBTS::clocks, and LBTS::compute().

Referenced by RTIA::processNetworkMessage(), and Federation::removeRegulator().

Here is the call graph for this function:

void setFederate | ( | FederateHandle | handle | ) | `[inline]`

Definition at line 54 of file LBTS.hh.

Referenced by FederationManagement::joinFederationExecution().

size_t size | ( |  | ) | const`[inline]`

Definition at line 55 of file LBTS.hh.

Referenced by Federation::getNbRegulators().

void update | ( | FederateHandle | num_fed,
|  | FederationTime | the_time |
| ) |  |  |

update a federate

Definition at line 123 of file LBTS.cc.

References LBTS::clocks, LBTS::compute(), certi::D, FedTime::getTime(), PrettyDebug::Out(), and pdDebug.

Referenced by RTIA::processNetworkMessage(), and Federation::updateRegulator().

Here is the call graph for this function:

## Member Data Documentation

FederationTime _LBTS`[protected]`

Definition at line 59 of file LBTS.hh.

Referenced by LBTS::compute(), TimeManagement::nextEventAdvance(), TimeManagement::requestFederationTime(), TimeManagement::requestLBTS(), TimeManagement::requestMinNextEventTime(), and TimeManagement::timeAdvance().

FederateHandle MyFederateNumber`[protected]`

Definition at line 60 of file LBTS.hh.

Referenced by LBTS::compute().

ClockSet clocks`[private]`

Definition at line 65 of file LBTS.hh.

Referenced by LBTS::compute(), LBTS::exists(), LBTS::get(), LBTS::insert(), LBTS::remove(), and LBTS::update().

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

- LBTS.hh
- LBTS.cc