-
Notifications
You must be signed in to change notification settings - Fork 2
/
ECUModule.asn1
110 lines (104 loc) · 3.59 KB
/
ECUModule.asn1
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
ECUModule DEFINITIONS AUTOMATIC TAGS ::= BEGIN
IMPORTS BinaryData,
Filename,
Identifier,
Length,
Positive,
Signatures,
UTCDateTime FROM CommonModule
Metadata FROM MetadataModule
Target FROM TargetsModule
Token FROM TimeServerModule;
-- What a primary sends the director repository.
VehicleVersionManifest ::= SEQUENCE {
-- The signed portion of the manifest.
signed VehicleVersionManifestSigned,
-- The signature on the hash of the signed portion.
numberOfSignatures Length,
signatures Signatures
}
VehicleVersionManifestSigned ::= SEQUENCE {
-- A unique identifier for the vehicle.
vehicleIdentifier Identifier,
-- A unique identifier for the primary sending this manifest.
primaryIdentifier Identifier,
numberOfECUVersionManifests Length,
-- An ECU version manifest per secondary.
ecuVersionManifests ECUVersionManifests,
-- A message about a detected security attack, if any.
securityAttack VisibleString (SIZE(1..1024)) OPTIONAL,
-- https://tools.ietf.org/html/rfc6025#section-2.4.2
...
}
-- Adjust length of SEQUENCE OF to your needs.
ECUVersionManifests ::= SEQUENCE (SIZE(1..128)) OF ECUVersionManifest
-- What a secondary sends its primary after installation.
VersionReport ::= SEQUENCE {
-- Token for the time server.
tokenForTimeServer Token,
-- The ECU version manifest for the director.
ecuVersionManifest ECUVersionManifest,
...
}
ECUVersionManifest ::= SEQUENCE {
-- The signed portion of the manifest.
signed ECUVersionManifestSigned,
-- The signature on the hash of the signed portion.
numberOfSignatures Length,
signatures Signatures
}
ECUVersionManifestSigned ::= SEQUENCE {
-- A unique identifier for the ECU.
ecuIdentifier Identifier,
-- The previous time seen on the time server.
previousTime UTCDateTime,
-- The latest known time seen on the time server.
currentTime UTCDateTime,
-- A message about a detected security attack, if any.
securityAttack VisibleString (SIZE(1..1024)) OPTIONAL,
-- Metadata about the installed image.
installedImage Target,
...
}
-- A signal from a primary to its secondaries that new metadata will be sent.
MetadataFiles ::= SEQUENCE {
-- A globally unique identifier (e.g., a monotonically increasing counter)
-- for this set of metadata files.
setGUID INTEGER,
-- The number of metadata files that will be sent in this set.
numberOfMetadataFiles Length
}
MetadataFile ::= SEQUENCE {
-- The GUID associated with this set of metadata files.
setGUID INTEGER,
-- The file number in this set.
fileNumber Positive,
-- The metadata filename.
filename Filename,
-- The metadata itself.
metadata Metadata
}
-- What a secondary without additional storage sends its primary to request an
-- image.
ImageRequest ::= SEQUENCE {
filename Filename,
-- https://tools.ietf.org/html/rfc6025#section-2.4.2
...
}
ImageFile ::= SEQUENCE {
-- An image filename.
filename Filename,
-- The number of blocks in this image file.
numberOfBlocks Positive,
-- The size of each block.
blockSize Positive
}
ImageBlock ::= SEQUENCE {
-- The filename of the image associated with this block.
filename Filename,
-- The block number of the image file.
blockNumber Positive,
-- The image block itself.
block BinaryData
}
END