Stride Reference Manual  1.0
stride::RemoteSimulatorSender Class Reference

#include <RemoteSimulatorSender.h>

Inheritance diagram for stride::RemoteSimulatorSender:
Inheritance graph
Collaboration diagram for stride::RemoteSimulatorSender:
Collaboration graph

Public Member Functions

 RemoteSimulatorSender (const string &m_name, const int mpi_id)
 
 ~RemoteSimulatorSender ()=default
 
virtual string getName () const override
 
virtual future< SimulatorStatustimeStep () override
 
virtual void welcomeHomeTravellers (const pair< vector< uint >, vector< Health >> &travellers) override
 
virtual void hostForeignTravellers (const vector< stride::Simulator::TravellerType > &travellers, uint days, const string &destination_district, const string &destination_facility) override
 Receive travellers travellers: the travellers this simulator has to host. More...
 
virtual void sendNewTravellers (uint amount, uint days, const string &destination_sim_id, const string &destination_district, const string &destination_facility) override
 Commands to send an amount of travellers to another region The Simulator will have to take action, select travellers, and indicate which travellers he chose amount: the amount of travellers to be sent days: how long these people will be gone destination_sim: a way of communicating with the destination simulator, this must contain all data to achieve communication destination_district: The name of the city in which the airport / facility is located e.g. More...
 
virtual void returnForeignTravellers () override
 Return foreign people that would return today, signals the Simulator to return today's travellers. More...
 
- Public Member Functions inherited from stride::AsyncSimulator
virtual ~AsyncSimulator ()
 

Private Member Functions

virtual void sendNewTravellers (const vector< Simulator::TravellerType > &travellers, uint days, const string &destination_sim_id, const string &destination_district, const string &destination_facility) override
 Send specifically chosen travellers to the destination region This function is used by the Simulator to give the signal to send people. More...
 
virtual void returnForeignTravellers (const pair< vector< uint >, vector< Health >> &travellers, const string &home_sim_id) override
 Send foreign travellers to the original region This function is used by the Simulator to give the signal to send people. More...
 
void makeSimulatorStatus ()
 
void makeTravellersReturningStruct ()
 

Detailed Description

Definition at line 23 of file RemoteSimulatorSender.h.

Constructor & Destructor Documentation

RemoteSimulatorSender::RemoteSimulatorSender ( const string &  m_name,
const int  mpi_id 
)
inline

Definition at line 83 of file RemoteSimulatorSender.h.

stride::RemoteSimulatorSender::~RemoteSimulatorSender ( )
default

Member Function Documentation

virtual string stride::RemoteSimulatorSender::getName ( ) const
inlineoverridevirtual

Implements stride::AsyncSimulator.

Definition at line 86 of file RemoteSimulatorSender.h.

future< SimulatorStatus > RemoteSimulatorSender::timeStep ( )
inlineoverridevirtual

Implements stride::AsyncSimulator.

Definition at line 87 of file RemoteSimulatorSender.h.

void RemoteSimulatorSender::welcomeHomeTravellers ( const pair< vector< uint >, vector< Health >> &  travellers)
inlineoverridevirtual

Implements stride::AsyncSimulator.

Definition at line 88 of file RemoteSimulatorSender.h.

void RemoteSimulatorSender::hostForeignTravellers ( const vector< stride::Simulator::TravellerType > &  travellers,
uint  days,
const string &  destination_district,
const string &  destination_facility 
)
inlineoverridevirtual

Receive travellers travellers: the travellers this simulator has to host.

Contains the data needed to identify a person in the home simulator days: The amount of days the travellers will stay in this simulator destination_district: The name of the city in which the airport / facility is located e.g. "Antwerp" destination_facility: The name of the facility / airport e.g. "ANR"

Implements stride::AsyncSimulator.

Definition at line 89 of file RemoteSimulatorSender.h.

void RemoteSimulatorSender::sendNewTravellers ( uint  amount,
uint  days,
const string &  destination_sim_id,
const string &  destination_district,
const string &  destination_facility 
)
inlineoverridevirtual

Commands to send an amount of travellers to another region The Simulator will have to take action, select travellers, and indicate which travellers he chose amount: the amount of travellers to be sent days: how long these people will be gone destination_sim: a way of communicating with the destination simulator, this must contain all data to achieve communication destination_district: The name of the city in which the airport / facility is located e.g.

"Antwerp" destination_facility: The name of the facility / airport e.g. "ANR"

Implements stride::AsyncSimulator.

Definition at line 90 of file RemoteSimulatorSender.h.

void RemoteSimulatorSender::returnForeignTravellers ( )
inlineoverridevirtual

Return foreign people that would return today, signals the Simulator to return today's travellers.

Implements stride::AsyncSimulator.

Definition at line 91 of file RemoteSimulatorSender.h.

void RemoteSimulatorSender::sendNewTravellers ( const vector< Simulator::TravellerType > &  travellers,
uint  days,
const string &  destination_sim_id,
const string &  destination_district,
const string &  destination_facility 
)
inlineoverrideprivatevirtual

Send specifically chosen travellers to the destination region This function is used by the Simulator to give the signal to send people.

Implements stride::AsyncSimulator.

Definition at line 94 of file RemoteSimulatorSender.h.

void RemoteSimulatorSender::returnForeignTravellers ( const pair< vector< uint >, vector< Health >> &  travellers,
const string &  home_sim_id 
)
inlineoverrideprivatevirtual

Send foreign travellers to the original region This function is used by the Simulator to give the signal to send people.

Implements stride::AsyncSimulator.

Definition at line 95 of file RemoteSimulatorSender.h.

void RemoteSimulatorSender::makeSimulatorStatus ( )
inlineprivate

Number of occurence of each type

Position offset from struct starting address

Create the type

Definition at line 97 of file RemoteSimulatorSender.h.

void stride::RemoteSimulatorSender::makeTravellersReturningStruct ( )
inlineprivate

Definition at line 98 of file RemoteSimulatorSender.h.


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