automotive-dlt
dlt_gateway.h
Go to the documentation of this file.
1 /*
2  * @licence app begin@
3  * SPDX license identifier: MPL-2.0
4  *
5  * Copyright (C) 2015 Advanced Driver Information Technology.
6  * This code is developed by Advanced Driver Information Technology.
7  * Copyright of Advanced Driver Information Technology, Bosch and DENSO.
8  *
9  * This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
10  *
11  * This Source Code Form is subject to the terms of the
12  * Mozilla Public License (MPL), v. 2.0.
13  * If a copy of the MPL was not distributed with this file,
14  * You can obtain one at http://mozilla.org/MPL/2.0/.
15  *
16  * For further information see http://www.genivi.org/.
17  * @licence end@
18  */
19 
30 /*******************************************************************************
31 ** **
32 ** SRC-MODULE: dlt_gateway.h **
33 ** **
34 ** TARGET : linux **
35 ** **
36 ** PROJECT : DLT **
37 ** **
38 ** AUTHOR : Christoph Lipka clipka@jp.adit-jv.com **
39 ** PURPOSE : **
40 ** **
41 ** REMARKS : **
42 ** **
43 ** PLATFORM DEPENDANT [yes/no]: yes **
44 ** **
45 ** TO BE CHANGED BY USER [yes/no]: no **
46 ** **
47 *******************************************************************************/
48 
49 /*******************************************************************************
50 ** Author Identity **
51 ********************************************************************************
52 ** **
53 ** Initials Name Company **
54 ** -------- ------------------------- ---------------------------------- **
55 ** cl Christoph Lipka ADIT **
56 *******************************************************************************/
57 
58 #ifndef DLT_GATEWAY_H_
59 #define DLT_GATEWAY_H_
60 
61 #include "dlt-daemon.h"
62 #include "dlt_gateway_types.h"
72 int dlt_gateway_init(DltDaemonLocal *daemon_local, int verbose);
73 
80 void dlt_gateway_deinit(DltGateway *g, int verbose);
81 
95  DltDaemonLocal *daemon_local,
96  int verbose);
97 
106 
107 
118  DltDaemonLocal *daemon_local,
119  DltReceiver *recv,
120  int verbose);
121 
131  DltDaemonLocal *daemon_local,
132  DltReceiver *rec,
133  int verbose);
134 
146  DltDaemonLocal *daemon_local,
147  DltMessage *msg,
148  char *ecu,
149  int verbose);
150 
160  DltDaemonLocal *daemon_local,
161  char *node_id,
162  int connection_status,
163  int verbose);
164 
174  DltGateway *g,
175  DltDaemonLocal *daemon_local,
176  int verbose);
177 
178 /* _ONLY_ for development purposes */
180 #ifdef DLT_UNIT_TESTS
181 typedef enum {
182  GW_CONF_IP_ADDRESS = 0,
183  GW_CONF_PORT,
191 int dlt_gateway_check_ip(DltGatewayConnection *con, char *value);
192 int dlt_gateway_check_port(DltGatewayConnection *con, char *value);
193 int dlt_gateway_check_ecu(DltGatewayConnection *con, char *value);
195  char *value);
196 int dlt_gateway_check_timeout(DltGatewayConnection *con, char *value);
199  char *value);
202  DltGatewayConfType ctype,
203  char *value);
204 int dlt_gateway_configure(DltGateway *gateway, char *config_file, int verbose);
207  int verbose);
208 #endif
209 #endif
STATIC int dlt_gateway_check_send_serial(DltGatewayConnection *con, char *value)
Definition: dlt_gateway.c:225
STATIC int dlt_gateway_check_control_messages(DltGatewayConnection *con, char *value)
Definition: dlt_gateway.c:244
int dlt_gateway_store_connection(DltGateway *gateway, DltGatewayConnection *tmp, int verbose)
Definition: dlt_gateway.c:369
connection_status
STATIC int dlt_gateway_check_timeout(DltGatewayConnection *con, char *value)
Definition: dlt_gateway.c:201
int dlt_gateway_forward_control_message(DltGateway *g, DltDaemonLocal *daemon_local, DltMessage *msg, char *ecu, int verbose)
Definition: dlt_gateway.c:957
int dlt_gateway_configure(DltGateway *gateway, char *config_file, int verbose)
Definition: dlt_gateway.c:455
void print_gateway_connection_details(const DltGateway *g)
DltReceiver * dlt_gateway_get_connection_receiver(DltGateway *g, int fd)
Definition: dlt_gateway.c:710
int dlt_gateway_process_gateway_timer(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *rec, int verbose)
Definition: dlt_gateway.c:914
STATIC int dlt_gateway_check_port(DltGatewayConnection *con, char *value)
Definition: dlt_gateway.c:112
STATIC int dlt_gateway_check_ecu(DltGatewayConnection *con, char *value)
Definition: dlt_gateway.c:144
int dlt_gateway_establish_connections(DltGateway *g, DltDaemonLocal *daemon_local, int verbose)
Definition: dlt_gateway.c:636
STATIC int dlt_gateway_check_connect_trigger(DltGatewayConnection *con, char *value)
Definition: dlt_gateway.c:168
int dlt_gateway_process_passive_node_messages(DltDaemon *daemon, DltDaemonLocal *daemon_local, DltReceiver *recv, int verbose)
Definition: dlt_gateway.c:731
int dlt_gateway_process_on_demand_request(DltGateway *g, DltDaemonLocal *daemon_local, char *node_id, int connection_status, int verbose)
Definition: dlt_gateway.c:1034
STATIC int dlt_gateway_check_param(DltGateway *gateway, DltGatewayConnection *con, DltGatewayConfType ctype, char *value)
Definition: dlt_gateway.c:345
void dlt_gateway_send_control_message(DltGatewayConnection *con, DltGateway *g, DltDaemonLocal *daemon_local, int verbose)
Definition: dlt_gateway.c:1123
DltGatewayConfType
Definition: dlt_gateway.c:54
void dlt_gateway_deinit(DltGateway *g, int verbose)
Definition: dlt_gateway.c:613
int dlt_gateway_init(DltDaemonLocal *daemon_local, int verbose)
Definition: dlt_gateway.c:577
STATIC int dlt_gateway_check_ip(DltGatewayConnection *con, char *value)
Definition: dlt_gateway.c:72