forked from usdot-jpo-ode/jpo-ode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wydotLogRecords.h
124 lines (114 loc) · 3.98 KB
/
wydotLogRecords.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
* Copyright (c) 2017 Lear Corporation. All rights reserved.
* Proprietary and Confidential Material.
*
*/
#ifndef _LOG_CONFIGURATIONS_H_
#define _LOG_CONFIGURATIONS_H_
typedef enum _rxSource {
RSU = 0,
SAT, //XM satelite
RV, /* for BSM rx */
SNMP /* for SRM payload from backend/ODE*/
} rxSource;
/* securityResultCode contains below result codes */
typedef enum _securityResultCode { /* from dot3 */
success = 0,
inconsistentInputParameters = 2,
spduParsingInvalidInput = 3,
spduParsingUnsupportedCriticalInformationField = 4,
spduParsingCertificateNotFound = 5,
spduParsingGenerationTimeNotAvailable = 6,
spduParsingGenerationLocationNotAvailable = 7,
spduCertificateChainNotEnoughInformationToConstructChain = 8,
spduCertificateChainChainEndedAtUntrustedRoot = 9,
spduCertificateChainChainWasTooLongForImplementation = 10,
spduCertificateChainCertificateRevoked = 11,
spduCertificateChainOverdueCRL = 12,
spduCertificateChainInconsistentExpiryTimes = 13,
spduCertificateChainInconsistentStartTimes = 14,
spduCertificateChainInconsistentChainPermissions = 15,
spduCryptoVerificationFailure = 16,
spduConsistencyFutureCertificateAtGenerationTime = 17,
spduConsistencyExpiredCertificateAtGenerationTime = 18,
spduConsistencyExpiryDateTooEarly = 19,
spduConsistencyExpiryDateTooLate = 20,
spduConsistencyGenerationLocationOutsideValidityRegion = 21,
spduConsistencyNoGenerationLocation = 22,
spduConsistencyUnauthorizedPSID = 23,
spduInternalConsistencyExpiryTimeBeforeGenerationTime = 24,
spduInternalConsistencyextDataHashDoesntMatch = 25,
spduInternalConsistencynoExtDataHashProvided = 26,
spduInternalConsistencynoExtDataHashPresent = 27,
spduLocalConsistencyPSIDsDontMatch = 28,
spduLocalConsistencyChainWasTooLongForSDEE = 29,
spduRelevanceGenerationTimeTooFarInPast = 30,
spduRelevanceGenerationTimeTooFarInFuture = 31,
spduRelevanceExpiryTimeInPast = 32,
spduRelevanceGenerationLocationTooDistant = 33,
spduRelevanceReplayedSpdu = 34,
spduCertificateExpired = 35
} securityResultCode;
/* below elements units are as per SAE-2735 */
typedef struct _location {
int32_t latitude;
int32_t longitude;
int32_t elevation;
uint16_t speed;
uint16_t heading;
} __attribute__((__packed__)) location;
typedef struct _driverAlertRecord {
location curLocation;
uint32_t utcTimeInSec;
uint16_t msec;
uint16_t length;
/* payload of length size*/
} __attribute__((__packed__)) driverAlertRecord;
typedef struct _bsmLogRecHeader {
uint8_t direction; //EV_BSM=0, RV_BSM=1
location curLocation;
uint32_t utcTimeInSec;
uint16_t msec;
int8_t signStatus;
uint16_t length;
/* payload of length size*/
} __attribute__((__packed__)) bsmLogRecHeader;
typedef struct _receivedMsgRecord {
uint8_t rxFrom; /* refer rxSource for values */
location curLocation;
uint32_t utcTimeInSec;
uint16_t msec;
int8_t verificationStatus;
uint16_t length;
/* payload of length size*/
} __attribute__((__packed__)) receivedMsgRecord;
typedef struct _dnmMsgRecord {
location curLocation;
uint32_t utcTimeInSec;
uint16_t msec;
int8_t verificationStatus;
uint16_t length;
/* payload of length size*/
} __attribute__((__packed__)) dnmMsgRecord;
/*
* FW upgrade, SCMS, System Logs will be logged to
* respective log files in "syslog" format as mentioned
* in below eaxmple:
* May 2 21:30:36 wsarx: Consistency check failed [WS_ERR_NO_CA_CERTIFICATE].
* Do you prefer ISO time format here also??
*/
typedef struct _scmsRecord {
/* TODO */
} __attribute__((__packed__)) scmsRecord;
/*
* Same record format for both OBU upgrades & Sysmlog
*
*/
typedef struct _updatesSystemLogRecord {
location curLocation;
uint32_t utcTimeInSec;
uint16_t msec;
uint16_t length;
/* payload of length size*/
} __attribute__((__packed__)) updatesSystemLogRecord;
#endif