SELKIELogger  1.0.0
DWMessages.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Swansea University
3  *
4  * This file is part of the SELKIELogger suite of tools.
5  *
6  * SELKIELogger is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation, either version 3 of the License, or (at your option)
9  * any later version.
10  *
11  * SELKIELogger is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this SELKIELogger product.
18  * If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef SELKIELoggerDW_Messages
22 #define SELKIELoggerDW_Messages
23 
29 #include <stdint.h>
30 
31 #include "DWTypes.h"
32 
39 uint16_t dw_hxv_cycdat(const dw_hxv *in);
40 
42 int16_t dw_hxv_vertical(const dw_hxv *in);
43 
45 int16_t dw_hxv_north(const dw_hxv *in);
46 
48 int16_t dw_hxv_west(const dw_hxv *in);
49 
51 uint16_t dw_hxv_parity(const dw_hxv *in);
52 
54 bool dw_spectrum_from_array(const uint16_t *arr, dw_spectrum *out);
55 
57 bool dw_spectral_block(const uint16_t *arr, const int ix, dw_spectrum *out);
58 
60 bool dw_system_from_array(const uint16_t *arr, dw_system *out);
62 #endif
int16_t dw_hxv_vertical(const dw_hxv *in)
Extract vertical displacement component from HXV input line.
Definition: DWMessages.c:39
bool dw_spectral_block(const uint16_t *arr, const int ix, dw_spectrum *out)
Populate a specific component of dw_spectrum from array of cyclic data words.
Definition: DWMessages.c:109
int16_t dw_hxv_west(const dw_hxv *in)
Extract west displacement component from HXV input line.
Definition: DWMessages.c:62
bool dw_spectrum_from_array(const uint16_t *arr, dw_spectrum *out)
Populate dw_spectrum from array of cyclic data words.
Definition: DWMessages.c:87
int16_t dw_hxv_north(const dw_hxv *in)
Extract north displacement component from HXV input line.
Definition: DWMessages.c:52
uint16_t dw_hxv_parity(const dw_hxv *in)
Extract parity word from HXV input line.
Definition: DWMessages.c:72
uint16_t dw_hxv_cycdat(const dw_hxv *in)
Extract cyclic data word from HXV input line.
Definition: DWMessages.c:31
bool dw_system_from_array(const uint16_t *arr, dw_system *out)
Extract system data from array of cyclic data words.
Definition: DWMessages.c:141
Internal representation of a Datawell HXV message.
Definition: DWTypes.h:99
Internal representation of HXV spectral messages.
Definition: DWTypes.h:111
Internal representation of HXV system messages.
Definition: DWTypes.h:130