World Ocean Simulation System (WOSS) library
uw-woss-pkt-hdr.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 UW_WOSS_PKT_H
34#define UW_WOSS_PKT_H
35
36
37#define HDR_WOSS(P) (hdr_woss::access(P))
38
39
40#include <packet.h>
41#include <complex>
42
43
49typedef struct hdr_woss {
50
51
55 std::complex<double> attenuation;
56
60 double frequency;
61
66
67 static int offset_;
68 static int& offset() { return offset_; }
69 static struct hdr_woss* access(const Packet* p) {
70 return (struct hdr_woss*)p->access(offset_);
71 }
72
74
75
76#endif /* UW_WOSS_PKT_H */
WOSS packet header.
Definition uw-woss-pkt-hdr.h:49
static int & offset()
Definition uw-woss-pkt-hdr.h:68
static int offset_
Definition uw-woss-pkt-hdr.h:67
bool already_processed
Definition uw-woss-pkt-hdr.h:65
static struct hdr_woss * access(const Packet *p)
Definition uw-woss-pkt-hdr.h:69
std::complex< double > attenuation
Definition uw-woss-pkt-hdr.h:55
double frequency
Definition uw-woss-pkt-hdr.h:60