automotive-dlt
Main Page
Modules
Data Structures
Files
File List
Globals
dlt_gateway_types.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_types.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_TYPES_H_
59
#define DLT_GATEWAY_TYPES_H_
60
61
#include "
dlt_client.h
"
62
63
#define DLT_GATEWAY_CONFIG_PATH CONFIGURATION_FILES_DIR "/dlt_gateway.conf"
64
#define DLT_GATEWAY_TIMER_INTERVAL 1
65
66
#define DLT_GATEWAY_RECONNECT_MAX 1
/* reconnect once after connection loss */
67
68
/* maximum number of control messages that can be send after connection is
69
* established */
70
#define DLT_GATEWAY_MAX_STARTUP_CTRL_MSG 10
71
72
typedef
enum
73
{
74
DLT_GATEWAY_UNINITIALIZED
,
75
DLT_GATEWAY_INITIALIZED
,
76
DLT_GATEWAY_CONNECTED
,
77
DLT_GATEWAY_DISCONNECTED
78
}
connection_status
;
79
80
typedef
enum
81
{
82
DLT_GATEWAY_UNDEFINED
= -1,
83
DLT_GATEWAY_ON_STARTUP
,
/* connect directly on startup */
84
DLT_GATEWAY_ON_DEMAND
,
/* connect on demand only */
85
DLT_GATEWAY_DISABLED
/* disable this connection due to problems */
86
}
connection_trigger
;
87
88
/* DLT Gateway connection structure */
89
typedef
struct
{
90
int
handle
;
/* connection handle */
91
connection_status
status
;
/* connected/disconnected */
92
char
*
ecuid
;
/* name of passive node */
93
char
*
ip_address
;
/* IP address */
94
int
sock_domain
;
/* socket domain */
95
int
sock_type
;
/* socket type */
96
int
sock_protocol
;
/* socket protocol */
97
int
port
;
/* port */
98
connection_trigger
trigger
;
/* connection trigger */
99
int
timeout
;
/* connection timeout */
100
int
timeout_cnt
;
/* connection timeout counter */
101
int
reconnect_cnt
;
/* reconnection counter */
102
int
control_msgs[
DLT_GATEWAY_MAX_STARTUP_CTRL_MSG
];
/* msg IDs send on startup */
103
int
send_serial
;
/* Send serial header with control messages */
104
DltClient
client
;
/* DltClient structure */
105
}
DltGatewayConnection
;
106
107
/* DltGateway structure */
108
typedef
struct
109
{
110
int
send_serial
;
/* Default: Send serial header with control messages */
111
DltGatewayConnection
*
connections
;
/* pointer to connections */
112
int
num_connections
;
/* number of connections */
113
}
DltGateway
;
114
115
#endif
/* DLT_GATEWAY_TYPES_H_ */
DLT_GATEWAY_UNDEFINED
Definition:
dlt_gateway_types.h:82
DltGatewayConnection::timeout_cnt
int timeout_cnt
Definition:
dlt_gateway_types.h:100
connection_status
connection_status
Definition:
dlt_gateway_types.h:72
DltGatewayConnection::ecuid
char * ecuid
Definition:
dlt_gateway_types.h:92
DLT_GATEWAY_ON_DEMAND
Definition:
dlt_gateway_types.h:84
DLT_GATEWAY_UNINITIALIZED
Definition:
dlt_gateway_types.h:74
DLT_GATEWAY_DISABLED
Definition:
dlt_gateway_types.h:85
DltGatewayConnection::sock_protocol
int sock_protocol
Definition:
dlt_gateway_types.h:96
DltGatewayConnection::port
int port
Definition:
dlt_gateway_types.h:97
dlt_client.h
DltGatewayConnection::sock_domain
int sock_domain
Definition:
dlt_gateway_types.h:94
DltGatewayConnection::ip_address
char * ip_address
Definition:
dlt_gateway_types.h:93
connection_trigger
connection_trigger
Definition:
dlt_gateway_types.h:80
DltGateway
Definition:
dlt_gateway_types.h:108
DltGatewayConnection::trigger
connection_trigger trigger
Definition:
dlt_gateway_types.h:98
DltGatewayConnection::handle
int handle
Definition:
dlt_gateway_types.h:90
DltGatewayConnection::client
DltClient client
Definition:
dlt_gateway_types.h:104
DltGatewayConnection::reconnect_cnt
int reconnect_cnt
Definition:
dlt_gateway_types.h:101
DltGateway::connections
DltGatewayConnection * connections
Definition:
dlt_gateway_types.h:111
DLT_GATEWAY_CONNECTED
Definition:
dlt_gateway_types.h:76
DLT_GATEWAY_ON_STARTUP
Definition:
dlt_gateway_types.h:83
DltGatewayConnection
Definition:
dlt_gateway_types.h:89
DltGatewayConnection::sock_type
int sock_type
Definition:
dlt_gateway_types.h:95
DltGatewayConnection::status
connection_status status
Definition:
dlt_gateway_types.h:91
DltGatewayConnection::send_serial
int send_serial
Definition:
dlt_gateway_types.h:103
DltGateway::send_serial
int send_serial
Definition:
dlt_gateway_types.h:110
DltGatewayConnection::timeout
int timeout
Definition:
dlt_gateway_types.h:99
DltGateway::num_connections
int num_connections
Definition:
dlt_gateway_types.h:112
DLT_GATEWAY_INITIALIZED
Definition:
dlt_gateway_types.h:75
DLT_GATEWAY_MAX_STARTUP_CTRL_MSG
#define DLT_GATEWAY_MAX_STARTUP_CTRL_MSG
Definition:
dlt_gateway_types.h:70
DltClient
Definition:
dlt_client.h:89
DLT_GATEWAY_DISCONNECTED
Definition:
dlt_gateway_types.h:77
src
gateway
dlt_gateway_types.h
Generated by
1.8.11