SELKIELogger  1.0.0
LoggerMP.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 SL_LOGGER_MP_H
22 #define SL_LOGGER_MP_H
23 
24 #include <errno.h>
25 #include <stdlib.h>
26 #include <string.h>
27 #include <unistd.h>
28 
29 #include "SELKIELoggerBase.h"
30 #include "SELKIELoggerMP.h"
31 
33 
46 typedef struct {
47  char *portName;
48  int baudRate;
49  int handle;
50  uint8_t csource;
51  char *cname;
53 } mp_params;
54 
56 void *mp_setup(void *ptargs);
57 
59 void *mp_logging(void *ptargs);
60 
62 void *mp_channels(void *ptargs);
63 
65 void *mp_shutdown(void *ptargs);
66 
69 
72 
75 
77 #endif
void * mp_logging(void *ptargs)
MP source main logging loop.
Definition: LoggerMP.c:57
void * mp_shutdown(void *ptargs)
MP source shutdown.
Definition: LoggerMP.c:206
void * mp_setup(void *ptargs)
MP connection setup.
Definition: LoggerMP.c:33
device_callbacks mp_getCallbacks(void)
Fill out device callback functions for logging.
Definition: LoggerMP.c:224
bool mp_parseConfig(log_thread_args_t *lta, config_section *s)
Take a configuration section and parse parameters.
Definition: LoggerMP.c:250
mp_params mp_getParams(void)
Fill out default MP source parameters.
Definition: LoggerMP.c:235
void * mp_channels(void *ptargs)
Push device information from cache to queue.
Definition: LoggerMP.c:164
Configuration file section.
Definition: LoggerConfig.h:54
Device specific function information.
Definition: Logger.h.in:72
Logging thread information.
Definition: Logger.h.in:86
MP Source device specific parameters.
Definition: LoggerMP.h:46
int baudRate
Baud rate for operations (currently unused)
Definition: LoggerMP.h:48
strarray cmap
Cache latest channel map.
Definition: LoggerMP.h:52
int handle
Handle for currently opened device.
Definition: LoggerMP.h:49
char * portName
Target port name.
Definition: LoggerMP.h:47
uint8_t csource
Cache source ID.
Definition: LoggerMP.h:50
char * cname
Cache latest device name.
Definition: LoggerMP.h:51
Array of strings.
Definition: strarray.h:43