SELKIELogger  1.0.0
LoggerTime.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_TIME_H
22 #define SL_LOGGER_TIME_H
23 
24 #include <errno.h>
25 #include <stdlib.h>
26 #include <string.h>
27 #include <time.h>
28 #include <unistd.h>
29 
30 #include "SELKIELoggerBase.h"
31 #include "SELKIELoggerMP.h"
32 
34 
46 typedef struct {
47  uint8_t sourceNum;
48  char *sourceName;
49  int frequency;
50 } timer_params;
51 
53 void *timer_setup(void *ptargs);
54 
56 void *timer_logging(void *ptargs);
57 
59 void *timer_shutdown(void *ptargs);
60 
62 void *timer_channels(void *ptargs);
63 
66 
69 
73 #endif
void * timer_logging(void *ptargs)
Generate timer message at requested frequency.
Definition: LoggerTime.c:61
timer_params timer_getParams(void)
Fill out default timer parameters.
Definition: LoggerTime.c:198
void * timer_shutdown(void *ptargs)
No shutdown required - does nothing.
Definition: LoggerTime.c:127
void * timer_setup(void *ptargs)
Check parameters, but no other setup required.
Definition: LoggerTime.c:34
bool timer_parseConfig(log_thread_args_t *lta, config_section *s)
Take a configuration section and parse parameters.
Definition: LoggerTime.c:212
void * timer_channels(void *ptargs)
Generate channel map and push to logging queue.
Definition: LoggerTime.c:146
device_callbacks timer_getCallbacks(void)
Fill out device callback functions for logging.
Definition: LoggerTime.c:187
Configuration file section.
Definition: LoggerConfig.h:54
Device specific function information.
Definition: Logger.h.in:72
Logging thread information.
Definition: Logger.h.in:86
Timer specific parameters.
Definition: LoggerTime.h:46
uint8_t sourceNum
Source ID for messages.
Definition: LoggerTime.h:47
char * sourceName
Name to report for this timer.
Definition: LoggerTime.h:48
int frequency
Aim to sample this many times per second.
Definition: LoggerTime.h:49