World Ocean Simulation System (WOSS) library
uw-woss-cbr.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 2025 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - WOSS@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22
33#ifndef UNDERWATER_WOSS_CBR_H
34#define UNDERWATER_WOSS_CBR_H
35
36
37#include <cbr-module.h>
38
39
40class WossCbrModule : public CbrModule {
41
42 public:
43
45
46 virtual ~WossCbrModule() override = default;
47
48 virtual void recv(Packet*) override;
49
50 virtual int command(int argc, const char*const* argv) override;
51
52
53 protected:
54
56
58
59 void updateFirstTimeRx(double time);
60
61 void updateLastTimeRx(double time);
62
63 double getFirstTimeRx() const { return first_time_rx; }
64
65 double getLastTimeRx() const { return last_time_rx; }
66
67};
68
69#endif /* UNDERWATER_WOSS_CBR_H */
Definition uw-woss-cbr.h:40
double first_time_rx
Definition uw-woss-cbr.h:55
virtual void recv(Packet *) override
Definition uw-woss-cbr.cpp:90
void updateLastTimeRx(double time)
Definition uw-woss-cbr.cpp:61
virtual int command(int argc, const char *const *argv) override
Definition uw-woss-cbr.cpp:65
double last_time_rx
Definition uw-woss-cbr.h:57
double getFirstTimeRx() const
Definition uw-woss-cbr.h:63
WossCbrModule()
Definition uw-woss-cbr.cpp:50
void updateFirstTimeRx(double time)
Definition uw-woss-cbr.cpp:57
virtual ~WossCbrModule() override=default
double getLastTimeRx() const
Definition uw-woss-cbr.h:65