automotive-dlt
dlt-kpi.c File Reference
#include "dlt-kpi.h"
#include <signal.h>
#include <dirent.h>
#include <time.h>
#include <unistd.h>
#include <pthread.h>
Include dependency graph for dlt-kpi.c:

Go to the source code of this file.

Functions

 DLT_DECLARE_CONTEXT (kpi_ctx)
 
void dlt_kpi_stop_loops (int sig)
 
void dlt_kpi_init_sigterm_handler ()
 
DltReturnValue dlt_kpi_init_process_lists ()
 
DltReturnValue dlt_kpi_free_process_lists ()
 
void * dlt_kpi_start_process_thread ()
 
DltReturnValue dlt_kpi_process_loop ()
 
DltReturnValue dlt_kpi_update_process_list (DltKpiProcessList *list, unsigned long int time_dif_ms)
 
void * dlt_kpi_start_irq_thread ()
 
DltReturnValue dlt_kpi_irq_loop ()
 
void * dlt_kpi_start_check_thread ()
 
DltReturnValue dlt_kpi_check_loop ()
 
DltReturnValue dlt_kpi_log_check_commandlines ()
 
unsigned long int timespec_to_millis (struct timespec *time)
 
unsigned long int get_millis ()
 
int main (int argc, char **argv)
 
DltReturnValue dlt_kpi_log_list (DltKpiProcessList *list, DltReturnValue(*process_callback)(DltKpiProcess *, char *, int), char *title, int delete_elements)
 

Variables

DltKpiConfig config
 
static volatile sig_atomic_t stop_loop = 0
 
static DltKpiProcessListlist
 
static DltKpiProcessListnew_process_list
 
static DltKpiProcessListstopped_process_list
 
static DltKpiProcessListupdate_process_list
 
static struct timespec _tmp_time
 
static pthread_mutex_t process_list_mutex
 

Detailed Description

Author
Sven Hassler sven_.nosp@m.hass.nosp@m.ler@m.nosp@m.ento.nosp@m.r.com

Definition in file dlt-kpi.c.

Function Documentation

DLT_DECLARE_CONTEXT ( kpi_ctx  )
DltReturnValue dlt_kpi_free_process_lists ( )

Definition at line 160 of file dlt-kpi.c.

References dlt_kpi_free_process_list(), DLT_RETURN_ERROR, and DLT_RETURN_OK.

Referenced by main().

DltReturnValue dlt_kpi_init_process_lists ( )

Definition at line 150 of file dlt-kpi.c.

References dlt_kpi_create_process_list(), DLT_RETURN_ERROR, DLT_RETURN_OK, and NULL.

Referenced by main().

void dlt_kpi_init_sigterm_handler ( )

Definition at line 131 of file dlt-kpi.c.

References dlt_kpi_stop_loops(), and NULL.

Referenced by main().

DltReturnValue dlt_kpi_log_check_commandlines ( )
void * dlt_kpi_start_check_thread ( )

Definition at line 460 of file dlt-kpi.c.

References dlt_kpi_check_loop(), dlt_kpi_stop_loops(), DLT_RETURN_OK, and NULL.

Referenced by main().

void * dlt_kpi_start_irq_thread ( )

Definition at line 425 of file dlt-kpi.c.

References dlt_kpi_irq_loop(), dlt_kpi_stop_loops(), DLT_RETURN_OK, and NULL.

Referenced by main().

void * dlt_kpi_start_process_thread ( )

Definition at line 179 of file dlt-kpi.c.

References dlt_kpi_process_loop(), dlt_kpi_stop_loops(), DLT_RETURN_OK, and NULL.

Referenced by main().

void dlt_kpi_stop_loops ( int  sig)
unsigned long int get_millis ( )

Definition at line 62 of file dlt-kpi.c.

References _tmp_time, and timespec_to_millis().

Referenced by dlt_kpi_check_loop(), dlt_kpi_irq_loop(), and dlt_kpi_process_loop().

unsigned long int timespec_to_millis ( struct timespec *  time)

Definition at line 57 of file dlt-kpi.c.

Referenced by get_millis().

Variable Documentation

struct timespec _tmp_time
static

Definition at line 41 of file dlt-kpi.c.

Referenced by get_millis().

DltKpiProcessList* list
static

Definition at line 40 of file dlt-kpi.c.

DltKpiProcessList * new_process_list
static

Definition at line 40 of file dlt-kpi.c.

pthread_mutex_t process_list_mutex
static

Definition at line 42 of file dlt-kpi.c.

Referenced by dlt_kpi_log_check_commandlines(), dlt_kpi_update_process_list(), and main().

volatile sig_atomic_t stop_loop = 0
static
DltKpiProcessList * stopped_process_list
static

Definition at line 40 of file dlt-kpi.c.

DltKpiProcessList * update_process_list
static

Definition at line 40 of file dlt-kpi.c.