Compare commits
4
Commits
2f60623e18
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c13c3891c9 | ||
|
|
d3fc9bf66c | ||
|
|
6e4d293c3a | ||
|
|
d107534eb2 |
+9
-5
@@ -47,11 +47,6 @@ sdkconfig.old
|
||||
# and remove them on close, so they are transient and machine-local.
|
||||
~$*
|
||||
|
||||
# Colleague's standalone ESP32-C5 VRU station (signed ITS via Vanetza). It is its
|
||||
# own git repository with its own history; kept beside the project as a reference
|
||||
# for porting the signed-TX path into obu-firmware, not tracked here.
|
||||
/microbu-esp32c5/
|
||||
|
||||
# Full-flash images read back off the bench boards before reflashing them (16 MB each).
|
||||
# Restore with: esptool --chip esp32c5 -p COM<N> write-flash 0 <image>
|
||||
/firmware-backups/
|
||||
@@ -59,3 +54,12 @@ sdkconfig.old
|
||||
# ESP-IDF component manager downloads (espressif/esp-boost for obu-firmware's vanetza-idf), ~125 MB.
|
||||
# dependencies.lock beside the project pins them and is committed; this is its cache.
|
||||
managed_components/
|
||||
|
||||
# The colleague's standalone ESP32-C5 VRU station (its own repository, HAW GitLab
|
||||
# urban-mobility-lab/microbu/microbu-esp32c5). Kept beside the project on the lab laptop, for
|
||||
# reference and because the V2X2MAP bridge runs from its tools/, but not part of this repository:
|
||||
# obu-firmware only needs its vanetza-idf, which is copied to obu-firmware/external/vanetza-idf.
|
||||
/microbu-esp32c5/
|
||||
|
||||
# draw.io keeps a backup beside an open diagram.
|
||||
*.drawio.bkp
|
||||
|
||||
@@ -5,6 +5,25 @@ Engineering to-do list. The reviewer-facing open items live in
|
||||
|
||||
## Waiting on hardware
|
||||
|
||||
### On-air check of the V2X data logger (added 2026-10-02)
|
||||
|
||||
Needs the phone, a second station sending (the simulated car works) and, for the CiT One part, the OBU.
|
||||
Settings > Developer > V2X data logger. 110 unit tests pass. ESP32-C5 path checked on the Pixel 9 Pro on
|
||||
2026-10-02 (see the ticked item); the rest has not run on a device.
|
||||
|
||||
- [x] **ESP32-C5 (done 2026-10-02, simulated car + RSU on air):** 153 CAMs and 60 SPATEMs in 30 s, RSSI -56..-36 dBm,
|
||||
phone GNSS on every row, `obu_*` NULL, file integrity ok. MAPEM 0 as expected (firmware drops port 2003). Original steps: start a log, let the simulated car's CAMs arrive, stop. Pull the `.db` from
|
||||
`files/v2x_logs/` and check `messages`: `msg_type='CAM'`, `source='esp32'`, `rssi_dbm` filled,
|
||||
`phone_lat/lon` filled, `obu_*` NULL, `payload` decodes with `asn1tools`.
|
||||
- [ ] **CiT One:** same, `source='cit_one'`, `rssi_dbm` NULL, `obu_*` filled from `v2x/rx/obu_gnss`.
|
||||
Expect both `channel='raw'` and `channel='processed'` rows for the same CAM.
|
||||
- [ ] **Screen off for a few minutes** with the log running: rows keep arriving (foreground service).
|
||||
- [ ] **MAPEM and VAM on the ESP32-C5 need a firmware change.** `gn_unwrap.c` accepts only BTP ports
|
||||
2001, 2002, 2004; add 2003 (MAPEM) and 2018 (VAM) and reflash. Real MAPEMs are mostly over the
|
||||
512-byte link limit, so most will still be counted as oversize drops. The app side already logs
|
||||
any port. On the CiT One, MAPEM arrives via `v2x/rx/mapem` (subscribed now) or the processed
|
||||
`v2x-uca/output/json/map` topic; the API lists no VAM topic, so no VAM rows are expected there.
|
||||
|
||||
### Signed-TX firmware (vanetza-idf port), VAM and BLE: first on-air checks (added 2026-09-23)
|
||||
|
||||
obu-firmware is now a port of the colleague's `microbu-esp32c5` station (vanetza-idf, TS 103 097
|
||||
@@ -75,7 +94,7 @@ resets the board, the phone is on the other port.
|
||||
Signed CAMs from the pinger already show "signature verified" live. Switch to VAM with signing
|
||||
on: the VAM must be decoded (cyclist, position) and show "signature verified" too.
|
||||
Confirmed by the user 2026-09-23: signed VAMs decode and verify.
|
||||
- [x] **VAM.** Transmit VAM: BTP port 2018, psid 638; with `microbu-esp32c5/tools/wireshark/psid-vru.lua`
|
||||
- [x] **VAM.** Transmit VAM: BTP port 2018, psid 638; with `tools/wireshark/psid-vru.lua` from the colleague's microbu-esp32c5 repository
|
||||
Wireshark decodes the VAM (stationType cyclist, bicyclist profile in every ~2 s VAM). Rate:
|
||||
≥1 per 5 s standing still, about one per GNSS fix while riding.
|
||||
Covered by the V2X2MAP check above (decoded VAM, psid 638); Wireshark not needed.
|
||||
|
||||
@@ -72,6 +72,12 @@
|
||||
android:foregroundServiceType="location"
|
||||
android:exported="false" />
|
||||
|
||||
<!-- Developer V2X data logger: keeps the process and GNSS alive while a log records. -->
|
||||
<service
|
||||
android:name=".service.V2xLogService"
|
||||
android:foregroundServiceType="location"
|
||||
android:exported="false" />
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
|
||||
@@ -56,10 +56,12 @@ import com.hawhamburg.micr0bu.ui.screens.SensorsSettingsScreen
|
||||
import com.hawhamburg.micr0bu.ui.screens.SettingsScreen
|
||||
import com.hawhamburg.micr0bu.ui.screens.UnitsSettingsScreen
|
||||
import com.hawhamburg.micr0bu.ui.screens.UseCaseAlertsSettingsScreen
|
||||
import com.hawhamburg.micr0bu.ui.screens.V2xLogSettingsScreen
|
||||
import com.hawhamburg.micr0bu.ui.theme.MicrOBUTheme
|
||||
import com.hawhamburg.micr0bu.viewmodel.MqttViewModel
|
||||
import com.hawhamburg.micr0bu.viewmodel.SensorViewModel
|
||||
import com.hawhamburg.micr0bu.viewmodel.TripRecordingViewModel
|
||||
import com.hawhamburg.micr0bu.viewmodel.V2xLogViewModel
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@AndroidEntryPoint
|
||||
@@ -68,6 +70,7 @@ class MainActivity : AppCompatActivity() {
|
||||
private val viewModel: SensorViewModel by viewModels()
|
||||
private val mqttViewModel: MqttViewModel by viewModels()
|
||||
private val tripViewModel: TripRecordingViewModel by viewModels()
|
||||
private val logViewModel: V2xLogViewModel by viewModels()
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
installSplashScreen()
|
||||
@@ -99,6 +102,8 @@ class MainActivity : AppCompatActivity() {
|
||||
val denmEvents by mqttViewModel.denmEvents.collectAsState()
|
||||
val spatIntersections by mqttViewModel.spatIntersections.collectAsState()
|
||||
val ownCamPosition by mqttViewModel.ownCamPosition.collectAsState()
|
||||
val v2xLogState by logViewModel.state.collectAsState()
|
||||
val v2xLogFiles by logViewModel.files.collectAsState()
|
||||
|
||||
MicrOBUTheme(darkTheme = state.darkTheme) {
|
||||
val view = LocalView.current
|
||||
@@ -365,9 +370,21 @@ class MainActivity : AppCompatActivity() {
|
||||
state = state,
|
||||
onDeveloperMode = viewModel::setDeveloperMode,
|
||||
onOpenSensorMonitor = { navController.navigate(Screen.Sensors.route) },
|
||||
onOpenV2xLogger = { navController.navigate(Screen.SettingsV2xLog.route) },
|
||||
onBack = { navController.popBackStack() },
|
||||
)
|
||||
}
|
||||
composable(Screen.SettingsV2xLog.route) {
|
||||
V2xLogSettingsScreen(
|
||||
state = v2xLogState,
|
||||
files = v2xLogFiles,
|
||||
obuHardware = obuHardware,
|
||||
onStart = logViewModel::start,
|
||||
onStop = logViewModel::stop,
|
||||
onDelete = logViewModel::delete,
|
||||
onBack = { navController.popBackStack() },
|
||||
)
|
||||
}
|
||||
composable(Screen.SettingsAbout.route) {
|
||||
AboutSettingsScreen(onBack = { navController.popBackStack() })
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.hawhamburg.micr0bu.data.mqtt.MqttRepository
|
||||
import com.hawhamburg.micr0bu.data.mqtt.ObuHardwarePreferences
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RAW_CAM_TOPIC
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RAW_DENM_TOPIC
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RAW_MAPEM_TOPIC
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RAW_SPATEM_TOPIC
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RecvV2xMessage
|
||||
import com.hawhamburg.micr0bu.data.mqtt.UseCaseAlertPreferences
|
||||
@@ -241,6 +242,8 @@ class CamUseCaseRepository @Inject constructor(
|
||||
source = "mqtt",
|
||||
)
|
||||
RAW_SPATEM_TOPIC -> handleSpatUper(envelope.payload, rssiDbm = null, source = "mqtt")
|
||||
// No MAPEM decoder yet; it is received for the V2X data logger only.
|
||||
RAW_MAPEM_TOPIC -> Unit
|
||||
else -> Log.w(TAG, "rawV2x: unexpected topic ${raw.topic}")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
package com.hawhamburg.micr0bu.data.log
|
||||
|
||||
import android.database.sqlite.SQLiteDatabase
|
||||
import android.database.sqlite.SQLiteStatement
|
||||
import com.hawhamburg.micr0bu.domain.log.ItsMessageKind
|
||||
import java.io.File
|
||||
|
||||
/** One GNSS fix, as stored next to a logged message. Phone and OBU fixes share this shape. */
|
||||
data class LogGnss(
|
||||
val latitude: Double,
|
||||
val longitude: Double,
|
||||
val altitudeM: Double? = null,
|
||||
val speedMps: Double? = null,
|
||||
val headingDeg: Double? = null,
|
||||
val accuracyM: Double? = null,
|
||||
/** Epoch ms the fix was taken, so a stale fix shows as one instead of passing for current. */
|
||||
val fixMs: Long,
|
||||
)
|
||||
|
||||
/** One received V2X message, ready to be written. */
|
||||
class LogMessage(
|
||||
val tsMs: Long,
|
||||
/** `esp32` or `cit_one`: which link delivered it. */
|
||||
val source: String,
|
||||
/** `raw` (UPER bytes in [payload]) or `processed` (the Use Case app's JSON in [payloadText]). */
|
||||
val channel: String,
|
||||
val kind: ItsMessageKind,
|
||||
val messageId: Int?,
|
||||
val btpPort: Int?,
|
||||
val stationId: Long?,
|
||||
val isOwn: Boolean?,
|
||||
val rssiDbm: Int?,
|
||||
val geoRadiusM: Int?,
|
||||
val senderLat: Double?,
|
||||
val senderLon: Double?,
|
||||
val senderSpeedMps: Double?,
|
||||
val senderHeadingDeg: Double?,
|
||||
val summary: String?,
|
||||
val payload: ByteArray?,
|
||||
val payloadText: String?,
|
||||
val phone: LogGnss?,
|
||||
val obu: LogGnss?,
|
||||
)
|
||||
|
||||
/** One GNSS fix for the `gnss` table: the receiver's own track, independent of any message. */
|
||||
class LogGnssSample(val tsMs: Long, val source: String, val fix: LogGnss)
|
||||
|
||||
/**
|
||||
* A V2X log: one self-contained SQLite file. Not Room, on purpose: a log is a file the developer
|
||||
* pulls off the phone and opens in any SQLite tool or pandas, so it carries its own schema and
|
||||
* needs no migration path or app-side entity classes. The app never reads one back.
|
||||
*
|
||||
* Not thread-safe; [V2xLogger] drives it from one writer coroutine. Each [writeBatch] is one
|
||||
* transaction on the default rollback journal, so a killed process leaves a file that is
|
||||
* complete up to the last batch, and a single file with no `-wal` sidecar to forget when sharing.
|
||||
*
|
||||
* Columns that do not apply to a row are NULL rather than invented: `rssi_dbm` is NULL for the
|
||||
* CiT One, `obu_*` is NULL when no OBU position is available (always on the ESP32-C5, which has no
|
||||
* GNSS), and the `sender_*` fields are NULL for messages the app has no decoder for.
|
||||
*/
|
||||
class V2xLogWriter(val file: File, meta: Map<String, String>) {
|
||||
|
||||
private val db: SQLiteDatabase = SQLiteDatabase.openOrCreateDatabase(file, null)
|
||||
private val insertMessage: SQLiteStatement
|
||||
private val insertGnss: SQLiteStatement
|
||||
|
||||
init {
|
||||
db.execSQL(
|
||||
"""
|
||||
CREATE TABLE meta (key TEXT PRIMARY KEY, value TEXT)
|
||||
""".trimIndent()
|
||||
)
|
||||
db.execSQL(
|
||||
"""
|
||||
CREATE TABLE messages (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
ts_ms INTEGER NOT NULL,
|
||||
source TEXT NOT NULL,
|
||||
channel TEXT NOT NULL,
|
||||
msg_type TEXT NOT NULL,
|
||||
message_id INTEGER,
|
||||
btp_port INTEGER,
|
||||
station_id INTEGER,
|
||||
is_own INTEGER,
|
||||
rssi_dbm INTEGER,
|
||||
geo_radius_m INTEGER,
|
||||
sender_lat REAL,
|
||||
sender_lon REAL,
|
||||
sender_speed_mps REAL,
|
||||
sender_heading_deg REAL,
|
||||
summary TEXT,
|
||||
payload BLOB,
|
||||
payload_text TEXT,
|
||||
phone_lat REAL,
|
||||
phone_lon REAL,
|
||||
phone_alt_m REAL,
|
||||
phone_speed_mps REAL,
|
||||
phone_heading_deg REAL,
|
||||
phone_accuracy_m REAL,
|
||||
phone_fix_ms INTEGER,
|
||||
obu_lat REAL,
|
||||
obu_lon REAL,
|
||||
obu_alt_m REAL,
|
||||
obu_speed_mps REAL,
|
||||
obu_heading_deg REAL,
|
||||
obu_fix_ms INTEGER
|
||||
)
|
||||
""".trimIndent()
|
||||
)
|
||||
db.execSQL("CREATE INDEX idx_messages_ts ON messages(ts_ms)")
|
||||
db.execSQL("CREATE INDEX idx_messages_type ON messages(msg_type)")
|
||||
db.execSQL(
|
||||
"""
|
||||
CREATE TABLE gnss (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
ts_ms INTEGER NOT NULL,
|
||||
source TEXT NOT NULL,
|
||||
lat REAL NOT NULL,
|
||||
lon REAL NOT NULL,
|
||||
alt_m REAL,
|
||||
speed_mps REAL,
|
||||
heading_deg REAL,
|
||||
accuracy_m REAL,
|
||||
fix_ms INTEGER NOT NULL
|
||||
)
|
||||
""".trimIndent()
|
||||
)
|
||||
db.execSQL("CREATE INDEX idx_gnss_ts ON gnss(ts_ms)")
|
||||
// Same rows, with the timestamp also as readable UTC, for anyone browsing in a SQLite GUI.
|
||||
db.execSQL(
|
||||
"CREATE VIEW messages_v AS SELECT *, " +
|
||||
"strftime('%Y-%m-%d %H:%M:%f', ts_ms / 1000.0, 'unixepoch') AS ts_utc FROM messages"
|
||||
)
|
||||
db.execSQL("PRAGMA user_version = $SCHEMA_VERSION")
|
||||
for ((k, v) in meta) setMeta(k, v)
|
||||
setMeta("schema_version", SCHEMA_VERSION.toString())
|
||||
|
||||
insertMessage = db.compileStatement(
|
||||
"INSERT INTO messages (ts_ms, source, channel, msg_type, message_id, btp_port, station_id, " +
|
||||
"is_own, rssi_dbm, geo_radius_m, sender_lat, sender_lon, sender_speed_mps, " +
|
||||
"sender_heading_deg, summary, payload, payload_text, " +
|
||||
"phone_lat, phone_lon, phone_alt_m, phone_speed_mps, phone_heading_deg, " +
|
||||
"phone_accuracy_m, phone_fix_ms, obu_lat, obu_lon, obu_alt_m, obu_speed_mps, " +
|
||||
"obu_heading_deg, obu_fix_ms) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
|
||||
)
|
||||
insertGnss = db.compileStatement(
|
||||
"INSERT INTO gnss (ts_ms, source, lat, lon, alt_m, speed_mps, heading_deg, accuracy_m, fix_ms) " +
|
||||
"VALUES (?,?,?,?,?,?,?,?,?)"
|
||||
)
|
||||
}
|
||||
|
||||
fun setMeta(key: String, value: String) {
|
||||
db.execSQL("INSERT OR REPLACE INTO meta (key, value) VALUES (?, ?)", arrayOf(key, value))
|
||||
}
|
||||
|
||||
/** Writes [messages] and [gnss] in one transaction. */
|
||||
fun writeBatch(messages: List<LogMessage>, gnss: List<LogGnssSample>) {
|
||||
if (messages.isEmpty() && gnss.isEmpty()) return
|
||||
db.beginTransaction()
|
||||
try {
|
||||
for (m in messages) bindAndRun(m)
|
||||
for (g in gnss) bindAndRun(g)
|
||||
db.setTransactionSuccessful()
|
||||
} finally {
|
||||
db.endTransaction()
|
||||
}
|
||||
}
|
||||
|
||||
fun close() {
|
||||
runCatching { insertMessage.close() }
|
||||
runCatching { insertGnss.close() }
|
||||
runCatching { db.close() }
|
||||
}
|
||||
|
||||
private fun bindAndRun(m: LogMessage) {
|
||||
val s = insertMessage
|
||||
s.clearBindings()
|
||||
s.bind(1, m.tsMs)
|
||||
s.bind(2, m.source)
|
||||
s.bind(3, m.channel)
|
||||
s.bind(4, m.kind.label)
|
||||
s.bind(5, m.messageId?.toLong())
|
||||
s.bind(6, m.btpPort?.toLong())
|
||||
s.bind(7, m.stationId)
|
||||
s.bind(8, m.isOwn?.let { if (it) 1L else 0L })
|
||||
s.bind(9, m.rssiDbm?.toLong())
|
||||
s.bind(10, m.geoRadiusM?.toLong())
|
||||
s.bind(11, m.senderLat)
|
||||
s.bind(12, m.senderLon)
|
||||
s.bind(13, m.senderSpeedMps)
|
||||
s.bind(14, m.senderHeadingDeg)
|
||||
s.bind(15, m.summary)
|
||||
s.bind(16, m.payload)
|
||||
s.bind(17, m.payloadText)
|
||||
s.bind(18, m.phone?.latitude)
|
||||
s.bind(19, m.phone?.longitude)
|
||||
s.bind(20, m.phone?.altitudeM)
|
||||
s.bind(21, m.phone?.speedMps)
|
||||
s.bind(22, m.phone?.headingDeg)
|
||||
s.bind(23, m.phone?.accuracyM)
|
||||
s.bind(24, m.phone?.fixMs)
|
||||
s.bind(25, m.obu?.latitude)
|
||||
s.bind(26, m.obu?.longitude)
|
||||
s.bind(27, m.obu?.altitudeM)
|
||||
s.bind(28, m.obu?.speedMps)
|
||||
s.bind(29, m.obu?.headingDeg)
|
||||
s.bind(30, m.obu?.fixMs)
|
||||
s.executeInsert()
|
||||
}
|
||||
|
||||
private fun bindAndRun(g: LogGnssSample) {
|
||||
val s = insertGnss
|
||||
s.clearBindings()
|
||||
s.bind(1, g.tsMs)
|
||||
s.bind(2, g.source)
|
||||
s.bind(3, g.fix.latitude)
|
||||
s.bind(4, g.fix.longitude)
|
||||
s.bind(5, g.fix.altitudeM)
|
||||
s.bind(6, g.fix.speedMps)
|
||||
s.bind(7, g.fix.headingDeg)
|
||||
s.bind(8, g.fix.accuracyM)
|
||||
s.bind(9, g.fix.fixMs)
|
||||
s.executeInsert()
|
||||
}
|
||||
|
||||
// clearBindings() leaves every parameter NULL, so a null value is simply not bound.
|
||||
private fun SQLiteStatement.bind(i: Int, v: Long?) { if (v != null) bindLong(i, v) }
|
||||
private fun SQLiteStatement.bind(i: Int, v: Double?) { if (v != null) bindDouble(i, v) }
|
||||
private fun SQLiteStatement.bind(i: Int, v: String?) { if (v != null) bindString(i, v) }
|
||||
private fun SQLiteStatement.bind(i: Int, v: ByteArray?) { if (v != null) bindBlob(i, v) }
|
||||
|
||||
companion object {
|
||||
const val SCHEMA_VERSION = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,413 @@
|
||||
package com.hawhamburg.micr0bu.data.log
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import com.hawhamburg.micr0bu.data.GnssReading
|
||||
import com.hawhamburg.micr0bu.data.SensorRepository
|
||||
import com.hawhamburg.micr0bu.data.cam.CamUseCaseRepository
|
||||
import com.hawhamburg.micr0bu.data.mqtt.MessageDirection
|
||||
import com.hawhamburg.micr0bu.data.mqtt.MqttRepository
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RAW_CAM_TOPIC
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RAW_DENM_TOPIC
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RAW_MAPEM_TOPIC
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RAW_SPATEM_TOPIC
|
||||
import com.hawhamburg.micr0bu.data.mqtt.RecvV2xMessage
|
||||
import com.hawhamburg.micr0bu.data.transport.Esp32Link
|
||||
import com.hawhamburg.micr0bu.data.transport.Esp32LinkState
|
||||
import com.hawhamburg.micr0bu.data.transport.ObuHardware
|
||||
import com.hawhamburg.micr0bu.data.transport.SerialFrameType
|
||||
import com.hawhamburg.micr0bu.data.transport.V2xRxFrame
|
||||
import com.hawhamburg.micr0bu.domain.asn1.DenmUperCodec
|
||||
import com.hawhamburg.micr0bu.domain.asn1.RealAsn1UperCodec
|
||||
import com.hawhamburg.micr0bu.domain.asn1.SpatemUperCodec
|
||||
import com.hawhamburg.micr0bu.domain.cam.ObuGnssParser
|
||||
import com.hawhamburg.micr0bu.domain.log.ItsMessageKind
|
||||
import com.hawhamburg.micr0bu.domain.log.classifyItsPdu
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.cancelAndJoin
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
import kotlinx.coroutines.flow.update
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withTimeoutOrNull
|
||||
import java.io.File
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
private const val TAG = "V2xLogger"
|
||||
private const val LOG_DIR = "v2x_logs"
|
||||
private const val PROCESSED_PREFIX = "v2x-uca/output/json/"
|
||||
private const val OBU_GNSS_TOPIC = "v2x/rx/obu_gnss"
|
||||
private const val SOURCE_ESP32 = "esp32"
|
||||
private const val SOURCE_CIT_ONE = "cit_one"
|
||||
private const val SOURCE_PHONE = "phone"
|
||||
private const val SOURCE_OBU = "obu"
|
||||
|
||||
/** How long the writer collects rows before it commits them. */
|
||||
private const val FLUSH_INTERVAL_MS = 250L
|
||||
|
||||
/** What the logging screen shows about the log in progress. */
|
||||
data class V2xLogState(
|
||||
val active: Boolean = false,
|
||||
val fileName: String? = null,
|
||||
val startedMs: Long = 0L,
|
||||
/** Rows written so far, by kind. Kinds never heard are absent. */
|
||||
val counts: Map<ItsMessageKind, Int> = emptyMap(),
|
||||
val total: Int = 0,
|
||||
val fileBytes: Long = 0L,
|
||||
/** Age of the newest phone / OBU fix at the time of the last update; null if none yet. */
|
||||
val phoneFixAgeMs: Long? = null,
|
||||
val obuFixAgeMs: Long? = null,
|
||||
/** Set when the file could not be created or written. */
|
||||
val error: String? = null,
|
||||
)
|
||||
|
||||
/** A log file on the device. */
|
||||
data class V2xLogFile(val file: File, val sizeBytes: Long, val modifiedMs: Long, val active: Boolean) {
|
||||
val name: String get() = file.name
|
||||
}
|
||||
|
||||
/**
|
||||
* Developer-tool logger: records every V2X message the phone receives, with a timestamp, the
|
||||
* phone's GNSS fix, the OBU's GNSS fix where there is one, and RSSI where the hardware reports it,
|
||||
* into one SQLite file per run (see [V2xLogWriter] for the schema).
|
||||
*
|
||||
* Works on both hardware paths and listens to whichever is selected:
|
||||
* - **ESP32-C5**: the V2X_RX frames from [Esp32Link], with the firmware's RSSI. No OBU position,
|
||||
* since that board has no GNSS.
|
||||
* - **CiT One**: the raw `v2x/rx` protobuf topics over MQTT, and the Use Case app's processed
|
||||
* `v2x-uca/output/json` topics as a second channel (the only source of MAPEM when the OBU does
|
||||
* not publish `v2x/rx/mapem`). The OBU's position comes from `v2x/rx/obu_gnss`. The API carries
|
||||
* no RSSI, so that column stays NULL.
|
||||
*
|
||||
* Every message is stored, including kinds the app cannot decode (MAPEM, VAM): the UPER bytes go
|
||||
* in the file untouched, and where a decoder exists a few fields are decoded alongside for
|
||||
* convenience. A message is never skipped because decoding failed.
|
||||
*
|
||||
* What it can hear is bounded by the hardware, not by this class: the current ESP32-C5 firmware
|
||||
* forwards only BTP ports 2001, 2002 and 2004 (see `gn_unwrap.c`), so MAPEM and VAM appear in an
|
||||
* ESP32 log only once the firmware accepts ports 2003 and 2018.
|
||||
*
|
||||
* A singleton, like the repositories it listens to. [com.hawhamburg.micr0bu.service.V2xLogService]
|
||||
* keeps the process alive and the CPU awake while a log runs; this class does the work.
|
||||
*/
|
||||
@Singleton
|
||||
class V2xLogger @Inject constructor(
|
||||
@ApplicationContext private val context: Context,
|
||||
private val mqttRepository: MqttRepository,
|
||||
private val esp32Link: Esp32Link,
|
||||
private val camUseCaseRepository: CamUseCaseRepository,
|
||||
private val camCodec: RealAsn1UperCodec,
|
||||
) {
|
||||
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
|
||||
|
||||
private val _state = MutableStateFlow(V2xLogState())
|
||||
val state: StateFlow<V2xLogState> = _state.asStateFlow()
|
||||
|
||||
private val _files = MutableStateFlow<List<V2xLogFile>>(emptyList())
|
||||
/** Logs on the device, newest first. Call [refreshFiles] after anything that changes the folder. */
|
||||
val files: StateFlow<List<V2xLogFile>> = _files.asStateFlow()
|
||||
|
||||
private val logDir: File get() = File(context.filesDir, LOG_DIR).apply { mkdirs() }
|
||||
|
||||
private var session: Job? = null
|
||||
private var rows = Channel<Any>(Channel.UNLIMITED)
|
||||
|
||||
@Volatile private var phoneFix: LogGnss? = null
|
||||
@Volatile private var obuFix: LogGnss? = null
|
||||
|
||||
fun start() {
|
||||
if (session?.isActive == true) return
|
||||
val startedMs = System.currentTimeMillis()
|
||||
val hardware = mqttRepository.obuHardware.value
|
||||
val file = File(logDir, fileNameFor(startedMs, hardware))
|
||||
val writer = try {
|
||||
V2xLogWriter(file, metaFor(startedMs, hardware))
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "cannot create ${file.name}", e)
|
||||
file.delete()
|
||||
_state.value = V2xLogState(error = e.message ?: e.javaClass.simpleName)
|
||||
return
|
||||
}
|
||||
phoneFix = null
|
||||
obuFix = null
|
||||
rows = Channel(Channel.UNLIMITED)
|
||||
_state.value = V2xLogState(active = true, fileName = file.name, startedMs = startedMs)
|
||||
refreshFiles()
|
||||
|
||||
session = scope.launch {
|
||||
val sources = listOf(
|
||||
launch { collectEsp32() },
|
||||
launch { collectCitOneRaw() },
|
||||
launch { collectCitOneMessages() },
|
||||
launch { collectPhoneGnss() },
|
||||
)
|
||||
try {
|
||||
runWriter(writer, file)
|
||||
} finally {
|
||||
sources.forEach { it.cancel() }
|
||||
runCatching { writer.setMeta("ended_ms", System.currentTimeMillis().toString()) }
|
||||
writer.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Stops the log and waits for the last rows to reach the file. */
|
||||
suspend fun stop() {
|
||||
val running = session ?: return
|
||||
// Closing the channel lets the writer drain everything already queued before it ends.
|
||||
rows.close()
|
||||
withTimeoutOrNull(5_000L) { running.join() } ?: running.cancelAndJoin()
|
||||
session = null
|
||||
_state.update { it.copy(active = false) }
|
||||
refreshFiles()
|
||||
}
|
||||
|
||||
fun delete(log: V2xLogFile): Boolean {
|
||||
if (log.active) return false
|
||||
val ok = log.file.delete()
|
||||
refreshFiles()
|
||||
return ok
|
||||
}
|
||||
|
||||
fun refreshFiles() {
|
||||
val activeName = _state.value.fileName.takeIf { _state.value.active }
|
||||
_files.value = logDir.listFiles { f -> f.isFile && f.extension == "db" }
|
||||
.orEmpty()
|
||||
.map { V2xLogFile(it, it.length(), it.lastModified(), it.name == activeName) }
|
||||
.sortedByDescending { it.modifiedMs }
|
||||
}
|
||||
|
||||
// ── Sources ───────────────────────────────────────────────────────────────
|
||||
|
||||
private suspend fun collectEsp32() {
|
||||
esp32Link.incomingFrames.collect { frame ->
|
||||
if (frame.type != SerialFrameType.V2X_RX) return@collect
|
||||
if (mqttRepository.obuHardware.value != ObuHardware.ESP32_C5) return@collect
|
||||
if (esp32Link.state.value != Esp32LinkState.CONNECTED) return@collect
|
||||
val v2x = V2xRxFrame.parse(frame.payload) ?: return@collect
|
||||
enqueueRaw(
|
||||
source = SOURCE_ESP32, uper = v2x.uper, btpPort = v2x.btpPort,
|
||||
rssiDbm = v2x.rssiDbm, geoRadiusM = v2x.geoArea?.radiusMeters,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun collectCitOneRaw() {
|
||||
mqttRepository.rawV2x.collect { raw ->
|
||||
if (mqttRepository.obuHardware.value != ObuHardware.CIT_ONE) return@collect
|
||||
val envelope = RecvV2xMessage.parse(raw.bytes)
|
||||
if (envelope == null) {
|
||||
Log.w(TAG, "unparseable RecvV2XMessage on ${raw.topic}, ${raw.bytes.size} bytes")
|
||||
return@collect
|
||||
}
|
||||
enqueueRaw(
|
||||
source = SOURCE_CIT_ONE, uper = envelope.payload,
|
||||
// The envelope's own port when it has one; the topic says the same thing otherwise.
|
||||
btpPort = envelope.destinationPort ?: portOfRawTopic(raw.topic),
|
||||
rssiDbm = null, geoRadiusM = envelope.destAreaRadiusM,
|
||||
tsMs = raw.timestamp,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun collectCitOneMessages() {
|
||||
mqttRepository.messages.collect { msg ->
|
||||
if (msg.direction != MessageDirection.RX) return@collect
|
||||
if (mqttRepository.obuHardware.value != ObuHardware.CIT_ONE) return@collect
|
||||
if (msg.topic == OBU_GNSS_TOPIC) {
|
||||
val ego = ObuGnssParser.parseEgo(msg.payload, timestamp = msg.timestamp) ?: return@collect
|
||||
val fix = LogGnss(
|
||||
latitude = ego.latitude, longitude = ego.longitude,
|
||||
speedMps = ego.speedMps, headingDeg = ego.headingDeg, fixMs = msg.timestamp,
|
||||
)
|
||||
obuFix = fix
|
||||
rows.trySend(LogGnssSample(msg.timestamp, SOURCE_OBU, fix))
|
||||
return@collect
|
||||
}
|
||||
if (!msg.topic.startsWith(PROCESSED_PREFIX)) return@collect
|
||||
val kind = ItsMessageKind.fromProcessedTopicName(msg.topic.removePrefix(PROCESSED_PREFIX))
|
||||
?: return@collect
|
||||
rows.trySend(
|
||||
LogMessage(
|
||||
tsMs = msg.timestamp, source = SOURCE_CIT_ONE, channel = "processed", kind = kind,
|
||||
messageId = null, btpPort = null, stationId = null, isOwn = null, rssiDbm = null,
|
||||
geoRadiusM = null, senderLat = null, senderLon = null, senderSpeedMps = null,
|
||||
senderHeadingDeg = null, summary = null, payload = null, payloadText = msg.payload,
|
||||
phone = phoneFix, obu = obuFix,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Phone GNSS, re-subscribed in a loop for the same reason [CamUseCaseRepository] does: a log
|
||||
* can be started before the location permission is granted, and a single attempt would then
|
||||
* leave every row without a phone position for the whole run.
|
||||
*/
|
||||
private suspend fun collectPhoneGnss() {
|
||||
val sensors = SensorRepository(context)
|
||||
while (true) {
|
||||
runCatching {
|
||||
sensors.gnssFlow().collect { reading ->
|
||||
val fix = reading.toLogGnss()
|
||||
phoneFix = fix
|
||||
rows.trySend(LogGnssSample(System.currentTimeMillis(), SOURCE_PHONE, fix))
|
||||
}
|
||||
}
|
||||
delay(5_000L)
|
||||
}
|
||||
}
|
||||
|
||||
// ── Rows ──────────────────────────────────────────────────────────────────
|
||||
|
||||
private fun enqueueRaw(
|
||||
source: String,
|
||||
uper: ByteArray,
|
||||
btpPort: Int?,
|
||||
rssiDbm: Int?,
|
||||
geoRadiusM: Int?,
|
||||
tsMs: Long = System.currentTimeMillis(),
|
||||
) {
|
||||
val cls = classifyItsPdu(uper, btpPort)
|
||||
val decoded = decode(cls.kind, uper, rssiDbm, geoRadiusM, tsMs)
|
||||
rows.trySend(
|
||||
LogMessage(
|
||||
tsMs = tsMs, source = source, channel = "raw", kind = cls.kind,
|
||||
messageId = cls.messageId, btpPort = btpPort, stationId = cls.stationId,
|
||||
isOwn = cls.stationId?.let { camUseCaseRepository.isOwnStationId(it) },
|
||||
rssiDbm = rssiDbm, geoRadiusM = geoRadiusM,
|
||||
senderLat = decoded.lat, senderLon = decoded.lon,
|
||||
senderSpeedMps = decoded.speedMps, senderHeadingDeg = decoded.headingDeg,
|
||||
summary = decoded.summary, payload = uper, payloadText = null,
|
||||
phone = phoneFix, obu = obuFix,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private class Decoded(
|
||||
val lat: Double? = null, val lon: Double? = null,
|
||||
val speedMps: Double? = null, val headingDeg: Double? = null,
|
||||
val summary: String? = null,
|
||||
)
|
||||
|
||||
/** Decoded convenience fields for the kinds the app can decode. A failure just leaves them NULL. */
|
||||
private fun decode(kind: ItsMessageKind, uper: ByteArray, rssiDbm: Int?, geoRadiusM: Int?, tsMs: Long): Decoded =
|
||||
runCatching {
|
||||
when (kind) {
|
||||
ItsMessageKind.CAM -> camCodec.decodeCam(uper, tsMs)?.let {
|
||||
Decoded(it.latitude, it.longitude, it.speedMps, it.headingDeg, "stationType=${it.stationType}")
|
||||
}
|
||||
ItsMessageKind.DENM -> DenmUperCodec.decode(uper, tsMs, rssiDbm, geoRadiusM)?.let {
|
||||
Decoded(
|
||||
it.latitude, it.longitude,
|
||||
summary = "seq=${it.sequenceNumber} cause=${it.causeCode}/${it.subCauseCode}" +
|
||||
if (it.isTermination) " termination" else "",
|
||||
)
|
||||
}
|
||||
ItsMessageKind.SPATEM -> SpatemUperCodec.decode(uper, tsMs, rssiDbm)?.let { s ->
|
||||
Decoded(summary = "intersections=" + s.intersections.joinToString(",") { it.key } +
|
||||
" movements=" + s.intersections.sumOf { it.movements.size })
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}.getOrNull() ?: Decoded()
|
||||
|
||||
// ── Writer ────────────────────────────────────────────────────────────────
|
||||
|
||||
/** Drains [rows] into [writer] in short batches, until the channel is closed and empty. */
|
||||
private suspend fun runWriter(writer: V2xLogWriter, file: File) {
|
||||
val counts = HashMap<ItsMessageKind, Int>()
|
||||
var total = 0
|
||||
var failure: String? = null
|
||||
val messages = ArrayList<LogMessage>()
|
||||
val gnss = ArrayList<LogGnssSample>()
|
||||
|
||||
while (true) {
|
||||
// Block for the first row of a batch, give more a moment to arrive, then take
|
||||
// whatever is queued. No timeout around receive: a cancelled receive can lose the
|
||||
// element it was handing over, which a logger must not do.
|
||||
val first = rows.receiveCatching().getOrNull() ?: break
|
||||
add(first, messages, gnss)
|
||||
delay(FLUSH_INTERVAL_MS)
|
||||
while (true) {
|
||||
val next = rows.tryReceive().getOrNull() ?: break
|
||||
add(next, messages, gnss)
|
||||
}
|
||||
try {
|
||||
writer.writeBatch(messages, gnss)
|
||||
} catch (e: Exception) {
|
||||
// Disk full or the file went away. Say so on screen rather than logging into a void.
|
||||
Log.e(TAG, "write failed", e)
|
||||
failure = e.message ?: e.javaClass.simpleName
|
||||
rows.close()
|
||||
break
|
||||
}
|
||||
for (m in messages) counts.merge(m.kind, 1, Int::plus)
|
||||
total += messages.size
|
||||
messages.clear(); gnss.clear()
|
||||
|
||||
val now = System.currentTimeMillis()
|
||||
_state.update {
|
||||
it.copy(
|
||||
counts = counts.toMap(), total = total, fileBytes = file.length(),
|
||||
phoneFixAgeMs = phoneFix?.let { f -> now - f.fixMs },
|
||||
obuFixAgeMs = obuFix?.let { f -> now - f.fixMs },
|
||||
)
|
||||
}
|
||||
}
|
||||
_state.update { it.copy(fileBytes = file.length(), error = failure ?: it.error, active = it.active && failure == null) }
|
||||
}
|
||||
|
||||
private fun add(row: Any, messages: MutableList<LogMessage>, gnss: MutableList<LogGnssSample>) {
|
||||
when (row) {
|
||||
is LogMessage -> messages += row
|
||||
is LogGnssSample -> gnss += row
|
||||
}
|
||||
}
|
||||
|
||||
// ── Helpers ───────────────────────────────────────────────────────────────
|
||||
|
||||
private fun portOfRawTopic(topic: String): Int? = when (topic) {
|
||||
RAW_CAM_TOPIC -> 2001
|
||||
RAW_DENM_TOPIC -> 2002
|
||||
RAW_MAPEM_TOPIC -> 2003
|
||||
RAW_SPATEM_TOPIC -> 2004
|
||||
else -> null
|
||||
}
|
||||
|
||||
private fun GnssReading.toLogGnss() = LogGnss(
|
||||
latitude = latitude, longitude = longitude, altitudeM = altitude,
|
||||
speedMps = speedMs.toDouble(), headingDeg = bearingDeg.toDouble(),
|
||||
accuracyM = accuracyM.toDouble(), fixMs = timestamp,
|
||||
)
|
||||
|
||||
private fun fileNameFor(startedMs: Long, hardware: ObuHardware): String {
|
||||
val stamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.US).format(Date(startedMs))
|
||||
val mode = if (hardware == ObuHardware.ESP32_C5) "esp32" else "citone"
|
||||
return "v2x_log_${stamp}_$mode.db"
|
||||
}
|
||||
|
||||
private fun metaFor(startedMs: Long, hardware: ObuHardware) = mapOf(
|
||||
"started_ms" to startedMs.toString(),
|
||||
"hardware" to if (hardware == ObuHardware.ESP32_C5) "esp32_c5" else "cit_one",
|
||||
"phone" to "${Build.MANUFACTURER} ${Build.MODEL}",
|
||||
"android_sdk" to Build.VERSION.SDK_INT.toString(),
|
||||
"app_version" to runCatching {
|
||||
context.packageManager.getPackageInfo(context.packageName, 0).versionName ?: "?"
|
||||
}.getOrDefault("?"),
|
||||
"note" to "ts_ms is phone wall-clock epoch ms. payload is the ITS PDU as UPER bytes. " +
|
||||
"rssi_dbm is NULL on the CiT One; obu_* is NULL on the ESP32-C5.",
|
||||
)
|
||||
}
|
||||
@@ -48,6 +48,9 @@ private val SUBSCRIBED_TOPICS = listOf(
|
||||
RAW_CAM_TOPIC,
|
||||
RAW_DENM_TOPIC,
|
||||
RAW_SPATEM_TOPIC,
|
||||
// Nothing decodes MAPEM yet; subscribed so the V2X data logger records it. An OBU product
|
||||
// configuration that does not publish it simply never delivers anything here.
|
||||
RAW_MAPEM_TOPIC,
|
||||
// Kept subscribed as a fallback for an OBU whose product configuration does not publish the
|
||||
// raw topics, and because the Use Case app is still the only source of its own alert output.
|
||||
"v2x-uca/output/json/cam",
|
||||
@@ -61,8 +64,9 @@ private val SUBSCRIBED_TOPICS = listOf(
|
||||
const val RAW_CAM_TOPIC = "v2x/rx/cam"
|
||||
const val RAW_DENM_TOPIC = "v2x/rx/denm"
|
||||
const val RAW_SPATEM_TOPIC = "v2x/rx/spatem"
|
||||
const val RAW_MAPEM_TOPIC = "v2x/rx/mapem"
|
||||
|
||||
private val RAW_V2X_TOPICS = setOf(RAW_CAM_TOPIC, RAW_DENM_TOPIC, RAW_SPATEM_TOPIC)
|
||||
private val RAW_V2X_TOPICS = setOf(RAW_CAM_TOPIC, RAW_DENM_TOPIC, RAW_SPATEM_TOPIC, RAW_MAPEM_TOPIC)
|
||||
|
||||
/**
|
||||
* A message straight off a `v2x/rx` topic, before the protobuf envelope is opened.
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.hawhamburg.micr0bu.domain.log
|
||||
|
||||
/**
|
||||
* Which ITS message a received PDU is, for the V2X data logger.
|
||||
*
|
||||
* The logger records every message it hears, including ones the app has no decoder for (MAPEM,
|
||||
* VAM), so classification cannot depend on a codec. It reads the two things every ETSI ITS PDU
|
||||
* has in common instead: the `ItsPduHeader` at the start of the UPER bytes
|
||||
* (`protocolVersion` 8 bits, `messageID` 8 bits, `stationID` 32 bits, none of it extensible, so
|
||||
* it sits byte-aligned at the front), and the BTP destination port the transport reports.
|
||||
*
|
||||
* messageID is the primary source. The port is the fallback for a payload too short to carry a
|
||||
* header. Mind the crossover: SPATEM is messageID 4 on port 2004 but MAPEM is messageID 5 on port
|
||||
* 2003; the two numbering schemes are unrelated.
|
||||
*/
|
||||
enum class ItsMessageKind(val label: String, val messageId: Int, val btpPort: Int?) {
|
||||
DENM("DENM", 1, 2002),
|
||||
CAM("CAM", 2, 2001),
|
||||
SPATEM("SPATEM", 4, 2004),
|
||||
MAPEM("MAPEM", 5, 2003),
|
||||
CPM("CPM", 14, null),
|
||||
VAM("VAM", 16, 2018),
|
||||
OTHER("OTHER", -1, null);
|
||||
|
||||
companion object {
|
||||
/** The five kinds the logger counts and shows on screen. */
|
||||
val TRACKED = listOf(CAM, DENM, SPATEM, MAPEM, VAM)
|
||||
|
||||
fun fromMessageId(id: Int): ItsMessageKind? = entries.firstOrNull { it.messageId == id && it != OTHER }
|
||||
|
||||
fun fromBtpPort(port: Int): ItsMessageKind? = entries.firstOrNull { it.btpPort == port }
|
||||
|
||||
/** Matches the `v2x-uca/output/json/<name>` suffix, for the CiT One's processed topics. */
|
||||
fun fromProcessedTopicName(name: String): ItsMessageKind? = when (name) {
|
||||
"cam" -> CAM
|
||||
"denm" -> DENM
|
||||
"spat" -> SPATEM
|
||||
"map" -> MAPEM
|
||||
"cpm" -> CPM
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** The fixed 6-byte header at the start of every ETSI ITS PDU. */
|
||||
data class ItsPduHeader(val protocolVersion: Int, val messageId: Int, val stationId: Long) {
|
||||
companion object {
|
||||
const val SIZE = 6
|
||||
|
||||
/** Null when [uper] is too short to hold a header. */
|
||||
fun parse(uper: ByteArray): ItsPduHeader? {
|
||||
if (uper.size < SIZE) return null
|
||||
var station = 0L
|
||||
for (i in 2 until SIZE) station = (station shl 8) or (uper[i].toLong() and 0xFF)
|
||||
return ItsPduHeader(
|
||||
protocolVersion = uper[0].toInt() and 0xFF,
|
||||
messageId = uper[1].toInt() and 0xFF,
|
||||
stationId = station,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** What [classifyItsPdu] worked out about one received PDU. */
|
||||
data class ItsClassification(val kind: ItsMessageKind, val messageId: Int?, val stationId: Long?)
|
||||
|
||||
/**
|
||||
* Classifies [uper], preferring its header's messageID over [btpPort].
|
||||
*
|
||||
* A message whose id and port disagree is classified by the id, since the id is what the sender
|
||||
* actually put in the PDU; the port is only where it happened to arrive.
|
||||
*/
|
||||
fun classifyItsPdu(uper: ByteArray, btpPort: Int?): ItsClassification {
|
||||
val header = ItsPduHeader.parse(uper)
|
||||
val kind = header?.let { ItsMessageKind.fromMessageId(it.messageId) }
|
||||
?: btpPort?.let { ItsMessageKind.fromBtpPort(it) }
|
||||
?: ItsMessageKind.OTHER
|
||||
return ItsClassification(kind, header?.messageId, header?.stationId)
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.hawhamburg.micr0bu.service
|
||||
|
||||
import android.app.NotificationChannel
|
||||
import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
import android.app.Service
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.ServiceInfo
|
||||
import android.os.IBinder
|
||||
import android.os.PowerManager
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.hawhamburg.micr0bu.MainActivity
|
||||
import com.hawhamburg.micr0bu.R
|
||||
import com.hawhamburg.micr0bu.data.log.V2xLogger
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import javax.inject.Inject
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
* Keeps the process alive, and the CPU awake, while [V2xLogger] records.
|
||||
*
|
||||
* The logger does the work; this exists only because a log is most useful on a drive, with the
|
||||
* screen off, and a process with no foreground service is one the system may kill and whose GNSS
|
||||
* callbacks it throttles. Same shape as [TripRecordingService], which does this for trips.
|
||||
*
|
||||
* Stops itself when the logger stops, including when the logger stops on a write failure.
|
||||
*/
|
||||
@AndroidEntryPoint
|
||||
class V2xLogService : Service() {
|
||||
|
||||
@Inject lateinit var logger: V2xLogger
|
||||
|
||||
private val job = SupervisorJob()
|
||||
private val scope = CoroutineScope(Dispatchers.Default + job)
|
||||
private var watchJob: Job? = null
|
||||
private var wakeLock: PowerManager.WakeLock? = null
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
(getSystemService(NOTIFICATION_SERVICE) as NotificationManager).createNotificationChannel(
|
||||
NotificationChannel(CHANNEL_ID, "V2X logging", NotificationManager.IMPORTANCE_LOW).apply {
|
||||
description = "Shown while the developer V2X data logger is recording"
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
when (intent?.action) {
|
||||
ACTION_START -> begin()
|
||||
ACTION_STOP -> end()
|
||||
}
|
||||
return START_NOT_STICKY
|
||||
}
|
||||
|
||||
override fun onBind(intent: Intent?): IBinder? = null
|
||||
|
||||
override fun onDestroy() {
|
||||
wakeLock?.let { if (it.isHeld) it.release() }
|
||||
job.cancel()
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
private fun begin() {
|
||||
// Foreground first: Android allows five seconds from startForegroundService.
|
||||
startForeground(NOTIFICATION_ID, notification(0), ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION)
|
||||
wakeLock = (getSystemService(POWER_SERVICE) as PowerManager)
|
||||
.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "micr0bu:V2xLog")
|
||||
.also { it.acquire() }
|
||||
logger.start()
|
||||
if (!logger.state.value.active) { // the file could not be created; the screen shows why
|
||||
end()
|
||||
return
|
||||
}
|
||||
|
||||
watchJob?.cancel()
|
||||
watchJob = scope.launch {
|
||||
logger.state.collect { state ->
|
||||
if (!state.active) {
|
||||
stopForeground(STOP_FOREGROUND_REMOVE)
|
||||
stopSelf()
|
||||
} else {
|
||||
(getSystemService(NOTIFICATION_SERVICE) as NotificationManager)
|
||||
.notify(NOTIFICATION_ID, notification(state.total))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun end() {
|
||||
scope.launch {
|
||||
logger.stop()
|
||||
stopForeground(STOP_FOREGROUND_REMOVE)
|
||||
stopSelf()
|
||||
}
|
||||
}
|
||||
|
||||
private fun notification(messages: Int) =
|
||||
NotificationCompat.Builder(this, CHANNEL_ID)
|
||||
.setContentTitle("Logging V2X messages")
|
||||
.setContentText("$messages messages recorded")
|
||||
.setSmallIcon(R.mipmap.ic_launcher_foreground)
|
||||
.setOngoing(true)
|
||||
.setOnlyAlertOnce(true)
|
||||
.setContentIntent(
|
||||
PendingIntent.getActivity(
|
||||
this, 0,
|
||||
Intent(this, MainActivity::class.java).apply {
|
||||
flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
},
|
||||
PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT,
|
||||
)
|
||||
)
|
||||
.build()
|
||||
|
||||
companion object {
|
||||
const val ACTION_START = "com.hawhamburg.micr0bu.V2X_LOG_START"
|
||||
const val ACTION_STOP = "com.hawhamburg.micr0bu.V2X_LOG_STOP"
|
||||
private const val NOTIFICATION_ID = 9002
|
||||
private const val CHANNEL_ID = "v2x_logging"
|
||||
|
||||
fun start(context: Context) = ContextCompat.startForegroundService(
|
||||
context, Intent(context, V2xLogService::class.java).setAction(ACTION_START)
|
||||
)
|
||||
|
||||
fun stop(context: Context) {
|
||||
context.startService(Intent(context, V2xLogService::class.java).setAction(ACTION_STOP))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@ sealed class Screen(val route: String, val labelRes: Int) {
|
||||
data object SettingsMqtt : Screen("settings/mqtt", R.string.settings_mqtt_section)
|
||||
data object SettingsUseCaseAlerts : Screen("settings/usecases", R.string.settings_usecase_alerts)
|
||||
data object SettingsDeveloper : Screen("settings/developer", R.string.settings_developer)
|
||||
data object SettingsV2xLog : Screen("settings/developer/v2x_log", R.string.v2xlog_title)
|
||||
data object SettingsAbout : Screen("settings/about", R.string.settings_about)
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ private fun MenuRow(label: String, onClick: () -> Unit) {
|
||||
// ── Sub-screen shell ────────────────────────────────────────────────────────
|
||||
|
||||
@Composable
|
||||
private fun SubScreen(title: String, onBack: () -> Unit, content: @Composable () -> Unit) {
|
||||
internal fun SubScreen(title: String, onBack: () -> Unit, content: @Composable () -> Unit) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
@@ -448,6 +448,7 @@ fun DeveloperSettingsScreen(
|
||||
state: SensorUiState,
|
||||
onDeveloperMode: (Boolean) -> Unit,
|
||||
onOpenSensorMonitor: () -> Unit,
|
||||
onOpenV2xLogger: () -> Unit,
|
||||
onBack: () -> Unit,
|
||||
) {
|
||||
SubScreen(stringResource(R.string.settings_developer), onBack) {
|
||||
@@ -457,6 +458,9 @@ fun DeveloperSettingsScreen(
|
||||
// Sensor Monitor lives here rather than in the bottom nav: a live phone-sensor feed is
|
||||
// a bench-diagnosis tool, not something a rider needs mid-ride.
|
||||
MenuRow(stringResource(R.string.sensor_monitor_title), onOpenSensorMonitor)
|
||||
Divider()
|
||||
// Records every received V2X message to a database file, on either OBU hardware.
|
||||
MenuRow(stringResource(R.string.v2xlog_title), onOpenV2xLogger)
|
||||
if (state.developerMode) {
|
||||
Divider()
|
||||
DisabledRow(stringResource(R.string.settings_wifi), stringResource(R.string.settings_wifi_val))
|
||||
@@ -481,7 +485,7 @@ fun AboutSettingsScreen(onBack: () -> Unit) {
|
||||
// ── Internal components ─────────────────────────────────────────────────────
|
||||
|
||||
@Composable
|
||||
private fun SectionCard(content: @Composable () -> Unit) {
|
||||
internal fun SectionCard(content: @Composable () -> Unit) {
|
||||
Card(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant),
|
||||
@@ -699,7 +703,7 @@ private fun TwoWayChoice(
|
||||
private fun RowDivider() = HorizontalDivider(color = MaterialTheme.colorScheme.outline.copy(alpha = 0.4f))
|
||||
|
||||
@Composable
|
||||
private fun Divider() = HorizontalDivider(color = MaterialTheme.colorScheme.outline.copy(alpha = 0.4f))
|
||||
internal fun Divider() = HorizontalDivider(color = MaterialTheme.colorScheme.outline.copy(alpha = 0.4f))
|
||||
|
||||
@Composable
|
||||
private fun SettingToggleRow(
|
||||
@@ -723,7 +727,7 @@ private fun SettingToggleRow(
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun DisabledRow(label: String, value: String) {
|
||||
internal fun DisabledRow(label: String, value: String) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(vertical = 10.dp),
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
package com.hawhamburg.micr0bu.ui.screens
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Delete
|
||||
import androidx.compose.material.icons.filled.FiberManualRecord
|
||||
import androidx.compose.material.icons.filled.Share
|
||||
import androidx.compose.material.icons.filled.Stop
|
||||
import androidx.compose.material3.AlertDialog
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.core.content.FileProvider
|
||||
import com.hawhamburg.micr0bu.R
|
||||
import com.hawhamburg.micr0bu.data.log.V2xLogFile
|
||||
import com.hawhamburg.micr0bu.data.log.V2xLogState
|
||||
import com.hawhamburg.micr0bu.data.transport.ObuHardware
|
||||
import com.hawhamburg.micr0bu.domain.log.ItsMessageKind
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
||||
private val modifiedFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault())
|
||||
|
||||
/**
|
||||
* Settings > Developer > V2X data logger.
|
||||
*
|
||||
* Start and stop one log at a time, watch what it is catching, and share or delete the finished
|
||||
* files. What is recorded, and from where, is described on [com.hawhamburg.micr0bu.data.log.V2xLogger].
|
||||
*/
|
||||
@Composable
|
||||
fun V2xLogSettingsScreen(
|
||||
state: V2xLogState,
|
||||
files: List<V2xLogFile>,
|
||||
obuHardware: ObuHardware,
|
||||
onStart: () -> Unit,
|
||||
onStop: () -> Unit,
|
||||
onDelete: (V2xLogFile) -> Unit,
|
||||
onBack: () -> Unit,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
var pendingDelete by remember { mutableStateOf<V2xLogFile?>(null) }
|
||||
val isEsp32 = obuHardware == ObuHardware.ESP32_C5
|
||||
|
||||
pendingDelete?.let { log ->
|
||||
AlertDialog(
|
||||
onDismissRequest = { pendingDelete = null },
|
||||
title = { Text(stringResource(R.string.v2xlog_delete_title)) },
|
||||
text = { Text(stringResource(R.string.v2xlog_delete_text, log.name)) },
|
||||
confirmButton = {
|
||||
TextButton(onClick = { onDelete(log); pendingDelete = null }) {
|
||||
Text(stringResource(R.string.log_delete_confirm), color = MaterialTheme.colorScheme.error)
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(onClick = { pendingDelete = null }) { Text(stringResource(R.string.log_cancel)) }
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
SubScreen(stringResource(R.string.v2xlog_title), onBack) {
|
||||
Text(
|
||||
stringResource(R.string.v2xlog_desc),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
|
||||
SectionCard {
|
||||
Spacer(Modifier.height(8.dp))
|
||||
Text(
|
||||
stringResource(if (isEsp32) R.string.v2xlog_mode_esp32 else R.string.v2xlog_mode_cit),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
// Said up front, not discovered later as two rows of zeros: the firmware decides this.
|
||||
if (isEsp32) {
|
||||
Spacer(Modifier.height(4.dp))
|
||||
Text(
|
||||
stringResource(R.string.v2xlog_esp32_firmware_note),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
}
|
||||
Spacer(Modifier.height(12.dp))
|
||||
Button(
|
||||
onClick = if (state.active) onStop else onStart,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
colors = if (state.active) ButtonDefaults.buttonColors(containerColor = Color(0xFFB3261E))
|
||||
else ButtonDefaults.buttonColors(),
|
||||
) {
|
||||
Icon(
|
||||
if (state.active) Icons.Default.Stop else Icons.Default.FiberManualRecord,
|
||||
contentDescription = null,
|
||||
)
|
||||
Spacer(Modifier.padding(horizontal = 4.dp))
|
||||
Text(stringResource(if (state.active) R.string.v2xlog_stop else R.string.v2xlog_start))
|
||||
}
|
||||
state.error?.let {
|
||||
Spacer(Modifier.height(8.dp))
|
||||
Text(
|
||||
stringResource(R.string.v2xlog_error, it),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.error,
|
||||
)
|
||||
}
|
||||
Spacer(Modifier.height(12.dp))
|
||||
}
|
||||
|
||||
if (state.active) {
|
||||
SectionCard {
|
||||
DisabledRow(stringResource(R.string.v2xlog_file), state.fileName.orEmpty())
|
||||
Divider()
|
||||
DisabledRow(
|
||||
stringResource(R.string.v2xlog_total),
|
||||
stringResource(R.string.v2xlog_total_val, state.total, formatBytes(state.fileBytes)),
|
||||
)
|
||||
ItsMessageKind.TRACKED.forEach { kind ->
|
||||
Divider()
|
||||
DisabledRow(kind.label, (state.counts[kind] ?: 0).toString())
|
||||
}
|
||||
Divider()
|
||||
DisabledRow(stringResource(R.string.v2xlog_phone_gnss), fixAge(state.phoneFixAgeMs))
|
||||
Divider()
|
||||
DisabledRow(
|
||||
stringResource(R.string.v2xlog_obu_gnss),
|
||||
if (isEsp32) stringResource(R.string.v2xlog_not_available) else fixAge(state.obuFixAgeMs),
|
||||
)
|
||||
}
|
||||
if (state.total == 0) {
|
||||
Text(
|
||||
stringResource(R.string.v2xlog_waiting),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Text(
|
||||
stringResource(R.string.v2xlog_files_title, files.size),
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
if (files.isEmpty()) {
|
||||
Text(
|
||||
stringResource(R.string.v2xlog_none),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
} else {
|
||||
SectionCard {
|
||||
files.forEachIndexed { i, log ->
|
||||
if (i > 0) Divider()
|
||||
LogFileRow(
|
||||
log = log,
|
||||
onShare = { shareLog(context, log) },
|
||||
onDelete = { pendingDelete = log },
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun LogFileRow(log: V2xLogFile, onShare: () -> Unit, onDelete: () -> Unit) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
||||
) {
|
||||
Column(modifier = Modifier.weight(1f)) {
|
||||
Text(
|
||||
log.name,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
fontFamily = FontFamily.Monospace,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
)
|
||||
Text(
|
||||
"${modifiedFormat.format(Date(log.modifiedMs))} · ${formatBytes(log.sizeBytes)}",
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
}
|
||||
// The file being written is open and incomplete; sharing or deleting it would hand over a
|
||||
// half-written database or pull it out from under the writer.
|
||||
IconButton(onClick = onShare, enabled = !log.active) {
|
||||
Icon(Icons.Default.Share, contentDescription = stringResource(R.string.v2xlog_share_cd))
|
||||
}
|
||||
IconButton(onClick = onDelete, enabled = !log.active) {
|
||||
Icon(
|
||||
Icons.Default.Delete,
|
||||
contentDescription = stringResource(R.string.v2xlog_delete_cd),
|
||||
tint = if (log.active) LocalContentColorDisabled() else MaterialTheme.colorScheme.error,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun LocalContentColorDisabled(): Color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f)
|
||||
|
||||
@Composable
|
||||
private fun fixAge(ageMs: Long?): String =
|
||||
if (ageMs == null) stringResource(R.string.v2xlog_no_fix)
|
||||
else stringResource(R.string.v2xlog_fix_age, (ageMs / 1000).toInt())
|
||||
|
||||
private fun formatBytes(bytes: Long): String = when {
|
||||
bytes < 1024 -> "$bytes B"
|
||||
bytes < 1024 * 1024 -> "%.1f kB".format(Locale.US, bytes / 1024.0)
|
||||
else -> "%.1f MB".format(Locale.US, bytes / (1024.0 * 1024.0))
|
||||
}
|
||||
|
||||
private fun shareLog(context: Context, log: V2xLogFile) {
|
||||
val uri = FileProvider.getUriForFile(context, "${context.packageName}.fileprovider", log.file)
|
||||
val intent = Intent(Intent.ACTION_SEND).apply {
|
||||
type = "application/vnd.sqlite3"
|
||||
putExtra(Intent.EXTRA_STREAM, uri)
|
||||
putExtra(Intent.EXTRA_SUBJECT, "MicrOBU V2X log - ${log.name}")
|
||||
addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||
}
|
||||
context.startActivity(Intent.createChooser(intent, context.getString(R.string.v2xlog_share_chooser)))
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.hawhamburg.micr0bu.viewmodel
|
||||
|
||||
import android.app.Application
|
||||
import androidx.lifecycle.AndroidViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.hawhamburg.micr0bu.data.log.V2xLogFile
|
||||
import com.hawhamburg.micr0bu.data.log.V2xLogState
|
||||
import com.hawhamburg.micr0bu.data.log.V2xLogger
|
||||
import com.hawhamburg.micr0bu.service.V2xLogService
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
|
||||
/** Backs Settings > Developer > V2X data logger. */
|
||||
@HiltViewModel
|
||||
class V2xLogViewModel @Inject constructor(
|
||||
application: Application,
|
||||
private val logger: V2xLogger,
|
||||
) : AndroidViewModel(application) {
|
||||
|
||||
val state: StateFlow<V2xLogState> = logger.state
|
||||
val files: StateFlow<List<V2xLogFile>> = logger.files
|
||||
|
||||
init {
|
||||
logger.refreshFiles()
|
||||
// The running file grows between state updates, so keep the list's sizes current while a
|
||||
// log is on screen.
|
||||
viewModelScope.launch {
|
||||
while (true) {
|
||||
delay(2_000L)
|
||||
if (logger.state.value.active) logger.refreshFiles()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun start() = V2xLogService.start(getApplication())
|
||||
|
||||
fun stop() = V2xLogService.stop(getApplication())
|
||||
|
||||
fun delete(log: V2xLogFile) {
|
||||
logger.delete(log)
|
||||
}
|
||||
}
|
||||
@@ -332,4 +332,28 @@
|
||||
<string name="conn_esp32_signing">Signieren %1$s · Tickets %2$d · signiert %3$d · abgelehnt %4$d · gesendet %5$d</string>
|
||||
<string name="conn_esp32_signing_on">an</string>
|
||||
<string name="conn_esp32_signing_off">aus</string>
|
||||
<string name="v2xlog_title">V2X-Datenlogger</string>
|
||||
<string name="v2xlog_desc">Zeichnet jede empfangene V2X-Nachricht (CAM, DENM, SPATEM, MAPEM, VAM) in einer Datenbankdatei auf, mit Zeitstempel, der GNSS-Position des Telefons und, wenn vorhanden, der GNSS-Position der OBU und der Signalstärke (RSSI).</string>
|
||||
<string name="v2xlog_mode_esp32">ESP32-C5: protokolliert, was das Board über die Verbindung weiterleitet, mit RSSI. Das Board hat kein GNSS, daher gibt es keine OBU-Position.</string>
|
||||
<string name="v2xlog_mode_cit">CiT One: protokolliert die MQTT-Topics. Die API liefert keine RSSI; die OBU-Position stammt aus v2x/rx/obu_gnss.</string>
|
||||
<string name="v2xlog_esp32_firmware_note">Die aktuelle ESP32-C5-Firmware leitet nur CAM, DENM und SPATEM weiter; MAPEM und VAM erscheinen erst, wenn die Firmware sie annimmt.</string>
|
||||
<string name="v2xlog_start">Aufzeichnung starten</string>
|
||||
<string name="v2xlog_stop">Aufzeichnung beenden</string>
|
||||
<string name="v2xlog_error">Aufzeichnung fehlgeschlagen: %1$s</string>
|
||||
<string name="v2xlog_file">Datei</string>
|
||||
<string name="v2xlog_total">Aufgezeichnet</string>
|
||||
<string name="v2xlog_total_val">%1$d Nachrichten · %2$s</string>
|
||||
<string name="v2xlog_phone_gnss">Telefon-GNSS</string>
|
||||
<string name="v2xlog_obu_gnss">OBU-GNSS</string>
|
||||
<string name="v2xlog_fix_age">Fix vor %1$d s</string>
|
||||
<string name="v2xlog_no_fix">kein Fix</string>
|
||||
<string name="v2xlog_not_available">nicht verfügbar</string>
|
||||
<string name="v2xlog_waiting">Warte auf Nachrichten. Ist die OBU noch nicht verbunden, verbinde sie auf dem Verbindungsbildschirm.</string>
|
||||
<string name="v2xlog_files_title">Logdateien (%1$d)</string>
|
||||
<string name="v2xlog_none">Noch keine Logs</string>
|
||||
<string name="v2xlog_share_cd">Log teilen</string>
|
||||
<string name="v2xlog_delete_cd">Log löschen</string>
|
||||
<string name="v2xlog_share_chooser">V2X-Log teilen</string>
|
||||
<string name="v2xlog_delete_title">Log löschen?</string>
|
||||
<string name="v2xlog_delete_text">%1$s wird dauerhaft vom Gerät entfernt.</string>
|
||||
</resources>
|
||||
|
||||
@@ -339,4 +339,28 @@
|
||||
<string name="conn_esp32_signing">Signing %1$s · tickets %2$d · signed %3$d · refused %4$d · on air %5$d</string>
|
||||
<string name="conn_esp32_signing_on">on</string>
|
||||
<string name="conn_esp32_signing_off">off</string>
|
||||
<string name="v2xlog_title">V2X data logger</string>
|
||||
<string name="v2xlog_desc">Records every V2X message received (CAM, DENM, SPATEM, MAPEM, VAM) into a database file, with a timestamp, the phone GNSS fix and, where available, the OBU GNSS fix and the signal strength (RSSI).</string>
|
||||
<string name="v2xlog_mode_esp32">ESP32-C5: logging what the board forwards over the link, with RSSI. The board has no GNSS, so there is no OBU position.</string>
|
||||
<string name="v2xlog_mode_cit">CiT One: logging the MQTT topics. The API carries no RSSI; the OBU position comes from v2x/rx/obu_gnss.</string>
|
||||
<string name="v2xlog_esp32_firmware_note">The current ESP32-C5 firmware forwards only CAM, DENM and SPATEM, so MAPEM and VAM appear only once the firmware accepts them.</string>
|
||||
<string name="v2xlog_start">Start logging</string>
|
||||
<string name="v2xlog_stop">Stop logging</string>
|
||||
<string name="v2xlog_error">Logging failed: %1$s</string>
|
||||
<string name="v2xlog_file">File</string>
|
||||
<string name="v2xlog_total">Recorded</string>
|
||||
<string name="v2xlog_total_val">%1$d messages · %2$s</string>
|
||||
<string name="v2xlog_phone_gnss">Phone GNSS</string>
|
||||
<string name="v2xlog_obu_gnss">OBU GNSS</string>
|
||||
<string name="v2xlog_fix_age">fix %1$d s ago</string>
|
||||
<string name="v2xlog_no_fix">no fix</string>
|
||||
<string name="v2xlog_not_available">not available</string>
|
||||
<string name="v2xlog_waiting">Waiting for messages. If the OBU is not connected yet, connect it on the Connection screen.</string>
|
||||
<string name="v2xlog_files_title">Log files (%1$d)</string>
|
||||
<string name="v2xlog_none">No logs yet</string>
|
||||
<string name="v2xlog_share_cd">Share log</string>
|
||||
<string name="v2xlog_delete_cd">Delete log</string>
|
||||
<string name="v2xlog_share_chooser">Share V2X log</string>
|
||||
<string name="v2xlog_delete_title">Delete log?</string>
|
||||
<string name="v2xlog_delete_text">This permanently removes %1$s from the device.</string>
|
||||
</resources>
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
<paths>
|
||||
<!-- Covers context.cacheDir — used for CSV exports -->
|
||||
<cache-path name="shared_csv" path="." />
|
||||
<!-- V2X data logs (V2xLogger), shared from Settings > Developer -->
|
||||
<files-path name="v2x_logs" path="v2x_logs/" />
|
||||
</paths>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.hawhamburg.micr0bu
|
||||
|
||||
import com.hawhamburg.micr0bu.domain.log.ItsMessageKind
|
||||
import com.hawhamburg.micr0bu.domain.log.ItsPduHeader
|
||||
import com.hawhamburg.micr0bu.domain.log.classifyItsPdu
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Test
|
||||
|
||||
/**
|
||||
* Pins how the V2X data logger names a message it may have no decoder for. The CAM fixture is the
|
||||
* golden UPER frame from [CamEncodeGoldenTest] (protocolVersion 2, messageID 2, stationID 999999);
|
||||
* the others only need a valid ItsPduHeader, which is all the classifier reads.
|
||||
*/
|
||||
class ItsMessageKindTest {
|
||||
|
||||
private fun String.hexToBytes() = chunked(2).map { it.toInt(16).toByte() }.toByteArray()
|
||||
|
||||
private val goldenCam =
|
||||
"0202000f423f3700402ab215af6e286477dffffffc23b7743e0027ffc0d0fe0118329337feebfff6000000".hexToBytes()
|
||||
|
||||
/** An ItsPduHeader with [messageId] and stationID 0x01020304, then a stand-in body. */
|
||||
private fun pdu(messageId: Int) =
|
||||
byteArrayOf(2, messageId.toByte(), 1, 2, 3, 4, 0x55, 0x66)
|
||||
|
||||
@Test fun `header of the golden CAM is read`() {
|
||||
val h = ItsPduHeader.parse(goldenCam)!!
|
||||
assertEquals(2, h.protocolVersion)
|
||||
assertEquals(2, h.messageId)
|
||||
assertEquals(999_999L, h.stationId)
|
||||
}
|
||||
|
||||
@Test fun `station id above 2^31 is not sign-extended`() {
|
||||
val h = ItsPduHeader.parse(byteArrayOf(2, 2, 0xFF.toByte(), 0xFF.toByte(), 0xFF.toByte(), 0xFE.toByte()))!!
|
||||
assertEquals(0xFFFFFFFEL, h.stationId)
|
||||
}
|
||||
|
||||
@Test fun `every tracked kind is recognised by messageID alone`() {
|
||||
assertEquals(ItsMessageKind.DENM, classifyItsPdu(pdu(1), null).kind)
|
||||
assertEquals(ItsMessageKind.CAM, classifyItsPdu(pdu(2), null).kind)
|
||||
assertEquals(ItsMessageKind.SPATEM, classifyItsPdu(pdu(4), null).kind)
|
||||
assertEquals(ItsMessageKind.MAPEM, classifyItsPdu(pdu(5), null).kind)
|
||||
assertEquals(ItsMessageKind.VAM, classifyItsPdu(pdu(16), null).kind)
|
||||
}
|
||||
|
||||
@Test fun `messageID wins over the BTP port, and the SPATEM-MAPEM numbers are not swapped`() {
|
||||
// SPATEM is port 2004 but messageID 4; MAPEM is port 2003 but messageID 5.
|
||||
assertEquals(ItsMessageKind.SPATEM, classifyItsPdu(pdu(4), 2004).kind)
|
||||
assertEquals(ItsMessageKind.MAPEM, classifyItsPdu(pdu(5), 2003).kind)
|
||||
// A PDU that disagrees with the port it arrived on is what its header says it is.
|
||||
assertEquals(ItsMessageKind.MAPEM, classifyItsPdu(pdu(5), 2004).kind)
|
||||
}
|
||||
|
||||
@Test fun `a PDU too short for a header falls back to the BTP port`() {
|
||||
val c = classifyItsPdu(byteArrayOf(2, 5), 2018)
|
||||
assertEquals(ItsMessageKind.VAM, c.kind)
|
||||
assertNull(c.messageId)
|
||||
assertNull(c.stationId)
|
||||
}
|
||||
|
||||
@Test fun `an unknown messageID is kept as OTHER with its id`() {
|
||||
val c = classifyItsPdu(pdu(99), null)
|
||||
assertEquals(ItsMessageKind.OTHER, c.kind)
|
||||
assertEquals(99, c.messageId)
|
||||
assertEquals(0x01020304L, c.stationId)
|
||||
}
|
||||
|
||||
@Test fun `processed topic names map to kinds`() {
|
||||
assertEquals(ItsMessageKind.MAPEM, ItsMessageKind.fromProcessedTopicName("map"))
|
||||
assertEquals(ItsMessageKind.SPATEM, ItsMessageKind.fromProcessedTopicName("spat"))
|
||||
assertNull(ItsMessageKind.fromProcessedTopicName("unknown"))
|
||||
}
|
||||
}
|
||||
@@ -35,8 +35,10 @@ fit together, how it was verified, and what is still open. Hardware checks still
|
||||
|
||||
## Firmware (obu-firmware)
|
||||
|
||||
obu-firmware is now a port of `microbu-esp32c5/firmware` (the colleague's repository, kept beside
|
||||
this one, gitignored). vanetza-idf is taken from `microbu-esp32c5/external/vanetza-idf`. It builds
|
||||
obu-firmware is now a port of `microbu-esp32c5/firmware`, from the colleague's own repository
|
||||
(not part of this one; nothing is pushed there). The C-ITS library it needs is copied into this
|
||||
repository as `obu-firmware/external/vanetza-idf` (their commit cf4b99f, unchanged), so
|
||||
obu-firmware builds from a plain clone. It builds
|
||||
with **ESP-IDF 6.0.2 only**: the raw-TX path uses private Wi-Fi driver structures that vanetza-idf
|
||||
pins to that version. The previous C firmware (IDF 6.1) is backed up as a full flash image in
|
||||
`firmware-backups/` (gitignored, restore command in its README.txt); its sources stay on disk,
|
||||
@@ -62,7 +64,7 @@ Main changes against the colleague's firmware:
|
||||
|
||||
## Link protocol
|
||||
|
||||
Station-link v1 (`microbu-esp32c5/station-link/README.md`): `[opcode][flags][sequence LE][body]`,
|
||||
Station-link v1 (colleague's repository, `station-link/README.md`): `[opcode][flags][sequence LE][body]`,
|
||||
little-endian, at most 512 octets. Over USB each message is one `0xAA55` frame of type `0x10`
|
||||
(the old framing and CRC). Over BLE each message is one GATT value on service
|
||||
`0000C175-BA5E-4C17-8000-00805F9B34FB` (the README describes a different, Nordic-UART layout; the
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 660 KiB |
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22)
|
||||
# obu-firmware: the ESP32-C5 half of the MicrOBU station, on the vanetza-idf C-ITS stack.
|
||||
#
|
||||
# Since 2026-09-23 this is a port of the colleague's standalone VRU station
|
||||
# (microbu-esp32c5/firmware, its own git repository beside this one and gitignored here). From it:
|
||||
# (microbu-esp32c5/firmware, in their own repository, not part of this one). From it:
|
||||
# BTP/GeoNetworking and the TS 103 097 security entity (vanetza-idf), the station-link message
|
||||
# layer over native USB Serial/JTAG and BLE GATT, the NVS credential store, and the C5 radio adapter.
|
||||
# Added here for this project: the raw receive path of the previous firmware (gn_unwrap.c, forwarded
|
||||
@@ -14,14 +14,16 @@ cmake_minimum_required(VERSION 3.22)
|
||||
# by vanetza-idf's radio_c5.cmake and has only been validated there. The previous C firmware was
|
||||
# built with IDF 6.1; see FLASHING.md for the export script of each.
|
||||
#
|
||||
# vanetza-idf is taken from the colleague's tree rather than vendored (it is ~90 MB). Override with
|
||||
# -DVANETZA_IDF_DIR=... if it lives elsewhere.
|
||||
# vanetza-idf lives in external/vanetza-idf, copied from the colleague's repository (their
|
||||
# external/vanetza-idf at commit cf4b99f, unchanged; see its PROVENANCE.md). Override with
|
||||
# -DVANETZA_IDF_DIR=... to build against another checkout.
|
||||
if(NOT VANETZA_IDF_DIR)
|
||||
set(VANETZA_IDF_DIR "${CMAKE_CURRENT_LIST_DIR}/../microbu-esp32c5/external/vanetza-idf")
|
||||
set(VANETZA_IDF_DIR "${CMAKE_CURRENT_LIST_DIR}/external/vanetza-idf")
|
||||
endif()
|
||||
if(NOT EXISTS "${VANETZA_IDF_DIR}/idf_component.yml")
|
||||
message(FATAL_ERROR "vanetza-idf not found at ${VANETZA_IDF_DIR}: clone microbu-esp32c5 beside this "
|
||||
"repository or pass -DVANETZA_IDF_DIR=<path to external/vanetza-idf>")
|
||||
message(FATAL_ERROR "vanetza-idf not found at ${VANETZA_IDF_DIR}: obu-firmware/external/vanetza-idf "
|
||||
"is part of this repository; check it is complete, or pass "
|
||||
"-DVANETZA_IDF_DIR=<path to a vanetza-idf checkout>")
|
||||
endif()
|
||||
|
||||
# Provenance guard for main/otm_tx_custom.c, copied unchanged from microbu-esp32c5/firmware/CMakeLists.txt:
|
||||
|
||||
+75
-27
@@ -13,11 +13,17 @@ inherits the first's `IDF_PYTHON_ENV_PATH` and reports every Python dependency
|
||||
as unmet. Don't run `install.bat` to "fix" that - open a fresh terminal, or
|
||||
clear the state with `$env:IDF_PYTHON_ENV_PATH = $null; $env:IDF_PATH = $null`.
|
||||
|
||||
The build also needs the colleague's `microbu-esp32c5` checkout beside this
|
||||
repository (gitignored here): vanetza-idf is taken from its
|
||||
`external/vanetza-idf`. Pass `-DVANETZA_IDF_DIR=<path>` to `idf.py` if it lives
|
||||
elsewhere. The first build downloads `espressif/esp-boost` into
|
||||
`managed_components/`.
|
||||
The build is self-contained: the C-ITS library comes from
|
||||
`obu-firmware/external/vanetza-idf`, a copy of `external/vanetza-idf` from the
|
||||
colleague's microbu-esp32c5 repository (their commit cf4b99f, unchanged). Pass
|
||||
`-DVANETZA_IDF_DIR=<path>` to `idf.py` to build against another checkout. The
|
||||
first build downloads `espressif/esp-boost` into `managed_components/`.
|
||||
|
||||
Nothing is fetched from or pushed to the colleague's repository (HAW GitLab,
|
||||
urban-mobility-lab/microbu/microbu-esp32c5). To take a newer vanetza-idf from
|
||||
it, copy their `external/vanetza-idf` over this folder, rebuild and test, and
|
||||
commit it here. The rest of their tree (their own VAM firmware, PKI tooling,
|
||||
station-link Python tools, the V2X2MAP bridge) is not part of this repository.
|
||||
|
||||
## Every new PowerShell session
|
||||
|
||||
@@ -28,23 +34,61 @@ C:\Espressif\frameworks\esp-idf-v6.0.2\export.ps1
|
||||
idf.py --version # v6.0.2
|
||||
```
|
||||
|
||||
## Going back to the previous firmware
|
||||
|
||||
`firmware-backups/` in the repository root (gitignored) holds a full-flash image
|
||||
of the COM3 board as it was before the port, with the esptool command to write
|
||||
it back in its README.txt.
|
||||
|
||||
## Build & flash
|
||||
|
||||
Flash over the board's **UART-bridge port** (CH343; COM3 for the production OBU
|
||||
on the bench), not the native port the phone uses.
|
||||
|
||||
```powershell
|
||||
cd C:\Users\Ashin\AndroidStudioProjects\MicrOBU\obu-firmware
|
||||
idf.py set-target esp32c5 # only needed once per clean build folder
|
||||
idf.py build
|
||||
idf.py -p COM5 -b 921600 flash monitor
|
||||
idf.py -p COM3 -b 921600 flash monitor
|
||||
```
|
||||
|
||||
Swap `COM5` for whatever port the ESP32-C5 enumerates as (Device Manager →
|
||||
Swap `COM3` for whatever port the ESP32-C5's bridge enumerates as (Device Manager →
|
||||
Ports). `monitor` opens the serial console after flashing — `Ctrl+]` to exit.
|
||||
Use `flash` (bootloader + partition table + app), not `app-flash`, whenever the
|
||||
partition table may differ from what the board has.
|
||||
|
||||
### First flash onto a board with the previous firmware
|
||||
|
||||
The partition table changed with the port (NVS 24 KB → 80 KB, app 0x10000 →
|
||||
0x20000), and the old NVS is full of Wi-Fi settings the previous firmware left
|
||||
behind. Erase the whole new NVS range once, then do a full flash:
|
||||
|
||||
```powershell
|
||||
python -m esptool --chip esp32c5 -p COM3 -b 921600 erase-region 0x9000 0x15000
|
||||
idf.py -p COM3 -b 921600 flash
|
||||
```
|
||||
|
||||
Without the erase, the board cannot store the BLE bond and the phone has to pair
|
||||
on every connection (2026-09-23). After it:
|
||||
|
||||
- the boot log shows `0 bonded phone(s) in NVS`, `BLE advertising started as
|
||||
'micrOBU-XXXX'` and `station task ready`; the radio stays off until the app
|
||||
connects;
|
||||
- on the first Connect the app provisions the demo credentials once (the card
|
||||
says "Provisioning the demo credentials"); they stay in NVS from then on;
|
||||
- a phone that was paired with the board before must forget `micrOBU-XXXX` in
|
||||
Android's Bluetooth settings and pair again (passkey 123456).
|
||||
|
||||
Erasing NVS later (e.g. after a partition change) has the same effects.
|
||||
|
||||
## Going back to the previous firmware
|
||||
|
||||
The previous, unsigned C firmware (frame types 0x01-0x05, CAM over USB only)
|
||||
can come back two ways. The app detects it and falls back to its protocol.
|
||||
|
||||
- **Image:** `firmware-backups/` in the repository root (gitignored, on the lab
|
||||
laptop only) holds a full-flash image of the COM3 board as it was before the
|
||||
port, with the esptool command in its README.txt. It restores the old
|
||||
partition table and NVS too.
|
||||
- **Source:** commit `7285fa1` is the last one before the port. Check it out in
|
||||
a separate worktree and build it with the receiver firmware's IDF 6.1
|
||||
(`its-g5-receiver-firmware\esp-idf\export.ps1`). Erase the NVS range as above
|
||||
first, then `flash` (full, since the partition table differs); erasing after
|
||||
flashing would wipe the start of the old app, which sits at 0x10000.
|
||||
|
||||
## If the build fails
|
||||
|
||||
@@ -64,9 +108,9 @@ Ports). `monitor` opens the serial console after flashing — `Ctrl+]` to exit.
|
||||
The board has two USB-C ports — use the right one:
|
||||
|
||||
- **Native USB-C port** (labeled for JTAG/native USB, up to 12 Mbps) — this
|
||||
is where the phone plugs in via USB-OTG. The CAM serial link
|
||||
(`serial_link.c`) runs over the ESP32-C5's native USB Serial/JTAG
|
||||
peripheral on this port, enumerating as a CDC-ACM device under Espressif's
|
||||
is where the phone plugs in via USB-OTG. The station link
|
||||
(`serial_link.cpp`: station-link messages as frame type 0x10 in the 0xAA55
|
||||
framing) runs over the ESP32-C5's native USB Serial/JTAG peripheral on this port, enumerating as a CDC-ACM device under Espressif's
|
||||
VID/PID (0x303A/0x1001).
|
||||
- **UART-bridge port** (labeled for flashing) — this is what you use for
|
||||
`idf.py flash monitor` from your PC. Leave the phone unplugged from this
|
||||
@@ -83,10 +127,10 @@ at all — that isolates a bad/charge-only OTG cable from an app-side issue.
|
||||
|
||||
Work down this list — each step isolates the layer below it.
|
||||
|
||||
1. **Flash and install together.** `SERIAL_LINK_MAX_PAYLOAD` is 512 on both sides.
|
||||
A phone at 512 talking to firmware still at 160 (or vice versa) silently
|
||||
rejects every large frame at the `length exceeds max, resync` branch. Never
|
||||
update one side alone.
|
||||
1. **Flash and install together.** The app detects the firmware generation by
|
||||
its heartbeat and speaks either protocol, but only an app from 2026-09-23 on
|
||||
knows the station-link protocol; messages are at most 512 octets on both
|
||||
sides.
|
||||
2. **Does Android see the device at all?** Plug the phone into the **native**
|
||||
USB-C port, hit Connect, and read logcat for `UsbSerialTransport`. It logs
|
||||
every attached device *and* each device's interfaces. Empty list = cable /
|
||||
@@ -95,10 +139,12 @@ Work down this list — each step isolates the layer below it.
|
||||
composite device — expect CDC control (class 2) + CDC data (class 10) +
|
||||
vendor-specific JTAG (class 255) in that dump. Compare against the `ports=`
|
||||
count on the `matched device` line.
|
||||
4. **Is the link alive?** The firmware sends a STATUS heartbeat at 1 Hz
|
||||
regardless of radio traffic, and the app marks the link ERROR after ~3.5 s of
|
||||
silence. Connected-and-staying-connected means device→host actually works.
|
||||
5. **If it connects but no CAM_RX ever arrives** — suspect DTR. The app now
|
||||
4. **Is the link alive?** The firmware sends a STATUS at 1 Hz regardless of
|
||||
radio traffic, and the app marks the link ERROR after ~3.5 s of silence.
|
||||
Connected-and-staying-connected means device→host actually works. The board
|
||||
starts its radio only after the app's STATION_CONFIGURE, so nothing is
|
||||
received before Connect.
|
||||
5. **If it connects but no V2X_RX ever arrives** — suspect DTR. The app now
|
||||
asserts DTR/RTS on open (`openDevice()` in `UsbSerialTransport.kt`), because
|
||||
`CdcAcmSerialDriver` doesn't do it by default and the ESP32's USB Serial/JTAG
|
||||
endpoint may gate TX on the host opening the CDC line. **This is still
|
||||
@@ -107,9 +153,11 @@ Work down this list — each step isolates the layer below it.
|
||||
next to the VID/PID note, so nobody has to guess again.
|
||||
6. **Watch the counters, not just "Sent: N".** The CAM Pinger card shows
|
||||
consecutive write failures (phone side) and the firmware's tx-failure /
|
||||
oversize-drop / CRC-error totals from the heartbeat. A rising `tx fail` means
|
||||
CAMs reach the ESP32 but `esp_wifi_80211_tx` rejects them — a radio problem,
|
||||
not a link problem.
|
||||
RX-queue-drop / CRC-error totals from the heartbeat; the connection card
|
||||
shows tickets, signed and refused counts. A rising `tx fail` means messages
|
||||
reach the ESP32 but the radio refuses them — a radio problem, not a link
|
||||
problem. A rising `refused` with signing on usually means no ticket (NVS
|
||||
erased: reconnect so the app provisions again).
|
||||
|
||||
## Connecting over Bluetooth instead
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
## Since 2026-09-23: signed ITS on vanetza-idf
|
||||
|
||||
This firmware is a port of the colleague's standalone ESP32-C5 VRU station
|
||||
(`microbu-esp32c5/firmware`, its own git repository kept beside this one and gitignored here).
|
||||
(`microbu-esp32c5/firmware`, in their own repository; only its `external/vanetza-idf` is copied
|
||||
here, to `obu-firmware/external/vanetza-idf`).
|
||||
From it: the vanetza-idf C-ITS stack (BTP, GeoNetworking, the TS 103 097 security entity with
|
||||
credentials in NVS), the station-link protocol v1 (`link_protocol.*`, `link_service.*`) over the
|
||||
native USB port (`serial_link.*`, frame type 0x10 in the same 0xAA55 framing as before) and over BLE
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
build
|
||||
.cache/
|
||||
build-*/
|
||||
build-*.log
|
||||
sdkconfig
|
||||
sdkconfig.old
|
||||
sdkconfig.*.old
|
||||
managed_components/
|
||||
dependencies.lock
|
||||
__pycache__/
|
||||
conanfile.pyc
|
||||
doxygen/html/
|
||||
www/
|
||||
build.asn1/
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
if(ESP_PLATFORM)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/ports/esp_idf/CMakeLists.txt")
|
||||
return()
|
||||
endif()
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
cmake_policy(VERSION 3.14...3.31)
|
||||
project(Vanetza VERSION 26.02)
|
||||
set(VANETZA_SOVERSION 0)
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||
|
||||
# Look up threading library (usually pthread)
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads MODULE)
|
||||
|
||||
# Build configuration options
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
|
||||
option(BUILD_TESTS "Build unit tests" OFF)
|
||||
if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(gtest)
|
||||
endif()
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib/static)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(UseVanetza)
|
||||
|
||||
# Enable usage of targets' folder property (good for Visual Studio)
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Find project dependencies
|
||||
find_package(Boost 1.70 REQUIRED COMPONENTS date_time OPTIONAL_COMPONENTS program_options CONFIG)
|
||||
vanetza_optional_dependency(GeographicLib 1.37 VANETZA_WITH_GEOGRAPHICLIB "Use GeographicLib for precise geodesy")
|
||||
vanetza_optional_dependency(CapnProto 0.8 VANETZA_WITH_RPC "Enable RPC support")
|
||||
vanetza_optional_dependency(CryptoPP 5.6.1 VANETZA_WITH_CRYPTOPP "Enable Crypto++ support")
|
||||
vanetza_optional_dependency(OpenSSL 1.1.1 VANETZA_WITH_OPENSSL "Enable OpenSSL extensions")
|
||||
|
||||
option(VANETZA_WITH_PQC "Enable the experimental hybrid-PQC certificate profile" OFF)
|
||||
if(VANETZA_WITH_PQC)
|
||||
find_package(liboqs 0.14 CONFIG REQUIRED)
|
||||
endif()
|
||||
|
||||
option(VANETZA_EMBED_COUNTRY_DATA "Embed country boundary data into geodesy library" OFF)
|
||||
|
||||
add_subdirectory(vanetza/access)
|
||||
add_subdirectory(vanetza/asn1)
|
||||
add_subdirectory(vanetza/btp)
|
||||
add_subdirectory(vanetza/common)
|
||||
add_subdirectory(vanetza/dcc)
|
||||
add_subdirectory(vanetza/facilities)
|
||||
add_subdirectory(vanetza/geodesy)
|
||||
add_subdirectory(vanetza/geonet)
|
||||
add_subdirectory(vanetza/gnss)
|
||||
add_subdirectory(vanetza/net)
|
||||
add_subdirectory(vanetza/rpc)
|
||||
add_subdirectory(vanetza/security)
|
||||
add_subdirectory(vanetza/units)
|
||||
|
||||
option(BUILD_SOCKTAP "Build socktap application" OFF)
|
||||
if(BUILD_SOCKTAP)
|
||||
add_subdirectory(tools/socktap)
|
||||
endif()
|
||||
|
||||
option(BUILD_CERTIFY "Build certify application" OFF)
|
||||
if(BUILD_CERTIFY)
|
||||
add_subdirectory(tools/certify)
|
||||
if(VANETZA_WITH_PQC)
|
||||
add_subdirectory(tools/certify-pqc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(BUILD_BENCHMARK "Build benchmark application" OFF)
|
||||
if(BUILD_BENCHMARK)
|
||||
add_subdirectory(tools/benchmark)
|
||||
endif()
|
||||
|
||||
option(BUILD_FUZZ "Build fuzz harness" OFF)
|
||||
if(BUILD_FUZZ)
|
||||
add_subdirectory(tools/fuzz-harness)
|
||||
endif()
|
||||
|
||||
option(BUILD_PKI "Build PKI tools" OFF)
|
||||
if(BUILD_PKI AND VANETZA_WITH_PQC)
|
||||
message(FATAL_ERROR
|
||||
"BUILD_PKI cannot be combined with VANETZA_WITH_PQC: the unchanged PKI "
|
||||
"client uses Vanetza's standard Security ASN.1 profile. Build the PKI "
|
||||
"client separately with VANETZA_WITH_PQC=OFF.")
|
||||
endif()
|
||||
if(BUILD_PKI)
|
||||
add_subdirectory(tools/pki)
|
||||
endif()
|
||||
|
||||
# interface library for convenience
|
||||
get_property(_components GLOBAL PROPERTY VANETZA_COMPONENTS)
|
||||
add_library(vanetza INTERFACE)
|
||||
add_library(Vanetza::vanetza ALIAS vanetza)
|
||||
foreach(_component IN LISTS _components)
|
||||
target_link_libraries(vanetza INTERFACE ${_component})
|
||||
endforeach()
|
||||
|
||||
# installation rules
|
||||
include(CMakePackageConfigHelpers)
|
||||
set(CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/Vanetza")
|
||||
set(CMAKECONFIG_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/cmake-config")
|
||||
write_basic_package_version_file(${CMAKECONFIG_BUILD_DIR}/VanetzaConfigVersion.cmake
|
||||
COMPATIBILITY ExactVersion)
|
||||
configure_package_config_file(cmake/VanetzaConfig.cmake.in
|
||||
${CMAKECONFIG_BUILD_DIR}/VanetzaConfig.cmake
|
||||
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||
PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
|
||||
|
||||
install(TARGETS vanetza EXPORT ${PROJECT_NAME})
|
||||
|
||||
install(FILES
|
||||
${CMAKECONFIG_BUILD_DIR}/VanetzaConfig.cmake
|
||||
${CMAKECONFIG_BUILD_DIR}/VanetzaConfigVersion.cmake
|
||||
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|
||||
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/cmake/
|
||||
DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||
FILES_MATCHING
|
||||
PATTERN "Find*.cmake")
|
||||
|
||||
install(EXPORT ${PROJECT_NAME} NAMESPACE Vanetza:: FILE VanetzaTargets.cmake DESTINATION ${CMAKECONFIG_INSTALL_DIR})
|
||||
|
||||
# install all C++ headers except those found for tests
|
||||
file(GLOB_RECURSE _vanetza_headers
|
||||
RELATIVE ${PROJECT_SOURCE_DIR}
|
||||
CONFIGURE_DEPENDS
|
||||
vanetza/*.hpp)
|
||||
list(FILTER _vanetza_headers EXCLUDE REGEX "/tests/")
|
||||
if(NOT VANETZA_WITH_PQC)
|
||||
list(FILTER _vanetza_headers EXCLUDE REGEX "vanetza/security/pqc/")
|
||||
endif()
|
||||
foreach(_header IN LISTS _vanetza_headers)
|
||||
get_filename_component(_dir ${_header} DIRECTORY)
|
||||
install(FILES ${_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${_dir})
|
||||
endforeach()
|
||||
|
||||
# export build tree (allows import by outside projects)
|
||||
option(VANETZA_EXPORT_PACKAGE "Export Vanetza build directory to CMake package registry" OFF)
|
||||
if(VANETZA_EXPORT_PACKAGE)
|
||||
export(EXPORT ${PROJECT_NAME} NAMESPACE Vanetza:: FILE VanetzaExports.cmake)
|
||||
file(COPY ${CMAKECONFIG_BUILD_DIR}/VanetzaConfigVersion.cmake
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
configure_file(cmake/VanetzaExportsConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/VanetzaConfig.cmake @ONLY)
|
||||
export(PACKAGE ${PROJECT_NAME})
|
||||
endif()
|
||||
|
||||
# mark build directory as cache dir, see https://bford.info/cachedir
|
||||
file(WRITE ${PROJECT_BINARY_DIR}/CACHEDIR.TAG
|
||||
"Signature: 8a477f597d28d172789f06886806bc55")
|
||||
+2983
File diff suppressed because it is too large
Load Diff
+1
@@ -0,0 +1 @@
|
||||
rsource "ports/esp_idf/Kconfig"
|
||||
+853
@@ -0,0 +1,853 @@
|
||||
This file contains copies of the GNU Lesser General Public License as well
|
||||
as the GNU General Public License, both in their third version.
|
||||
|
||||
|
||||
# GNU Lesser General Public License (LGPL) v3
|
||||
|
||||
```
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
```
|
||||
|
||||
|
||||
# GNU General Public License (GPL) v3
|
||||
|
||||
```
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
```
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
# Vanetza Upstream Provenance
|
||||
|
||||
This directory (`external/vanetza-idf`) contains the Vanetza protocol stack and its ESP-IDF integration for the micrOBU ESP32-C5 ITS-S station.
|
||||
|
||||
## Upstream Software Basis
|
||||
|
||||
- **Project**: Vanetza (ETSI C-ITS protocol stack implementation in C++17)
|
||||
- **Upstream Repository**: `https://github.com/riebl/vanetza.git`
|
||||
- **Pinned Upstream Revision**: `a7cacc1879f3e2124dfb8ef2d83886b1e82d3b36`
|
||||
- **Author / Upstream Maintainer**: Raphael Riebl et al.
|
||||
- **Citekey**: `rieblRieblVanetza2026`
|
||||
- **License**: BSD-3-Clause (retained in `LICENSE.md`)
|
||||
|
||||
## Integrated Components & Third-Party Dependencies
|
||||
|
||||
1. **Boost C++ Libraries (v1.87.0)**:
|
||||
- Located in `ports/esp_idf/third_party/` (`circular_buffer`, `geometry`, `heap`, `iostreams`, `multiprecision`, `rational`).
|
||||
- License: Boost Software License 1.0 (`BSL-1.0`).
|
||||
|
||||
2. **OpenTrafficMap (OTM) Transmitter**:
|
||||
- Upstream: `https://codeberg.org/opentrafficmap/its-g5-receiver-firmware_txenabled.git`
|
||||
- Reviewed Revision: `674e34128279235ba34c9f8d778f43cf1d075397`
|
||||
- Core file: `ports/esp_idf/third_party/otm/main/tx_custom.c` (guarded by SHA-256 in `firmware/CMakeLists.txt`).
|
||||
|
||||
3. **ESP-IDF Port (`ports/esp_idf`)**:
|
||||
- Implements hardware-accelerated crypto (mbedTLS ECC/ECDSA/SHA), NVS credential persistence, ESP32-C5 802.11p PHY bindings (`radio_c5.cmake`), and localhost PKI verification tooling (`ports/esp_idf/tools/local_pki.py`, `pki_client.py`).
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
# vanetza-idf
|
||||
|
||||
Modular C++17 Vanetza library for ESP-IDF. Choose an access, network/transport,
|
||||
or facilities-codec profile; supply your own platform and radio adapters.
|
||||
The portable core targets the ESP32 family. The integrated C5 radio backend
|
||||
is experimental and requires separate hardware validation.
|
||||
|
||||
**Start with the [ESP-IDF integration guide](docs/idf/README.md).** It covers
|
||||
installation, Kconfig, ownership/event-loop rules, examples, and standalone
|
||||
host/device tests. [Standards traceability](docs/idf/standards.md) links the public
|
||||
interfaces to precise ETSI editions and clauses.
|
||||
The [interface assessment](docs/idf/interface-assessment.md) identifies remaining
|
||||
contract and capability gaps. [Test campaigns](docs/idf/test-campaigns.md) explains
|
||||
how the separately installed ETSI framework and two-C5 radio tests connect.
|
||||
|
||||
**This is an experimental port, not a completed ETSI-conformant stack.**
|
||||
See [implementation and conformance gaps](docs/idf/conformance.md) and
|
||||
[validation results](docs/idf/validation.md). CAM/DENM/VAM codecs and endpoints
|
||||
are distinct from complete Basic Services.
|
||||
|
||||
## Components and configurable boundaries
|
||||
|
||||
The arrangement follows the facilities, networking/transport and access layers
|
||||
of the ETSI ITS station architecture, with management and security as shared
|
||||
cross-layer services. It is an implementation map, inspired by
|
||||
[TS 102 723-11, clauses 4–5](https://www.etsi.org/deliver/etsi_ts/102700_102799/10272311/01.01.01_60/ts_10272311v010101p.pdf)
|
||||
and [EN 303 797, Annex B](https://www.etsi.org/deliver/etsi_en/303700_303799/303797/02.01.01_60/en_303797v020101p.pdf).
|
||||
It does not imply that every service in those figures is implemented.
|
||||
|
||||
```mermaid
|
||||
flowchart TB
|
||||
subgraph station["vanetza-idf"]
|
||||
direction TB
|
||||
|
||||
subgraph entry["Application / test entry points"]
|
||||
direction LR
|
||||
application["Application or upper tester"]
|
||||
f_entry["Facilities PDU entry"]
|
||||
b_entry["BTP-DATA entry"]
|
||||
a_entry["AL_DATA entry"]
|
||||
application --> f_entry
|
||||
application --> b_entry
|
||||
application --> a_entry
|
||||
end
|
||||
|
||||
subgraph dataplane["Protocol data plane"]
|
||||
direction LR
|
||||
|
||||
subgraph facilities["Facilities"]
|
||||
direction TB
|
||||
codecs["CAM R2 / DENM R2 / VAM R2\nASN.1 codecs"]
|
||||
basic_services["CA / DEN / VRU Basic Services\npending"]
|
||||
end
|
||||
|
||||
subgraph nt["Networking & Transport"]
|
||||
direction TB
|
||||
btp["BTP-A / BTP-B"]
|
||||
gn["GeoNetworking\nSHB / GBC"]
|
||||
btp --> gn
|
||||
end
|
||||
|
||||
subgraph access_layer["Access boundary"]
|
||||
direction TB
|
||||
access["AL_DATA\nparameter validation"]
|
||||
end
|
||||
|
||||
codecs --> btp
|
||||
gn --> access
|
||||
end
|
||||
|
||||
subgraph shared["Shared / cross-layer services"]
|
||||
direction LR
|
||||
position["Position + clock"]
|
||||
management["Management\nMIB + configuration"]
|
||||
security["Security entity\nTS 103 097 signing + ticket pool\nverification pending"]
|
||||
saps["SAP bindings\nSN / SF / MN / MF / MI"]
|
||||
end
|
||||
|
||||
f_entry --> codecs
|
||||
b_entry --> btp
|
||||
a_entry --> access
|
||||
|
||||
position -.-> gn
|
||||
management -.-> gn
|
||||
security -.-> gn
|
||||
saps -.-> security
|
||||
saps -.-> gn
|
||||
end
|
||||
|
||||
subgraph integration["Platform / external integration"]
|
||||
direction LR
|
||||
etsi["External ETSI TTCN-3\nframework + SUT adapter"]
|
||||
hil["Optional HIL framing\nbounded VID1 envelope"]
|
||||
adapter["External access adapter\nsoftware lower tester / radio"]
|
||||
radio["ESP32-C5 radio backend\nexperimental; DCC + HW validation pending"]
|
||||
|
||||
hil -.-> etsi
|
||||
adapter -.-> radio
|
||||
end
|
||||
|
||||
etsi -.-> application
|
||||
etsi -.-> adapter
|
||||
access <-->|"owned GNPDU + metadata"| adapter
|
||||
```
|
||||
|
||||
The main transmit path is deliberately kept horizontal: Facilities → BTP →
|
||||
GeoNetworking → Access. Management, position/time and security are shown as
|
||||
shared services because they support protocol processing rather than form another
|
||||
encapsulation stage. Reception travels back up the selected layers. The access
|
||||
profile omits the network and facilities layers; the network profile adds
|
||||
BTP/GeoNetworking; the facilities profile also enables the individually
|
||||
selectable codecs. Complete CA, DEN and VRU Basic Services are still pending.
|
||||
The optional HIL envelope carries adapter payloads; it is not an ETSI protocol.
|
||||
|
||||
## External TTCN-3 and HIL
|
||||
|
||||
Install the TTCN-3 runtime and the [official ETSI ITS framework](https://forge.etsi.org/rep/ITS/TS.ITS)
|
||||
separately. The library does not install or bundle them. The test application
|
||||
connects that framework's suite-specific SUT adapter to these points:
|
||||
|
||||
| Point | API/boundary | Intended use |
|
||||
|---|---|---|
|
||||
| Upper tester | Named NF-SAP binding, `Stack::request`, position/time/security injection | Stimulate implemented behavior and collect actual results; full service operations remain pending |
|
||||
| Software lower tester | `Access::request` and `Stack::indicate` | Inject/observe GN traffic while the protocol implementation runs on the ESP32 |
|
||||
| Physical lower tester | Independent ITS-G5 capture/injection radio | Validate transmitted frames, access behavior and RF properties |
|
||||
|
||||
Enable `CONFIG_VANETZA_IDF_HIL` for optional bounded framing. USB/UART/BLE/IP
|
||||
transports and suite-specific command decoding remain in the test application
|
||||
and host SUT adapter. Preserve the ETSI codec payload and map it to the actual
|
||||
service under test; never synthesize a successful acknowledgement.
|
||||
|
||||
The [hook-up guide](docs/idf/README.md#connect-a-separately-installed-etsi-ttcn-3-framework)
|
||||
explains payload boundaries, metadata, real-time versus injected-time tests,
|
||||
PICS/PIXIT, Release 2 ATS adaptation, and evidence retention. A mirrored SUT
|
||||
packet is software evidence; radio conformance requires independent observation.
|
||||
|
||||
## Foundation and acknowledgements
|
||||
|
||||
vanetza-idf is an independent ESP-IDF adaptation built on
|
||||
[Vanetza](https://github.com/riebl/vanetza). It is not maintained by, affiliated
|
||||
with, or endorsed by the Vanetza team. Upstream authorship and license notices
|
||||
remain with the original source files. See the
|
||||
[upstream documentation](https://www.vanetza.org/) for the original library.
|
||||
|
||||
Thank you to [OpenTrafficMap](https://codeberg.org/opentrafficmap) for the
|
||||
foundational work that established how to transmit ITS-G5 using the ESP32-C5
|
||||
radio, shared in their
|
||||
[receiver firmware with TX enabled](https://codeberg.org/opentrafficmap/its-g5-receiver-firmware_txenabled).
|
||||
The C5 backend builds on that work. Its private SDK dependencies and validation
|
||||
status are documented separately from the portable protocol core.
|
||||
|
||||
Vanetza is licensed under LGPLv3; see [LICENSE.md](LICENSE.md).
|
||||
Third-party components retain their respective notices and licensing terms.
|
||||
@@ -0,0 +1,47 @@
|
||||
These ASN.1 files are taken from their respective standardisation documents and are **not** licensed the same way as Vanetza itself.
|
||||
Please refer to the referenced standardisation documents for details about the applicable Intellectual Property Rights (IPR).
|
||||
To the best of my knowledge, ETSI does not object to bundling ASN.1 files of their published documents along with software.
|
||||
Some editorial changes may have been applied, e.g. removal of trailing whitespace etc.
|
||||
Code generated from the files located here can be found in the *vanetza/asn1/its* directory.
|
||||
|
||||
# Standardisation documents
|
||||
|
||||
- *EN302637-2v141-CAM.asn* from ETSI EN 302 637-2 v1.4.1 (2019-04)
|
||||
- *EN302637-3v131-DENM.asn* from ETSI EN 302 637-3 v1.3.1 (2019-04)
|
||||
- *TS102894-2v131-CDD.asn* from ETSI TS 102 894-2 v1.3.1 (2018-08)
|
||||
- *TS102941v131-\*.asn* from ETSI TS 102 941 v1.3.1 (2019-02)
|
||||
- *TS103097v131.asn* from ETSI TS 103 097 v1.3.1 (2017-10)
|
||||
- *TS103097v211-\*.asn* from ETSI TS 103 097 v2.1.1 (2021-10)
|
||||
- *TR103562v211.asn* from ETSI TR 103 562 v2.1.1 (2019-12)
|
||||
|
||||
- *IEEE1609dot2.asn* and *IEEE1609dot2BaseTypes.asn* from IEEE 1609.2 as printed in ETSI TS 103 097 v1.3.1
|
||||
|
||||
# ETSI WebSVN
|
||||
|
||||
You may find these ITS ASN.1 modules also in ETSI's public SVN repository: http://oldforge.etsi.org/websvn/listing.php?repname=ITS.ITS_ASN1
|
||||
While above source is still online (in March 2020), ETSI seems to have moved to https://forge.etsi.org/rep/ITS/ITS_ASN1 by now.
|
||||
This newer source also contains a license file explicitly. A copy is included below for reference.
|
||||
|
||||
> Copyright 2019 ETSI
|
||||
>
|
||||
> Redistribution and use in source and binary forms, with or without
|
||||
> modification, are permitted provided that the following conditions are met:
|
||||
> 1. Redistributions of source code must retain the above copyright notice,
|
||||
> this list of conditions and the following disclaimer.
|
||||
> 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
> this list of conditions and the following disclaimer in the documentation
|
||||
> and/or other materials provided with the distribution.
|
||||
> 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
> may be used to endorse or promote products derived from this software without
|
||||
> specific prior written permission.
|
||||
>
|
||||
> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
> ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
> WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
> IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
> INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
> DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
> LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
> OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
> OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -0,0 +1,132 @@
|
||||
CAM-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) en (302637) cam (2) version (2)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
ItsPduHeader, CauseCode, ReferencePosition, AccelerationControl, Curvature, CurvatureCalculationMode, Heading, LanePosition, EmergencyPriority, EmbarkationStatus, Speed, DriveDirection, LongitudinalAcceleration, LateralAcceleration, VerticalAcceleration, StationType, ExteriorLights, DangerousGoodsBasic, SpecialTransportType, LightBarSirenInUse, VehicleRole, VehicleLength, VehicleWidth, PathHistory, RoadworksSubCauseCode, ClosedLanes, TrafficRule, SpeedLimit, SteeringWheelAngle, PerformanceClass, YawRate, ProtectedCommunicationZone, PtActivation, Latitude, Longitude, ProtectedCommunicationZonesRSU, CenDsrcTollingZone FROM ITS-Container {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2)
|
||||
};
|
||||
|
||||
|
||||
-- The root data frame for cooperative awareness messages
|
||||
|
||||
CAM ::= SEQUENCE {
|
||||
header ItsPduHeader,
|
||||
cam CoopAwareness
|
||||
}
|
||||
|
||||
CoopAwareness ::= SEQUENCE {
|
||||
generationDeltaTime GenerationDeltaTime,
|
||||
camParameters CamParameters
|
||||
}
|
||||
|
||||
CamParameters ::= SEQUENCE {
|
||||
basicContainer BasicContainer,
|
||||
highFrequencyContainer HighFrequencyContainer,
|
||||
lowFrequencyContainer LowFrequencyContainer OPTIONAL,
|
||||
specialVehicleContainer SpecialVehicleContainer OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
HighFrequencyContainer ::= CHOICE {
|
||||
basicVehicleContainerHighFrequency BasicVehicleContainerHighFrequency,
|
||||
rsuContainerHighFrequency RSUContainerHighFrequency,
|
||||
...
|
||||
}
|
||||
|
||||
LowFrequencyContainer ::= CHOICE {
|
||||
basicVehicleContainerLowFrequency BasicVehicleContainerLowFrequency,
|
||||
...
|
||||
}
|
||||
|
||||
SpecialVehicleContainer ::= CHOICE {
|
||||
publicTransportContainer PublicTransportContainer,
|
||||
specialTransportContainer SpecialTransportContainer,
|
||||
dangerousGoodsContainer DangerousGoodsContainer,
|
||||
roadWorksContainerBasic RoadWorksContainerBasic,
|
||||
rescueContainer RescueContainer,
|
||||
emergencyContainer EmergencyContainer,
|
||||
safetyCarContainer SafetyCarContainer,
|
||||
...
|
||||
}
|
||||
|
||||
BasicContainer ::= SEQUENCE {
|
||||
stationType StationType,
|
||||
referencePosition ReferencePosition,
|
||||
...
|
||||
}
|
||||
|
||||
BasicVehicleContainerHighFrequency ::= SEQUENCE {
|
||||
heading Heading,
|
||||
speed Speed,
|
||||
driveDirection DriveDirection,
|
||||
vehicleLength VehicleLength,
|
||||
vehicleWidth VehicleWidth,
|
||||
longitudinalAcceleration LongitudinalAcceleration,
|
||||
curvature Curvature,
|
||||
curvatureCalculationMode CurvatureCalculationMode,
|
||||
yawRate YawRate,
|
||||
accelerationControl AccelerationControl OPTIONAL,
|
||||
lanePosition LanePosition OPTIONAL,
|
||||
steeringWheelAngle SteeringWheelAngle OPTIONAL,
|
||||
lateralAcceleration LateralAcceleration OPTIONAL,
|
||||
verticalAcceleration VerticalAcceleration OPTIONAL,
|
||||
performanceClass PerformanceClass OPTIONAL,
|
||||
cenDsrcTollingZone CenDsrcTollingZone OPTIONAL
|
||||
}
|
||||
|
||||
BasicVehicleContainerLowFrequency ::= SEQUENCE {
|
||||
vehicleRole VehicleRole,
|
||||
exteriorLights ExteriorLights,
|
||||
pathHistory PathHistory
|
||||
}
|
||||
|
||||
PublicTransportContainer ::= SEQUENCE {
|
||||
embarkationStatus EmbarkationStatus,
|
||||
ptActivation PtActivation OPTIONAL
|
||||
}
|
||||
|
||||
SpecialTransportContainer ::= SEQUENCE {
|
||||
specialTransportType SpecialTransportType,
|
||||
lightBarSirenInUse LightBarSirenInUse
|
||||
}
|
||||
|
||||
DangerousGoodsContainer ::= SEQUENCE {
|
||||
dangerousGoodsBasic DangerousGoodsBasic
|
||||
}
|
||||
|
||||
RoadWorksContainerBasic ::= SEQUENCE {
|
||||
roadworksSubCauseCode RoadworksSubCauseCode OPTIONAL,
|
||||
lightBarSirenInUse LightBarSirenInUse,
|
||||
closedLanes ClosedLanes OPTIONAL
|
||||
}
|
||||
|
||||
RescueContainer ::= SEQUENCE {
|
||||
lightBarSirenInUse LightBarSirenInUse
|
||||
}
|
||||
|
||||
EmergencyContainer ::= SEQUENCE {
|
||||
lightBarSirenInUse LightBarSirenInUse,
|
||||
incidentIndication CauseCode OPTIONAL,
|
||||
emergencyPriority EmergencyPriority OPTIONAL
|
||||
}
|
||||
|
||||
SafetyCarContainer ::= SEQUENCE {
|
||||
lightBarSirenInUse LightBarSirenInUse,
|
||||
incidentIndication CauseCode OPTIONAL,
|
||||
trafficRule TrafficRule OPTIONAL,
|
||||
speedLimit SpeedLimit OPTIONAL
|
||||
}
|
||||
|
||||
RSUContainerHighFrequency ::= SEQUENCE {
|
||||
protectedCommunicationZonesRSU ProtectedCommunicationZonesRSU OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
GenerationDeltaTime ::= INTEGER { oneMilliSec(1) } (0..65535)
|
||||
|
||||
END
|
||||
@@ -0,0 +1,109 @@
|
||||
DENM-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) en (302637) denm (1) version (2)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
ItsPduHeader, CauseCode, Speed, InformationQuality, ReferencePosition, ClosedLanes, DangerousGoodsExtended, Heading, LanePosition, LightBarSirenInUse, RoadType, HeightLonCarr, PosLonCarr, PosCentMass, PositioningSolutionType, RequestResponseIndication, StationType, SpeedLimit, StationarySince, TimestampIts, WheelBaseVehicle, TurningRadius, PosFrontAx, PositionOfOccupants, Temperature, VehicleMass, VehicleIdentification, EnergyStorageType, ActionID, ItineraryPath, NumberOfOccupants, PositionOfPillars, RelevanceTrafficDirection, RestrictedTypes, Traces, TransmissionInterval, ValidityDuration, RelevanceDistance, EventHistory, TrafficRule, DeltaReferencePosition FROM ITS-Container {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2)
|
||||
};
|
||||
|
||||
|
||||
DENM ::= SEQUENCE {
|
||||
header ItsPduHeader,
|
||||
denm DecentralizedEnvironmentalNotificationMessage
|
||||
}
|
||||
|
||||
DecentralizedEnvironmentalNotificationMessage ::= SEQUENCE {
|
||||
management ManagementContainer,
|
||||
situation SituationContainer OPTIONAL,
|
||||
location LocationContainer OPTIONAL,
|
||||
alacarte AlacarteContainer OPTIONAL
|
||||
}
|
||||
|
||||
ManagementContainer ::= SEQUENCE {
|
||||
actionID ActionID,
|
||||
detectionTime TimestampIts,
|
||||
referenceTime TimestampIts,
|
||||
termination Termination OPTIONAL,
|
||||
eventPosition ReferencePosition,
|
||||
relevanceDistance RelevanceDistance OPTIONAL,
|
||||
relevanceTrafficDirection RelevanceTrafficDirection OPTIONAL,
|
||||
validityDuration ValidityDuration DEFAULT defaultValidity,
|
||||
transmissionInterval TransmissionInterval OPTIONAL,
|
||||
stationType StationType,
|
||||
...
|
||||
}
|
||||
|
||||
SituationContainer ::= SEQUENCE {
|
||||
informationQuality InformationQuality,
|
||||
eventType CauseCode,
|
||||
linkedCause CauseCode OPTIONAL,
|
||||
eventHistory EventHistory OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
LocationContainer ::= SEQUENCE {
|
||||
eventSpeed Speed OPTIONAL,
|
||||
eventPositionHeading Heading OPTIONAL,
|
||||
traces Traces,
|
||||
roadType RoadType OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
ImpactReductionContainer ::= SEQUENCE {
|
||||
heightLonCarrLeft HeightLonCarr,
|
||||
heightLonCarrRight HeightLonCarr,
|
||||
posLonCarrLeft PosLonCarr,
|
||||
posLonCarrRight PosLonCarr,
|
||||
positionOfPillars PositionOfPillars,
|
||||
posCentMass PosCentMass,
|
||||
wheelBaseVehicle WheelBaseVehicle,
|
||||
turningRadius TurningRadius,
|
||||
posFrontAx PosFrontAx,
|
||||
positionOfOccupants PositionOfOccupants,
|
||||
vehicleMass VehicleMass,
|
||||
requestResponseIndication RequestResponseIndication
|
||||
}
|
||||
|
||||
RoadWorksContainerExtended ::= SEQUENCE {
|
||||
lightBarSirenInUse LightBarSirenInUse OPTIONAL,
|
||||
closedLanes ClosedLanes OPTIONAL,
|
||||
restriction RestrictedTypes OPTIONAL,
|
||||
speedLimit SpeedLimit OPTIONAL,
|
||||
incidentIndication CauseCode OPTIONAL,
|
||||
recommendedPath ItineraryPath OPTIONAL,
|
||||
startingPointSpeedLimit DeltaReferencePosition OPTIONAL,
|
||||
trafficFlowRule TrafficRule OPTIONAL,
|
||||
referenceDenms ReferenceDenms OPTIONAL
|
||||
}
|
||||
|
||||
StationaryVehicleContainer ::= SEQUENCE {
|
||||
stationarySince StationarySince OPTIONAL,
|
||||
stationaryCause CauseCode OPTIONAL,
|
||||
carryingDangerousGoods DangerousGoodsExtended OPTIONAL,
|
||||
numberOfOccupants NumberOfOccupants OPTIONAL,
|
||||
vehicleIdentification VehicleIdentification OPTIONAL,
|
||||
energyStorageType EnergyStorageType OPTIONAL
|
||||
}
|
||||
|
||||
AlacarteContainer ::= SEQUENCE {
|
||||
lanePosition LanePosition OPTIONAL,
|
||||
impactReduction ImpactReductionContainer OPTIONAL,
|
||||
externalTemperature Temperature OPTIONAL,
|
||||
roadWorks RoadWorksContainerExtended OPTIONAL,
|
||||
positioningSolution PositioningSolutionType OPTIONAL,
|
||||
stationaryVehicle StationaryVehicleContainer OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
defaultValidity INTEGER ::= 600
|
||||
|
||||
Termination ::= ENUMERATED {isCancellation(0), isNegation (1)}
|
||||
|
||||
ReferenceDenms ::= SEQUENCE (SIZE(1..8, ...)) OF ActionID
|
||||
|
||||
END
|
||||
@@ -0,0 +1,306 @@
|
||||
IEEE1609dot2 {
|
||||
iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) base (1) schema (1) major-version-2(2)
|
||||
}
|
||||
|
||||
--******************************************************************************
|
||||
--
|
||||
-- IEEE P1609.2 Data Types
|
||||
--
|
||||
--******************************************************************************
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
EXPORTS ALL;
|
||||
|
||||
IMPORTS
|
||||
CrlSeries,
|
||||
EccP256CurvePoint,
|
||||
EciesP256EncryptedKey,
|
||||
EncryptionKey,
|
||||
GeographicRegion,
|
||||
GroupLinkageValue,
|
||||
HashAlgorithm,
|
||||
HashedId3,
|
||||
HashedId8,
|
||||
Hostname,
|
||||
IValue,
|
||||
LinkageValue,
|
||||
Opaque,
|
||||
Psid,
|
||||
PsidSsp,
|
||||
PsidSspRange,
|
||||
PublicEncryptionKey,
|
||||
PublicVerificationKey,
|
||||
SequenceOfHashedId3,
|
||||
SequenceOfPsidSsp,
|
||||
SequenceOfPsidSspRange,
|
||||
ServiceSpecificPermissions,
|
||||
Signature,
|
||||
SubjectAssurance,
|
||||
SymmetricEncryptionKey,
|
||||
ThreeDLocation,
|
||||
Time64,
|
||||
Uint3,
|
||||
Uint8,
|
||||
Uint16,
|
||||
Uint32,
|
||||
ValidityPeriod
|
||||
FROM IEEE1609dot2BaseTypes {
|
||||
iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) base(1) base-types(2) major-version-2 (2)
|
||||
};
|
||||
|
||||
--
|
||||
--*********************************************************************
|
||||
--
|
||||
-- Structures for describing secured data
|
||||
--
|
||||
--*********************************************************************
|
||||
|
||||
-- Necessary to get certain tools to generate sample PDUs
|
||||
-- TestIeee1609Dot2Data ::= Ieee1609Dot2Data
|
||||
-- TestCertificate ::= Certificate
|
||||
|
||||
-- this structure belongs later in the file but putting it here avoids
|
||||
-- compiler errors with certain tools
|
||||
SignedDataPayload ::= SEQUENCE {
|
||||
data Ieee1609Dot2Data OPTIONAL,
|
||||
extDataHash HashedData OPTIONAL,
|
||||
...
|
||||
}
|
||||
(WITH COMPONENTS {..., data PRESENT} |
|
||||
WITH COMPONENTS {..., extDataHash PRESENT})
|
||||
|
||||
Ieee1609Dot2Data ::= SEQUENCE {
|
||||
protocolVersion Uint8(3),
|
||||
content Ieee1609Dot2Content
|
||||
}
|
||||
|
||||
Ieee1609Dot2Content ::= CHOICE {
|
||||
unsecuredData Opaque,
|
||||
signedData SignedData,
|
||||
encryptedData EncryptedData,
|
||||
signedCertificateRequest Opaque,
|
||||
...
|
||||
}
|
||||
|
||||
SignedData ::= SEQUENCE {
|
||||
hashId HashAlgorithm,
|
||||
tbsData ToBeSignedData,
|
||||
signer SignerIdentifier,
|
||||
signature Signature
|
||||
}
|
||||
|
||||
SignerIdentifier ::= CHOICE {
|
||||
digest HashedId8,
|
||||
certificate SequenceOfCertificate,
|
||||
self NULL,
|
||||
...
|
||||
}
|
||||
|
||||
ToBeSignedData ::= SEQUENCE {
|
||||
payload SignedDataPayload,
|
||||
headerInfo HeaderInfo
|
||||
}
|
||||
|
||||
HashedData::= CHOICE {
|
||||
sha256HashedData OCTET STRING (SIZE(32)),
|
||||
...
|
||||
}
|
||||
|
||||
HeaderInfo ::= SEQUENCE {
|
||||
psid Psid,
|
||||
generationTime Time64 OPTIONAL,
|
||||
expiryTime Time64 OPTIONAL,
|
||||
generationLocation ThreeDLocation OPTIONAL,
|
||||
p2pcdLearningRequest HashedId3 OPTIONAL,
|
||||
missingCrlIdentifier MissingCrlIdentifier OPTIONAL,
|
||||
encryptionKey EncryptionKey OPTIONAL,
|
||||
...,
|
||||
inlineP2pcdRequest SequenceOfHashedId3 OPTIONAL,
|
||||
requestedCertificate Certificate OPTIONAL
|
||||
}
|
||||
|
||||
MissingCrlIdentifier ::= SEQUENCE {
|
||||
cracaId HashedId3,
|
||||
crlSeries CrlSeries,
|
||||
...
|
||||
}
|
||||
|
||||
Countersignature ::= Ieee1609Dot2Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {...,
|
||||
signedData (WITH COMPONENTS {...,
|
||||
tbsData (WITH COMPONENTS {...,
|
||||
payload (WITH COMPONENTS {...,
|
||||
data ABSENT,
|
||||
extDataHash PRESENT
|
||||
}),
|
||||
headerInfo(WITH COMPONENTS {...,
|
||||
generationTime PRESENT,
|
||||
expiryTime ABSENT,
|
||||
generationLocation ABSENT,
|
||||
p2pcdLearningRequest ABSENT,
|
||||
missingCrlIdentifier ABSENT,
|
||||
encryptionKey ABSENT
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
--**********************************************************************
|
||||
--
|
||||
-- Structures for describing encrypted data
|
||||
--
|
||||
--**********************************************************************
|
||||
|
||||
EncryptedData ::= SEQUENCE {
|
||||
recipients SequenceOfRecipientInfo,
|
||||
ciphertext SymmetricCiphertext
|
||||
}
|
||||
RecipientInfo ::= CHOICE {
|
||||
pskRecipInfo PreSharedKeyRecipientInfo,
|
||||
symmRecipInfo SymmRecipientInfo,
|
||||
certRecipInfo PKRecipientInfo,
|
||||
signedDataRecipInfo PKRecipientInfo,
|
||||
rekRecipInfo PKRecipientInfo
|
||||
}
|
||||
|
||||
SequenceOfRecipientInfo ::= SEQUENCE OF RecipientInfo
|
||||
|
||||
PreSharedKeyRecipientInfo ::= HashedId8
|
||||
SymmRecipientInfo ::= SEQUENCE {
|
||||
recipientId HashedId8,
|
||||
encKey SymmetricCiphertext
|
||||
}
|
||||
|
||||
PKRecipientInfo ::= SEQUENCE {
|
||||
recipientId HashedId8,
|
||||
encKey EncryptedDataEncryptionKey
|
||||
}
|
||||
|
||||
EncryptedDataEncryptionKey ::= CHOICE {
|
||||
eciesNistP256 EciesP256EncryptedKey,
|
||||
eciesBrainpoolP256r1 EciesP256EncryptedKey,
|
||||
...
|
||||
}
|
||||
|
||||
SymmetricCiphertext ::= CHOICE {
|
||||
aes128ccm AesCcmCiphertext,
|
||||
...
|
||||
}
|
||||
|
||||
AesCcmCiphertext ::= SEQUENCE {
|
||||
nonce OCTET STRING (SIZE (12)),
|
||||
ccmCiphertext Opaque -- 16 bytes longer than plaintext
|
||||
}
|
||||
|
||||
|
||||
--**********************************************************************
|
||||
--
|
||||
-- Certificates and other security management data structures
|
||||
--
|
||||
--**********************************************************************
|
||||
|
||||
-- Certificates are implicit (type = implicit, toBeSigned includes
|
||||
-- reconstruction value, signature absent) or explicit (type = explicit,
|
||||
-- toBeSigned includes verification key, signature present).
|
||||
|
||||
Certificate ::= CertificateBase (ImplicitCertificate | ExplicitCertificate)
|
||||
|
||||
SequenceOfCertificate ::= SEQUENCE OF Certificate
|
||||
|
||||
CertificateBase ::= SEQUENCE {
|
||||
version Uint8(3),
|
||||
type CertificateType,
|
||||
issuer IssuerIdentifier,
|
||||
toBeSigned ToBeSignedCertificate,
|
||||
signature Signature OPTIONAL
|
||||
}
|
||||
|
||||
CertificateType ::= ENUMERATED {
|
||||
explicit,
|
||||
implicit,
|
||||
...
|
||||
}
|
||||
|
||||
ImplicitCertificate ::= CertificateBase (WITH COMPONENTS {...,
|
||||
type(implicit),
|
||||
toBeSigned (WITH COMPONENTS {...,
|
||||
verifyKeyIndicator(WITH COMPONENTS {reconstructionValue})
|
||||
}),
|
||||
signature ABSENT
|
||||
})
|
||||
|
||||
ExplicitCertificate ::= CertificateBase (WITH COMPONENTS {...,
|
||||
type(explicit),
|
||||
toBeSigned(WITH COMPONENTS {...,
|
||||
verifyKeyIndicator(WITH COMPONENTS {verificationKey})
|
||||
}),
|
||||
signature PRESENT
|
||||
})
|
||||
|
||||
IssuerIdentifier ::= CHOICE {
|
||||
sha256AndDigest HashedId8,
|
||||
self HashAlgorithm,
|
||||
...,
|
||||
sha384AndDigest HashedId8
|
||||
}
|
||||
|
||||
ToBeSignedCertificate ::= SEQUENCE {
|
||||
id CertificateId,
|
||||
cracaId HashedId3,
|
||||
crlSeries CrlSeries,
|
||||
validityPeriod ValidityPeriod,
|
||||
region GeographicRegion OPTIONAL,
|
||||
assuranceLevel SubjectAssurance OPTIONAL,
|
||||
appPermissions SequenceOfPsidSsp OPTIONAL,
|
||||
certIssuePermissions SequenceOfPsidGroupPermissions OPTIONAL,
|
||||
certRequestPermissions SequenceOfPsidGroupPermissions OPTIONAL,
|
||||
canRequestRollover NULL OPTIONAL,
|
||||
encryptionKey PublicEncryptionKey OPTIONAL,
|
||||
verifyKeyIndicator VerificationKeyIndicator,
|
||||
...
|
||||
}
|
||||
(WITH COMPONENTS { ..., appPermissions PRESENT} |
|
||||
WITH COMPONENTS { ..., certIssuePermissions PRESENT} |
|
||||
WITH COMPONENTS { ..., certRequestPermissions PRESENT})
|
||||
|
||||
CertificateId ::= CHOICE {
|
||||
linkageData LinkageData,
|
||||
name Hostname,
|
||||
binaryId OCTET STRING(SIZE(1..64)),
|
||||
none NULL,
|
||||
...
|
||||
}
|
||||
|
||||
LinkageData ::= SEQUENCE {
|
||||
iCert IValue,
|
||||
linkage-value LinkageValue,
|
||||
group-linkage-value GroupLinkageValue OPTIONAL
|
||||
}
|
||||
|
||||
EndEntityType ::= BIT STRING { app (0), enrol (1) } (SIZE (8)) (ALL EXCEPT {})
|
||||
|
||||
PsidGroupPermissions ::= SEQUENCE {
|
||||
subjectPermissions SubjectPermissions,
|
||||
minChainLength INTEGER DEFAULT 1,
|
||||
chainLengthRange INTEGER DEFAULT 0,
|
||||
eeType EndEntityType DEFAULT {app} -- vanetza-idf: IEEE Std 1609.2-2022 6.4.28 (was '00'H)
|
||||
}
|
||||
|
||||
SequenceOfPsidGroupPermissions ::= SEQUENCE OF PsidGroupPermissions
|
||||
|
||||
SubjectPermissions ::= CHOICE {
|
||||
explicit SequenceOfPsidSspRange,
|
||||
all NULL,
|
||||
...
|
||||
}
|
||||
|
||||
VerificationKeyIndicator ::= CHOICE {
|
||||
verificationKey PublicVerificationKey,
|
||||
reconstructionValue EccP256CurvePoint,
|
||||
...
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,330 @@
|
||||
IEEE1609dot2BaseTypes {
|
||||
iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) base(1) base-types(2) major-version-2(2)
|
||||
}
|
||||
|
||||
--
|
||||
--********************************************************************
|
||||
-- IEEE P1609.2 Base Data Types
|
||||
--
|
||||
--********************************************************************
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
EXPORTS ALL;
|
||||
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
--
|
||||
-- Integers
|
||||
--
|
||||
-- ------------------------------------------------------------------
|
||||
|
||||
Uint3 ::= INTEGER (0..7) -- (hex) 07
|
||||
Uint8 ::= INTEGER (0..255) -- (hex) ff
|
||||
Uint16 ::= INTEGER (0..65535) -- (hex) ff ff
|
||||
Uint32 ::= INTEGER (0..4294967295) -- (hex) ff ff ff ff
|
||||
Uint64 ::= INTEGER (0..18446744073709551615) -- (hex) ff ff ff ff ff ff ff ff
|
||||
|
||||
SequenceOfUint8 ::= SEQUENCE OF Uint8
|
||||
SequenceOfUint16 ::= SEQUENCE OF Uint16
|
||||
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
--
|
||||
-- OCTET STRING types
|
||||
--
|
||||
-- ------------------------------------------------------------------
|
||||
|
||||
Opaque ::= OCTET STRING
|
||||
|
||||
HashedId10 ::= OCTET STRING (SIZE(10))
|
||||
HashedId8 ::= OCTET STRING (SIZE(8))
|
||||
HashedId3 ::= OCTET STRING (SIZE(3))
|
||||
SequenceOfHashedId3 ::= SEQUENCE OF HashedId3
|
||||
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
--
|
||||
-- Time
|
||||
--
|
||||
-- ------------------------------------------------------------------
|
||||
|
||||
Time32 ::= Uint32
|
||||
Time64 ::= Uint64
|
||||
|
||||
ValidityPeriod ::= SEQUENCE {
|
||||
start Time32,
|
||||
duration Duration
|
||||
}
|
||||
|
||||
Duration ::= CHOICE {
|
||||
microseconds Uint16,
|
||||
milliseconds Uint16,
|
||||
seconds Uint16,
|
||||
minutes Uint16,
|
||||
hours Uint16,
|
||||
sixtyHours Uint16,
|
||||
years Uint16
|
||||
}
|
||||
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
--
|
||||
-- Location
|
||||
--
|
||||
-- ------------------------------------------------------------------
|
||||
|
||||
GeographicRegion ::= CHOICE {
|
||||
circularRegion CircularRegion,
|
||||
rectangularRegion SequenceOfRectangularRegion,
|
||||
polygonalRegion PolygonalRegion,
|
||||
identifiedRegion SequenceOfIdentifiedRegion,
|
||||
...
|
||||
}
|
||||
|
||||
CircularRegion ::= SEQUENCE {
|
||||
center TwoDLocation,
|
||||
radius Uint16
|
||||
}
|
||||
|
||||
RectangularRegion ::= SEQUENCE {
|
||||
northWest TwoDLocation,
|
||||
southEast TwoDLocation
|
||||
}
|
||||
|
||||
SequenceOfRectangularRegion ::= SEQUENCE OF RectangularRegion
|
||||
|
||||
PolygonalRegion ::= SEQUENCE SIZE(3..MAX) OF TwoDLocation
|
||||
|
||||
TwoDLocation ::= SEQUENCE {
|
||||
latitude Latitude,
|
||||
longitude Longitude
|
||||
}
|
||||
|
||||
IdentifiedRegion ::= CHOICE {
|
||||
countryOnly CountryOnly,
|
||||
countryAndRegions CountryAndRegions,
|
||||
countryAndSubregions CountryAndSubregions,
|
||||
...
|
||||
}
|
||||
|
||||
SequenceOfIdentifiedRegion ::= SEQUENCE OF IdentifiedRegion
|
||||
|
||||
CountryOnly ::= Uint16
|
||||
|
||||
CountryAndRegions ::= SEQUENCE {
|
||||
countryOnly CountryOnly,
|
||||
regions SequenceOfUint8
|
||||
}
|
||||
|
||||
CountryAndSubregions ::= SEQUENCE {
|
||||
country CountryOnly,
|
||||
regionAndSubregions SequenceOfRegionAndSubregions
|
||||
}
|
||||
|
||||
RegionAndSubregions ::= SEQUENCE {
|
||||
region Uint8,
|
||||
subregions SequenceOfUint16
|
||||
}
|
||||
|
||||
SequenceOfRegionAndSubregions ::= SEQUENCE OF RegionAndSubregions
|
||||
|
||||
ThreeDLocation ::= SEQUENCE {
|
||||
latitude Latitude,
|
||||
longitude Longitude,
|
||||
elevation Elevation
|
||||
}
|
||||
|
||||
Latitude ::= NinetyDegreeInt
|
||||
Longitude ::= OneEightyDegreeInt
|
||||
Elevation ::= ElevInt
|
||||
|
||||
NinetyDegreeInt ::= INTEGER {
|
||||
min (-900000000),
|
||||
max (900000000),
|
||||
unknown (900000001)
|
||||
} (-900000000..900000001)
|
||||
|
||||
KnownLatitude ::= NinetyDegreeInt (min..max) -- Minus 90deg to +90deg in microdegree intervals
|
||||
UnknownLatitude ::= NinetyDegreeInt (unknown)
|
||||
|
||||
OneEightyDegreeInt ::= INTEGER {
|
||||
min (-1799999999),
|
||||
max (1800000000),
|
||||
unknown (1800000001)
|
||||
} (-1799999999..1800000001)
|
||||
|
||||
KnownLongitude ::= OneEightyDegreeInt (min..max)
|
||||
UnknownLongitude ::= OneEightyDegreeInt (unknown)
|
||||
|
||||
ElevInt ::= Uint16 -- Range is from -4096 to 61439 in units of one-tenth of a meter
|
||||
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
--
|
||||
-- Crypto
|
||||
--
|
||||
-- ------------------------------------------------------------------
|
||||
|
||||
Signature ::= CHOICE {
|
||||
ecdsaNistP256Signature EcdsaP256Signature,
|
||||
ecdsaBrainpoolP256r1Signature EcdsaP256Signature,
|
||||
...,
|
||||
ecdsaBrainpoolP384r1Signature EcdsaP384Signature
|
||||
}
|
||||
|
||||
EcdsaP256Signature ::= SEQUENCE {
|
||||
rSig EccP256CurvePoint,
|
||||
sSig OCTET STRING (SIZE (32))
|
||||
}
|
||||
|
||||
EcdsaP384Signature ::= SEQUENCE {
|
||||
rSig EccP384CurvePoint,
|
||||
sSig OCTET STRING (SIZE (48))
|
||||
}
|
||||
|
||||
EccP256CurvePoint ::= CHOICE {
|
||||
x-only OCTET STRING (SIZE (32)),
|
||||
fill NULL, -- consistency with 1363 / X9.62
|
||||
compressed-y-0 OCTET STRING (SIZE (32)),
|
||||
compressed-y-1 OCTET STRING (SIZE (32)),
|
||||
uncompressedP256 SEQUENCE {
|
||||
x OCTET STRING (SIZE (32)),
|
||||
y OCTET STRING (SIZE (32))
|
||||
}
|
||||
}
|
||||
|
||||
EccP384CurvePoint ::= CHOICE {
|
||||
x-only OCTET STRING (SIZE (48)),
|
||||
fill NULL, -- consistency w 1363 / X9.62
|
||||
compressed-y-0 OCTET STRING (SIZE (48)),
|
||||
compressed-y-1 OCTET STRING (SIZE (48)),
|
||||
uncompressedP384 SEQUENCE {
|
||||
x OCTET STRING (SIZE (48)),
|
||||
y OCTET STRING (SIZE (48))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SymmAlgorithm ::= ENUMERATED {
|
||||
aes128Ccm,
|
||||
...
|
||||
}
|
||||
|
||||
HashAlgorithm ::= ENUMERATED {
|
||||
sha256,
|
||||
...,
|
||||
sha384
|
||||
}
|
||||
|
||||
EciesP256EncryptedKey ::= SEQUENCE {
|
||||
v EccP256CurvePoint,
|
||||
c OCTET STRING (SIZE (16)),
|
||||
t OCTET STRING (SIZE (16))
|
||||
}
|
||||
|
||||
EncryptionKey ::= CHOICE {
|
||||
public PublicEncryptionKey,
|
||||
symmetric SymmetricEncryptionKey
|
||||
}
|
||||
|
||||
PublicEncryptionKey ::= SEQUENCE {
|
||||
supportedSymmAlg SymmAlgorithm,
|
||||
publicKey BasePublicEncryptionKey
|
||||
}
|
||||
|
||||
BasePublicEncryptionKey ::= CHOICE {
|
||||
eciesNistP256 EccP256CurvePoint,
|
||||
eciesBrainpoolP256r1 EccP256CurvePoint,
|
||||
...
|
||||
}
|
||||
|
||||
PublicVerificationKey ::= CHOICE {
|
||||
ecdsaNistP256 EccP256CurvePoint,
|
||||
ecdsaBrainpoolP256r1 EccP256CurvePoint,
|
||||
...,
|
||||
ecdsaBrainpoolP384r1 EccP384CurvePoint
|
||||
}
|
||||
|
||||
SymmetricEncryptionKey ::= CHOICE {
|
||||
aes128Ccm OCTET STRING(SIZE(16)),
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
--
|
||||
-- PSID / ITS-AID
|
||||
--
|
||||
-- ------------------------------------------------------------------
|
||||
|
||||
PsidSsp ::= SEQUENCE {
|
||||
psid Psid,
|
||||
ssp ServiceSpecificPermissions OPTIONAL
|
||||
}
|
||||
|
||||
SequenceOfPsidSsp ::= SEQUENCE OF PsidSsp
|
||||
|
||||
Psid ::= INTEGER (0..MAX)
|
||||
|
||||
SequenceOfPsid ::= SEQUENCE OF Psid
|
||||
|
||||
ServiceSpecificPermissions ::= CHOICE {
|
||||
opaque OCTET STRING (SIZE(0..MAX)),
|
||||
...,
|
||||
bitmapSsp BitmapSsp
|
||||
}
|
||||
|
||||
BitmapSsp ::= OCTET STRING (SIZE(0..31))
|
||||
|
||||
PsidSspRange ::= SEQUENCE {
|
||||
psid Psid,
|
||||
sspRange SspRange OPTIONAL
|
||||
}
|
||||
|
||||
SequenceOfPsidSspRange ::= SEQUENCE OF PsidSspRange
|
||||
|
||||
SspRange ::= CHOICE {
|
||||
opaque SequenceOfOctetString,
|
||||
all NULL,
|
||||
... ,
|
||||
bitmapSspRange BitmapSspRange
|
||||
}
|
||||
|
||||
BitmapSspRange ::= SEQUENCE {
|
||||
sspValue OCTET STRING (SIZE(1..32)),
|
||||
sspBitmask OCTET STRING (SIZE(1..32))
|
||||
}
|
||||
|
||||
SequenceOfOctetString ::= SEQUENCE (SIZE (0..MAX)) OF OCTET STRING (SIZE(0..MAX))
|
||||
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
--
|
||||
-- Goes in certs
|
||||
--
|
||||
-- ------------------------------------------------------------------
|
||||
|
||||
SubjectAssurance ::= OCTET STRING (SIZE(1))
|
||||
|
||||
CrlSeries ::= Uint16
|
||||
|
||||
|
||||
-- ------------------------------------------------------------------
|
||||
--
|
||||
-- Pseudonym Linkage
|
||||
--
|
||||
-- ------------------------------------------------------------------
|
||||
|
||||
IValue ::= Uint16
|
||||
Hostname ::= UTF8String (SIZE(0..255))
|
||||
LinkageValue ::= OCTET STRING (SIZE(9))
|
||||
GroupLinkageValue ::= SEQUENCE {
|
||||
jValue OCTET STRING (SIZE(4)),
|
||||
value OCTET STRING (SIZE(9))
|
||||
}
|
||||
|
||||
LaId ::= OCTET STRING (SIZE(2))
|
||||
LinkageSeed ::= OCTET STRING (SIZE(16))
|
||||
|
||||
END
|
||||
@@ -0,0 +1,372 @@
|
||||
CPM-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) tr (103562) cpm (1) version (1)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS ItsPduHeader, Heading, ReferencePosition, Speed, DriveDirection, LongitudinalAcceleration, LateralAcceleration, VerticalAcceleration, StationType, VehicleLength, VehicleWidth, YawRate, SpeedConfidence
|
||||
FROM ITS-Container { itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2) }
|
||||
IntersectionReferenceID, LaneID, NodeOffsetPointXY, Offset-B10, Offset-B11, Offset-B12, Offset-B13, Offset-B14, Offset-B16, RoadSegmentReferenceID, VehicleHeight
|
||||
FROM DSRC { iso (1) standard (0) signalizedIntersection (19091) profilec(2) dsrc (2) version2 (2) }
|
||||
GenerationDeltaTime FROM CAM-PDU-Descriptions { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg1(1) en(302637) cam(2) version(2)} ;
|
||||
|
||||
-- The root data frame for collective perception message
|
||||
CPM ::= SEQUENCE {
|
||||
header ItsPduHeader,
|
||||
cpm CollectivePerceptionMessage
|
||||
}
|
||||
|
||||
CollectivePerceptionMessage ::= SEQUENCE {
|
||||
generationDeltaTime GenerationDeltaTime,
|
||||
cpmParameters CpmParameters
|
||||
}
|
||||
|
||||
CpmParameters ::= SEQUENCE {
|
||||
managementContainer CpmManagementContainer,
|
||||
stationDataContainer StationDataContainer OPTIONAL,
|
||||
sensorInformationContainer SensorInformationContainer OPTIONAL,
|
||||
perceivedObjectContainer PerceivedObjectContainer OPTIONAL,
|
||||
freeSpaceAddendumContainer FreeSpaceAddendumContainer OPTIONAL,
|
||||
numberOfPerceivedObjects NumberOfPerceivedObjects,
|
||||
...
|
||||
}
|
||||
|
||||
CpmManagementContainer ::= SEQUENCE {
|
||||
stationType StationType,
|
||||
perceivedObjectContainerSegmentInfo PerceivedObjectContainerSegmentInfo OPTIONAL,
|
||||
referencePosition ReferencePosition,
|
||||
...
|
||||
}
|
||||
|
||||
StationDataContainer ::= CHOICE {
|
||||
originatingVehicleContainer OriginatingVehicleContainer,
|
||||
originatingRSUContainer OriginatingRSUContainer,
|
||||
...
|
||||
}
|
||||
|
||||
OriginatingVehicleContainer ::= SEQUENCE {
|
||||
heading Heading,
|
||||
speed Speed,
|
||||
vehicleOrientationAngle WGS84Angle OPTIONAL,
|
||||
driveDirection DriveDirection DEFAULT forward,
|
||||
longitudinalAcceleration LongitudinalAcceleration OPTIONAL,
|
||||
lateralAcceleration LateralAcceleration OPTIONAL,
|
||||
verticalAcceleration VerticalAcceleration OPTIONAL,
|
||||
yawRate YawRate OPTIONAL,
|
||||
pitchAngle CartesianAngle OPTIONAL,
|
||||
rollAngle CartesianAngle OPTIONAL,
|
||||
vehicleLength VehicleLength OPTIONAL,
|
||||
vehicleWidth VehicleWidth OPTIONAL,
|
||||
vehicleHeight VehicleHeight OPTIONAL,
|
||||
trailerDataContainer TrailerDataContainer OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
OriginatingRSUContainer ::= CHOICE {
|
||||
intersectionReferenceId IntersectionReferenceID,
|
||||
roadSegmentReferenceId RoadSegmentReferenceID,
|
||||
...
|
||||
}
|
||||
|
||||
SensorInformationContainer ::= SEQUENCE SIZE(1..128, ...) OF SensorInformation
|
||||
|
||||
SensorInformation ::= SEQUENCE {
|
||||
sensorID Identifier,
|
||||
type SensorType,
|
||||
detectionArea DetectionArea,
|
||||
freeSpaceConfidence FreeSpaceConfidence OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
PerceivedObjectContainer ::= SEQUENCE SIZE(1..128, ...) OF PerceivedObject
|
||||
|
||||
PerceivedObject ::= SEQUENCE {
|
||||
objectID Identifier,
|
||||
sensorIDList SensorIdList OPTIONAL,
|
||||
timeOfMeasurement TimeOfMeasurement,
|
||||
objectAge ObjectAge OPTIONAL,
|
||||
objectConfidence ObjectConfidence DEFAULT 0,
|
||||
xDistance ObjectDistanceWithConfidence,
|
||||
yDistance ObjectDistanceWithConfidence,
|
||||
zDistance ObjectDistanceWithConfidence OPTIONAL,
|
||||
xSpeed SpeedExtended,
|
||||
ySpeed SpeedExtended,
|
||||
zSpeed SpeedExtended OPTIONAL,
|
||||
xAcceleration LongitudinalAcceleration OPTIONAL,
|
||||
yAcceleration LateralAcceleration OPTIONAL,
|
||||
zAcceleration VerticalAcceleration OPTIONAL,
|
||||
yawAngle CartesianAngle OPTIONAL,
|
||||
planarObjectDimension1 ObjectDimension OPTIONAL,
|
||||
planarObjectDimension2 ObjectDimension OPTIONAL,
|
||||
verticalObjectDimension ObjectDimension OPTIONAL,
|
||||
objectRefPoint ObjectRefPoint DEFAULT 0,
|
||||
dynamicStatus DynamicStatus OPTIONAL,
|
||||
classification ObjectClassDescription OPTIONAL,
|
||||
matchedPosition MatchedPosition OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
DetectionArea ::= CHOICE {
|
||||
vehicleSensor VehicleSensor,
|
||||
stationarySensorRadial AreaRadial,
|
||||
stationarySensorPolygon AreaPolygon,
|
||||
stationarySensorCircular AreaCircular,
|
||||
stationarySensorEllipse AreaEllipse,
|
||||
stationarySensorRectangle AreaRectangle,
|
||||
...
|
||||
}
|
||||
|
||||
VehicleSensor ::= SEQUENCE {
|
||||
refPointId RefPointId DEFAULT 0,
|
||||
xSensorOffset XSensorOffset,
|
||||
ySensorOffset YSensorOffset,
|
||||
zSensorOffset ZSensorOffset OPTIONAL,
|
||||
vehicleSensorPropertyList VehicleSensorPropertyList,
|
||||
...
|
||||
}
|
||||
|
||||
VehicleSensorPropertyList ::= SEQUENCE SIZE(1..10) OF VehicleSensorProperties
|
||||
|
||||
VehicleSensorProperties ::= SEQUENCE {
|
||||
range Range,
|
||||
horizontalOpeningAngleStart CartesianAngleValue,
|
||||
horizontalOpeningAngleEnd CartesianAngleValue,
|
||||
verticalOpeningAngleStart CartesianAngleValue OPTIONAL,
|
||||
verticalOpeningAngleEnd CartesianAngleValue OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
AreaCircular ::= SEQUENCE {
|
||||
nodeCenterPoint OffsetPoint OPTIONAL,
|
||||
radius Radius
|
||||
}
|
||||
|
||||
AreaEllipse ::= SEQUENCE {
|
||||
nodeCenterPoint OffsetPoint OPTIONAL,
|
||||
semiMinorRangeLength SemiRangeLength,
|
||||
semiMajorRangeLength SemiRangeLength,
|
||||
semiMajorRangeOrientation WGS84AngleValue,
|
||||
semiHeight SemiRangeLength OPTIONAL
|
||||
}
|
||||
|
||||
AreaRectangle ::= SEQUENCE {
|
||||
nodeCenterPoint OffsetPoint OPTIONAL,
|
||||
semiMajorRangeLength SemiRangeLength,
|
||||
semiMinorRangeLength SemiRangeLength,
|
||||
semiMajorRangeOrientation WGS84AngleValue,
|
||||
semiHeight SemiRangeLength OPTIONAL
|
||||
}
|
||||
|
||||
AreaPolygon ::= SEQUENCE {
|
||||
polyPointList PolyPointList
|
||||
}
|
||||
|
||||
PolyPointList ::= SEQUENCE (SIZE(3..16, ...)) OF OffsetPoint
|
||||
|
||||
AreaRadial ::= SEQUENCE {
|
||||
range Range,
|
||||
stationaryHorizontalOpeningAngleStart WGS84AngleValue,
|
||||
stationaryHorizontalOpeningAngleEnd WGS84AngleValue,
|
||||
verticalOpeningAngleStart CartesianAngleValue OPTIONAL,
|
||||
verticalOpeningAngleEnd CartesianAngleValue OPTIONAL,
|
||||
sensorPositionOffset OffsetPoint OPTIONAL,
|
||||
sensorHeight SensorHeight OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
FreeSpaceAddendumContainer ::= SEQUENCE SIZE(1..128, ...) OF FreeSpaceAddendum
|
||||
|
||||
FreeSpaceAddendum ::= SEQUENCE {
|
||||
freeSpaceConfidence FreeSpaceConfidence,
|
||||
freeSpaceArea FreeSpaceArea,
|
||||
sensorIDList SensorIdList OPTIONAL,
|
||||
shadowingApplies ShadowingApplies DEFAULT TRUE,
|
||||
...
|
||||
}
|
||||
|
||||
FreeSpaceArea ::= CHOICE {
|
||||
freeSpacePolygon AreaPolygon,
|
||||
freeSpaceCircular AreaCircular,
|
||||
freeSpaceEllipse AreaEllipse,
|
||||
freeSpaceRectangle AreaRectangle,
|
||||
...
|
||||
}
|
||||
|
||||
ObjectDistanceWithConfidence ::= SEQUENCE {
|
||||
value DistanceValue,
|
||||
confidence DistanceConfidence
|
||||
}
|
||||
|
||||
ObjectDimension ::= SEQUENCE {
|
||||
value ObjectDimensionValue,
|
||||
confidence ObjectDimensionConfidence
|
||||
}
|
||||
|
||||
CartesianAngle ::= SEQUENCE {
|
||||
value CartesianAngleValue,
|
||||
confidence AngleConfidence
|
||||
}
|
||||
|
||||
WGS84Angle ::= SEQUENCE {
|
||||
value WGS84AngleValue,
|
||||
confidence AngleConfidence
|
||||
}
|
||||
|
||||
SpeedExtended ::= SEQUENCE {
|
||||
value SpeedValueExtended,
|
||||
confidence SpeedConfidence
|
||||
}
|
||||
|
||||
SensorIdList ::= SEQUENCE SIZE(1..128, ...) OF Identifier
|
||||
|
||||
TrailerDataContainer ::= SEQUENCE SIZE(1..2) OF TrailerData
|
||||
|
||||
TrailerData ::= SEQUENCE {
|
||||
refPointId RefPointId,
|
||||
hitchPointOffset HitchPointOffset,
|
||||
frontOverhang FrontOverhang,
|
||||
rearOverhang RearOverhang,
|
||||
trailerWidth VehicleWidth OPTIONAL,
|
||||
hitchAngle CartesianAngle OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
LongitudinalLanePosition ::= SEQUENCE {
|
||||
longitudinalLanePositionValue LongitudinalLanePositionValue,
|
||||
longitudinalLanePositionConfidence LongitudinalLanePositionConfidence
|
||||
}
|
||||
|
||||
MatchedPosition ::= SEQUENCE {
|
||||
laneID LaneID OPTIONAL,
|
||||
longitudinalLanePosition LongitudinalLanePosition OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
PerceivedObjectContainerSegmentInfo ::= SEQUENCE {
|
||||
totalMsgSegments SegmentCount,
|
||||
thisSegmentNum SegmentCount
|
||||
}
|
||||
|
||||
ObjectClassDescription ::= SEQUENCE (SIZE(1..8)) OF ObjectClass
|
||||
|
||||
ObjectClass ::= SEQUENCE {
|
||||
confidence ClassConfidence,
|
||||
class CHOICE {
|
||||
vehicle VehicleSubclass,
|
||||
person PersonSubclass,
|
||||
animal AnimalSubclass,
|
||||
other OtherSubclass
|
||||
}
|
||||
}
|
||||
|
||||
VehicleSubclass ::= SEQUENCE {
|
||||
type VehicleSubclassType DEFAULT 0,
|
||||
confidence ClassConfidence DEFAULT 0
|
||||
}
|
||||
|
||||
PersonSubclass ::= SEQUENCE {
|
||||
type PersonSubclassType DEFAULT 0,
|
||||
confidence ClassConfidence DEFAULT 0
|
||||
}
|
||||
|
||||
AnimalSubclass ::= SEQUENCE {
|
||||
type AnimalSubclassType DEFAULT 0,
|
||||
confidence ClassConfidence DEFAULT 0
|
||||
}
|
||||
|
||||
OtherSubclass ::= SEQUENCE {
|
||||
type OtherSublassType DEFAULT 0,
|
||||
confidence ClassConfidence DEFAULT 0
|
||||
}
|
||||
|
||||
OffsetPoint ::= SEQUENCE {
|
||||
nodeOffsetPointxy NodeOffsetPointXY (WITH COMPONENTS {..., node-LatLon ABSENT, regional ABSENT}),
|
||||
nodeOffsetPointZ NodeOffsetPointZ OPTIONAL
|
||||
}
|
||||
|
||||
NodeOffsetPointZ ::= CHOICE {
|
||||
node-Z1 Offset-B10, -- node is within 5.11m of last node
|
||||
node-Z2 Offset-B11, -- node is within 10.23m of last node
|
||||
node-Z3 Offset-B12, -- node is within 20.47m of last node
|
||||
node-Z4 Offset-B13, -- node is within 40.96m of last node
|
||||
node-Z5 Offset-B14, -- node is within 81.91m of last node
|
||||
node-Z6 Offset-B16 -- node is within 327.67m of last node
|
||||
}
|
||||
|
||||
AnimalSubclassType ::= INTEGER {unknown(0)} (0..255)
|
||||
|
||||
ClassConfidence ::= INTEGER {unknown(0), onePercent(1), oneHundredPercent(100), unavailable(101)} (0..101)
|
||||
|
||||
WGS84AngleValue ::= INTEGER {wgs84North(0), wgs84East(900), wgs84South(1800), wgs84West(2700), unavailable(3601)} (0..3601)
|
||||
|
||||
CartesianAngleValue ::= INTEGER {zeroPointOneDegree(1), oneDegree(10), unavailable(3601)} (0..3601)
|
||||
|
||||
AngleConfidence ::= INTEGER {zeroPointOneDegree (1), oneDegree (10), outOfRange(126), unavailable(127)} (1..127)
|
||||
|
||||
SemiRangeLength ::= INTEGER {zeroPointOneMeter(1), oneMeter(10)} (0..10000)
|
||||
|
||||
DistanceValue ::= INTEGER {zeroPointZeroOneMeter(1), oneMeter(100)} (-132768..132767)
|
||||
|
||||
DistanceConfidence ::= INTEGER {zeroPointZeroOneMeter(1), oneMeter(100), outOfRange(101), unavailable(102)} (0..102)
|
||||
|
||||
DynamicStatus ::= INTEGER {dynamic(0), hasBeenDynamic(1), static(2)} (0..2)
|
||||
|
||||
HitchPointOffset ::= INTEGER {zeroPointOneMeter(1), oneMeter(10)} (0..100)
|
||||
|
||||
FrontOverhang ::= INTEGER {zeroPointOneMeter(1), oneMeter(10)} (0..50)
|
||||
|
||||
FreeSpaceConfidence ::= INTEGER {unknown(0), onePercent(1), oneHundredPercent(100), unavailable(101)} (0..101)
|
||||
|
||||
LongitudinalLanePositionValue ::= INTEGER {zeroPointOneMeter(1)} (0..32767)
|
||||
|
||||
LongitudinalLanePositionConfidence ::= INTEGER {zeroPointZeroOneMeter(1), oneMeter(100), outOfRange(101), unavailable(102)} (0..102)
|
||||
|
||||
ObjectAge ::= INTEGER {oneMiliSec(1)} (0..1500)
|
||||
|
||||
ObjectConfidence ::= INTEGER {unknown(0), onePercent(1), oneHundredPercent(100), unavailable(101)} (0..101)
|
||||
|
||||
ObjectDimensionValue ::= INTEGER {zeroPointOneMeter(1), oneMeter(10)} (0..1023)
|
||||
|
||||
ObjectDimensionConfidence ::= INTEGER {zeroPointZeroOneMeter(1), oneMeter(100), outOfRange(101), unavailable(102)} (0..102)
|
||||
|
||||
ObjectRefPoint ::= INTEGER {mid(0), bottomLeft(1), midLeft(2), topLeft(3), bottomMid(4), topMid(5), bottomRight(6), midRight(7), topRight(8)} (0..8)
|
||||
|
||||
OtherSublassType ::= INTEGER {unknown(0), roadSideUnit(1)} (0..255)
|
||||
|
||||
PersonSubclassType ::= INTEGER {unknown(0), pedestrian(1), personInWheelchair(2), cyclist(3), personWithStroller(4), personOnSkates(5), personGroup(6)} (0..255)
|
||||
|
||||
Radius ::= INTEGER {zeroPointOneMeter(1), oneMeter(10)} (0..10000)
|
||||
|
||||
Range ::= INTEGER {zeroPointOneMeter(1), oneMeter(10)} (0..10000)
|
||||
|
||||
RearOverhang ::= INTEGER {zeroPointOneMeter(1), oneMeter(10)} (0..150)
|
||||
|
||||
RefPointId ::= INTEGER (0..255)
|
||||
|
||||
SensorHeight ::= INTEGER {zeroPointZeroOneMeter(1)} (-5000..5000)
|
||||
|
||||
ShadowingApplies ::= BOOLEAN
|
||||
|
||||
Identifier ::= INTEGER (0..255)
|
||||
|
||||
NumberOfPerceivedObjects ::= INTEGER (0..255)
|
||||
|
||||
SensorType ::= INTEGER {undefined(0), radar(1), lidar(2), monovideo(3), stereovision(4), nightvision(5), ultrasonic(6), pmd(7), fusion(8), inductionloop(9), sphericalCamera(10), itssaggregation(11)} (0..15)
|
||||
|
||||
SegmentCount ::= INTEGER(1..127)
|
||||
|
||||
SpeedValueExtended ::= INTEGER {standstill(0), oneCentimeterPerSec(1),unavailable(16383)} (-16383..16383)
|
||||
|
||||
TimeOfMeasurement ::= INTEGER {oneMilliSecond(1)} (-1500..1500)
|
||||
|
||||
VehicleSubclassType ::= INTEGER {unknown(0), moped(1), motorcycle(2), passengerCar(3), bus(4), lightTruck(5), heavyTruck(6), trailer(7), specialVehicles(8), tram(9), emergencyVehicle(10), agricultural(11)} (0..255)
|
||||
|
||||
XSensorOffset ::= INTEGER {negativeZeroPointZeroOneMeter(-1), negativeOneMeter(-100)} (-5000..0)
|
||||
|
||||
YSensorOffset ::= INTEGER {zeroPointZeroOneMeter(1), oneMeter(100)} (-1000..1000)
|
||||
|
||||
ZSensorOffset ::= INTEGER {zeroPointZeroOneMeter(1), oneMeter(100)} (0..1000)
|
||||
|
||||
END
|
||||
@@ -0,0 +1,505 @@
|
||||
ITS-Container {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
ItsPduHeader ::= SEQUENCE {
|
||||
protocolVersion INTEGER (0..255),
|
||||
messageID INTEGER{ denm(1), cam(2), poi(3), spatem(4), mapem(5), ivim(6), ev-rsr(7), tistpgtransaction(8), srem(9), ssem(10), evcsn(11), saem(12), rtcmem(13) } (0..255), -- Mantis #7209, #7005
|
||||
stationID StationID
|
||||
}
|
||||
|
||||
StationID ::= INTEGER(0..4294967295)
|
||||
|
||||
ReferencePosition ::= SEQUENCE {
|
||||
latitude Latitude,
|
||||
longitude Longitude,
|
||||
positionConfidenceEllipse PosConfidenceEllipse ,
|
||||
altitude Altitude
|
||||
}
|
||||
|
||||
DeltaReferencePosition ::= SEQUENCE {
|
||||
deltaLatitude DeltaLatitude,
|
||||
deltaLongitude DeltaLongitude,
|
||||
deltaAltitude DeltaAltitude
|
||||
}
|
||||
|
||||
Longitude ::= INTEGER {oneMicrodegreeEast (10), oneMicrodegreeWest (-10), unavailable(1800000001)} (-1800000000..1800000001)
|
||||
|
||||
Latitude ::= INTEGER {oneMicrodegreeNorth (10), oneMicrodegreeSouth (-10), unavailable(900000001)} (-900000000..900000001)
|
||||
|
||||
Altitude ::= SEQUENCE {
|
||||
altitudeValue AltitudeValue,
|
||||
altitudeConfidence AltitudeConfidence
|
||||
}
|
||||
|
||||
AltitudeValue ::= INTEGER {referenceEllipsoidSurface(0), oneCentimeter(1), unavailable(800001)} (-100000..800001)
|
||||
|
||||
AltitudeConfidence ::= ENUMERATED {
|
||||
alt-000-01 (0),
|
||||
alt-000-02 (1),
|
||||
alt-000-05 (2),
|
||||
alt-000-10 (3),
|
||||
alt-000-20 (4),
|
||||
alt-000-50 (5),
|
||||
alt-001-00 (6),
|
||||
alt-002-00 (7),
|
||||
alt-005-00 (8),
|
||||
alt-010-00 (9),
|
||||
alt-020-00 (10),
|
||||
alt-050-00 (11),
|
||||
alt-100-00 (12),
|
||||
alt-200-00 (13),
|
||||
outOfRange (14),
|
||||
unavailable (15)
|
||||
}
|
||||
|
||||
DeltaLongitude ::= INTEGER {oneMicrodegreeEast (10), oneMicrodegreeWest (-10), unavailable(131072)} (-131071..131072)
|
||||
|
||||
DeltaLatitude ::= INTEGER {oneMicrodegreeNorth (10), oneMicrodegreeSouth (-10) , unavailable(131072)} (-131071..131072)
|
||||
|
||||
DeltaAltitude ::= INTEGER {oneCentimeterUp (1), oneCentimeterDown (-1), unavailable(12800)} (-12700..12800)
|
||||
|
||||
PosConfidenceEllipse ::= SEQUENCE {
|
||||
semiMajorConfidence SemiAxisLength,
|
||||
semiMinorConfidence SemiAxisLength,
|
||||
semiMajorOrientation HeadingValue
|
||||
}
|
||||
|
||||
PathPoint ::= SEQUENCE {
|
||||
pathPosition DeltaReferencePosition,
|
||||
pathDeltaTime PathDeltaTime OPTIONAL
|
||||
}
|
||||
|
||||
PathDeltaTime ::= INTEGER {tenMilliSecondsInPast(1)} (1..65535, ...)
|
||||
|
||||
PtActivation ::= SEQUENCE {
|
||||
ptActivationType PtActivationType,
|
||||
ptActivationData PtActivationData
|
||||
}
|
||||
|
||||
PtActivationType ::= INTEGER {undefinedCodingType(0), r09-16CodingType(1), vdv-50149CodingType(2)} (0..255)
|
||||
|
||||
PtActivationData ::= OCTET STRING (SIZE(1..20))
|
||||
|
||||
AccelerationControl ::= BIT STRING {
|
||||
brakePedalEngaged (0),
|
||||
gasPedalEngaged (1),
|
||||
emergencyBrakeEngaged (2),
|
||||
collisionWarningEngaged (3),
|
||||
accEngaged (4),
|
||||
cruiseControlEngaged (5),
|
||||
speedLimiterEngaged (6)
|
||||
} (SIZE(7))
|
||||
|
||||
|
||||
SemiAxisLength ::= INTEGER{oneCentimeter(1), outOfRange(4094), unavailable(4095)} (0..4095)
|
||||
|
||||
CauseCode ::= SEQUENCE {
|
||||
causeCode CauseCodeType,
|
||||
subCauseCode SubCauseCodeType,
|
||||
...
|
||||
}
|
||||
|
||||
CauseCodeType ::= INTEGER {
|
||||
reserved (0),
|
||||
trafficCondition (1),
|
||||
accident (2),
|
||||
roadworks (3),
|
||||
impassability (5),
|
||||
adverseWeatherCondition-Adhesion (6),
|
||||
aquaplannning (7),
|
||||
hazardousLocation-SurfaceCondition (9),
|
||||
hazardousLocation-ObstacleOnTheRoad (10),
|
||||
hazardousLocation-AnimalOnTheRoad (11),
|
||||
humanPresenceOnTheRoad (12),
|
||||
wrongWayDriving (14),
|
||||
rescueAndRecoveryWorkInProgress (15),
|
||||
adverseWeatherCondition-ExtremeWeatherCondition (17),
|
||||
adverseWeatherCondition-Visibility (18),
|
||||
adverseWeatherCondition-Precipitation (19),
|
||||
slowVehicle (26),
|
||||
dangerousEndOfQueue (27),
|
||||
vehicleBreakdown (91),
|
||||
postCrash (92),
|
||||
humanProblem (93),
|
||||
stationaryVehicle (94),
|
||||
emergencyVehicleApproaching (95),
|
||||
hazardousLocation-DangerousCurve (96),
|
||||
collisionRisk (97),
|
||||
signalViolation (98),
|
||||
dangerousSituation (99)
|
||||
} (0..255)
|
||||
|
||||
SubCauseCodeType ::= INTEGER (0..255)
|
||||
|
||||
TrafficConditionSubCauseCode ::= INTEGER {unavailable(0), increasedVolumeOfTraffic(1), trafficJamSlowlyIncreasing(2), trafficJamIncreasing(3), trafficJamStronglyIncreasing(4), trafficStationary(5), trafficJamSlightlyDecreasing(6), trafficJamDecreasing(7), trafficJamStronglyDecreasing(8)} (0..255)
|
||||
|
||||
AccidentSubCauseCode ::= INTEGER {unavailable(0), multiVehicleAccident(1), heavyAccident(2), accidentInvolvingLorry(3), accidentInvolvingBus(4), accidentInvolvingHazardousMaterials(5), accidentOnOppositeLane(6), unsecuredAccident(7), assistanceRequested(8)} (0..255)
|
||||
|
||||
RoadworksSubCauseCode ::= INTEGER {unavailable(0), majorRoadworks(1), roadMarkingWork(2), slowMovingRoadMaintenance(3), shortTermStationaryRoadworks(4), streetCleaning(5), winterService(6)} (0..255)
|
||||
|
||||
HumanPresenceOnTheRoadSubCauseCode ::= INTEGER {unavailable(0), childrenOnRoadway(1), cyclistOnRoadway(2), motorcyclistOnRoadway(3)} (0..255)
|
||||
|
||||
WrongWayDrivingSubCauseCode ::= INTEGER {unavailable(0), wrongLane(1), wrongDirection(2)} (0..255)
|
||||
|
||||
AdverseWeatherCondition-ExtremeWeatherConditionSubCauseCode ::= INTEGER {unavailable(0), strongWinds(1), damagingHail(2), hurricane(3), thunderstorm(4), tornado(5), blizzard(6)} (0..255)
|
||||
|
||||
AdverseWeatherCondition-AdhesionSubCauseCode ::= INTEGER {unavailable(0), heavyFrostOnRoad(1), fuelOnRoad(2), mudOnRoad(3), snowOnRoad(4), iceOnRoad(5), blackIceOnRoad(6), oilOnRoad(7), looseChippings(8), instantBlackIce(9), roadsSalted(10)} (0..255)
|
||||
|
||||
AdverseWeatherCondition-VisibilitySubCauseCode ::= INTEGER {unavailable(0), fog(1), smoke(2), heavySnowfall(3), heavyRain(4), heavyHail(5), lowSunGlare(6), sandstorms(7), swarmsOfInsects(8)} (0..255)
|
||||
|
||||
AdverseWeatherCondition-PrecipitationSubCauseCode ::= INTEGER {unavailable(0), heavyRain(1), heavySnowfall(2), softHail(3)} (0..255)
|
||||
|
||||
SlowVehicleSubCauseCode ::= INTEGER {unavailable(0), maintenanceVehicle(1), vehiclesSlowingToLookAtAccident(2), abnormalLoad(3), abnormalWideLoad(4), convoy(5), snowplough(6), deicing(7), saltingVehicles(8)} (0..255)
|
||||
|
||||
StationaryVehicleSubCauseCode ::= INTEGER {unavailable(0), humanProblem(1), vehicleBreakdown(2), postCrash(3), publicTransportStop(4), carryingDangerousGoods(5)} (0..255)
|
||||
|
||||
HumanProblemSubCauseCode ::= INTEGER {unavailable(0), glycemiaProblem(1), heartProblem(2)} (0..255)
|
||||
|
||||
EmergencyVehicleApproachingSubCauseCode ::= INTEGER {unavailable(0), emergencyVehicleApproaching(1), prioritizedVehicleApproaching(2)} (0..255)
|
||||
|
||||
HazardousLocation-DangerousCurveSubCauseCode ::= INTEGER {unavailable(0), dangerousLeftTurnCurve(1), dangerousRightTurnCurve(2), multipleCurvesStartingWithUnknownTurningDirection(3), multipleCurvesStartingWithLeftTurn(4), multipleCurvesStartingWithRightTurn(5)} (0..255)
|
||||
|
||||
HazardousLocation-SurfaceConditionSubCauseCode ::= INTEGER {unavailable(0), rockfalls(1), earthquakeDamage(2), sewerCollapse(3), subsidence(4), snowDrifts(5), stormDamage(6), burstPipe(7), volcanoEruption(8), fallingIce(9)} (0..255)
|
||||
|
||||
HazardousLocation-ObstacleOnTheRoadSubCauseCode ::= INTEGER {unavailable(0), shedLoad(1), partsOfVehicles(2), partsOfTyres(3), bigObjects(4), fallenTrees(5), hubCaps(6), waitingVehicles(7)} (0..255)
|
||||
|
||||
HazardousLocation-AnimalOnTheRoadSubCauseCode ::= INTEGER {unavailable(0), wildAnimals(1), herdOfAnimals(2), smallAnimals(3), largeAnimals(4)} (0..255)
|
||||
|
||||
CollisionRiskSubCauseCode ::= INTEGER {unavailable(0), longitudinalCollisionRisk(1), crossingCollisionRisk(2), lateralCollisionRisk(3), vulnerableRoadUser(4)} (0..255)
|
||||
|
||||
SignalViolationSubCauseCode ::= INTEGER {unavailable(0), stopSignViolation(1), trafficLightViolation(2), turningRegulationViolation(3)} (0..255)
|
||||
|
||||
RescueAndRecoveryWorkInProgressSubCauseCode ::= INTEGER {unavailable(0), emergencyVehicles(1), rescueHelicopterLanding(2), policeActivityOngoing(3), medicalEmergencyOngoing(4), childAbductionInProgress(5)} (0..255)
|
||||
|
||||
DangerousEndOfQueueSubCauseCode ::= INTEGER {unavailable(0), suddenEndOfQueue(1), queueOverHill(2), queueAroundBend(3), queueInTunnel(4)} (0..255)
|
||||
|
||||
DangerousSituationSubCauseCode ::= INTEGER {unavailable(0), emergencyElectronicBrakeEngaged(1), preCrashSystemEngaged(2), espEngaged(3), absEngaged(4), aebEngaged(5), brakeWarningEngaged(6), collisionRiskWarningEngaged(7)} (0..255)
|
||||
|
||||
VehicleBreakdownSubCauseCode ::= INTEGER {unavailable(0), lackOfFuel (1), lackOfBatteryPower (2), engineProblem(3), transmissionProblem(4), engineCoolingProblem(5), brakingSystemProblem(6), steeringProblem(7), tyrePuncture(8), tyrePressureProblem(9)} (0..255)
|
||||
|
||||
PostCrashSubCauseCode ::= INTEGER {unavailable(0), accidentWithoutECallTriggered (1), accidentWithECallManuallyTriggered (2), accidentWithECallAutomaticallyTriggered (3), accidentWithECallTriggeredWithoutAccessToCellularNetwork(4)} (0..255)
|
||||
|
||||
Curvature ::= SEQUENCE {
|
||||
curvatureValue CurvatureValue,
|
||||
curvatureConfidence CurvatureConfidence
|
||||
}
|
||||
|
||||
CurvatureValue ::= INTEGER {straight(0), unavailable(1023)} (-1023..1023)
|
||||
|
||||
CurvatureConfidence ::= ENUMERATED {
|
||||
onePerMeter-0-00002 (0),
|
||||
onePerMeter-0-0001 (1),
|
||||
onePerMeter-0-0005 (2),
|
||||
onePerMeter-0-002 (3),
|
||||
onePerMeter-0-01 (4),
|
||||
onePerMeter-0-1 (5),
|
||||
outOfRange (6),
|
||||
unavailable (7)
|
||||
}
|
||||
|
||||
CurvatureCalculationMode ::= ENUMERATED {yawRateUsed(0), yawRateNotUsed(1), unavailable(2), ...}
|
||||
|
||||
Heading ::= SEQUENCE {
|
||||
headingValue HeadingValue,
|
||||
headingConfidence HeadingConfidence
|
||||
}
|
||||
|
||||
HeadingValue ::= INTEGER {wgs84North(0), wgs84East(900), wgs84South(1800), wgs84West(2700), unavailable(3601)} (0..3601)
|
||||
|
||||
HeadingConfidence ::= INTEGER {equalOrWithinZeroPointOneDegree (1), equalOrWithinOneDegree (10), outOfRange(126), unavailable(127)} (1..127)
|
||||
|
||||
LanePosition ::= INTEGER {offTheRoad(-1), innerHardShoulder(0), innermostDrivingLane(1), secondLaneFromInside(2), outerHardShoulder(14)} (-1..14)
|
||||
|
||||
ClosedLanes ::= SEQUENCE {
|
||||
innerhardShoulderStatus HardShoulderStatus OPTIONAL,
|
||||
outerhardShoulderStatus HardShoulderStatus OPTIONAL,
|
||||
drivingLaneStatus DrivingLaneStatus OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
HardShoulderStatus ::= ENUMERATED {availableForStopping(0), closed(1), availableForDriving(2)}
|
||||
|
||||
DrivingLaneStatus ::= BIT STRING (SIZE (1..13))
|
||||
|
||||
PerformanceClass ::= INTEGER {unavailable(0), performanceClassA(1), performanceClassB(2)} (0..7)
|
||||
|
||||
SpeedValue ::= INTEGER {standstill(0), oneCentimeterPerSec(1), unavailable(16383)} (0..16383)
|
||||
|
||||
SpeedConfidence ::= INTEGER {equalOrWithinOneCentimeterPerSec(1), equalOrWithinOneMeterPerSec(100), outOfRange(126), unavailable(127)} (1..127)
|
||||
|
||||
VehicleMass ::= INTEGER {hundredKg(1), unavailable(1024)} (1..1024)
|
||||
|
||||
Speed ::= SEQUENCE {
|
||||
speedValue SpeedValue,
|
||||
speedConfidence SpeedConfidence
|
||||
}
|
||||
|
||||
DriveDirection ::= ENUMERATED {forward (0), backward (1), unavailable (2)}
|
||||
|
||||
EmbarkationStatus ::= BOOLEAN
|
||||
|
||||
LongitudinalAcceleration ::= SEQUENCE {
|
||||
longitudinalAccelerationValue LongitudinalAccelerationValue,
|
||||
longitudinalAccelerationConfidence AccelerationConfidence
|
||||
}
|
||||
|
||||
LongitudinalAccelerationValue ::= INTEGER {pointOneMeterPerSecSquaredForward(1), pointOneMeterPerSecSquaredBackward(-1), unavailable(161)} (-160 .. 161)
|
||||
|
||||
AccelerationConfidence ::= INTEGER {pointOneMeterPerSecSquared(1), outOfRange(101), unavailable(102)} (0 .. 102)
|
||||
|
||||
LateralAcceleration ::= SEQUENCE {
|
||||
lateralAccelerationValue LateralAccelerationValue,
|
||||
lateralAccelerationConfidence AccelerationConfidence
|
||||
}
|
||||
|
||||
LateralAccelerationValue ::= INTEGER {pointOneMeterPerSecSquaredToRight(-1), pointOneMeterPerSecSquaredToLeft(1), unavailable(161)} (-160 .. 161)
|
||||
|
||||
VerticalAcceleration ::= SEQUENCE {
|
||||
verticalAccelerationValue VerticalAccelerationValue,
|
||||
verticalAccelerationConfidence AccelerationConfidence
|
||||
}
|
||||
|
||||
VerticalAccelerationValue ::= INTEGER {pointOneMeterPerSecSquaredUp(1), pointOneMeterPerSecSquaredDown(-1), unavailable(161)} (-160 .. 161)
|
||||
|
||||
StationType ::= INTEGER {unknown(0), pedestrian(1), cyclist(2), moped(3), motorcycle(4), passengerCar(5), bus(6), lightTruck(7), heavyTruck(8), trailer(9), specialVehicles(10), tram(11), roadSideUnit(15)} (0..255)
|
||||
|
||||
ExteriorLights ::= BIT STRING {
|
||||
lowBeamHeadlightsOn (0),
|
||||
highBeamHeadlightsOn (1),
|
||||
leftTurnSignalOn (2),
|
||||
rightTurnSignalOn (3),
|
||||
daytimeRunningLightsOn (4),
|
||||
reverseLightOn (5),
|
||||
fogLightOn (6),
|
||||
parkingLightsOn (7)
|
||||
} (SIZE(8))
|
||||
|
||||
DangerousGoodsBasic::= ENUMERATED {
|
||||
explosives1(0),
|
||||
explosives2(1),
|
||||
explosives3(2),
|
||||
explosives4(3),
|
||||
explosives5(4),
|
||||
explosives6(5),
|
||||
flammableGases(6),
|
||||
nonFlammableGases(7),
|
||||
toxicGases(8),
|
||||
flammableLiquids(9),
|
||||
flammableSolids(10),
|
||||
substancesLiableToSpontaneousCombustion(11),
|
||||
substancesEmittingFlammableGasesUponContactWithWater(12),
|
||||
oxidizingSubstances(13),
|
||||
organicPeroxides(14),
|
||||
toxicSubstances(15),
|
||||
infectiousSubstances(16),
|
||||
radioactiveMaterial(17),
|
||||
corrosiveSubstances(18),
|
||||
miscellaneousDangerousSubstances(19)
|
||||
}
|
||||
|
||||
DangerousGoodsExtended ::= SEQUENCE {
|
||||
dangerousGoodsType DangerousGoodsBasic,
|
||||
unNumber INTEGER (0..9999),
|
||||
elevatedTemperature BOOLEAN,
|
||||
tunnelsRestricted BOOLEAN,
|
||||
limitedQuantity BOOLEAN,
|
||||
emergencyActionCode IA5String (SIZE (1..24)) OPTIONAL,
|
||||
phoneNumber PhoneNumber OPTIONAL,
|
||||
companyName UTF8String (SIZE (1..24)) OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
SpecialTransportType ::= BIT STRING {heavyLoad(0), excessWidth(1), excessLength(2), excessHeight(3)} (SIZE(4))
|
||||
|
||||
LightBarSirenInUse ::= BIT STRING {
|
||||
lightBarActivated (0),
|
||||
sirenActivated (1)
|
||||
} (SIZE(2))
|
||||
|
||||
HeightLonCarr ::= INTEGER {oneCentimeter(1), unavailable(100)} (1..100)
|
||||
|
||||
PosLonCarr ::= INTEGER {oneCentimeter(1), unavailable(127)} (1..127)
|
||||
|
||||
PosPillar ::= INTEGER {tenCentimeters(1), unavailable(30)} (1..30)
|
||||
|
||||
PosCentMass ::= INTEGER {tenCentimeters(1), unavailable(63)} (1..63)
|
||||
|
||||
RequestResponseIndication ::= ENUMERATED {request(0), response(1)}
|
||||
|
||||
SpeedLimit ::= INTEGER {oneKmPerHour(1)} (1..255)
|
||||
|
||||
StationarySince ::= ENUMERATED {lessThan1Minute(0), lessThan2Minutes(1), lessThan15Minutes(2), equalOrGreater15Minutes(3)}
|
||||
|
||||
Temperature ::= INTEGER {equalOrSmallerThanMinus60Deg (-60), oneDegreeCelsius(1), equalOrGreaterThan67Deg(67)} (-60..67)
|
||||
|
||||
TrafficRule ::= ENUMERATED {noPassing(0), noPassingForTrucks(1), passToRight(2), passToLeft(3), ...}
|
||||
|
||||
WheelBaseVehicle ::= INTEGER {tenCentimeters(1), unavailable(127)} (1..127)
|
||||
|
||||
TurningRadius ::= INTEGER {point4Meters(1), unavailable(255)} (1..255)
|
||||
|
||||
PosFrontAx ::= INTEGER {tenCentimeters(1), unavailable(20)} (1..20)
|
||||
|
||||
PositionOfOccupants ::= BIT STRING {
|
||||
row1LeftOccupied (0),
|
||||
row1RightOccupied (1),
|
||||
row1MidOccupied (2),
|
||||
row1NotDetectable (3),
|
||||
row1NotPresent (4),
|
||||
row2LeftOccupied (5),
|
||||
row2RightOccupied (6),
|
||||
row2MidOccupied (7),
|
||||
row2NotDetectable (8),
|
||||
row2NotPresent (9),
|
||||
row3LeftOccupied (10),
|
||||
row3RightOccupied (11),
|
||||
row3MidOccupied (12),
|
||||
row3NotDetectable (13),
|
||||
row3NotPresent (14),
|
||||
row4LeftOccupied (15),
|
||||
row4RightOccupied (16),
|
||||
row4MidOccupied (17),
|
||||
row4NotDetectable (18),
|
||||
row4NotPresent (19)} (SIZE(20))
|
||||
|
||||
PositioningSolutionType ::= ENUMERATED {noPositioningSolution(0), sGNSS(1), dGNSS(2), sGNSSplusDR(3), dGNSSplusDR(4), dR(5), ...}
|
||||
|
||||
VehicleIdentification ::= SEQUENCE {
|
||||
wMInumber WMInumber OPTIONAL,
|
||||
vDS VDS OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
WMInumber ::= IA5String (SIZE(1..3))
|
||||
|
||||
VDS ::= IA5String (SIZE(6))
|
||||
|
||||
EnergyStorageType ::= BIT STRING {hydrogenStorage(0), electricEnergyStorage(1), liquidPropaneGas(2), compressedNaturalGas(3), diesel(4), gasoline(5), ammonia(6)} (SIZE(7))
|
||||
|
||||
VehicleLength ::= SEQUENCE {
|
||||
vehicleLengthValue VehicleLengthValue,
|
||||
vehicleLengthConfidenceIndication VehicleLengthConfidenceIndication
|
||||
}
|
||||
|
||||
VehicleLengthValue ::= INTEGER {tenCentimeters(1), outOfRange(1022), unavailable(1023)} (1..1023)
|
||||
|
||||
VehicleLengthConfidenceIndication ::= ENUMERATED {noTrailerPresent(0), trailerPresentWithKnownLength(1), trailerPresentWithUnknownLength(2), trailerPresenceIsUnknown(3), unavailable(4)}
|
||||
|
||||
VehicleWidth ::= INTEGER {tenCentimeters(1), outOfRange(61), unavailable(62)} (1..62)
|
||||
|
||||
PathHistory::= SEQUENCE (SIZE(0..40)) OF PathPoint
|
||||
|
||||
EmergencyPriority ::= BIT STRING {requestForRightOfWay(0), requestForFreeCrossingAtATrafficLight(1)} (SIZE(2))
|
||||
|
||||
InformationQuality ::= INTEGER {unavailable(0), lowest(1), highest(7)} (0..7)
|
||||
|
||||
RoadType ::= ENUMERATED {
|
||||
urban-NoStructuralSeparationToOppositeLanes(0),
|
||||
urban-WithStructuralSeparationToOppositeLanes(1),
|
||||
nonUrban-NoStructuralSeparationToOppositeLanes(2),
|
||||
nonUrban-WithStructuralSeparationToOppositeLanes(3)}
|
||||
|
||||
SteeringWheelAngle ::= SEQUENCE {
|
||||
steeringWheelAngleValue SteeringWheelAngleValue,
|
||||
steeringWheelAngleConfidence SteeringWheelAngleConfidence
|
||||
}
|
||||
|
||||
SteeringWheelAngleValue ::= INTEGER {straight(0), onePointFiveDegreesToRight(-1), onePointFiveDegreesToLeft(1), unavailable(512)} (-511..512)
|
||||
|
||||
SteeringWheelAngleConfidence ::= INTEGER {equalOrWithinOnePointFiveDegree (1), outOfRange(126), unavailable(127)} (1..127)
|
||||
|
||||
TimestampIts ::= INTEGER {utcStartOf2004(0), oneMillisecAfterUTCStartOf2004(1)} (0..4398046511103)
|
||||
|
||||
VehicleRole ::= ENUMERATED {default(0), publicTransport(1), specialTransport(2), dangerousGoods(3), roadWork(4), rescue(5), emergency(6), safetyCar(7), agriculture(8),commercial(9),military(10),roadOperator(11),taxi(12), reserved1(13), reserved2(14), reserved3(15)}
|
||||
|
||||
YawRate::= SEQUENCE {
|
||||
yawRateValue YawRateValue,
|
||||
yawRateConfidence YawRateConfidence
|
||||
}
|
||||
|
||||
YawRateValue ::= INTEGER {straight(0), degSec-000-01ToRight(-1), degSec-000-01ToLeft(1), unavailable(32767)} (-32766..32767)
|
||||
|
||||
YawRateConfidence ::= ENUMERATED {
|
||||
degSec-000-01 (0),
|
||||
degSec-000-05 (1),
|
||||
degSec-000-10 (2),
|
||||
degSec-001-00 (3),
|
||||
degSec-005-00 (4),
|
||||
degSec-010-00 (5),
|
||||
degSec-100-00 (6),
|
||||
outOfRange (7),
|
||||
unavailable (8)
|
||||
}
|
||||
|
||||
ProtectedZoneType::= ENUMERATED { permanentCenDsrcTolling (0), ..., temporaryCenDsrcTolling (1) }
|
||||
|
||||
RelevanceDistance ::= ENUMERATED {lessThan50m(0), lessThan100m(1), lessThan200m(2), lessThan500m(3), lessThan1000m(4), lessThan5km(5), lessThan10km(6), over10km(7)}
|
||||
|
||||
RelevanceTrafficDirection ::= ENUMERATED {allTrafficDirections(0), upstreamTraffic(1), downstreamTraffic(2), oppositeTraffic(3)}
|
||||
|
||||
TransmissionInterval ::= INTEGER {oneMilliSecond(1), tenSeconds(10000)} (1..10000)
|
||||
|
||||
ValidityDuration ::= INTEGER {timeOfDetection(0), oneSecondAfterDetection(1)} (0..86400)
|
||||
|
||||
ActionID ::= SEQUENCE {
|
||||
originatingStationID StationID,
|
||||
sequenceNumber SequenceNumber
|
||||
}
|
||||
|
||||
ItineraryPath ::= SEQUENCE SIZE(1..40) OF ReferencePosition
|
||||
|
||||
ProtectedCommunicationZone ::= SEQUENCE {
|
||||
protectedZoneType ProtectedZoneType,
|
||||
expiryTime TimestampIts OPTIONAL,
|
||||
protectedZoneLatitude Latitude,
|
||||
protectedZoneLongitude Longitude,
|
||||
protectedZoneRadius ProtectedZoneRadius OPTIONAL,
|
||||
protectedZoneID ProtectedZoneID OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
Traces ::= SEQUENCE SIZE(1..7) OF PathHistory
|
||||
|
||||
NumberOfOccupants ::= INTEGER {oneOccupant (1), unavailable(127)} (0..127)
|
||||
|
||||
SequenceNumber ::= INTEGER (0..65535)
|
||||
|
||||
PositionOfPillars ::= SEQUENCE (SIZE(1..3, ...)) OF PosPillar
|
||||
|
||||
RestrictedTypes ::= SEQUENCE (SIZE(1..3, ...)) OF StationType
|
||||
|
||||
EventHistory::= SEQUENCE (SIZE(1..23)) OF EventPoint
|
||||
|
||||
EventPoint ::= SEQUENCE {
|
||||
eventPosition DeltaReferencePosition,
|
||||
eventDeltaTime PathDeltaTime OPTIONAL,
|
||||
informationQuality InformationQuality
|
||||
}
|
||||
|
||||
ProtectedCommunicationZonesRSU ::= SEQUENCE (SIZE(1..16)) OF ProtectedCommunicationZone
|
||||
|
||||
CenDsrcTollingZone ::= SEQUENCE {
|
||||
protectedZoneLatitude Latitude,
|
||||
protectedZoneLongitude Longitude,
|
||||
cenDsrcTollingZoneID CenDsrcTollingZoneID OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
ProtectedZoneRadius ::= INTEGER {oneMeter(1)} (1..255, ...)
|
||||
|
||||
ProtectedZoneID ::= INTEGER (0..134217727)
|
||||
|
||||
CenDsrcTollingZoneID ::= ProtectedZoneID
|
||||
|
||||
DigitalMap ::= SEQUENCE (SIZE(1..256)) OF ReferencePosition
|
||||
|
||||
OpeningDaysHours ::= UTF8String
|
||||
|
||||
PhoneNumber ::= NumericString (SIZE(1..16))
|
||||
|
||||
END
|
||||
@@ -0,0 +1,73 @@
|
||||
EtsiTs102941BaseTypes
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) version2(2) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
HashedId8, Time32, PublicEncryptionKey, PublicVerificationKey, Signature
|
||||
FROM
|
||||
IEEE1609dot2BaseTypes {iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) base(1) base-types(2) major-version-2(2)}
|
||||
|
||||
CertificateId, SubjectAssurance, SequenceOfPsidSsp, SequenceOfPsidGroupPermissions,
|
||||
ValidityPeriod, GeographicRegion
|
||||
FROM
|
||||
IEEE1609dot2 {iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) base (1) schema (1) major-version-2(2)}
|
||||
|
||||
EtsiTs103097Data, EtsiTs103097Data-Encrypted, EtsiTs103097Data-Signed, EtsiTs103097Data-SignedExternalPayload
|
||||
FROM
|
||||
EtsiTs103097Module {itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(103097) securedMessageV1(0)}
|
||||
;
|
||||
|
||||
CertificateFormat::= INTEGER {
|
||||
ts103097v131 (1)
|
||||
}(1..255)
|
||||
|
||||
CertificateSubjectAttributes ::= SEQUENCE {
|
||||
id CertificateId OPTIONAL,
|
||||
validityPeriod ValidityPeriod OPTIONAL,
|
||||
region GeographicRegion OPTIONAL,
|
||||
assuranceLevel SubjectAssurance OPTIONAL,
|
||||
appPermissions SequenceOfPsidSsp OPTIONAL,
|
||||
certIssuePermissions SequenceOfPsidGroupPermissions OPTIONAL,
|
||||
...
|
||||
}(WITH COMPONENTS { ..., appPermissions PRESENT} | WITH COMPONENTS { ..., certIssuePermissions PRESENT})
|
||||
|
||||
EcSignature::= CHOICE {
|
||||
encryptedEcSignature EtsiTs103097Data-Encrypted{EtsiTs103097Data-SignedExternalPayload},
|
||||
ecSignature EtsiTs103097Data-SignedExternalPayload
|
||||
}
|
||||
|
||||
PublicKeys ::= SEQUENCE {
|
||||
verificationKey PublicVerificationKey,
|
||||
encryptionKey PublicEncryptionKey OPTIONAL
|
||||
}
|
||||
|
||||
Version ::= INTEGER {v1(1)}
|
||||
|
||||
EtsiTs103097Data-Unsecured {ToBeSentDataContent} ::= EtsiTs103097Data
|
||||
(WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
unsecuredData (CONTAINING ToBeSentDataContent)
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-Encrypted-Unicast {ToBeEncryptedDataContent} ::= EtsiTs103097Data-Encrypted { EtsiTs103097Data-Unsecured{ToBeEncryptedDataContent}}
|
||||
(WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
encryptedData (WITH COMPONENTS {...,
|
||||
recipients (SIZE(1))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-SignedAndEncrypted-Unicast {ToBesignedAndEncryptedDataContent} ::= EtsiTs103097Data-Encrypted {EtsiTs103097Data-Signed {ToBesignedAndEncryptedDataContent}}
|
||||
(WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
encryptedData (WITH COMPONENTS {...,
|
||||
recipients (SIZE(1))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
END
|
||||
@@ -0,0 +1,77 @@
|
||||
/*************************************************************************************
|
||||
This file contains the EtsiTs102941Messages module containing all possible PKI messages.
|
||||
It should be used when all PKI messages needs to be implemented (for example, for CA development)
|
||||
**************************************************************************************/
|
||||
EtsiTs102941MessagesCa
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) messagesCa(0) version2(2) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Data-Signed,
|
||||
--EtsiTs103097Data-Encrypted,
|
||||
EtsiTs103097Data-SignedExternalPayload
|
||||
--EtsiTs103097Data-SignedAndEncrypted
|
||||
FROM EtsiTs103097Module { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(103097) securedMessageV1(0) }
|
||||
|
||||
Version, EtsiTs103097Data-Encrypted-Unicast, EtsiTs103097Data-SignedAndEncrypted-Unicast
|
||||
FROM EtsiTs102941BaseTypes { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) version2(2) }
|
||||
|
||||
InnerEcRequestSignedForPop, InnerEcResponse
|
||||
FROM EtsiTs102941TypesEnrolment { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) version2(2) }
|
||||
|
||||
InnerAtRequest, InnerAtResponse
|
||||
FROM EtsiTs102941TypesAuthorization { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) version2(2) }
|
||||
|
||||
ToBeSignedCrl, ToBeSignedTlmCtl, ToBeSignedRcaCtl
|
||||
FROM EtsiTs102941TrustLists { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) version2(2) }
|
||||
|
||||
AuthorizationValidationRequest, AuthorizationValidationResponse
|
||||
FROM EtsiTs102941TypesAuthorizationValidation { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authValidation(7) version2(2) }
|
||||
|
||||
CaCertificateRequest
|
||||
FROM EtsiTs102941TypesCaManagement { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) caManagement(8) version2(2) }
|
||||
;
|
||||
|
||||
/************
|
||||
-- Messages
|
||||
************/
|
||||
EnrolmentRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentRequest PRESENT})})}
|
||||
EnrolmentResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentResponse PRESENT})})}
|
||||
AuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})}
|
||||
AuthorizationRequestMessageWithPop ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})}
|
||||
AuthorizationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationResponse PRESENT})})}
|
||||
CertificateRevocationListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateRevocationList PRESENT})})}
|
||||
TlmCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListTlm PRESENT})})}
|
||||
RcaCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListRca PRESENT})})}
|
||||
AuthorizationValidationRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationValidationRequest PRESENT})})}
|
||||
AuthorizationValidationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationValidationResponse PRESENT})})}
|
||||
CaCertificateRequestMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data(WITH COMPONENTS{..., content (WITH COMPONENTS{caCertificateRequest PRESENT})})}
|
||||
CaCertificateRekeyingMessage ::= EtsiTs103097Data-Signed {EtsiTs103097Data-Signed {EtsiTs102941Data(WITH COMPONENTS{..., content (WITH COMPONENTS{caCertificateRequest PRESENT})})}}
|
||||
|
||||
/************
|
||||
-- EtsiTs102941Data
|
||||
************/
|
||||
|
||||
EtsiTs102941Data::= SEQUENCE {
|
||||
version Version (v1),
|
||||
content EtsiTs102941DataContent
|
||||
}
|
||||
|
||||
EtsiTs102941DataContent ::= CHOICE {
|
||||
enrolmentRequest InnerEcRequestSignedForPop,
|
||||
enrolmentResponse InnerEcResponse,
|
||||
authorizationRequest InnerAtRequest,
|
||||
authorizationResponse InnerAtResponse,
|
||||
certificateRevocationList ToBeSignedCrl,
|
||||
certificateTrustListTlm ToBeSignedTlmCtl,
|
||||
certificateTrustListRca ToBeSignedRcaCtl,
|
||||
authorizationValidationRequest AuthorizationValidationRequest,
|
||||
authorizationValidationResponse AuthorizationValidationResponse,
|
||||
caCertificateRequest CaCertificateRequest,
|
||||
...
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,138 @@
|
||||
EtsiTs102941TrustLists
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) version2(2) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Certificate, EtsiTs103097Data-SignedAndEncrypted, EtsiTs103097Data-Signed
|
||||
FROM EtsiTs103097Module {itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(103097) securedMessageV1(0)}
|
||||
|
||||
HashedId8, Time32, Version --, CertificateAuthorityConstraints
|
||||
FROM EtsiTs102941BaseTypes {itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) version2(2)}
|
||||
;
|
||||
|
||||
/************
|
||||
-- CRL
|
||||
************/
|
||||
ToBeSignedCrl ::= SEQUENCE {
|
||||
version Version,
|
||||
thisUpdate Time32,
|
||||
nextUpdate Time32,
|
||||
entries SEQUENCE OF CrlEntry,
|
||||
...
|
||||
}
|
||||
|
||||
CrlEntry ::= HashedId8
|
||||
|
||||
/************
|
||||
-- TLM CTL
|
||||
************/
|
||||
|
||||
ToBeSignedTlmCtl ::= CtlFormat (FullCtl | DeltaCtl) (WITH COMPONENTS {...,
|
||||
ctlCommands ( WITH COMPONENT(
|
||||
( WITH COMPONENTS {...,
|
||||
add ( WITH COMPONENTS {...,
|
||||
ea ABSENT,
|
||||
aa ABSENT
|
||||
})
|
||||
})
|
||||
))
|
||||
})
|
||||
|
||||
/************
|
||||
-- RCA CTL
|
||||
************/
|
||||
|
||||
ToBeSignedRcaCtl ::= CtlFormat (FullCtl | DeltaCtl) ( WITH COMPONENTS {...,
|
||||
ctlCommands ( WITH COMPONENT(
|
||||
( WITH COMPONENTS {...,
|
||||
add ( WITH COMPONENTS {...,
|
||||
rca ABSENT,
|
||||
tlm ABSENT
|
||||
})
|
||||
})
|
||||
))
|
||||
})
|
||||
|
||||
/************
|
||||
-- CTL
|
||||
************/
|
||||
|
||||
FullCtl::= CtlFormat ( WITH COMPONENTS {...,
|
||||
isFullCtl ( TRUE ),
|
||||
ctlCommands ( WITH COMPONENT(
|
||||
( WITH COMPONENTS {...,
|
||||
delete ABSENT
|
||||
})
|
||||
))
|
||||
})
|
||||
|
||||
DeltaCtl::= CtlFormat (WITH COMPONENTS {...,
|
||||
isFullCtl(FALSE)
|
||||
})
|
||||
|
||||
|
||||
CtlFormat ::= SEQUENCE {
|
||||
version Version,
|
||||
nextUpdate Time32,
|
||||
isFullCtl BOOLEAN,
|
||||
ctlSequence INTEGER (0..255),
|
||||
ctlCommands SEQUENCE OF CtlCommand,
|
||||
...
|
||||
}
|
||||
|
||||
CtlCommand ::= CHOICE {
|
||||
add CtlEntry,
|
||||
delete CtlDelete,
|
||||
...
|
||||
}
|
||||
|
||||
CtlEntry ::= CHOICE {
|
||||
rca RootCaEntry,
|
||||
ea EaEntry,
|
||||
aa AaEntry,
|
||||
dc DcEntry,
|
||||
tlm TlmEntry,
|
||||
...
|
||||
}
|
||||
|
||||
CtlDelete ::= CHOICE {
|
||||
cert HashedId8,
|
||||
dc DcDelete,
|
||||
...
|
||||
}
|
||||
|
||||
TlmEntry::= SEQUENCE {
|
||||
selfSignedTLMCertificate EtsiTs103097Certificate,
|
||||
linkTLMCertificate EtsiTs103097Certificate OPTIONAL,
|
||||
accessPoint Url
|
||||
}
|
||||
|
||||
RootCaEntry ::= SEQUENCE {
|
||||
selfsignedRootCa EtsiTs103097Certificate,
|
||||
linkRootCaCertificate EtsiTs103097Certificate OPTIONAL
|
||||
}
|
||||
|
||||
EaEntry ::= SEQUENCE {
|
||||
eaCertificate EtsiTs103097Certificate,
|
||||
aaAccessPoint Url,
|
||||
itsAccessPoint Url OPTIONAL
|
||||
}
|
||||
|
||||
AaEntry ::= SEQUENCE {
|
||||
aaCertificate EtsiTs103097Certificate,
|
||||
accessPoint Url
|
||||
}
|
||||
|
||||
DcEntry ::= SEQUENCE {
|
||||
url Url,
|
||||
cert SEQUENCE OF HashedId8
|
||||
}
|
||||
|
||||
DcDelete ::= Url
|
||||
|
||||
Url::= IA5String
|
||||
|
||||
END
|
||||
@@ -0,0 +1,80 @@
|
||||
EtsiTs102941TypesAuthorization
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) version2(2) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
EtsiTs103097Certificate, EtsiTs103097Data-Signed
|
||||
FROM EtsiTs103097Module { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(103097) securedMessageV1(0)}
|
||||
|
||||
CertificateFormat, CertificateSubjectAttributes, EcSignature, HashedId8, PublicKeys, Version
|
||||
FROM EtsiTs102941BaseTypes { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) version2(2) }
|
||||
;
|
||||
|
||||
/************
|
||||
-- AuthorizationRequest/Response
|
||||
************/
|
||||
|
||||
AuthorizationResponseCode ::= ENUMERATED {
|
||||
ok(0),
|
||||
-- ITS->AA
|
||||
its-aa-cantparse, -- valid for any structure
|
||||
its-aa-badcontenttype, -- not encrypted, not signed, not authorizationrequest
|
||||
its-aa-imnottherecipient, -- the "recipients" of the outermost encrypted data doesn't include me
|
||||
its-aa-unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm
|
||||
its-aa-decryptionfailed, -- works for ECIES-HMAC and AES-CCM
|
||||
its-aa-keysdontmatch, -- HMAC keyTag verification fails
|
||||
its-aa-incompleterequest, -- some elements are missing
|
||||
its-aa-invalidencryptionkey, -- the responseEncryptionKey is bad
|
||||
its-aa-outofsyncrequest, -- signingTime is outside acceptable limits
|
||||
its-aa-unknownea, -- the EA identified by eaId is unknown to me
|
||||
its-aa-invalidea, -- the EA certificate is revoked
|
||||
its-aa-deniedpermissions, -- I, the AA, deny the requested permissions
|
||||
-- AA->EA
|
||||
aa-ea-cantreachea, -- the EA is unreachable (network error?)
|
||||
-- EA->AA
|
||||
ea-aa-cantparse, -- valid for any structure
|
||||
ea-aa-badcontenttype, -- not encrypted, not signed, not authorizationrequest
|
||||
ea-aa-imnottherecipient, -- the "recipients" of the outermost encrypted data doesn't include me
|
||||
ea-aa-unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm
|
||||
ea-aa-decryptionfailed, -- works for ECIES-HMAC and AES-CCM
|
||||
-- TODO: to be continued...
|
||||
invalidaa, -- the AA certificate presented is invalid/revoked/whatever
|
||||
invalidaasignature, -- the AA certificate presented can't validate the request signature
|
||||
wrongea, -- the encrypted signature doesn't designate me as the EA
|
||||
unknownits, -- can't retrieve the EC/ITS in my DB
|
||||
invalidsignature, -- signature verification of the request by the EC fails
|
||||
invalidencryptionkey, -- signature is good, but the key is bad
|
||||
deniedpermissions, -- permissions not granted
|
||||
deniedtoomanycerts, -- parallel limit
|
||||
... }
|
||||
|
||||
|
||||
InnerAtRequest ::= SEQUENCE {
|
||||
publicKeys PublicKeys,
|
||||
hmacKey OCTET STRING (SIZE(32)),
|
||||
sharedAtRequest SharedAtRequest,
|
||||
ecSignature EcSignature,
|
||||
...
|
||||
}
|
||||
|
||||
SharedAtRequest ::= SEQUENCE {
|
||||
eaId HashedId8,
|
||||
keyTag OCTET STRING (SIZE(16)),
|
||||
certificateFormat CertificateFormat,
|
||||
requestedSubjectAttributes CertificateSubjectAttributes (WITH COMPONENTS{..., certIssuePermissions ABSENT}),
|
||||
...
|
||||
}
|
||||
|
||||
InnerAtResponse ::= SEQUENCE {
|
||||
requestHash OCTET STRING (SIZE(16)),
|
||||
responseCode AuthorizationResponseCode,
|
||||
certificate EtsiTs103097Certificate OPTIONAL,
|
||||
...
|
||||
}
|
||||
(WITH COMPONENTS { responseCode (ok), certificate PRESENT }
|
||||
| WITH COMPONENTS { responseCode (ALL EXCEPT ok), certificate ABSENT }
|
||||
)
|
||||
|
||||
END
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
EtsiTs102941TypesAuthorizationValidation
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authValidation(7) version2(2) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Certificate
|
||||
FROM EtsiTs103097Module { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(103097) securedMessageV1(0) }
|
||||
|
||||
CertificateFormat, CertificateSubjectAttributes,EcSignature, HashedId8, PublicKeys, Version
|
||||
FROM EtsiTs102941BaseTypes { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) version2(2) }
|
||||
|
||||
SharedAtRequest
|
||||
FROM EtsiTs102941TypesAuthorization { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) version2(2) }
|
||||
;
|
||||
|
||||
/************
|
||||
-- AuthorizationValidationRequest/Response
|
||||
************/
|
||||
|
||||
AuthorizationValidationResponseCode ::= ENUMERATED {
|
||||
ok(0),
|
||||
cantparse, -- valid for any structure
|
||||
badcontenttype, -- not encrypted, not signed, not permissionsverificationrequest
|
||||
imnottherecipient, -- the "recipients" of the outermost encrypted data doesn't include me
|
||||
unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm
|
||||
decryptionfailed, -- works for ECIES-HMAC and AES-CCM
|
||||
invalidaa, -- the AA certificate presented is invalid/revoked/whatever
|
||||
invalidaasignature, -- the AA certificate presented can't validate the request signature
|
||||
wrongea, -- the encrypted signature doesn't designate me as the EA
|
||||
unknownits, -- can't retrieve the EC/ITS in my DB
|
||||
invalidsignature, -- signature verification of the request by the EC fails
|
||||
invalidencryptionkey, -- signature is good, but the responseEncryptionKey is bad
|
||||
deniedpermissions, -- requested permissions not granted
|
||||
deniedtoomanycerts, -- parallel limit
|
||||
deniedrequest, -- any other reason?
|
||||
...
|
||||
}
|
||||
|
||||
AuthorizationValidationRequest ::= SEQUENCE {
|
||||
sharedAtRequest SharedAtRequest,
|
||||
ecSignature EcSignature,
|
||||
...
|
||||
}
|
||||
|
||||
AuthorizationValidationResponse ::= SEQUENCE {
|
||||
requestHash OCTET STRING (SIZE(16)),
|
||||
responseCode AuthorizationValidationResponseCode,
|
||||
confirmedSubjectAttributes CertificateSubjectAttributes (WITH COMPONENTS{..., certIssuePermissions ABSENT}) OPTIONAL,
|
||||
...
|
||||
}
|
||||
(WITH COMPONENTS { responseCode (ok), confirmedSubjectAttributes PRESENT }
|
||||
| WITH COMPONENTS { responseCode (ALL EXCEPT ok), confirmedSubjectAttributes ABSENT }
|
||||
)
|
||||
|
||||
END
|
||||
@@ -0,0 +1,26 @@
|
||||
EtsiTs102941TypesCaManagement
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) caManagement(8) version2(2) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Certificate, EtsiTs103097Data-Signed
|
||||
FROM EtsiTs103097Module {itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(103097) securedMessageV1(0) }
|
||||
|
||||
PublicKeys, CertificateSubjectAttributes
|
||||
FROM EtsiTs102941BaseTypes { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) version2(2) }
|
||||
;
|
||||
|
||||
/************
|
||||
-- CA certificate request
|
||||
************/
|
||||
|
||||
CaCertificateRequest ::= SEQUENCE {
|
||||
publicKeys PublicKeys,
|
||||
requestedSubjectAttributes CertificateSubjectAttributes,
|
||||
...
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,58 @@
|
||||
EtsiTs102941TypesEnrolment
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) version2(2) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Certificate, EtsiTs103097Data-Signed
|
||||
FROM EtsiTs103097Module { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(103097) securedMessageV1(0) }
|
||||
|
||||
CertificateFormat, CertificateSubjectAttributes, EcSignature, HashedId8, PublicKeys, Version
|
||||
FROM EtsiTs102941BaseTypes { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) version2(2) }
|
||||
;
|
||||
|
||||
/************
|
||||
-- EnrolmentRequest/Response
|
||||
************/
|
||||
|
||||
EnrolmentResponseCode ::= ENUMERATED {
|
||||
ok(0),
|
||||
cantparse, -- valid for any structure
|
||||
badcontenttype, -- not encrypted, not signed, not enrolmentrequest
|
||||
imnottherecipient, -- the "recipients" doesn't include me
|
||||
unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm
|
||||
decryptionfailed, -- works for ECIES-HMAC and AES-CCM
|
||||
unknownits, -- can't retrieve the ITS from the itsId
|
||||
invalidsignature, -- signature verification of the request fails
|
||||
invalidencryptionkey, -- signature is good, but the responseEncryptionKey is bad
|
||||
baditsstatus, -- revoked, not yet active
|
||||
incompleterequest, -- some elements are missing
|
||||
deniedpermissions, -- requested permissions are not granted
|
||||
invalidkeys, -- either the verification_key of the encryption_key is bad
|
||||
deniedrequest, -- any other reason?
|
||||
...
|
||||
}
|
||||
|
||||
InnerEcRequestSignedForPop::= EtsiTs103097Data-Signed{InnerEcRequest}
|
||||
|
||||
InnerEcRequest ::= SEQUENCE {
|
||||
itsId OCTET STRING,
|
||||
certificateFormat CertificateFormat,
|
||||
publicKeys PublicKeys,
|
||||
requestedSubjectAttributes CertificateSubjectAttributes (WITH COMPONENTS{..., certIssuePermissions ABSENT}),
|
||||
...
|
||||
}
|
||||
|
||||
InnerEcResponse ::= SEQUENCE {
|
||||
requestHash OCTET STRING (SIZE(16)),
|
||||
responseCode EnrolmentResponseCode,
|
||||
certificate EtsiTs103097Certificate OPTIONAL,
|
||||
...
|
||||
}
|
||||
(WITH COMPONENTS { responseCode (ok), certificate PRESENT }
|
||||
| WITH COMPONENTS { responseCode (ALL EXCEPT ok), certificate ABSENT }
|
||||
)
|
||||
|
||||
END
|
||||
@@ -0,0 +1,100 @@
|
||||
EtsiTs103097Module {
|
||||
itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(103097) v1(0)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
Ieee1609Dot2Data, ExplicitCertificate
|
||||
FROM IEEE1609dot2 {
|
||||
iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) base (1) schema (1) major-version-2(2)
|
||||
};
|
||||
|
||||
EtsiTs103097Certificate ::= ExplicitCertificate (WITH COMPONENTS {...,
|
||||
toBeSigned (WITH COMPONENTS {...,
|
||||
id (WITH COMPONENTS {...,
|
||||
linkageData ABSENT,
|
||||
binaryId ABSENT
|
||||
}),
|
||||
certRequestPermissions ABSENT,
|
||||
canRequestRollover ABSENT
|
||||
})
|
||||
})
|
||||
|
||||
SingleEtsiTs103097Certificate ::= SEQUENCE {
|
||||
only EtsiTs103097Certificate
|
||||
}
|
||||
|
||||
EtsiTs103097Data ::= Ieee1609Dot2Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {...,
|
||||
signedData (WITH COMPONENTS {..., -- constraints on signed data headers
|
||||
tbsData (WITH COMPONENTS {
|
||||
headerInfo (WITH COMPONENTS {...,
|
||||
generationTime PRESENT,
|
||||
p2pcdLearningRequest ABSENT,
|
||||
missingCrlIdentifier ABSENT
|
||||
})
|
||||
}),
|
||||
signer (WITH COMPONENTS {..., -- constraints on the certificate
|
||||
certificate (SIZE(1))
|
||||
})
|
||||
}),
|
||||
encryptedData (WITH COMPONENTS {..., -- constraints on encrypted data headers
|
||||
recipients (WITH COMPONENT (
|
||||
(WITH COMPONENTS {...,
|
||||
pskRecipInfo ABSENT,
|
||||
symmRecipInfo ABSENT,
|
||||
rekRecipInfo ABSENT
|
||||
})
|
||||
))
|
||||
}),
|
||||
signedCertificateRequest ABSENT
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-Signed {ToBeSignedDataContent} ::= EtsiTs103097Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
signedData (WITH COMPONENTS {...,
|
||||
tbsData (WITH COMPONENTS {
|
||||
payload (WITH COMPONENTS {
|
||||
data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
unsecuredData (CONTAINING ToBeSignedDataContent)
|
||||
})
|
||||
}) PRESENT
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-SignedExternalPayload ::= EtsiTs103097Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
signedData (WITH COMPONENTS {...,
|
||||
tbsData (WITH COMPONENTS {
|
||||
payload (WITH COMPONENTS {
|
||||
extDataHash (WITH COMPONENTS {
|
||||
sha256HashedData PRESENT
|
||||
}) PRESENT
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-Encrypted {ToBeEncryptedDataContent} ::= EtsiTs103097Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
encryptedData (WITH COMPONENTS {...,
|
||||
ciphertext (WITH COMPONENTS {...,
|
||||
aes128ccm (WITH COMPONENTS {...,
|
||||
ccmCiphertext (CONSTRAINED BY { -- ccm encryption of -- ToBeEncryptedDataContent})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
EtsiTs103097Data-SignedAndEncrypted {ToBesignedAndEncryptedDataContent} ::= EtsiTs103097Data-Encrypted {EtsiTs103097Data-Signed {ToBesignedAndEncryptedDataContent}}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,40 @@
|
||||
-- @brief Specification of the In vehicle information Message ETSI TS 103 301
|
||||
-- Latest version available at @url https://forge.etsi.org/rep/ITS/asn1/is_ts103301.git
|
||||
|
||||
IVIM-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts103301 (103301) ivim (2) version2 (2)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
-- @brief Include ISO 19321
|
||||
-- Include references from @url https://standards.iso.org/iso/ts/19321/ed-2/en/ISO19321IVIv2.asn
|
||||
IviStructure
|
||||
FROM IVI { iso (1) standard (0) ivi (19321) version2 (2) }
|
||||
|
||||
-- @brief Include ETSI TS 102 894-2
|
||||
-- Include references from @url https://forge.etsi.org/rep/ITS/ITS_ASN1/blob/master/CDD_TS102894-2/ITS-Container.asn
|
||||
ItsPduHeader
|
||||
FROM ITS-Container { itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2)};
|
||||
|
||||
-- In vehicle information Message Message
|
||||
|
||||
-- @brief In vehicle information Message Root
|
||||
-- This DF includes DEs for the IVIM protocolVersion, the IVI message type identifier _messageID_,
|
||||
-- the station identifier _stationID_ of the originating ITS-S and the IVI data from ISO TS 19321.
|
||||
IVIM ::= SEQUENCE {
|
||||
-- @details header
|
||||
-- The DE _protocolVersion_ is used to select the appropriate protocol decoder at the receiving ITS-S.
|
||||
-- It shall be set to 2.
|
||||
-- The DE _messageID_ shall be ivim(6).
|
||||
header ItsPduHeader,
|
||||
-- @details ivi
|
||||
-- The DE _ivi_ contains the IVI data as defined in ISO TS 19321.
|
||||
ivi IviStructure
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,39 @@
|
||||
-- @brief Specification of the Map (lane topology) extended Message ETSI TS 103 301
|
||||
-- Latest version available at @url https://forge.etsi.org/rep/ITS/asn1/is_ts103301.git
|
||||
|
||||
MAPEM-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts103301 (103301) mapem (1) version2 (2)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
-- @brief Include ISO TS 19091
|
||||
-- Include references from @url https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn
|
||||
MapData FROM DSRC { iso (1) standard (0) signalizedIntersection (19091) profilec(2) dsrc (2) version2 (2) }
|
||||
|
||||
-- @brief Include ETSI TS 102 894-2
|
||||
-- Include references from @url https://forge.etsi.org/rep/ITS/ITS_ASN1/blob/master/CDD_TS102894-2/ITS-Container.asn
|
||||
ItsPduHeader
|
||||
FROM ITS-Container { itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2)};
|
||||
|
||||
-- Map (lane topology) extended Message
|
||||
|
||||
-- @brief Map (lane topology) extended Message Root
|
||||
-- This DF includes DEs for the MAPEM: protocolVersion, the MAPEM message type identifier _messageID_,
|
||||
-- the station identifier _stationID_ of the originating ITS-S and the Map data from ISO TS 19091.
|
||||
MAPEM ::= SEQUENCE {
|
||||
-- @details header
|
||||
-- The DE _protocolVersion_ is used to select the appropriate protocol decoder at the receiving ITS-S.
|
||||
-- It shall be set to 2.
|
||||
-- The DE _messageID_ shall be mapem(5).
|
||||
header ItsPduHeader,
|
||||
-- @details map
|
||||
-- The DE _map_ contains the MAP data as defined in ISO TS 19091.
|
||||
map MapData
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,40 @@
|
||||
-- @brief Specification of the RTCM corrections extended Message ETSI TS 103 301
|
||||
-- Latest version available at @url https://forge.etsi.org/rep/ITS/asn1/is_ts103301.git
|
||||
|
||||
RTCMEM-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts103301 (103301) rtcmem (5) version1 (1)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
-- @brief Include ISO 19091
|
||||
-- Include references from @url https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn
|
||||
RTCMcorrections
|
||||
FROM DSRC { iso (1) standard (0) signalizedIntersection (19091) profilec(2) dsrc (2) version2 (2) }
|
||||
|
||||
-- @brief Include ETSI TS 102 894-2
|
||||
-- Include references from @url https://forge.etsi.org/rep/ITS/ITS_ASN1/blob/master/CDD_TS102894-2/ITS-Container.asn
|
||||
ItsPduHeader
|
||||
FROM ITS-Container { itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2)};
|
||||
|
||||
-- RTCM corrections extended extended Message
|
||||
|
||||
-- @brief RTCM corrections extended extended Message Root
|
||||
-- This DF includes DEs for the RTCMEM: protocolVersion, the RTCMEM message type identifier _messageID_,
|
||||
-- the station identifier _stationID_ of the originating ITS-S and the RTCM corrections as os ISO TS 19091.
|
||||
RTCMEM ::= SEQUENCE {
|
||||
-- @details header
|
||||
-- The DE _protocolVersion_ is used to select the appropriate protocol decoder at the receiving ITS-S.
|
||||
-- It shall be set to 1.
|
||||
-- The DE _messageID_ shall be rtcmem(13).
|
||||
header ItsPduHeader,
|
||||
-- @details rtcmc
|
||||
-- The DE _rtcmc_ contains the RTCM corrections data as defined in ISO TS 19091.
|
||||
rtcmc RTCMcorrections
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,40 @@
|
||||
-- @brief Specification of the Signal phase and timing extended Message ETSI TS 103 301
|
||||
-- Latest version available at @url https://forge.etsi.org/rep/ITS/asn1/is_ts103301.git
|
||||
|
||||
SPATEM-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts103301 (103301) spatem (0) version2 (2)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
-- @brief Include ISO TS 19091
|
||||
-- Include references from @url https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn
|
||||
SPAT
|
||||
FROM DSRC { iso (1) standard (0) signalizedIntersection (19091) profilec(2) dsrc (2) version2 (2) }
|
||||
|
||||
-- @brief Include ETSI TS 102 894-2
|
||||
-- Include references from @url https://forge.etsi.org/rep/ITS/ITS_ASN1/blob/master/CDD_TS102894-2/ITS-Container.asn
|
||||
ItsPduHeader
|
||||
FROM ITS-Container { itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2) };
|
||||
|
||||
-- Signal phase and timing extended Message
|
||||
|
||||
-- @brief Signal phase and timing extended Message Root
|
||||
-- This DF includes DEs for the SPATEM: protocolVersion, the SPATEM message type identifier _messageID_,
|
||||
-- the station identifier _stationID_ of the originating ITS-S and the SPaT data from ISO TS 19091.
|
||||
SPATEM ::= SEQUENCE {
|
||||
-- @details header
|
||||
-- The DE _protocolVersion_ is used to select the appropriate protocol decoder at the receiving ITS-S.
|
||||
-- It shall be set to 2.
|
||||
-- The DE _messageID_ shall be spatem(4).
|
||||
header ItsPduHeader,
|
||||
-- @details spat
|
||||
-- The DE _spat_ contains the SPaT data as defined in ISO TS 19091.
|
||||
spat SPAT
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,40 @@
|
||||
-- @brief Specification of the Signal request extended Message ETSI TS 103 301
|
||||
-- Latest version available at @url https://forge.etsi.org/rep/ITS/asn1/is_ts103301.git
|
||||
|
||||
SREM-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts103301 (103301) srem (3) version2 (2)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
-- @brief Include ISO 19091
|
||||
-- Include references from @url https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn
|
||||
SignalRequestMessage
|
||||
FROM DSRC { iso (1) standard (0) signalizedIntersection (19091) profilec(2) dsrc (2) version2 (2) }
|
||||
|
||||
-- @brief Include ETSI TS 102 894-2
|
||||
-- Include references from @url https://forge.etsi.org/rep/ITS/ITS_ASN1/blob/master/CDD_TS102894-2/ITS-Container.asn
|
||||
ItsPduHeader
|
||||
FROM ITS-Container { itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2)};
|
||||
|
||||
-- Signal request extended Message Message
|
||||
|
||||
-- @brief Signal request extended Message Root
|
||||
-- This DF includes DEs for the SREM: protocolVersion, the SREM message type identifier _messageID_,
|
||||
-- the station identifier _stationID_ of the originating ITS-S and the signal request data ISO TS 19091.
|
||||
SREM ::= SEQUENCE {
|
||||
-- @details header
|
||||
-- The DE _protocolVersion_ is used to select the appropriate protocol decoder at the receiving ITS-S.
|
||||
-- It shall be set to 2.
|
||||
-- The DE _messageID_ shall be srem(9).
|
||||
header ItsPduHeader,
|
||||
-- @details srm
|
||||
-- The DE _srm_ contains the Signal request data as defined in ISO TS 19091.
|
||||
srm SignalRequestMessage
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,40 @@
|
||||
-- @brief Specification of the Signal status extended Message ETSI TS 103 301
|
||||
-- Latest version available at @url https://forge.etsi.org/rep/ITS/asn1/is_ts103301.git
|
||||
|
||||
SSEM-PDU-Descriptions {
|
||||
itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts103301 (103301) ssem (4) version2 (2)
|
||||
}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
-- @brief Include ISO 19091
|
||||
-- Include references from @url https://standards.iso.org/iso/ts/19091/ed-2/en/ISO-TS-19091-addgrp-C-2018.asn
|
||||
SignalStatusMessage
|
||||
FROM DSRC { iso (1) standard (0) signalizedIntersection (19091) profilec(2) dsrc (2) version2 (2) }
|
||||
|
||||
-- @brief Include ETSI TS 102 894-2
|
||||
-- Include references from @url https://forge.etsi.org/rep/ITS/ITS_ASN1/blob/master/CDD_TS102894-2/ITS-Container.asn
|
||||
ItsPduHeader
|
||||
FROM ITS-Container { itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) version (2)};
|
||||
|
||||
-- Signal status extended Message
|
||||
|
||||
-- @brief Signal status extended Message Root
|
||||
-- This DF includes DEs for the SSEM: protocolVersion, the SSEM message type identifier _messageID_ and
|
||||
-- the station identifier _stationID_ of the originating ITS-S and the signal status data ISO TS 19091.
|
||||
SSEM ::= SEQUENCE {
|
||||
-- @details header
|
||||
-- The DE _protocolVersion_ is used to select the appropriate protocol decoder at the receiving ITS-S.
|
||||
-- It shall be set to 2.
|
||||
-- The DE _messageID_ shall be ssem(10).
|
||||
header ItsPduHeader,
|
||||
-- @details ssm
|
||||
-- The DE _ssm_ contains the Signal status data as defined in ISO TS 19091.
|
||||
ssm SignalStatusMessage
|
||||
}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,44 @@
|
||||
# ETSI ITS ASN.1
|
||||
|
||||
The ASN.1 files in this directory are a slightly patched subset of the files published by ETSI for ITS Release 2.
|
||||
You can find the original files on [ETSI Forge](https://forge.etsi.org/rep/ITS/asn1). Our changes are documented below.
|
||||
These files are distributed under a permissive license:
|
||||
|
||||
> Copyright 2019 ETSI
|
||||
>
|
||||
> Redistribution and use in source and binary forms, with or without
|
||||
> modification, are permitted provided that the following conditions are met:
|
||||
> 1. Redistributions of source code must retain the above copyright notice,
|
||||
> this list of conditions and the following disclaimer.
|
||||
> 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
> this list of conditions and the following disclaimer in the documentation
|
||||
> and/or other materials provided with the distribution.
|
||||
> 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
> may be used to endorse or promote products derived from this software without
|
||||
> specific prior written permission.
|
||||
>
|
||||
> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
> ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
> WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
> IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
> INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
> DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
> LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
> OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
> OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
# Changes
|
||||
|
||||
## CDD
|
||||
|
||||
Removed obsolete `ActionID` and `StationID` data elements. The generated file names clash with those of `ActionId` and `StationId` on case-insensitive filesystems.
|
||||
|
||||
## CPM
|
||||
|
||||
Updated CDD imports.
|
||||
|
||||
## VAM
|
||||
|
||||
Updated CDD imports.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,58 @@
|
||||
EtsiTs102941BaseTypes
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
HashedId8, Time32, PublicEncryptionKey, PublicVerificationKey, Signature
|
||||
FROM
|
||||
Ieee1609Dot2BaseTypes {iso(1) identified-organization(3) ieee(111)
|
||||
standards-association-numbered-series-standards(2) wave-stds(1609)
|
||||
dot2(2) base(1) base-types(2) major-version-2(2) minor-version-3(3)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
CertificateId, SubjectAssurance, SequenceOfPsidSsp, SequenceOfPsidGroupPermissions,
|
||||
ValidityPeriod, GeographicRegion, HashedData
|
||||
FROM
|
||||
Ieee1609Dot2 {iso(1) identified-organization(3) ieee(111)
|
||||
standards-association-numbered-series-standards(2) wave-stds(1609)
|
||||
dot2(2) base (1) schema (1) major-version-2(2) minor-version-4(4)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
EtsiTs103097Data, EtsiTs103097Data-Encrypted, EtsiTs103097Data-Signed,
|
||||
EtsiTs103097Data-SignedExternalPayload,
|
||||
EtsiTs103097Data-Unsecured, EtsiTs103097Data-Encrypted-Unicast, EtsiTs103097Data-SignedAndEncrypted-Unicast
|
||||
FROM
|
||||
EtsiTs103097Module {itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
;
|
||||
|
||||
CertificateFormat::= INTEGER {
|
||||
ts103097v131 (1)
|
||||
}(1..255)
|
||||
|
||||
CertificateSubjectAttributes ::= SEQUENCE {
|
||||
id CertificateId OPTIONAL,
|
||||
validityPeriod ValidityPeriod OPTIONAL,
|
||||
region GeographicRegion OPTIONAL,
|
||||
assuranceLevel SubjectAssurance OPTIONAL,
|
||||
appPermissions SequenceOfPsidSsp OPTIONAL,
|
||||
certIssuePermissions SequenceOfPsidGroupPermissions OPTIONAL,
|
||||
...
|
||||
}(WITH COMPONENTS { ..., appPermissions PRESENT} |
|
||||
WITH COMPONENTS { ..., certIssuePermissions PRESENT})
|
||||
|
||||
EcSignature::= CHOICE {
|
||||
encryptedEcSignature EtsiTs103097Data-Encrypted{EtsiTs103097Data-SignedExternalPayload},
|
||||
ecSignature EtsiTs103097Data-SignedExternalPayload
|
||||
}
|
||||
|
||||
PublicKeys ::= SEQUENCE {
|
||||
verificationKey PublicVerificationKey,
|
||||
encryptionKey PublicEncryptionKey OPTIONAL
|
||||
}
|
||||
|
||||
Version ::= INTEGER {v1(1)}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,127 @@
|
||||
/*************************************************************************************
|
||||
This file contains the EtsiTs102941Messages module containing all possible PKI messages.
|
||||
It should be used when all PKI messages needs to be implemented (for example, for CA development)
|
||||
**************************************************************************************/
|
||||
EtsiTs102941MessagesCa
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) messagesCa(0) major-version-3(3) minor-version-3(3)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Data-Signed,
|
||||
EtsiTs103097Data-SignedExternalPayload,
|
||||
EtsiTs103097Data-Encrypted-Unicast,
|
||||
EtsiTs103097Data-SignedAndEncrypted-Unicast
|
||||
FROM EtsiTs103097Module
|
||||
{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
Version
|
||||
FROM EtsiTs102941BaseTypes
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
InnerEcRequestSignedForPop, InnerEcResponse
|
||||
FROM EtsiTs102941TypesEnrolment
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
EtsiTs102941ButterflyAuthorizationRequest-X509Signed, InnerAtRequest, InnerAtResponse
|
||||
FROM EtsiTs102941TypesAuthorization
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-2(2) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
ToBeSignedCrl, ToBeSignedTlmCtl, ToBeSignedRcaCtl
|
||||
FROM EtsiTs102941TrustLists
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
AuthorizationValidationRequest, AuthorizationValidationResponse
|
||||
FROM EtsiTs102941TypesAuthorizationValidation
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authValidation(7) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
CaCertificateRequest
|
||||
FROM EtsiTs102941TypesCaManagement
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) caManagement(8) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
ToBeSignedLinkCertificate, ToBeSignedLinkCertificateTlm, ToBeSignedLinkCertificateRca
|
||||
FROM EtsiTs102941TypesLinkCertificate
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) linkCertificate(9) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
EeRaCertRequest, RaEeCertInfo, EeRaDownloadRequest
|
||||
FROM Ieee1609Dot2Dot1EeRaInterface
|
||||
{iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) ee-ra(11) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
RaAcaCertRequest, AcaRaCertResponse
|
||||
FROM Ieee1609Dot2Dot1AcaRaInterface
|
||||
{iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) aca-ra(4) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
;
|
||||
|
||||
/************
|
||||
-- Messages
|
||||
************/
|
||||
EnrolmentRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentRequest PRESENT})})}
|
||||
EnrolmentResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentResponse PRESENT})})}
|
||||
AuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})}
|
||||
AuthorizationRequestMessageWithPop ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})}
|
||||
AuthorizationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationResponse PRESENT})})}
|
||||
CertificateRevocationListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateRevocationList PRESENT})})}
|
||||
TlmCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListTlm PRESENT})})}
|
||||
RcaCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListRca PRESENT})})}
|
||||
AuthorizationValidationRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationValidationRequest PRESENT})})}
|
||||
AuthorizationValidationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationValidationResponse PRESENT})})}
|
||||
CaCertificateRequestMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data(WITH COMPONENTS{..., content (WITH COMPONENTS{caCertificateRequest PRESENT})})}
|
||||
CaCertificateRekeyingMessage ::= EtsiTs103097Data-Signed {EtsiTs103097Data-Signed {EtsiTs102941Data(WITH COMPONENTS{..., content (WITH COMPONENTS{caCertificateRequest PRESENT})})}}
|
||||
TlmLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{linkCertificateTlm PRESENT})})}
|
||||
RcaSingleSignedLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{singleSignedLinkCertificateRca PRESENT})})}
|
||||
RcaDoubleSignedLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{doubleSignedlinkCertificateRca PRESENT})})}
|
||||
ButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationRequest PRESENT})})}
|
||||
X509SignedButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{x509SignedbutterflyAuthorizationRequest PRESENT})})}
|
||||
ButterflyAuthorizationResponseMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationResponse PRESENT})})}
|
||||
ButterflyAtDownloadRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAtDownloadRequest PRESENT})})}
|
||||
ButterflyCertRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyCertificateRequest PRESENT})})}
|
||||
ButterflyCertResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyCertificateResponse PRESENT})})}
|
||||
|
||||
/************
|
||||
-- EtsiTs102941Data
|
||||
************/
|
||||
|
||||
EtsiTs102941Data::= SEQUENCE {
|
||||
version Version (v1),
|
||||
content EtsiTs102941DataContent
|
||||
}
|
||||
|
||||
EtsiTs102941DataContent ::= CHOICE {
|
||||
enrolmentRequest InnerEcRequestSignedForPop,
|
||||
enrolmentResponse InnerEcResponse,
|
||||
authorizationRequest InnerAtRequest,
|
||||
authorizationResponse InnerAtResponse,
|
||||
certificateRevocationList ToBeSignedCrl,
|
||||
certificateTrustListTlm ToBeSignedTlmCtl,
|
||||
certificateTrustListRca ToBeSignedRcaCtl,
|
||||
authorizationValidationRequest AuthorizationValidationRequest,
|
||||
authorizationValidationResponse AuthorizationValidationResponse,
|
||||
caCertificateRequest CaCertificateRequest,
|
||||
...,
|
||||
linkCertificateTlm ToBeSignedLinkCertificateTlm,
|
||||
singleSignedLinkCertificateRca ToBeSignedLinkCertificateRca,
|
||||
doubleSignedlinkCertificateRca RcaSingleSignedLinkCertificateMessage,
|
||||
/* Extension for butterfly key provisioning */
|
||||
[[butterflyAuthorizationRequest EeRaCertRequest,
|
||||
x509SignedbutterflyAuthorizationRequest EtsiTs102941ButterflyAuthorizationRequest-X509Signed,
|
||||
butterflyAuthorizationResponse RaEeCertInfo,
|
||||
butterflyCertificateRequest RaAcaCertRequest,
|
||||
butterflyCertificateResponse AcaRaCertResponse,
|
||||
butterflyAtDownloadRequest EeRaDownloadRequest]]
|
||||
}
|
||||
|
||||
|
||||
|
||||
END
|
||||
Vendored
+106
@@ -0,0 +1,106 @@
|
||||
/*************************************************************************************
|
||||
This file contains the EtsiTs102941MessagesItss-OptionalPrivacy module providing the
|
||||
same subset of messages as the EtsiTs102941MessagesItss module.
|
||||
It should never be used together with the EtsiTs102941MessagesCA and EtsiTs102941MessagesItss
|
||||
|
||||
This module allows the usage of unencrypted EC signature for AA requests.
|
||||
**************************************************************************************/
|
||||
EtsiTs102941MessagesItss-OptionalPrivacy
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) messagesItssOp(2) major-version-3(3) minor-version-3(3)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Data-Signed,
|
||||
EtsiTs103097Data-Encrypted-Unicast,
|
||||
EtsiTs103097Data-SignedAndEncrypted-Unicast
|
||||
FROM EtsiTs103097Module
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
Version
|
||||
FROM EtsiTs102941BaseTypes
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
InnerEcRequestSignedForPop, InnerEcResponse
|
||||
FROM EtsiTs102941TypesEnrolment
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
EtsiTs102941ButterflyAuthorizationRequest-X509Signed, InnerAtRequest, InnerAtResponse
|
||||
FROM EtsiTs102941TypesAuthorization
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-2(2) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
ToBeSignedCrl, ToBeSignedTlmCtl, ToBeSignedRcaCtl
|
||||
FROM EtsiTs102941TrustLists
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
ToBeSignedLinkCertificate, ToBeSignedLinkCertificateTlm
|
||||
FROM EtsiTs102941TypesLinkCertificate
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) linkCertificate(9) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
EeRaCertRequest, RaEeCertInfo, EeRaDownloadRequest
|
||||
FROM Ieee1609Dot2Dot1EeRaInterface
|
||||
{ iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) ee-ra(11) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
;
|
||||
|
||||
/************
|
||||
-- Messages
|
||||
************/
|
||||
|
||||
EnrolmentRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentRequest PRESENT})})}
|
||||
EnrolmentResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentResponse PRESENT})})}
|
||||
AuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})}
|
||||
AuthorizationRequestMessageWithPop ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})}
|
||||
AuthorizationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationResponse PRESENT})})}
|
||||
CertificateRevocationListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateRevocationList PRESENT})})}
|
||||
TlmCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListTlm PRESENT})})}
|
||||
RcaCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListRca PRESENT})})}
|
||||
TlmLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{linkCertificateTlm PRESENT})})}
|
||||
ButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationRequest PRESENT})})}
|
||||
X509SignedButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{x509SignedbutterflyAuthorizationRequest PRESENT})})}
|
||||
ButterflyAuthorizationResponseMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationResponse PRESENT})})}
|
||||
ButterflyAtDownloadRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAtDownloadRequest PRESENT})})}
|
||||
|
||||
/************
|
||||
-- EtsiTs102941Data
|
||||
************/
|
||||
|
||||
EtsiTs102941Data::= SEQUENCE {
|
||||
version Version (v1),
|
||||
content EtsiTs102941DataContent
|
||||
}
|
||||
|
||||
EtsiTs102941DataContent ::= CHOICE {
|
||||
enrolmentRequest InnerEcRequestSignedForPop,
|
||||
enrolmentResponse InnerEcResponse,
|
||||
authorizationRequest InnerAtRequest,
|
||||
authorizationResponse InnerAtResponse,
|
||||
certificateRevocationList ToBeSignedCrl,
|
||||
certificateTrustListTlm ToBeSignedTlmCtl,
|
||||
certificateTrustListRca ToBeSignedRcaCtl,
|
||||
authorizationValidationRequest NULL,
|
||||
authorizationValidationResponse NULL,
|
||||
caCertificateRequest NULL,
|
||||
...,
|
||||
linkCertificateTlm ToBeSignedLinkCertificateTlm,
|
||||
singleSignedLinkCertificateRca NULL,
|
||||
doubleSignedlinkCertificateRca NULL,
|
||||
/* Extension for butterfly key provisioning */
|
||||
[[butterflyAuthorizationRequest EeRaCertRequest,
|
||||
x509SignedbutterflyAuthorizationRequest EtsiTs102941ButterflyAuthorizationRequest-X509Signed,
|
||||
butterflyAuthorizationResponse RaEeCertInfo,
|
||||
butterflyCertificateRequest NULL,
|
||||
butterflyCertificateResponse NULL,
|
||||
butterflyAtDownloadRequest EeRaDownloadRequest]]
|
||||
}
|
||||
|
||||
END
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
/*************************************************************************************
|
||||
This file contains the EtsiTs102941MessagesItss module providing the ITS-S subset
|
||||
of messages defined in the module EtsiTs102941MessagesCA
|
||||
It should never be imported together with the module EtsiTs102941MessagesCA.
|
||||
Use the EtsiTs102941MessagesCA if all possible PKI message types are needed.
|
||||
|
||||
This module blocks the usage of unencrypted EC signature for AA requests.
|
||||
**************************************************************************************/
|
||||
EtsiTs102941MessagesItss
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) messagesItss(1) major-version-3(3) minor-version-3(3)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Data-Signed,
|
||||
EtsiTs103097Data-Encrypted-Unicast,
|
||||
EtsiTs103097Data-SignedAndEncrypted-Unicast
|
||||
FROM EtsiTs103097Module
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
Version
|
||||
FROM EtsiTs102941BaseTypes
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
InnerEcRequestSignedForPop, InnerEcResponse
|
||||
FROM EtsiTs102941TypesEnrolment
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
EtsiTs102941ButterflyAuthorizationRequest-X509Signed, InnerAtRequest, InnerAtResponse
|
||||
FROM EtsiTs102941TypesAuthorization
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-2(2) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
ToBeSignedCrl, ToBeSignedTlmCtl, ToBeSignedRcaCtl
|
||||
FROM EtsiTs102941TrustLists
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
ToBeSignedLinkCertificate, ToBeSignedLinkCertificateTlm
|
||||
FROM EtsiTs102941TypesLinkCertificate
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) linkCertificate(9) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
EeRaCertRequest, RaEeCertInfo, EeRaDownloadRequest
|
||||
FROM Ieee1609Dot2Dot1EeRaInterface
|
||||
{ iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) ee-ra(11) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
;
|
||||
|
||||
/************
|
||||
-- Messages
|
||||
************/
|
||||
|
||||
EnrolmentRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentRequest PRESENT})})}
|
||||
EnrolmentResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentResponse PRESENT})})}
|
||||
AuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})}
|
||||
AuthorizationRequestMessageWithPop ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})}
|
||||
AuthorizationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationResponse PRESENT})})}
|
||||
CertificateRevocationListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateRevocationList PRESENT})})}
|
||||
TlmCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListTlm PRESENT})})}
|
||||
RcaCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListRca PRESENT})})}
|
||||
TlmLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{linkCertificateTlm PRESENT})})}
|
||||
ButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationRequest PRESENT})})}
|
||||
X509SignedButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{x509SignedbutterflyAuthorizationRequest PRESENT})})}
|
||||
ButterflyAuthorizationResponseMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationResponse PRESENT})})}
|
||||
ButterflyAtDownloadRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAtDownloadRequest PRESENT})})}
|
||||
|
||||
/************
|
||||
-- EtsiTs102941Data
|
||||
************/
|
||||
|
||||
EtsiTs102941Data::= SEQUENCE {
|
||||
version Version (v1),
|
||||
content EtsiTs102941DataContent
|
||||
}
|
||||
|
||||
EtsiTs102941DataContent ::= CHOICE {
|
||||
enrolmentRequest InnerEcRequestSignedForPop,
|
||||
enrolmentResponse InnerEcResponse,
|
||||
authorizationRequest InnerAtRequest,
|
||||
authorizationResponse InnerAtResponse,
|
||||
certificateRevocationList ToBeSignedCrl,
|
||||
certificateTrustListTlm ToBeSignedTlmCtl,
|
||||
certificateTrustListRca ToBeSignedRcaCtl,
|
||||
authorizationValidationRequest NULL,
|
||||
authorizationValidationResponse NULL,
|
||||
caCertificateRequest NULL,
|
||||
...,
|
||||
linkCertificateTlm ToBeSignedLinkCertificateTlm,
|
||||
singleSignedLinkCertificateRca NULL,
|
||||
doubleSignedlinkCertificateRca NULL,
|
||||
/* Extension for butterfly key provisioning */
|
||||
[[butterflyAuthorizationRequest EeRaCertRequest,
|
||||
x509SignedbutterflyAuthorizationRequest EtsiTs102941ButterflyAuthorizationRequest-X509Signed,
|
||||
butterflyAuthorizationResponse RaEeCertInfo,
|
||||
butterflyCertificateRequest NULL,
|
||||
butterflyCertificateResponse NULL,
|
||||
butterflyAtDownloadRequest EeRaDownloadRequest]]
|
||||
} (WITH COMPONENTS{...,
|
||||
authorizationRequest (WITH COMPONENTS{...,
|
||||
ecSignature (WITH COMPONENTS{...,
|
||||
encryptedEcSignature PRESENT
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
END
|
||||
@@ -0,0 +1,3 @@
|
||||
The TS 102941 v2.2.1 PKI ASN1 files are copied from its [ETSI repository](https://forge.etsi.org/rep/ITS/asn1/pki_ts102941/-/tree/v2.2.1).
|
||||
|
||||
See [ETSI License](https://forge.etsi.org/rep/ITS/asn1/pki_ts102941/-/blob/v2.2.1/LICENSE) for copyright details.
|
||||
@@ -0,0 +1,143 @@
|
||||
EtsiTs102941TrustLists
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) major-version-3(3) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Certificate, EtsiTs103097Data-SignedAndEncrypted, EtsiTs103097Data-Signed
|
||||
FROM
|
||||
EtsiTs103097Module
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
HashedId8, Time32, Version --, CertificateAuthorityConstraints
|
||||
FROM EtsiTs102941BaseTypes
|
||||
{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
;
|
||||
|
||||
/************
|
||||
-- CRL
|
||||
************/
|
||||
ToBeSignedCrl ::= SEQUENCE {
|
||||
version Version,
|
||||
thisUpdate Time32,
|
||||
nextUpdate Time32,
|
||||
entries SEQUENCE OF CrlEntry,
|
||||
...
|
||||
}
|
||||
|
||||
CrlEntry ::= HashedId8
|
||||
|
||||
/************
|
||||
-- TLM CTL
|
||||
************/
|
||||
|
||||
ToBeSignedTlmCtl ::= CtlFormat (FullCtl | DeltaCtl) (WITH COMPONENTS {...,
|
||||
ctlCommands ( WITH COMPONENT(
|
||||
( WITH COMPONENTS {...,
|
||||
add ( WITH COMPONENTS {...,
|
||||
ea ABSENT,
|
||||
aa ABSENT
|
||||
})
|
||||
})
|
||||
))
|
||||
})
|
||||
|
||||
/************
|
||||
-- RCA CTL
|
||||
************/
|
||||
|
||||
ToBeSignedRcaCtl ::= CtlFormat (FullCtl | DeltaCtl) ( WITH COMPONENTS {...,
|
||||
ctlCommands ( WITH COMPONENT(
|
||||
( WITH COMPONENTS {...,
|
||||
add ( WITH COMPONENTS {...,
|
||||
rca ABSENT,
|
||||
tlm ABSENT
|
||||
})
|
||||
})
|
||||
))
|
||||
})
|
||||
|
||||
/************
|
||||
-- CTL
|
||||
************/
|
||||
|
||||
FullCtl::= CtlFormat ( WITH COMPONENTS {...,
|
||||
isFullCtl ( TRUE ),
|
||||
ctlCommands ( WITH COMPONENT(
|
||||
( WITH COMPONENTS {...,
|
||||
delete ABSENT
|
||||
})
|
||||
))
|
||||
})
|
||||
|
||||
DeltaCtl::= CtlFormat (WITH COMPONENTS {...,
|
||||
isFullCtl(FALSE)
|
||||
})
|
||||
|
||||
|
||||
CtlFormat ::= SEQUENCE {
|
||||
version Version,
|
||||
nextUpdate Time32,
|
||||
isFullCtl BOOLEAN,
|
||||
ctlSequence INTEGER (0..255),
|
||||
ctlCommands SEQUENCE OF CtlCommand,
|
||||
...
|
||||
}
|
||||
|
||||
CtlCommand ::= CHOICE {
|
||||
add CtlEntry,
|
||||
delete CtlDelete,
|
||||
...
|
||||
}
|
||||
|
||||
CtlEntry ::= CHOICE {
|
||||
rca RootCaEntry,
|
||||
ea EaEntry,
|
||||
aa AaEntry,
|
||||
dc DcEntry,
|
||||
tlm TlmEntry,
|
||||
...
|
||||
}
|
||||
|
||||
CtlDelete ::= CHOICE {
|
||||
cert HashedId8,
|
||||
dc DcDelete,
|
||||
...
|
||||
}
|
||||
|
||||
TlmEntry::= SEQUENCE {
|
||||
selfSignedTLMCertificate EtsiTs103097Certificate,
|
||||
successorTo EtsiTs103097Certificate OPTIONAL,
|
||||
accessPoint Url
|
||||
}
|
||||
|
||||
RootCaEntry ::= SEQUENCE {
|
||||
selfsignedRootCa EtsiTs103097Certificate,
|
||||
successorTo EtsiTs103097Certificate OPTIONAL
|
||||
}
|
||||
|
||||
EaEntry ::= SEQUENCE {
|
||||
eaCertificate EtsiTs103097Certificate,
|
||||
aaAccessPoint Url,
|
||||
itsAccessPoint Url OPTIONAL
|
||||
}
|
||||
|
||||
AaEntry ::= SEQUENCE {
|
||||
aaCertificate EtsiTs103097Certificate,
|
||||
accessPoint Url
|
||||
}
|
||||
|
||||
DcEntry ::= SEQUENCE {
|
||||
url Url,
|
||||
cert SEQUENCE OF HashedId8
|
||||
}
|
||||
|
||||
DcDelete ::= Url
|
||||
|
||||
Url::= IA5String
|
||||
|
||||
END
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
EtsiTs102941TypesAuthorization
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-3(3)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Certificate,
|
||||
EtsiTs103097Data-Signed
|
||||
FROM EtsiTs103097Module
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
CertificateFormat, CertificateSubjectAttributes, EcSignature, HashedId8, PublicKeys, Version
|
||||
FROM EtsiTs102941BaseTypes
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
EeRaInterfacePdu
|
||||
FROM Ieee1609Dot2Dot1EeRaInterface
|
||||
{ iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) ee-ra(11) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest, ScmsPdu-Scoped, SignerSingleX509Cert
|
||||
FROM Ieee1609Dot2Dot1Protocol
|
||||
{ iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) protocol(17) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
;
|
||||
|
||||
/************
|
||||
-- AuthorizationRequest/Response
|
||||
************/
|
||||
|
||||
AuthorizationResponseCode ::= ENUMERATED {
|
||||
ok(0),
|
||||
-- ITS->AA
|
||||
its-aa-cantparse, -- valid for any structure
|
||||
its-aa-badcontenttype, -- not encrypted, not signed, not authorizationrequest
|
||||
its-aa-imnottherecipient, -- the "recipients" of the outermost encrypted data doesn't include me
|
||||
its-aa-unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm
|
||||
its-aa-decryptionfailed, -- works for ECIES-HMAC and AES-CCM
|
||||
its-aa-keysdontmatch, -- HMAC keyTag verification fails
|
||||
its-aa-incompleterequest, -- some elements are missing
|
||||
its-aa-invalidencryptionkey, -- the responseEncryptionKey is bad
|
||||
its-aa-outofsyncrequest, -- signingTime is outside acceptable limits
|
||||
its-aa-unknownea, -- the EA identified by eaId is unknown to me
|
||||
its-aa-invalidea, -- the EA certificate is revoked
|
||||
its-aa-deniedpermissions, -- I, the AA, deny the requested permissions
|
||||
-- AA->EA
|
||||
aa-ea-cantreachea, -- the EA is unreachable (network error?)
|
||||
-- EA->AA
|
||||
ea-aa-cantparse, -- valid for any structure
|
||||
ea-aa-badcontenttype, -- not encrypted, not signed, not authorizationrequest
|
||||
ea-aa-imnottherecipient, -- the "recipients" of the outermost encrypted data doesn't include me
|
||||
ea-aa-unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm
|
||||
ea-aa-decryptionfailed, -- works for ECIES-HMAC and AES-CCM
|
||||
-- TODO: to be continued...
|
||||
invalidaa, -- the AA certificate presented is invalid/revoked/whatever
|
||||
invalidaasignature, -- the AA certificate presented can't validate the request signature
|
||||
wrongea, -- the encrypted signature doesn't designate me as the EA
|
||||
unknownits, -- can't retrieve the EC/ITS in my DB
|
||||
invalidsignature, -- signature verification of the request by the EC fails
|
||||
invalidencryptionkey, -- signature is good, but the key is bad
|
||||
deniedpermissions, -- permissions not granted
|
||||
deniedtoomanycerts, -- parallel limit
|
||||
... }
|
||||
|
||||
|
||||
InnerAtRequest ::= SEQUENCE {
|
||||
publicKeys PublicKeys,
|
||||
hmacKey OCTET STRING (SIZE(32)),
|
||||
sharedAtRequest SharedAtRequest,
|
||||
ecSignature EcSignature,
|
||||
...
|
||||
}
|
||||
|
||||
SharedAtRequest ::= SEQUENCE {
|
||||
eaId HashedId8,
|
||||
keyTag OCTET STRING (SIZE(16)),
|
||||
certificateFormat CertificateFormat,
|
||||
requestedSubjectAttributes CertificateSubjectAttributes (WITH COMPONENTS{..., certIssuePermissions ABSENT}),
|
||||
...
|
||||
}
|
||||
|
||||
InnerAtResponse ::= SEQUENCE {
|
||||
requestHash OCTET STRING (SIZE(16)),
|
||||
responseCode AuthorizationResponseCode,
|
||||
certificate EtsiTs103097Certificate OPTIONAL,
|
||||
...
|
||||
}
|
||||
(WITH COMPONENTS { responseCode (ok), certificate PRESENT }
|
||||
| WITH COMPONENTS { responseCode (ALL EXCEPT ok), certificate ABSENT }
|
||||
)
|
||||
|
||||
EtsiTs102941ButterflyAuthorizationRequest-X509Signed ::= Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest {
|
||||
ScmsPdu-Scoped {
|
||||
EeRaInterfacePdu (WITH COMPONENTS {
|
||||
eeRaCertRequest})
|
||||
},
|
||||
SignerSingleX509Cert
|
||||
}
|
||||
|
||||
END
|
||||
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
EtsiTs102941TypesAuthorizationValidation
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authValidation(7) major-version-3(3) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Certificate
|
||||
FROM EtsiTs103097Module
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
CertificateFormat, CertificateSubjectAttributes,EcSignature, HashedId8, PublicKeys, Version
|
||||
FROM EtsiTs102941BaseTypes
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
SharedAtRequest
|
||||
FROM EtsiTs102941TypesAuthorization
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-2(2) }
|
||||
WITH SUCCESSORS
|
||||
;
|
||||
|
||||
/************
|
||||
-- AuthorizationValidationRequest/Response
|
||||
************/
|
||||
|
||||
AuthorizationValidationResponseCode ::= ENUMERATED {
|
||||
ok(0),
|
||||
cantparse, -- valid for any structure
|
||||
badcontenttype, -- not encrypted, not signed, not permissionsverificationrequest
|
||||
imnottherecipient, -- the "recipients" of the outermost encrypted data doesn't include me
|
||||
unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm
|
||||
decryptionfailed, -- works for ECIES-HMAC and AES-CCM
|
||||
invalidaa, -- the AA certificate presented is invalid/revoked/whatever
|
||||
invalidaasignature, -- the AA certificate presented can't validate the request signature
|
||||
wrongea, -- the encrypted signature doesn't designate me as the EA
|
||||
unknownits, -- can't retrieve the EC/ITS in my DB
|
||||
invalidsignature, -- signature verification of the request by the EC fails
|
||||
invalidencryptionkey, -- signature is good, but the responseEncryptionKey is bad
|
||||
deniedpermissions, -- requested permissions not granted
|
||||
deniedtoomanycerts, -- parallel limit
|
||||
deniedrequest, -- any other reason?
|
||||
... }
|
||||
|
||||
AuthorizationValidationRequest ::= SEQUENCE {
|
||||
sharedAtRequest SharedAtRequest,
|
||||
ecSignature EcSignature,
|
||||
...
|
||||
}
|
||||
|
||||
AuthorizationValidationResponse ::= SEQUENCE {
|
||||
requestHash OCTET STRING (SIZE(16)),
|
||||
responseCode AuthorizationValidationResponseCode,
|
||||
confirmedSubjectAttributes CertificateSubjectAttributes (WITH COMPONENTS{..., certIssuePermissions ABSENT}) OPTIONAL,
|
||||
...
|
||||
}
|
||||
(WITH COMPONENTS { responseCode (ok), confirmedSubjectAttributes PRESENT }
|
||||
| WITH COMPONENTS { responseCode (ALL EXCEPT ok), confirmedSubjectAttributes ABSENT }
|
||||
)
|
||||
|
||||
END
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
EtsiTs102941TypesCaManagement
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) caManagement(8) major-version-3(3) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Certificate, EtsiTs103097Data-Signed
|
||||
FROM
|
||||
EtsiTs103097Module
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
PublicKeys, CertificateSubjectAttributes
|
||||
FROM EtsiTs102941BaseTypes
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
;
|
||||
|
||||
/************
|
||||
-- CA certificate request
|
||||
************/
|
||||
|
||||
CaCertificateRequest ::= SEQUENCE {
|
||||
publicKeys PublicKeys,
|
||||
requestedSubjectAttributes CertificateSubjectAttributes,
|
||||
...
|
||||
}
|
||||
|
||||
END
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
EtsiTs102941TypesEnrolment
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) major-version-3(3) minor-version-1(1) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
EtsiTs103097Certificate,
|
||||
EtsiTs103097Data-Signed
|
||||
FROM EtsiTs103097Module
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
|
||||
CertificateFormat, CertificateSubjectAttributes, EcSignature, HashedId8, PublicKeys, Version
|
||||
FROM EtsiTs102941BaseTypes
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) }
|
||||
WITH SUCCESSORS
|
||||
;
|
||||
|
||||
/************
|
||||
-- EnrolmentRequest/Response
|
||||
************/
|
||||
|
||||
EnrolmentResponseCode ::= ENUMERATED {
|
||||
ok(0),
|
||||
cantparse, -- valid for any structure
|
||||
badcontenttype, -- not encrypted, not signed, not enrolmentrequest
|
||||
imnottherecipient, -- the "recipients" doesn't include me
|
||||
unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm
|
||||
decryptionfailed, -- works for ECIES-HMAC and AES-CCM
|
||||
unknownits, -- can't retrieve the ITS from the itsId
|
||||
invalidsignature, -- signature verification of the request fails
|
||||
invalidencryptionkey, -- signature is good, but the responseEncryptionKey is bad
|
||||
baditsstatus, -- revoked, not yet active
|
||||
incompleterequest, -- some elements are missing
|
||||
deniedpermissions, -- requested permissions are not granted
|
||||
invalidkeys, -- either the verification_key of the encryption_key is bad
|
||||
deniedrequest, -- any other reason?
|
||||
... }
|
||||
|
||||
InnerEcRequestSignedForPop::= EtsiTs103097Data-Signed{InnerEcRequest}
|
||||
|
||||
InnerEcRequest ::= SEQUENCE {
|
||||
itsId OCTET STRING,
|
||||
certificateFormat CertificateFormat,
|
||||
publicKeys PublicKeys,
|
||||
requestedSubjectAttributes CertificateSubjectAttributes (WITH COMPONENTS{..., certIssuePermissions ABSENT}),
|
||||
...
|
||||
}
|
||||
|
||||
InnerEcResponse ::= SEQUENCE {
|
||||
requestHash OCTET STRING (SIZE(16)),
|
||||
responseCode EnrolmentResponseCode,
|
||||
certificate EtsiTs103097Certificate OPTIONAL,
|
||||
...
|
||||
}
|
||||
(WITH COMPONENTS { responseCode (ok), certificate PRESENT }
|
||||
| WITH COMPONENTS { responseCode (ALL EXCEPT ok), certificate ABSENT }
|
||||
)
|
||||
|
||||
END
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
EtsiTs102941TypesLinkCertificate
|
||||
{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) linkCertificate(9) major-version-3(3) minor-version-1(1) }
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
Time32, HashedData
|
||||
FROM EtsiTs102941BaseTypes
|
||||
{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
;
|
||||
|
||||
/************
|
||||
-- Link certificate messages
|
||||
************/
|
||||
|
||||
ToBeSignedLinkCertificate ::= SEQUENCE {
|
||||
expiryTime Time32,
|
||||
certificateHash HashedData,
|
||||
...
|
||||
}
|
||||
|
||||
ToBeSignedLinkCertificateTlm ::= ToBeSignedLinkCertificate
|
||||
ToBeSignedLinkCertificateRca ::= ToBeSignedLinkCertificate
|
||||
|
||||
END
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
EtsiTs103097ExtensionModule
|
||||
{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) extension(2) major-version-1(1) minor-version-1(1)}
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
HashedId8,
|
||||
Time32
|
||||
FROM Ieee1609Dot2BaseTypes {iso(1) identified-organization(3) ieee(111)
|
||||
standards-association-numbered-series-standards(2) wave-stds(1609)
|
||||
dot2(2) base(1) base-types(2) major-version-2 (2) minor-version-3 (3)}
|
||||
WITH SUCCESSORS
|
||||
;
|
||||
|
||||
ExtensionModuleVersion::= INTEGER(1)
|
||||
|
||||
Extension {EXT-TYPE : ExtensionTypes} ::= SEQUENCE {
|
||||
id EXT-TYPE.&extId({ExtensionTypes}),
|
||||
content EXT-TYPE.&ExtContent({ExtensionTypes}{@.id})
|
||||
}
|
||||
|
||||
EXT-TYPE ::= CLASS {
|
||||
&extId ExtId,
|
||||
&ExtContent
|
||||
} WITH SYNTAX {&ExtContent IDENTIFIED BY &extId}
|
||||
|
||||
ExtId ::= INTEGER(0..255)
|
||||
|
||||
EtsiOriginatingHeaderInfoExtension ::= Extension{{EtsiTs103097HeaderInfoExtensions}}
|
||||
|
||||
EtsiTs103097HeaderInfoExtensionId ::= ExtId
|
||||
etsiTs102941CrlRequestId EtsiTs103097HeaderInfoExtensionId ::= 1 --'01'H
|
||||
etsiTs102941DeltaCtlRequestId EtsiTs103097HeaderInfoExtensionId ::= 2 --'02'H
|
||||
|
||||
EtsiTs103097HeaderInfoExtensions EXT-TYPE ::= {
|
||||
{ EtsiTs102941CrlRequest IDENTIFIED BY etsiTs102941CrlRequestId } |
|
||||
{ EtsiTs102941DeltaCtlRequest IDENTIFIED BY etsiTs102941DeltaCtlRequestId },
|
||||
...
|
||||
}
|
||||
|
||||
EtsiTs102941CrlRequest::= SEQUENCE {
|
||||
issuerId HashedId8,
|
||||
lastKnownUpdate Time32 OPTIONAL
|
||||
}
|
||||
|
||||
EtsiTs102941CtlRequest::= SEQUENCE {
|
||||
issuerId HashedId8,
|
||||
lastKnownCtlSequence INTEGER (0..255) OPTIONAL
|
||||
}
|
||||
|
||||
EtsiTs102941DeltaCtlRequest::= EtsiTs102941CtlRequest
|
||||
|
||||
END
|
||||
@@ -0,0 +1,123 @@
|
||||
EtsiTs103097Module
|
||||
{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
Ieee1609Dot2Data, Certificate
|
||||
FROM Ieee1609Dot2 {iso(1) identified-organization(3) ieee(111)
|
||||
standards-association-numbered-series-standards(2) wave-stds(1609)
|
||||
dot2(2) base(1) schema(1) major-version-2(2) minor-version-4(4)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
ExtensionModuleVersion
|
||||
FROM EtsiTs103097ExtensionModule {itu-t(0) identified-organization(4)
|
||||
etsi(0) itsDomain(5) wg5(5) secHeaders(103097) extension(2) major-version-1(1) minor-version-1(1)}
|
||||
;
|
||||
|
||||
EtsiTs103097Certificate::= Certificate (WITH COMPONENTS{...,
|
||||
toBeSigned (WITH COMPONENTS{...,
|
||||
id (WITH COMPONENTS{...,
|
||||
linkageData ABSENT,
|
||||
binaryId ABSENT
|
||||
}),
|
||||
certRequestPermissions ABSENT,
|
||||
canRequestRollover ABSENT
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data::=Ieee1609Dot2Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {...,
|
||||
signedData (WITH COMPONENTS {..., -- constraints on signed data headers
|
||||
tbsData (WITH COMPONENTS {
|
||||
headerInfo (WITH COMPONENTS {...,
|
||||
generationTime PRESENT,
|
||||
p2pcdLearningRequest ABSENT,
|
||||
missingCrlIdentifier ABSENT
|
||||
})
|
||||
}),
|
||||
signer (WITH COMPONENTS {..., --constraints on the certificate
|
||||
certificate ((WITH COMPONENT (EtsiTs103097Certificate))^(SIZE(1)))
|
||||
})
|
||||
}),
|
||||
encryptedData (WITH COMPONENTS {..., -- constraints on encrypted data headers
|
||||
recipients (WITH COMPONENT (
|
||||
(WITH COMPONENTS {...,
|
||||
pskRecipInfo ABSENT,
|
||||
symmRecipInfo ABSENT,
|
||||
rekRecipInfo ABSENT
|
||||
})
|
||||
))
|
||||
}),
|
||||
signedCertificateRequest ABSENT
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-Unsecured {ToBeSentDataContent} ::= EtsiTs103097Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
unsecuredData (CONTAINING ToBeSentDataContent)
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-Signed {ToBeSignedDataContent} ::= EtsiTs103097Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
signedData (WITH COMPONENTS {...,
|
||||
tbsData (WITH COMPONENTS {
|
||||
payload (WITH COMPONENTS {
|
||||
data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
unsecuredData (CONTAINING ToBeSignedDataContent)
|
||||
})
|
||||
}) PRESENT
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-SignedExternalPayload ::= EtsiTs103097Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
signedData (WITH COMPONENTS {...,
|
||||
tbsData (WITH COMPONENTS {
|
||||
payload (WITH COMPONENTS {
|
||||
extDataHash (WITH COMPONENTS {
|
||||
sha256HashedData PRESENT
|
||||
}) PRESENT
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-Encrypted {ToBeEncryptedDataContent} ::= EtsiTs103097Data (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
encryptedData (WITH COMPONENTS {...,
|
||||
ciphertext (WITH COMPONENTS {...,
|
||||
aes128ccm (WITH COMPONENTS {...,
|
||||
ccmCiphertext (CONSTRAINED BY {-- ccm encryption of -- ToBeEncryptedDataContent})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-SignedAndEncrypted {ToBesignedAndEncryptedDataContent} ::= EtsiTs103097Data-Encrypted {EtsiTs103097Data-Signed {ToBesignedAndEncryptedDataContent}}
|
||||
|
||||
EtsiTs103097Data-Encrypted-Unicast {ToBeEncryptedDataContent} ::= EtsiTs103097Data-Encrypted { EtsiTs103097Data-Unsecured{ToBeEncryptedDataContent}} (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
encryptedData (WITH COMPONENTS {...,
|
||||
recipients (SIZE(1))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
EtsiTs103097Data-SignedAndEncrypted-Unicast {ToBesignedAndEncryptedDataContent} ::= EtsiTs103097Data-Encrypted {EtsiTs103097Data-Signed {ToBesignedAndEncryptedDataContent}} (WITH COMPONENTS {...,
|
||||
content (WITH COMPONENTS {
|
||||
encryptedData (WITH COMPONENTS {...,
|
||||
recipients (SIZE(1))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
END
|
||||
+229
@@ -0,0 +1,229 @@
|
||||
-- Draft V0.0.4_2.2.1 - VAM TS 103 300-1 ASN.1 module
|
||||
-- Based on the official version available at @url https://forge.etsi.org/rep/ITS/asn1/vam-ts103300_3/-/tree/v2.1.1
|
||||
-- Modified to import from the CDD module V2.1.1
|
||||
|
||||
VAM-PDU-Descriptions {itu-t(0) identified-organization(4) etsi(0) itsDomain(5)
|
||||
wg1(1) 103300 vam(1) major-version-3(3) minor-version-1(1)}
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
AccelerationChangeIndication, BasicContainer, CartesianAngle, ClusterBreakupInfo,
|
||||
ClusterJoinInfo, ClusterLeaveInfo, Curvature, CurvatureCalculationMode,
|
||||
DeltaTimeQuarterSecond, GenerationDeltaTime, HeadingChangeIndication, ItsPduHeader, LanePosition,
|
||||
LateralAcceleration, LongitudinalAcceleration, PathHistory, PathPredicted,
|
||||
SequenceOfSafeDistanceIndication, SequenceOfTrajectoryInterceptionIndication,
|
||||
SequenceOfTrajectoryInterceptionIndication, Speed, StabilityChangeIndication, StationId,
|
||||
TrajectoryInterceptionIndication, VerticalAcceleration, VruClusterInformation, VruDeviceUsage,
|
||||
VruEnvironment, VruExteriorLights, GeneralizedLanePosition, VruProfileAndSubprofile, VruMovementControl,
|
||||
VruSizeClass, YawRate, Wgs84Angle
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) 102894 cdd (2) major-version-3 (4) minor-version-3 (3) }
|
||||
WITH SUCCESSORS
|
||||
;
|
||||
|
||||
VAM ::= SEQUENCE {
|
||||
header ItsPduHeaderVam,
|
||||
vam VruAwareness
|
||||
}
|
||||
|
||||
/**
|
||||
* @details ItsPduHeaderVam
|
||||
* The ITS PDU header for the VAM.
|
||||
*
|
||||
* This DF includes DEs for the VAM _protocolVersion_, the VAM message type identifier _messageID_
|
||||
* and the station identifier _stationID_ of the originating ITS-S.
|
||||
*
|
||||
* @category: Communication information
|
||||
* @revision: V2.2.1
|
||||
*/
|
||||
ItsPduHeaderVam ::= ItsPduHeader(WITH COMPONENTS {..., protocolVersion(3), messageId(vam)})
|
||||
|
||||
|
||||
/**
|
||||
* @details VruAwareness
|
||||
* VAM payload.
|
||||
*
|
||||
* It includes the time stamp of the VAM and the VAM different containers
|
||||
*
|
||||
* @category: Communication information
|
||||
* @revision: V2.2.1
|
||||
*/
|
||||
VruAwareness ::= SEQUENCE {
|
||||
generationDeltaTime GenerationDeltaTime,
|
||||
vamParameters VamParameters
|
||||
}
|
||||
|
||||
/**
|
||||
* @details VamParameters
|
||||
* The VAM payload includes the @ref BasicContainer and @ref VruHighFrequencyContainer.
|
||||
* The VAM payload may also include additional containers: @ref VruLowFrequencyContainer,
|
||||
* @ref VruClusterInformationContainer, @ref VruClusterOperationContainer and @ref VruMotionPredictionContainer.
|
||||
* The selection of the additional containers depends on the dissemination criteria,
|
||||
* e.g. _vruCluster_ or _MotionDynamicPrediction_ availability.
|
||||
*
|
||||
* @category: Communication information
|
||||
* @revision: V2.2.1
|
||||
**/
|
||||
VamParameters ::= SEQUENCE {
|
||||
basicContainer BasicContainer,
|
||||
vruHighFrequencyContainer VruHighFrequencyContainer,
|
||||
vruLowFrequencyContainer VruLowFrequencyContainer OPTIONAL,
|
||||
vruClusterInformationContainer VruClusterInformationContainer OPTIONAL,
|
||||
vruClusterOperationContainer VruClusterOperationContainer OPTIONAL,
|
||||
vruMotionPredictionContainer VruMotionPredictionContainer OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* @details VruHighFrequencyContainer
|
||||
* The VRU HF container of the VAM contains potentially fast-changing status information of the VRU ITS-S.
|
||||
* It includes the following components (setting indications are specified in clause 7.3.3 of TS 103 300-3):
|
||||
*
|
||||
* @field heading: heading and heading confidence of the originating VRU with regards to the true north.
|
||||
* @field speed: speed in moving direction and speed confidence of the originating VRU.
|
||||
* @field longitudinalAcceleration: longitudinal acceleration of the originating VRU.
|
||||
* @field curvature: related to the actual trajectory of the originating VRU vehicle.
|
||||
_(recommended for VRU Profile 2)_
|
||||
* @field curvatureCalculationMode: indicates whether vehicle yaw-rate is used in the calculation of
|
||||
* the curvature of the VRU vehicle ITS-S that originates the VAM. _(recommended for VRU Profile 2)_
|
||||
* @field yawRate: yaw rate of originating VRU vehicle. _(recommended for VRU Profile 2)_
|
||||
* @field lateralAcceleration: originating VRU lateral acceleration in the street plane.
|
||||
* This field shall be present if the data is available at the originating ITS-S. _(recommended for VRU Profile 2)_
|
||||
* @field verticalAcceleration: vertical acceleration of the originating VRU.
|
||||
* This field shall be present if the data is available at the originating ITS-S.
|
||||
* @field vruLanePosition: lane position of the referencePosition of a VRU, which is either a VRU-specific non-traffic lane
|
||||
* or a standard traffic lane. This field shall be present if the data is available at the originating ITS-S.
|
||||
* @field environment: provides contextual awareness of the VRU among other road users.
|
||||
* This field shall be present only if the data is available at the originating ITS-S.
|
||||
* @field movementControl: indicates the mechanism used by the VRU to control the longitudinal movement of the VRU vehicle.
|
||||
* This field shall be present only if the data is available at the originating ITS-S. _(recommended for VRU Profile 2)_
|
||||
* @field orientation : complements the dimensions of the VRU vehicle by defining the angle of the VRU vehicle longitudinal
|
||||
* axis with regards to the WGS84 north. _(recommended for VRU Profile 2)_
|
||||
* @field rollAngle: provides the angle and angle accuracy between the ground plane and the current orientation of a vehicle's
|
||||
* y-axis with respect to the ground plane about the x-axis according to the ISO 8855.
|
||||
* This field shall be present only if the data is available at the originating ITS-S. _(recommended for VRU Profile 2)_
|
||||
* @field deviceUsage: provides indications from the personal device about the potential
|
||||
* activity of the VRU. This field shall be present only if the data is available at the originating ITS-S.
|
||||
* _(recommended for VRU Profile 1)_
|
||||
*
|
||||
* @category: VRU information
|
||||
* @revision: V2.2.1
|
||||
*/
|
||||
VruHighFrequencyContainer ::= SEQUENCE {
|
||||
heading Wgs84Angle,
|
||||
speed Speed,
|
||||
longitudinalAcceleration LongitudinalAcceleration,
|
||||
curvature Curvature OPTIONAL,
|
||||
curvatureCalculationMode CurvatureCalculationMode OPTIONAL,
|
||||
yawRate YawRate OPTIONAL,
|
||||
lateralAcceleration LateralAcceleration OPTIONAL,
|
||||
verticalAcceleration VerticalAcceleration OPTIONAL,
|
||||
vruLanePosition GeneralizedLanePosition OPTIONAL,
|
||||
environment VruEnvironment OPTIONAL,
|
||||
movementControl VruMovementControl OPTIONAL,
|
||||
orientation Wgs84Angle OPTIONAL,
|
||||
rollAngle CartesianAngle OPTIONAL,
|
||||
deviceUsage VruDeviceUsage OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* @details VruLowFrequencyContainer
|
||||
* The VRU LF container of the VAM contains potentially slow-changing information of the VRU ITS-S.
|
||||
* It is mandatory with higher periodicity as specified in clause 6.2 or when VRU cluster operation container is present.
|
||||
* It includes the following components (setting indications are specified in clause 7.3.4 of TS 103 300-3):
|
||||
*
|
||||
* @field profileAndSubprofile: profile of the ITS-S that originates the VAM, including sub-profile information.
|
||||
* @field sizeClass: information about the size of the VRU.
|
||||
* @field exteriorLights: status of the most important exterior lights switches of the VRU ITS-S that originates the VAM.
|
||||
* _(conditional mandatory as specified in clause 7.3.4 of TS 103 300-3)_
|
||||
*
|
||||
* @category: VRU information
|
||||
* @revision: V2.2.1
|
||||
*/
|
||||
VruLowFrequencyContainer ::= SEQUENCE {
|
||||
profileAndSubprofile VruProfileAndSubprofile,
|
||||
sizeClass VruSizeClass OPTIONAL,
|
||||
exteriorLights VruExteriorLights OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* @details VruClusterInformationContainer
|
||||
* The VRU Cluster Information container of the VAM provides the information/parameters relevant to the VRU cluster.
|
||||
* It is mandatory if the VAM is transmitted by VRU cluster leader.
|
||||
* It includes the following components (setting indications are specified in clause 7.3.5 of TS 103 300-3):
|
||||
*
|
||||
* @field vruClusterInformation: set of parammeters releated to the VRU cluster.
|
||||
* When transmitted by a VRU ITS-S, the clusterId and clusterBoundingBoxShape fields inside this DF shall be present.
|
||||
* The clusterBoundingBoxShape is positioned with respect to the position sent in the BasicContainer.
|
||||
*
|
||||
* @category: VRU information
|
||||
* @revision: V2.2.1
|
||||
*/
|
||||
VruClusterInformationContainer::= SEQUENCE{
|
||||
vruClusterInformation VruClusterInformation (WITH COMPONENTS{..., clusterId, clusterBoundingBoxShape PRESENT}),
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @details VruClusterOperationContainer
|
||||
* The VRU Cluster Operation container of the VAM provides information relevant to change of cluster state and composition.
|
||||
* It is mandatory if the VAM is transmitted by a VRU joining, leaving or breaking up a cluster.
|
||||
* It includes the following components (setting indications are specified in clause 7.3.5 of TS 103 300-3).
|
||||
* At least one of the fields below shall be present if the container is present in the VAM:
|
||||
*
|
||||
* @field clusterJoinInfo: indicates the intent of an individual VAM transmitter to join a cluster.
|
||||
* @field clusterLeaveInfo : indicates that an individual VAM transmitter has recently left the VRU cluster.
|
||||
* @field clusterBreakupInfo: indicates the intent of a cluster VAM transmitter to stop sending cluster VAMs.
|
||||
* @field clusterIdChangeTimeInfo: indicates the intent of a cluster VAM transmitter to change cluster ID.
|
||||
*
|
||||
* @category: VRU information
|
||||
* @revision: V2.2.1
|
||||
*/
|
||||
VruClusterOperationContainer ::= SEQUENCE {
|
||||
clusterJoinInfo ClusterJoinInfo OPTIONAL,
|
||||
clusterLeaveInfo ClusterLeaveInfo OPTIONAL,
|
||||
clusterBreakupInfo ClusterBreakupInfo OPTIONAL,
|
||||
clusterIdChangeTimeInfo DeltaTimeQuarterSecond OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* @details VruMotionPredictionContainer
|
||||
* The VRU Motion Prediction container of the VAM carries the past and future motion state information of the VRU.
|
||||
* It includes the following components (setting indications are specified in clause 7.3.6 of TS 103 300-3).
|
||||
* At least one of the fields below shall be present if the container is present in the VAM:
|
||||
*
|
||||
* @field pathHistory: represents the VRU's recent movement over some past time and/or distance.
|
||||
* It consists of a list of path points.
|
||||
* @field pathPrediction: provides the set of predicted locations of the ITS-S, confidence values
|
||||
* and the corresponding future time instants.
|
||||
* @field safeDistance: provides indication of safe distance between an ego-VRU and up to 8 other ITS-S
|
||||
* or entity on the road to indicate whether the ego-VRU is at a safe distance (that is less likely to
|
||||
* physically collide) from another ITS-S or entity on the road.
|
||||
* @field trajectoryInterceptionIndication: provides the indication for possible trajectory interception
|
||||
* with up to 8 VRUs or other objects on the road..
|
||||
* @field accelerationChangeIndication: provides an acceleration change indication of the VRU.
|
||||
* When present this DF indicates an anticipated change in the VRU speed for period of actionDeltaTime.
|
||||
* @field headingChangeIndication: provides additional data elements associated to heading change indicators
|
||||
* such as a change of travel direction (left or right).
|
||||
* The direction change action is performed for a period of actionDeltaTime.
|
||||
* @field stabilityChangeIndication: provides an estimation of the VRU stability.
|
||||
*
|
||||
* @category: GeoReference information, VRU information
|
||||
* @revision: V2.2.1
|
||||
*/
|
||||
VruMotionPredictionContainer ::= SEQUENCE {
|
||||
pathHistory PathHistory OPTIONAL,
|
||||
pathPrediction PathPredicted OPTIONAL,
|
||||
safeDistance SequenceOfSafeDistanceIndication OPTIONAL,
|
||||
trajectoryInterceptionIndication SequenceOfTrajectoryInterceptionIndication OPTIONAL,
|
||||
accelerationChangeIndication AccelerationChangeIndication OPTIONAL,
|
||||
headingChangeIndication HeadingChangeIndication OPTIONAL,
|
||||
stabilityChangeIndication StabilityChangeIndication OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
END
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
-- Draft V0.0.4_2.2.1 - TS 103 300-3
|
||||
-- Based on the official version available at @url https://forge.etsi.org/rep/ITS/asn1/vam-ts103300_3/-/tree/v2.1.1
|
||||
-- Modified to import from the CDD module V2.1.1
|
||||
|
||||
-- This module defines a special container for motorcycles, to be integrated into the
|
||||
-- Cooperative Awareness Message (CAM) defined in ETSI TS 103 900
|
||||
|
||||
VRU-Motorcyclist-Special-Container {itu-t(0) identified-organization(4) etsi(0) itsDomain(5)
|
||||
wg1(1) 103300 motorcyclist-special-container(2) version2(2)}
|
||||
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
PathPredicted, SequenceOfSafeDistanceIndication,
|
||||
StabilityChangeIndication, Wgs84Angle, CartesianAngle,
|
||||
VruSizeClass, VruSubProfileMotorcyclist
|
||||
FROM ETSI-ITS-CDD
|
||||
{itu-t(0) identified-organization(4) etsi(0)
|
||||
itsDomain(5) wg1(1) 102894 cdd(2) major-version-3(4) minor-version-3(3)}
|
||||
;
|
||||
|
||||
MotorcylistSpecialContainer ::= SEQUENCE {
|
||||
motorcyclist VruSubProfileMotorcyclist,
|
||||
sizeClass VruSizeClass,
|
||||
rollAngle CartesianAngle OPTIONAL,
|
||||
orientation Wgs84Angle OPTIONAL,
|
||||
safeDistance SequenceOfSafeDistanceIndication OPTIONAL,
|
||||
pathPrediction PathPredicted OPTIONAL,
|
||||
stabilityChangeIndication StabilityChangeIndication OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
|
||||
END
|
||||
Vendored
+54
@@ -0,0 +1,54 @@
|
||||
CPM-OriginatingStationContainers {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) originatingStationContainers (2) major-version-1 (1) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
CartesianAngle, MapReference, Speed, StationType, TrailerData, Wgs84Angle
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-3 (3)}
|
||||
;
|
||||
|
||||
/**
|
||||
* This DF represents the Originating Vehicle Container
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field orientationAngle: the angle and angle accuracy of the absolute orientation of the disseminating vehicle in the WGS84 coordinate system with respect to true North.
|
||||
*
|
||||
* @field pitchAngle: the optional angle and angle accuracy between the ground plane and the current orientation of the vehicle's x-axis with respect to the ground plane about the y-axis according to the ISO 8855.
|
||||
*
|
||||
* @field rollAngle: the optional angle and angle accuracy between the ground plane and the current orientation of a vehicle's y-axis with respect to the ground plane about the x-axis according to the ISO 8855
|
||||
*
|
||||
* @field trailerData: information about the trailer dimensions and orientation in case a trailer is present.
|
||||
*
|
||||
*/
|
||||
OriginatingVehicleContainer ::= SEQUENCE {
|
||||
orientationAngle Wgs84Angle,
|
||||
pitchAngle CartesianAngle OPTIONAL,
|
||||
rollAngle CartesianAngle OPTIONAL,
|
||||
trailerDataSet TrailerDataSet OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents the Originating RSU Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field mapReference: identifies the MAPEM containing the topology information reference in the Perceived Object Container
|
||||
*
|
||||
*/
|
||||
OriginatingRsuContainer ::= SEQUENCE{
|
||||
mapReference MapReference OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents a list of trailer data.
|
||||
*
|
||||
*/
|
||||
TrailerDataSet::= SEQUENCE SIZE(1..8,...) OF TrailerData (WITH COMPONENTS {... ,frontOverhang ABSENT, rearOverhang ABSENT, trailerWidth ABSENT})
|
||||
|
||||
END
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
CPM-PDU-Descriptions { itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) cpm (1) major-version-1 (1) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
ItsPduHeader, MessageRateHz, MessageSegmentationInfo, OrdinalNumber1B, ReferencePosition, StationType, TimestampIts
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-3 (3)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
OriginatingRsuContainer, OriginatingVehicleContainer
|
||||
FROM CPM-OriginatingStationContainers {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) originatingStationContainers (2) major-version-1 (1) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
SensorInformationContainer
|
||||
FROM CPM-SensorInformationContainer {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) sensorInformationContainer (3) major-version-1 (1) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
PerceptionRegionContainer
|
||||
FROM CPM-PerceptionRegionContainer {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) perceptionRegionContainer (5) major-version-1 (1) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
PerceivedObjectContainer
|
||||
FROM CPM-PerceivedObjectContainer {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) perceivedObjectContainer (4) major-version-1 (1) minor-version-1(1)}
|
||||
WITH SUCCESSORS
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* This DF represents the Collective Perception Message (CPM) and is the top level Protocol Data Unit.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field header: the common message header for the facilities layer message.
|
||||
*
|
||||
* @field payload: the payload of the message.
|
||||
*
|
||||
*/
|
||||
CollectivePerceptionMessage ::= SEQUENCE {
|
||||
header ItsPduHeader (WITH COMPONENTS {... , protocolVersion (2), messageId(cpm)}),
|
||||
payload CpmPayload
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents the payload of the CPM.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field managementContainer: the management container.
|
||||
*
|
||||
* @field cpmContainers: the list of CPM containers, including its container type identifier and including either one or none of originatingVehicleContainer and/or originatingRsuContainer.
|
||||
*
|
||||
*/
|
||||
CpmPayload ::= SEQUENCE {
|
||||
managementContainer ManagementContainer,
|
||||
cpmContainers ConstraintWrappedCpmContainers,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents the management container of the CPM.
|
||||
* The management container provides basic information about the originating ITS-S, which are not specific to a specific type of station.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field referenceTime: the reference time for all time related information in the CPM.
|
||||
*
|
||||
* @field messageRateRange: the planned or expected range of the CPM generation rate.
|
||||
*
|
||||
* @field segmentationInfo: information regarding the message segmentation on facility layer.
|
||||
*
|
||||
* @field referencePosition: the reference position for all position related information in the CPM.
|
||||
*
|
||||
*/
|
||||
ManagementContainer ::= SEQUENCE {
|
||||
referenceTime TimestampIts,
|
||||
referencePosition ReferencePosition,
|
||||
segmentationInfo MessageSegmentationInfo OPTIONAL,
|
||||
messageRateRange MessageRateRange OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This information object class is an abstract template to instantiate containers.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field &id: the identifier of the container type.
|
||||
*
|
||||
* @field &Type: the container content.
|
||||
*
|
||||
*/
|
||||
|
||||
CPM-CONTAINER-ID-AND-TYPE ::= CLASS {
|
||||
&id CpmContainerId UNIQUE,
|
||||
&Type
|
||||
} WITH SYNTAX {&Type IDENTIFIED BY &id}
|
||||
|
||||
/**
|
||||
* This DE represents the identifier of the container type.
|
||||
*
|
||||
*/
|
||||
CpmContainerId ::= INTEGER (1..16)
|
||||
|
||||
/**
|
||||
* These value assignements represent specific values of the container type identifier.
|
||||
*/
|
||||
originatingVehicleContainer CpmContainerId ::= 1
|
||||
originatingRsuContainer CpmContainerId ::= 2
|
||||
sensorInformationContainer CpmContainerId ::= 3
|
||||
perceptionRegionContainer CpmContainerId ::= 4
|
||||
perceivedObjectContainer CpmContainerId ::= 5
|
||||
|
||||
|
||||
/**
|
||||
* This information object set represents the association between the container type and the container content.
|
||||
*/
|
||||
CpmContainers CPM-CONTAINER-ID-AND-TYPE ::= {
|
||||
{OriginatingVehicleContainer IDENTIFIED BY originatingVehicleContainer} |
|
||||
{OriginatingRsuContainer IDENTIFIED BY originatingRsuContainer} |
|
||||
{SensorInformationContainer IDENTIFIED BY sensorInformationContainer} |
|
||||
{PerceptionRegionContainer IDENTIFIED BY perceptionRegionContainer} |
|
||||
{PerceivedObjectContainer IDENTIFIED BY perceivedObjectContainer},
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents a CPM container preceded by its type identifier and a lenght indicator.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field containerId: the identifier of the container type.
|
||||
*
|
||||
* @field containerData: the container content consistent with the container type.
|
||||
*
|
||||
*/
|
||||
WrappedCpmContainer ::= SEQUENCE {
|
||||
containerId CPM-CONTAINER-ID-AND-TYPE.&id( {CpmContainers} ),
|
||||
containerData CPM-CONTAINER-ID-AND-TYPE.&Type( {CpmContainers}{@containerId} )
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents a list of CPM containers, each with their type identifier.
|
||||
*/
|
||||
WrappedCpmContainers::= SEQUENCE SIZE(1..8,...) OF WrappedCpmContainer
|
||||
|
||||
/**
|
||||
* This DF represents a list of CPM containers, each with their type identifier with an additional constraint.
|
||||
*/
|
||||
ConstraintWrappedCpmContainers ::= WrappedCpmContainers
|
||||
((WITH COMPONENT (WITH COMPONENTS {..., containerId (ALL EXCEPT 1)})) |
|
||||
(WITH COMPONENT (WITH COMPONENTS {..., containerId (ALL EXCEPT 2)})))
|
||||
|
||||
/**
|
||||
* This DF represents the planned or expected range of the message generation rate.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field messageRateMin: the minimum planned or expected message rate.
|
||||
*
|
||||
* @field messageRateMax: the maximum planned or expected message rate.
|
||||
*
|
||||
*/
|
||||
MessageRateRange::= SEQUENCE{
|
||||
messageRateMin MessageRateHz,
|
||||
messageRateMax MessageRateHz
|
||||
}
|
||||
|
||||
END
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
CPM-PerceivedObjectContainer {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) perceivedObjectContainer (4) major-version-1 (1) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
CardinalNumber1B, PerceivedObject
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-3 (3)}
|
||||
;
|
||||
|
||||
/**
|
||||
* This DF represents the Perceived Object Container
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field numberOfPerceivedObjects: the total number of perceived objects at the time of generating the message.
|
||||
*
|
||||
* @field perceivedObjects: the list of perceived objects.
|
||||
*
|
||||
*/
|
||||
PerceivedObjectContainer ::= SEQUENCE {
|
||||
numberOfPerceivedObjects CardinalNumber1B,
|
||||
perceivedObjects PerceivedObjects,
|
||||
...
|
||||
}
|
||||
|
||||
/** @brief Perceived Objects
|
||||
* This DF provides a list of perceived objects represented in the coordinate system in which the y-axis corresponds to the North direction, the x-axis to the East direction, and the z- axis to the vertical direction.
|
||||
*/
|
||||
PerceivedObjects::= SEQUENCE SIZE(0..255, ...) OF PerceivedObject (WITH COMPONENTS {... ,objectId PRESENT})
|
||||
|
||||
END
|
||||
Vendored
+54
@@ -0,0 +1,54 @@
|
||||
CPM-PerceptionRegionContainer {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) perceptionRegionContainer (5) major-version-1 (1) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
CardinalNumber1B, DeltaTimeMilliSecondSigned, Identifier2B, Shape, ConfidenceLevel, SensorType, SequenceOfIdentifier1B
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-3 (3)}
|
||||
;
|
||||
|
||||
/**
|
||||
* This DF represents the Perception Region Container as a list of perception region information objects.
|
||||
*/
|
||||
PerceptionRegionContainer ::= SEQUENCE SIZE(1..256, ...) OF PerceptionRegion
|
||||
|
||||
/**
|
||||
* This DF represents the actual perception capabilities available to the transmitting ITS-S, offering additional (often dynamic) details to the information provided in the sensor information container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
|
||||
* @field measurementDeltaTime: difference between the time of estimation of the perception region and the reference time. Positive values indicates that the provided information refers to a point in time after the reference time.
|
||||
*
|
||||
* @field perceptionRegionConfidence: the perception confidence.
|
||||
*
|
||||
* @field perceptionRegionShape: specification of the shape of the perception region.
|
||||
*
|
||||
* @field shadowingApplies: indicates if the standard shadowing approach applies to the described perception region.
|
||||
*
|
||||
* @field sensorIdList: the optional list of identifiers of the sensors which are involved in perceiving the region.
|
||||
*
|
||||
* @field numberOfPerceivedObjects: the optional number of perceived objects contained in the perception region specified in the component perceptionRegionShape.
|
||||
*
|
||||
* @field perceivedObjectIds: the optional list of identifiers of the objects specified in the Perceived Object Container that are contained in the perception region specified in the component perceptionRegionShape.
|
||||
*
|
||||
*/
|
||||
PerceptionRegion ::= SEQUENCE {
|
||||
measurementDeltaTime DeltaTimeMilliSecondSigned,
|
||||
perceptionRegionConfidence ConfidenceLevel,
|
||||
perceptionRegionShape Shape,
|
||||
shadowingApplies BOOLEAN,
|
||||
sensorIdList SequenceOfIdentifier1B OPTIONAL,
|
||||
numberOfPerceivedObjects CardinalNumber1B OPTIONAL,
|
||||
perceivedObjectIds PerceivedObjectIds OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents a list of identifiers of perceived objects.
|
||||
*/
|
||||
PerceivedObjectIds::= SEQUENCE SIZE(0..255, ...) OF Identifier2B
|
||||
|
||||
END
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
CPM-SensorInformationContainer {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (103324) sensorInformationContainer (3) major-version-1 (1) minor-version-1(1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
Shape, ConfidenceLevel, Identifier1B, SensorType
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-3 (3) }
|
||||
;
|
||||
|
||||
/**
|
||||
* This DF represents the Sensor Information Container as a list of information objects about the sensors or data fusion systems from which the station provides information about detected objects.
|
||||
*/
|
||||
SensorInformationContainer ::= SEQUENCE SIZE(1..128, ...) OF SensorInformation
|
||||
|
||||
|
||||
/**
|
||||
* This DF represents the characteristics of a single sensor or data fusion system.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field sensorId: identifier of the sensor or data fusion system used to relate the perceived object in the Perceived Object Container to the sensor that detected it.
|
||||
* this identifier shall uniquely identify the sensor inside the CPM, but may be changed from one CPM to the next.
|
||||
*
|
||||
* @field sensorType: the type of the sensor.
|
||||
*
|
||||
* @field perceptionRegionShape: the perception region of the sensor.
|
||||
*
|
||||
* @field perceptionRegionConfidence: the homogeneous perception region confidence that can be assumed for the entire perception region shape of this sensor.
|
||||
*
|
||||
* @field shadowingApplies: indicates if the standard shadowing approach applies to the described perception region.
|
||||
*
|
||||
*/
|
||||
|
||||
SensorInformation ::= SEQUENCE {
|
||||
sensorId Identifier1B,
|
||||
sensorType SensorType,
|
||||
perceptionRegionShape Shape OPTIONAL,
|
||||
perceptionRegionConfidence ConfidenceLevel OPTIONAL,
|
||||
shadowingApplies BOOLEAN,
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
END
|
||||
@@ -0,0 +1,4 @@
|
||||
The TS 103324 v2.1.1 CPM ASN1 files are copied from its [ETSI repository](https://forge.etsi.org/rep/ITS/asn1/cpm_ts103324/-/tree/v2.1.1).
|
||||
For compatibility with CDD 2.2.1, the CDD import lines are manually patched from "major-version-3" to "major-version-4".
|
||||
|
||||
See [ETSI License](https://forge.etsi.org/rep/ITS/asn1/cpm_ts103324/-/blob/v2.1.1/LICENSE) for copyright details.
|
||||
@@ -0,0 +1,406 @@
|
||||
DENM-PDU-Description {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) denmPduRelease2 (103831)
|
||||
major-version-2 (2) minor-version-3 (3)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
ActionId, ActionIdList, CauseCodeV2, ClosedLanes, DangerousGoodsExtended, DeltaReferencePosition, DeltaTimeMilliSecondPositive, DeltaTimeSecond,
|
||||
EnergyStorageType, EventZone, GeneralizedLanePositions, HeightLonCarr, InformationQuality, ItsPduHeader, IvimReferences, LanePosition,
|
||||
LightBarSirenInUse, ItineraryPath, MapReferences, MetaInformation, MultiplicativeFactor, NumberOfOccupants, ObjectFace, OccupiedLanesWithConfidence,
|
||||
PerceivedObject, Position1d, PosLonCarr, PosCentMass, PositionOfPillars, PositioningSolutionType, PosFrontAx, PositionOfOccupants, PathPredictedList,
|
||||
RequestResponseIndication, ReferencePosition, RestrictedTypes, RoadConfigurationSectionList, RoadType, StandardLength3b,StandardLength12b,
|
||||
StationType, Speed, SpeedLimit, StationId, StationarySince, TimestampIts, Traces, TracesExtended, TrafficDirection, TrafficRule, TurningRadius,
|
||||
Temperature, VehicleMass, VehicleIdentification, Wgs84Angle, WheelBaseVehicle
|
||||
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2)
|
||||
major-version-4 (4) minor-version-3 (3)} WITH SUCCESSORS
|
||||
;
|
||||
|
||||
/**
|
||||
* This type represents the DENM PDU.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field header: the header of the DENM PDU.
|
||||
*
|
||||
* @field denm: the payload of the DENM PDU.
|
||||
*/
|
||||
DENM ::= SEQUENCE {
|
||||
header ItsPduHeader (WITH COMPONENTS {... , protocolVersion (2), messageId(denm)}),
|
||||
denm DenmPayload
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the DENM payload.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field management: the Management Container.
|
||||
*
|
||||
* @field situation: the optional Situation Container.
|
||||
*
|
||||
* @field location: the optional Location Container.
|
||||
*
|
||||
* @field alacarte: the optional ALaCarte Container .
|
||||
*
|
||||
*/
|
||||
DenmPayload ::= SEQUENCE {
|
||||
management ManagementContainer,
|
||||
situation SituationContainer OPTIONAL,
|
||||
location LocationContainer OPTIONAL,
|
||||
alacarte AlacarteContainer OPTIONAL
|
||||
}
|
||||
((WITH COMPONENTS {..., management (WITH COMPONENTS {..., termination ABSENT}), situation PRESENT, location PRESENT}) |
|
||||
(WITH COMPONENTS {..., management (WITH COMPONENTS {..., termination PRESENT}), situation ABSENT, location ABSENT, alacarte ABSENT}))
|
||||
|
||||
/**
|
||||
* This type represents the Management Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field actionId: the identifier of the DENM.
|
||||
*
|
||||
* @field detectionTime: the time at which the event is detected.
|
||||
*
|
||||
* @field referenceTime: the time at which a new DENM, an update DENM or a cancellation DENM is generated
|
||||
*
|
||||
* @field termination: the optional termination type of the DENM.
|
||||
*
|
||||
* @field eventPosition: the geographical position used in the definition of the awareness area / relevance zone, see clause 6.1.3.
|
||||
*
|
||||
* @field awarenessDistance: the optional radius of the circular awareness area, with centre at the event position or at any of the
|
||||
* event history points as defined in clause 6.1.3.1.
|
||||
*
|
||||
* @field trafficDirection: the optional traffic direction along which the receiving ITS-S may encounter the event,
|
||||
* as defined in clause 6.1.3.
|
||||
*
|
||||
* @field validityDuration: the validity duration of a DENM. This component represents a time offset in the unit of second since detectionTime.
|
||||
*
|
||||
* @field transmissionInterval: the optional time interval for DENM transmission as defined by the originating ITS-S.
|
||||
* If the component is not present in DENM, a default value defaultValidity is assumed.
|
||||
*
|
||||
* @field stationType: the station type information of the originating ITS-S.
|
||||
*
|
||||
*/
|
||||
ManagementContainer ::= SEQUENCE {
|
||||
actionId ActionId,
|
||||
detectionTime TimestampIts,
|
||||
referenceTime TimestampIts,
|
||||
termination Termination OPTIONAL,
|
||||
eventPosition ReferencePosition,
|
||||
awarenessDistance StandardLength3b OPTIONAL,
|
||||
trafficDirection TrafficDirection OPTIONAL,
|
||||
validityDuration DeltaTimeSecond DEFAULT defaultValidity,
|
||||
transmissionInterval DeltaTimeMilliSecondPositive OPTIONAL,
|
||||
stationType StationType,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the situation container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field informationQuality: the quality level of the information provided by the ITS-S application of the originating ITS-S.
|
||||
* It indicates the probability of the detected event being truly existent at the event position.
|
||||
*
|
||||
* @field eventType: the event type, including direct cause and sub cause.
|
||||
*
|
||||
* @field linkedCause: the optional type of a linked event co-existing at the same time and the same place (same event zone),
|
||||
* including direct cause and sub cause of the linked event, for which no other DENM is sent out.
|
||||
*
|
||||
* @field eventZone: an optional list of EventPoint, using the position indicated in the component eventPosition of the Management container
|
||||
* as the reference position for the first EventPoint.
|
||||
*
|
||||
* @field linkedDenms: the optional list of DF ActionId, pointing to DENMs that are semantically connected because applying to consecutive
|
||||
* event zones at the same time.
|
||||
*
|
||||
* @field eventEnd: the end position of the event along the road that is affected by the event w.r.t. the component eventPosition of the
|
||||
* Management container. This end position is represented by the length of the event along the road.
|
||||
*
|
||||
* @field eventEndFactor: an optional component that applies to the component eventEnd. It is a factor to be multiplied with the value given in eventEnd.
|
||||
*
|
||||
* @field perceivedEvent: an optional component that, in case of vehicle ITS-S, indicates the nature of the information about the event.
|
||||
*
|
||||
*/
|
||||
SituationContainer ::= SEQUENCE {
|
||||
informationQuality InformationQuality,
|
||||
eventType CauseCodeV2,
|
||||
linkedCause CauseCodeV2 OPTIONAL,
|
||||
eventZone EventZone OPTIONAL,
|
||||
...,
|
||||
[[ linkedDenms ActionIdList OPTIONAL,
|
||||
eventEnd Position1d OPTIONAL ]], -- extension in minor-version-2
|
||||
[[ eventEndFactor MultiplicativeFactor OPTIONAL,
|
||||
perceivedEvent PerceivedEvent OPTIONAL ]] -- extension in minor-version-3
|
||||
}
|
||||
((WITH COMPONENTS {..., eventZone PRESENT, eventEnd ABSENT, eventEndFactor ABSENT}) |
|
||||
(WITH COMPONENTS {..., eventZone ABSENT, eventEnd PRESENT}) |
|
||||
(WITH COMPONENTS {..., eventZone ABSENT, eventEnd ABSENT, eventEndFactor ABSENT}))
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This type represents the Location Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field eventSpeed: optional speed of a detected dynamic event and the confidence of the speed information.
|
||||
*
|
||||
* @field eventPositionHeading: the optional heading of the event and the confidence of the heading information.
|
||||
*
|
||||
* @field detectionZonesToEventPosition: the detection zone information approaching the event position, see clause 6.1.3.3.
|
||||
*
|
||||
* @field roadType: the optional road type information at the event position.
|
||||
*
|
||||
* @field lanePositions: the optional lane(s) where the event is located, at the position indicated by the component eventPosition
|
||||
* of the Management container and for a given reference direction.
|
||||
*
|
||||
* @field occupiedLanes: the optional lane(s) that are fully or partially occupied by the event, at the position indicated by the
|
||||
* component eventPosition of the Management container and for a given reference direction.
|
||||
*
|
||||
* @field linkedIvims: the optional list of DF IvimReference, pointing to IVIMs that are semantically connected because providing information
|
||||
* applying to the road segment(s) covered by the components detectionZonesToEventPosition, detectionZonesToSpecifiedEventPoint and
|
||||
* the SituationContainer component eventZone.
|
||||
*
|
||||
* @field linkedMapem: the optional list of DF Mapreference, pointing to MAPEMs that are semantically connected because providing information
|
||||
* applying to the road segment(s) covered by the component detectionZonesToEventPosition, detectionZonesToSpecifiedEventPoint and
|
||||
* the SituationContainer component eventZone.
|
||||
*
|
||||
* @field detectionZonesToSpecifiedEventPoint: the optional detection zone information approaching towards a
|
||||
* specified event point, see clause 6.1.3.3.
|
||||
*
|
||||
* @field predictedPaths: the optional list of future paths or trajectories that the event may move along or zones that the event may occupy.
|
||||
*
|
||||
*/
|
||||
LocationContainer ::= SEQUENCE {
|
||||
eventSpeed Speed OPTIONAL,
|
||||
eventPositionHeading Wgs84Angle OPTIONAL,
|
||||
detectionZonesToEventPosition Traces,
|
||||
roadType RoadType OPTIONAL,
|
||||
...,
|
||||
[[ lanePositions GeneralizedLanePositions OPTIONAL,
|
||||
occupiedLanes OccupiedLanesWithConfidence OPTIONAL,
|
||||
linkedIvims IvimReferences OPTIONAL,
|
||||
linkedMapems MapReferences OPTIONAL,
|
||||
detectionZonesToSpecifiedEventPoint TracesExtended OPTIONAL,
|
||||
predictedPaths PathPredictedList OPTIONAL ]] -- extension in minor-version-2
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detailed information about the vehicle in which the originating ITS-S is mounted, for mitigating the consequences
|
||||
* of a collision.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field heightLonCarrLeft: the height of the left longitudinal carrier of the vehicle from base to top.
|
||||
*
|
||||
* @field heightLonCarrRight: the height of the right longitudinal carrier of the vehicle from base to top.
|
||||
*
|
||||
* @field posLonCarrLeft: the position of the left longitudinal carrier of vehicle.
|
||||
*
|
||||
* @field posLonCarrRight: the position of the right longitudinal carrier of vehicle.
|
||||
*
|
||||
* @field positionOfPillars: information about the vertical support of the vehicle in which the originating ITS-S is mounted. It shall be
|
||||
* included for passenger vehicles only.
|
||||
*
|
||||
* @field posCentMass: the position of the centre of mass of the vehicle.
|
||||
*
|
||||
* @field wheelBaseVehicle: the wheel base of the vehicle.
|
||||
*
|
||||
* @field turningRadius: the turning radius of the vehicle.
|
||||
*
|
||||
* @field posFrontAx: the position of the front axle of the vehicle.
|
||||
*
|
||||
* @field positionOfOccupants: indicates whether an in-vehicle seat is occupied at the moment of generation of the message.
|
||||
*
|
||||
* @field vehicleMass: the mass of the unloaded vehicle
|
||||
*
|
||||
* @field requestResponseIndication: indicates whether the originating ITS-S transmitting the impactReduction component is requesting
|
||||
* the receiving ITS-S to provide also its impactReduction component.
|
||||
*
|
||||
*/
|
||||
ImpactReductionContainer ::= SEQUENCE {
|
||||
heightLonCarrLeft HeightLonCarr,
|
||||
heightLonCarrRight HeightLonCarr,
|
||||
posLonCarrLeft PosLonCarr,
|
||||
posLonCarrRight PosLonCarr,
|
||||
positionOfPillars PositionOfPillars,
|
||||
posCentMass PosCentMass,
|
||||
wheelBaseVehicle WheelBaseVehicle,
|
||||
turningRadius TurningRadius,
|
||||
posFrontAx PosFrontAx,
|
||||
positionOfOccupants PositionOfOccupants,
|
||||
vehicleMass VehicleMass,
|
||||
requestResponseIndication RequestResponseIndication
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detailed information about an object with which a vehicle and/or the traffic is likely to collide.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field perceivedPreCrashObject: information about a perceived object in the East, North, Up reference frame.
|
||||
*
|
||||
* @field objectStationId: the optional station Id of the object for which the information is provided.
|
||||
*
|
||||
* @field timeToCollision: the optional estimated time to collision of a vehicle with the object.
|
||||
*
|
||||
* @field impactSection: indication of the object's section where the impact will most likely occur.
|
||||
* When the target object is likely to be a vehicle, then this component should be present, otherwise it should not be provided.
|
||||
*
|
||||
* @field estimatedBrakingDistance: the optional estimated distance in which the vehicle would need to come to a complete hold,
|
||||
* if no obstruction was in the way.
|
||||
*/
|
||||
PreCrashContainer ::= SEQUENCE {
|
||||
perceivedPreCrashObject PerceivedObject,
|
||||
objectStationId StationId OPTIONAL,
|
||||
timeToCollision DeltaTimeMilliSecondPositive OPTIONAL,
|
||||
impactSection ObjectFace OPTIONAL,
|
||||
estimatedBrakingDistance StandardLength12b OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detailed information about the configuration of road section(s) that are geographically related to the event.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field roadConfigurationConfidence: information about the source of the road configuration and the confidence in the information.
|
||||
*
|
||||
* @field roadConfigurationSectionList: a list of road configuration information per applicable road section.
|
||||
*
|
||||
*/
|
||||
RoadConfigurationContainer ::= SEQUENCE {
|
||||
roadConfigurationConfidence MetaInformation,
|
||||
roadConfigurationSectionList RoadConfigurationSectionList,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detailed information of a roadwork zone and specific access conditions.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field lightBarSirenInUse: optionally indicates whether a roadwork vehicle has switched on the light bar or siren.
|
||||
* It is used when the roadwork involves a specific roadwork vehicle
|
||||
*
|
||||
* @field closedLanes: optionally indicates whether the roadwork has caused the closure of one or several driving lanes.
|
||||
* Optionally, it may indicate whether a hard shoulder lane is closed to traffic or can be used for specific usage (e.g. for stopping).
|
||||
*
|
||||
* @field restriction: the optional type(s) of vehicles that are restricted to access the road work zone.
|
||||
* More than one vehicle types may be provided by this component if the restriction apply to multiple vehicle types.
|
||||
*
|
||||
* @field speedLimit: the optional speed limitation applied to the roadwork zone.
|
||||
*
|
||||
* @field incidentIndication: the optional incident related to the roadworks to provide additional information of the roadworks zone.
|
||||
*
|
||||
* @field recommendedPath: the optional recommended itinerary in order to contour the roadworks zone. If present, a recommended path
|
||||
* shall be a list of path points in the order from the starting point closest to the roadworks zone to the end point of the recommended path.
|
||||
*
|
||||
* @field startingPointSpeedLimit: the optional effective starting position of a speed limit being applied to the roadwork zone,
|
||||
* with respect to the component eventPosition on the Management Container.
|
||||
* This component shall be present if the speed limit is applied at a certain distance prior to the roadwork zone starting position.
|
||||
*
|
||||
* @field trafficFlowRule: optionally indicates the side of the road to which the traffic should flow around a roadwork.
|
||||
*
|
||||
* @field referenceDenms: an optional sequence of actionIds for different DENMs that describe the same event.
|
||||
* If it is available, it indicates the actionIds of all other DENMs describing this event.
|
||||
*
|
||||
*/
|
||||
RoadWorksContainerExtended ::= SEQUENCE {
|
||||
lightBarSirenInUse LightBarSirenInUse OPTIONAL,
|
||||
closedLanes ClosedLanes OPTIONAL,
|
||||
restriction RestrictedTypes OPTIONAL,
|
||||
speedLimit SpeedLimit OPTIONAL,
|
||||
incidentIndication CauseCodeV2 OPTIONAL,
|
||||
recommendedPath ItineraryPath OPTIONAL,
|
||||
startingPointSpeedLimit DeltaReferencePosition OPTIONAL,
|
||||
trafficFlowRule TrafficRule OPTIONAL,
|
||||
referenceDenms ActionIdList OPTIONAL
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detailed information about a stationary vehicle.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field stationarySince: the optional time duration of the stationary vehicle being stationary.
|
||||
*
|
||||
* @field stationaryCause: optional additional information to describe causes of the stationary vehicle event such as human problem.
|
||||
*
|
||||
* @field carryingDangerousGoods: optional information on the type of dangerous goods, the required emergency action and other information.
|
||||
*
|
||||
* @field numberOfOccupants: the optional estimated number of occupants involved in the stationary vehicle event.
|
||||
*
|
||||
* @field vehicleIdentification: the optional identification of the stationary vehicle.
|
||||
*
|
||||
* @field energyStorageType: the optional vehicle energy storage type information of the stationary vehicle, such as electric, diesel, etc.
|
||||
*
|
||||
*/
|
||||
StationaryVehicleContainer ::= SEQUENCE {
|
||||
stationarySince StationarySince OPTIONAL,
|
||||
stationaryCause CauseCodeV2 OPTIONAL,
|
||||
carryingDangerousGoods DangerousGoodsExtended OPTIONAL,
|
||||
numberOfOccupants NumberOfOccupants OPTIONAL,
|
||||
vehicleIdentification VehicleIdentification OPTIONAL,
|
||||
energyStorageType EnergyStorageType OPTIONAL
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the A La Carte Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field lanePosition: the optional lane position of the event.
|
||||
*
|
||||
* @field impactReduction: optional vehicle data for collision mitigation.
|
||||
*
|
||||
* @field externalTemperature: optional the ambient temperature at the event position.
|
||||
*
|
||||
* @field roadWorks: optional information of the roadwork zone.
|
||||
*
|
||||
* @field positioningSolution: optionally indicates the technical solution being used by the originating ITS-S to estimate the event position.
|
||||
*
|
||||
* @field stationaryVehicle: optional information about a stationary vehicle.
|
||||
*
|
||||
* @field roadConfiguration: optional information about the configuration of the road.
|
||||
*
|
||||
* @field precrash: the optional information about perceived objects that represent hazards and/or could be subject of collisions.
|
||||
*
|
||||
*/
|
||||
AlacarteContainer ::= SEQUENCE {
|
||||
lanePosition LanePosition OPTIONAL,
|
||||
impactReduction ImpactReductionContainer OPTIONAL,
|
||||
externalTemperature Temperature OPTIONAL,
|
||||
roadWorks RoadWorksContainerExtended OPTIONAL,
|
||||
positioningSolution PositioningSolutionType OPTIONAL,
|
||||
stationaryVehicle StationaryVehicleContainer OPTIONAL,
|
||||
...,
|
||||
[[ roadConfiguration RoadConfigurationContainer OPTIONAL,
|
||||
preCrash PreCrashContainer OPTIONAL ]] -- extension in minor-version-2
|
||||
}
|
||||
|
||||
/**
|
||||
* This type specifies the default value for DENM validity duration used for DENM protocol operation.
|
||||
*/
|
||||
defaultValidity INTEGER ::= 600
|
||||
|
||||
/**
|
||||
* This DE indicates whether a vehicle has perceived an event (e.g. a stationary vehicle using camera sensors) or whether it is itself the cause of the event.
|
||||
* the value shall be set to:
|
||||
* - True - in case the vehicle has perceived the event
|
||||
* - False - in case the vehicle itself is the cause of the event (e.g. vehicle is stationary) or part of the cause (e.g. traffic jam) or is directly exposed to the environmental condition (e.g. adverse weather)
|
||||
*/
|
||||
PerceivedEvent::= BOOLEAN
|
||||
|
||||
/**
|
||||
* This indicates the termination type of generated DENM, i.e. if it is a cancellation DENM or a negation DENM
|
||||
*/
|
||||
|
||||
Termination ::= ENUMERATED {isCancellation(0), isNegation (1)}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,542 @@
|
||||
--! @options: no-fields-header
|
||||
|
||||
CAM-PDU-Descriptions {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) camPduRelease2 (103900)
|
||||
major-version-2 (2) minor-version-3 (3)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
IMPORTS
|
||||
ItsPduHeader, CauseCodeV2, ReferencePosition, AccelerationControl, Curvature, CurvatureCalculationMode, Heading, LanePosition,
|
||||
EmergencyPriority, EmbarkationStatus, Speed, DriveDirection, AccelerationComponent, StationType, ExteriorLights, DangerousGoodsBasic,
|
||||
SpecialTransportType, LightBarSirenInUse, VehicleRole, VehicleLength, VehicleWidth, Path, RoadworksSubCauseCode, ClosedLanes,
|
||||
TrafficRule, SpeedLimit, SteeringWheelAngle, PerformanceClass, YawRate, PtActivation, ProtectedCommunicationZonesRSU,
|
||||
CenDsrcTollingZone, GenerationDeltaTime, BasicContainer, BrakeControl, VehicleHeight2, WiperStatus, GeneralizedLanePositions,
|
||||
PathPredictedList, CartesianAngle, Wgs84Angle, StabilityChangeIndication, VruSubProfileBicyclist, VruMovementControl,
|
||||
BasicLaneConfiguration, PolygonalLine, MetaInformation, ConfidenceLevels, VehicleMovementControl
|
||||
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) 102894 cdd (2)
|
||||
major-version-4 (4) minor-version-3 (3)} WITH SUCCESSORS
|
||||
;
|
||||
|
||||
|
||||
-- The root data frame for cooperative awareness messages
|
||||
|
||||
/**
|
||||
* This type represents the CAM PDU.
|
||||
*
|
||||
* It shall include the following componenets:
|
||||
*
|
||||
* @field header: the header of the CAM PDU.
|
||||
*
|
||||
* @field cam: the payload of the CAM PDU.
|
||||
*/
|
||||
|
||||
CAM ::= SEQUENCE {
|
||||
header ItsPduHeader (WITH COMPONENTS {... , protocolVersion (2), messageId(cam)}),
|
||||
cam CamPayload
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the CAM payload.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field generationDeltaTime: Time corresponding to the time of the reference position in the CAM, considered as time of the CAM generation.
|
||||
*
|
||||
* @field camParameters: The sequence of CAM mandatory and optional container.
|
||||
*
|
||||
*/
|
||||
CamPayload ::= SEQUENCE {
|
||||
generationDeltaTime GenerationDeltaTime,
|
||||
camParameters CamParameters
|
||||
}
|
||||
|
||||
/**
|
||||
* @field basicContainer: the mandatory basic container of the CAM.
|
||||
*
|
||||
* @field highFrequencyContainer: the mandatory container represents the high frequency of the CAM.
|
||||
*
|
||||
* @field lowFrequencyContainer: the optional conatainer represents the low frequency of the CAM.
|
||||
*
|
||||
* @field specialVehicleContainer: The special container of the CAM shall be present as defined in clause 6.1.2.
|
||||
* The content of the container shall be set according to the value of the vehicleRole component as specified in Table 5.
|
||||
*
|
||||
* @field extensionContainers: the list of CAM extension containers, including its container type identifier and the container itself.
|
||||
*/
|
||||
CamParameters ::= SEQUENCE {
|
||||
basicContainer BasicContainer,
|
||||
highFrequencyContainer HighFrequencyContainer,
|
||||
lowFrequencyContainer LowFrequencyContainer OPTIONAL,
|
||||
specialVehicleContainer SpecialVehicleContainer OPTIONAL,
|
||||
...,
|
||||
extensionContainers WrappedExtensionContainers OPTIONAL
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the high frequency container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field basicVehicleContainerHighFrequency: The mandatory high frequency container of the CAM when the originating ITS-S is of the type vehicle ITS-S.
|
||||
*
|
||||
* @field rsuContainerHighFrequency: The mandatory high frequency container of CAM when the type of the originating ITS-S is RSU ITS-S.
|
||||
*/
|
||||
HighFrequencyContainer ::= CHOICE {
|
||||
basicVehicleContainerHighFrequency BasicVehicleContainerHighFrequency,
|
||||
rsuContainerHighFrequency RSUContainerHighFrequency,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the low frequency container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* The low frequency container of the CAM when the originating ITS-S is of the type vehicle ITS-S. It shall be present as defined in clause 6.1.2.
|
||||
*/
|
||||
LowFrequencyContainer ::= CHOICE {
|
||||
basicVehicleContainerLowFrequency BasicVehicleContainerLowFrequency (WITH COMPONENTS {..., pathHistory (SIZE (0..23))}),
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represent the Special Vehicle Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field publicTransportContainer: If the vehicleRole component is set to publicTransport(1) this container shall be present.
|
||||
*
|
||||
* @field specialTransportContainer: If the vehicleRole component is set to specialTransport(2) this container shall be present.
|
||||
*
|
||||
* @field dangerousGoodsContainer: If the vehicleRole component is set to dangerousGoods(3) this container shall be present.
|
||||
*
|
||||
* @field roadWorksContainerBasic: If the vehicleRole component is set to roadWork(4) this container shall be present.
|
||||
*
|
||||
* @field rescueContainer: If the vehicleRole component is set to rescue(5) this container shall be present.
|
||||
*
|
||||
* @field emergencyContainer: If the vehicleRole component is set to emergency(6) this container shall be present.
|
||||
*
|
||||
* @field safetyCarContainer: If the vehicleRole component is set to safetyCar(7) this container shall be present.
|
||||
*/
|
||||
SpecialVehicleContainer ::= CHOICE {
|
||||
publicTransportContainer PublicTransportContainer,
|
||||
specialTransportContainer SpecialTransportContainer,
|
||||
dangerousGoodsContainer DangerousGoodsContainer,
|
||||
roadWorksContainerBasic RoadWorksContainerBasic,
|
||||
rescueContainer RescueContainer,
|
||||
emergencyContainer EmergencyContainer,
|
||||
safetyCarContainer SafetyCarContainer,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the Basic Vehicle Container High Frequency.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field heading: It represent the heading and heading accuracy of the vehicle movement of the originating ITS-S with regards to the true north.
|
||||
* The heading accuracy provided in the heading Confidence value shall provide the accuracy of the measured vehicle heading with a confidence level
|
||||
* of 95 %. Otherwise, the value of the headingConfidence shall be set to unavailable.
|
||||
*
|
||||
* @field speed: It represent driving speed and speed accuracy of the originating ITS-S. The speed accuracy provided in the speedConfidence shall
|
||||
* provide the accuracy of the speed value with a confidence level of 95 %. Otherwise, the speedConfidence shall be set to unavailable.
|
||||
*
|
||||
* @field driveDirection: This component represent the vehicle drive direction (forward or backward) of the originating ITS-S.
|
||||
*
|
||||
* @field vehicleLength: This component represent the vehicle length value and vehicle length confidence indication of the vehicle ITS-S that
|
||||
* originate the CAM.
|
||||
*
|
||||
* @field vehicleWidth: This component represents the Vehicle Width of the vehicle ITS-S that originates the CAM excluding side mirrors and possible
|
||||
* similar extensions.
|
||||
*
|
||||
* @field longitudinalAcceleration: It represent the vehicle Longitudinal Acceleration of the originating ITS-S in the centre of the mass of the
|
||||
* empty vehicle. It shall include the measured vehicle longitudinal acceleration and its accuracy value with the confidence level of 95 %.
|
||||
* Otherwise, the longitudinalAccelerationConfidence shall be set to unavailable.
|
||||
*
|
||||
* @field curvature: this component reppresent the actual trajectory of the vehicle.
|
||||
*
|
||||
* @field curvatureCalculationMode: It indicates whether vehicle yaw-rate is used in the calculation of the curvature of the vehicle ITS-S that
|
||||
* originates the CAM.
|
||||
*
|
||||
* @field yawRate: It denotes the vehicle rotation around the centre of mass of the empty vehicle. The leading sign denotes the direction of
|
||||
* rotation. The value is negative if the motion is clockwise when viewing from the top.
|
||||
* yawRateConfidence denotes the accuracy for the 95 % confidence level for the measured yawRateValue. Otherwise, the value of yawRateConfidence
|
||||
* shall be set to unavailable.
|
||||
*
|
||||
* @field accelerationControl: an optional component which represents the current status of the vehcile mechnanisms controlling the longitudinal movement of the vehcile ITS-S
|
||||
* (e.g. brake pedal, gas pedal, etc. engaged) that originate the CAM.
|
||||
*
|
||||
* @field lanePosition: an optional component which represents the lanePosition of the referencePosition of a vehicle. This component shall be present if the data is
|
||||
* available at the originating ITS-S.
|
||||
*
|
||||
* @field steeringWheelAngle: an optional component which indicates the steering wheel angle and accuracy as measured at the vehicle ITS-S that originates the CAM.
|
||||
*
|
||||
* @field lateralAcceleration: an optional component which represents the vehicle lateral acceleration of the originating ITS-S in the centre of the mass of the empty vehicle.
|
||||
* It shall include the measured vehicle lateral acceleration and its accuracy value with the confidence level of 95%.
|
||||
*
|
||||
* @field verticalAcceleration: an optional component which indicates the originating ITS-S in the centre of the mass of the empty vehicle.
|
||||
*
|
||||
* @field performanceClass: an optional component characterizes the maximum age of the CAM data elements with regard to the generation delta time.
|
||||
*
|
||||
* @field cenDsrcTollingZone: an optional component which represents the information about the position of a CEN DSRC Tolling Station operating in the 5,8 GHz frequency band.
|
||||
*/
|
||||
BasicVehicleContainerHighFrequency ::= SEQUENCE {
|
||||
heading Heading,
|
||||
speed Speed,
|
||||
driveDirection DriveDirection,
|
||||
vehicleLength VehicleLength,
|
||||
vehicleWidth VehicleWidth,
|
||||
longitudinalAcceleration AccelerationComponent,
|
||||
curvature Curvature,
|
||||
curvatureCalculationMode CurvatureCalculationMode,
|
||||
yawRate YawRate,
|
||||
accelerationControl AccelerationControl OPTIONAL,
|
||||
lanePosition LanePosition OPTIONAL,
|
||||
steeringWheelAngle SteeringWheelAngle OPTIONAL,
|
||||
lateralAcceleration AccelerationComponent OPTIONAL,
|
||||
verticalAcceleration AccelerationComponent OPTIONAL,
|
||||
performanceClass PerformanceClass OPTIONAL,
|
||||
cenDsrcTollingZone CenDsrcTollingZone OPTIONAL
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the Basic Vehicle Container Low Frequency.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field vehicleRole: represent the role of the vehicle ITS-S that originates the CAM. Only values 0 to 7 shall be used.
|
||||
*
|
||||
* @field exteriorLights: represent the status of the most important exterior lights switches of the vehicle ITS-S that originates the CAM.
|
||||
*
|
||||
* @field pathHistory: which represents the vehicle's recent movement over some past time and/or distance. It consists of a list of path points,
|
||||
* each represented as DF PathPoint. The list of path points may consist of up to 23 elements.
|
||||
*/
|
||||
BasicVehicleContainerLowFrequency ::= SEQUENCE {
|
||||
vehicleRole VehicleRole,
|
||||
exteriorLights ExteriorLights,
|
||||
pathHistory Path
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the Public Transport Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field embarkationStatus: It indicates whether the passenger embarkation is currently ongoing.
|
||||
*
|
||||
* @field ptActivation: an optional component used for controlling traffic lights, barriers, bollards, etc.
|
||||
*/
|
||||
PublicTransportContainer ::= SEQUENCE {
|
||||
embarkationStatus EmbarkationStatus,
|
||||
ptActivation PtActivation OPTIONAL
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the Special Transport Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field specialTransportType: which indicates whether the originating ITS-S is mounted on a special transport vehicle with heavy or oversized load
|
||||
* or both. It shall be present if the data is available in originating ITS-S.
|
||||
*
|
||||
* @field lightBarSirenInUse: indicates whether light-bar or a siren is in use by the vehicle originating the CAM.
|
||||
*/
|
||||
SpecialTransportContainer ::= SEQUENCE {
|
||||
specialTransportType SpecialTransportType,
|
||||
lightBarSirenInUse LightBarSirenInUse
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the Dangerous Goods Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field dangerousGoodsBasic: identifies the type of the dangerous goods transported by the vehicle that originates the CAM. It shall be present if
|
||||
* the data is available in the originating ITS S.
|
||||
*/
|
||||
DangerousGoodsContainer ::= SEQUENCE {
|
||||
dangerousGoodsBasic DangerousGoodsBasic
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the Road Works Container Basic.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field roadworksSubCauseCode: The optional component, in case the originating ITS-S is mounted to a vehicle ITS-S participating to roadwork. It
|
||||
* provides information on the type of roadwork that it is currently undertaking. This component shall be present if the data is available in
|
||||
* originating ITS S.
|
||||
*
|
||||
* @field lightBarSirenInUse: it indicates whether light-bar or a siren is in use by the vehicle originating the CAM.
|
||||
*
|
||||
* @field closedLanes: an optional component which provides information about the opening/closure status of the lanes ahead. Lanes are counted from
|
||||
* the inside boarder of the road. If a lane is closed to traffic, the corresponding bit shall be set to 1.
|
||||
*/
|
||||
RoadWorksContainerBasic ::= SEQUENCE {
|
||||
roadworksSubCauseCode RoadworksSubCauseCode OPTIONAL,
|
||||
lightBarSirenInUse LightBarSirenInUse,
|
||||
closedLanes ClosedLanes OPTIONAL
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the Rescue Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field lightBarSirenInUse: it indicates whether light-bar or a siren is in use by the vehicle originating the CAM.
|
||||
*/
|
||||
RescueContainer ::= SEQUENCE {
|
||||
lightBarSirenInUse LightBarSirenInUse
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the Emergency Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field lightBarSirenInUse: it indicates whether light-bar or a siren is in use by the vehicle originating the CAM.
|
||||
*
|
||||
* @field incidentIndication: the optional incident related to the roadworks to provide additional information of the roadworks zone.
|
||||
*
|
||||
* @field emergencyPriority: the optional component represent right of way indicator of the vehicle ITS-S that originates the CAM PDU.
|
||||
*/
|
||||
EmergencyContainer ::= SEQUENCE {
|
||||
lightBarSirenInUse LightBarSirenInUse,
|
||||
incidentIndication CauseCodeV2 OPTIONAL,
|
||||
emergencyPriority EmergencyPriority OPTIONAL
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the Safety Car Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field lightBarSirenInUse: it indicates whether light-bar or a siren is in use by the vehicle originating the CAM.
|
||||
*
|
||||
* @field incidentIndication: the optional incident related to the roadworks to provide additional information of the roadworks zone.
|
||||
*
|
||||
* @field trafficRule: an optional rule indicates whether vehicles are allowed to overtake a safety car that is originating this CAM.
|
||||
*
|
||||
* @field speedLimit: an optional speed indicates whether a speed limit is applied to vehicles following the safety car.
|
||||
*/
|
||||
SafetyCarContainer ::= SEQUENCE {
|
||||
lightBarSirenInUse LightBarSirenInUse,
|
||||
incidentIndication CauseCodeV2 OPTIONAL,
|
||||
trafficRule TrafficRule OPTIONAL,
|
||||
speedLimit SpeedLimit OPTIONAL
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains detaild information of the RSU Container High Frequency.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field protectedCommunicationZonesRSU: an optional Information about position of a CEN DSRC Tolling Station operating in the 5,8 GHz frequency
|
||||
* band. If this information is provided by RSUs a receiving vehicle ITS-S is prepared to adopt mitigation techniques when being in the vicinity of
|
||||
* CEN DSRC tolling stations.
|
||||
*/
|
||||
RSUContainerHighFrequency ::= SEQUENCE {
|
||||
protectedCommunicationZonesRSU ProtectedCommunicationZonesRSU OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This information object class is an abstract template to instantiate containers.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field &id: the identifier of the container type.
|
||||
*
|
||||
* @field &Type: the container content.
|
||||
*
|
||||
*/
|
||||
EXTENSION-CONTAINER-ID-AND-TYPE ::= CLASS {
|
||||
&id ExtensionContainerId UNIQUE,
|
||||
&Type
|
||||
} WITH SYNTAX {&Type IDENTIFIED BY &id}
|
||||
|
||||
/**
|
||||
* This DE represents the identifier of the container type.
|
||||
*/
|
||||
ExtensionContainerId ::= INTEGER (1..16,...)
|
||||
|
||||
/**
|
||||
* These value assignments represent specific values of the container type identifier.
|
||||
*/
|
||||
twoWheelerContainer ExtensionContainerId ::= 1
|
||||
eHorizonLocationSharingContainer ExtensionContainerId ::= 2
|
||||
veryLowFrequencyContainer ExtensionContainerId ::= 3
|
||||
pathPredictionContainer ExtensionContainerId ::= 4
|
||||
generalizedLanePositionsContainer ExtensionContainerId ::= 5
|
||||
vehicleMovementControlContainer ExtensionContainerId ::= 6
|
||||
|
||||
/**
|
||||
* This information object set represents the association between the container type and the container content.
|
||||
*/
|
||||
ExtensionContainers EXTENSION-CONTAINER-ID-AND-TYPE ::= {
|
||||
{TwoWheelerContainer IDENTIFIED BY twoWheelerContainer} |
|
||||
{EHorizonLocationSharingContainer IDENTIFIED BY eHorizonLocationSharingContainer} |
|
||||
{VeryLowFrequencyContainer IDENTIFIED BY veryLowFrequencyContainer} |
|
||||
{PathPredictionContainer IDENTIFIED BY pathPredictionContainer} |
|
||||
{GeneralizedLanePositionsContainer IDENTIFIED BY generalizedLanePositionsContainer} |
|
||||
{VehicleMovementControlContainer IDENTIFIED BY vehicleMovementControlContainer},
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents a CAM container preceded by its type identifier and a length indicator.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field containerId: the identifier of the container type.
|
||||
*
|
||||
* @field containerData: the container content consistent with the container type.
|
||||
*
|
||||
*/
|
||||
WrappedExtensionContainer ::= SEQUENCE {
|
||||
containerId EXTENSION-CONTAINER-ID-AND-TYPE.&id( {ExtensionContainers} ),
|
||||
containerData EXTENSION-CONTAINER-ID-AND-TYPE.&Type( {ExtensionContainers}{@containerId} )
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents a list of CAM containers, each with their type identifier.
|
||||
*/
|
||||
WrappedExtensionContainers ::= SEQUENCE SIZE(1..8,...) OF WrappedExtensionContainer
|
||||
|
||||
/**
|
||||
* This type contains detailed information about two wheelers. It is meant to use for StationType
|
||||
* cyclist, moped and motorcycle.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field typeSpecificInformation: this data field contains type specific information about two wheelers.
|
||||
*
|
||||
* @field rollAngle: this data field describes the roll angle of the two wheeler.
|
||||
*
|
||||
* @field orientation: this data field describes the orientation of the two wheeler.
|
||||
*
|
||||
* @field stabilityChangeIndication: this data field describes if the two wheeler is about to lose control.
|
||||
*
|
||||
*/
|
||||
TwoWheelerContainer ::= SEQUENCE {
|
||||
typeSpecificInformation TwoWheelerTypeSpecificInformation OPTIONAL,
|
||||
rollAngle CartesianAngle OPTIONAL,
|
||||
orientation Wgs84Angle OPTIONAL,
|
||||
stabilityChangeIndication StabilityChangeIndication OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains type specific information about a two wheeler.
|
||||
*
|
||||
* It includes one of the following components:
|
||||
*
|
||||
* @field cyclist: it contains cyclist-specific information.
|
||||
*
|
||||
*/
|
||||
TwoWheelerTypeSpecificInformation ::= CHOICE {
|
||||
cyclist CyclistTypeSpecificInformation,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains type-specific information about cyclists.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field vruSubProfileBicyclist: it indicates the detailed type of the cyclist.
|
||||
*
|
||||
* @field vruMovementControl: it includes information about the movement control of the bicycle.
|
||||
*
|
||||
*/
|
||||
CyclistTypeSpecificInformation ::= SEQUENCE {
|
||||
vruSubProfileBicyclist VruSubProfileBicyclist (unavailable | bicyclist | e-scooter | pedelec | speed-pedelec | roadbike | childrensbike) OPTIONAL,
|
||||
vruMovementControl VruMovementControl OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type contains contextual, map-based location information.
|
||||
* eHorizon is defined as a tool to convey the part of the road network and its characteristics derived from map data located in front of and behind the vehicle along the road.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field segmentAhead: the road segment that the vehicle is predicted to reach, starting from the reference position.
|
||||
* At least one node must be filled in so that the current map position can be calculated on the receiver side.
|
||||
*
|
||||
* @field nodeProbabilities: confidence values for each node in segmentAhead, indicating how confident we are that the ITS station will reach that point.
|
||||
*
|
||||
* @field segmentBehind: the road segment that the vehicle has passed, based on the collected data, starting from the reference position.
|
||||
* At least one node must be filled in so that the current map position can be calculated on the receiver side.
|
||||
*
|
||||
* @field laneLevelDetails: provides information about the configuration of the road at the position indicated by the component referencePosition of the Basic Container and for a given reference direction.
|
||||
*
|
||||
* @field segmentSource: it represents the origin of the map-specific data.
|
||||
*
|
||||
*/
|
||||
EHorizonLocationSharingContainer ::= SEQUENCE {
|
||||
segmentAhead PolygonalLine,
|
||||
nodeProbabilities ConfidenceLevels OPTIONAL,
|
||||
segmentBehind PolygonalLine,
|
||||
laneLevelDetails BasicLaneConfiguration OPTIONAL,
|
||||
segmentSource MetaInformation (WITH COMPONENTS {..., confidenceValue ABSENT}) OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the very low frequency container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field vehicleHeight: this component represents the height of the vehicle that originates the CAM.
|
||||
*
|
||||
* @field wiperStatus: this component represents the status of the wipers of the vehicle that originates the CAM, at the time indicated by generationDeltaTime.
|
||||
*
|
||||
* @field brakeControl: this component represents the status of the brake control system of the vehicle that originates the CAM,
|
||||
* at the time indicated by generationDeltaTime and during the period 10 seconds before that time.
|
||||
*/
|
||||
VeryLowFrequencyContainer ::= SEQUENCE {
|
||||
vehicleHeight VehicleHeight2 OPTIONAL,
|
||||
wiperStatus WiperStatus OPTIONAL,
|
||||
brakeControl BrakeControl OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the path prediction container.
|
||||
*
|
||||
* Contains information about the possible future paths of ITS station.
|
||||
*/
|
||||
PathPredictionContainer ::= SEQUENCE {
|
||||
pathPredictedList PathPredictedList,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the generalized lane positions container.
|
||||
*
|
||||
* Contains detailed information about the transversal position of the ITS station with respect to the road and potentially about the lane type.
|
||||
*/
|
||||
GeneralizedLanePositionsContainer ::= SEQUENCE {
|
||||
generalizedLanePositions GeneralizedLanePositions,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the vehicle movement control container.
|
||||
*
|
||||
* Contains information about the current vehicle movement control status
|
||||
* of ITS station.
|
||||
* This contains:
|
||||
* - brake and acceleration pedal position status information
|
||||
* - mechanism for lateral, longitudinal movements dimensions
|
||||
* of the vehicle
|
||||
*/
|
||||
VehicleMovementControlContainer ::= SEQUENCE {
|
||||
vehicleMovementControl VehicleMovementControl,
|
||||
...
|
||||
}
|
||||
|
||||
END
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
POIM-CommonContainers {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) poi(103916) common(99) major-version-1 (1) minor-version-1 (1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
Identifier2B, IvimReferences, MapReferences, Provider, TimestampIts
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-1 (1)} WITH SUCCESSORS
|
||||
|
||||
PoiType
|
||||
FROM POIM-PDU-Description {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) poi(103916) poim(0) major-version-1 (1) minor-version-1 (1)}
|
||||
;
|
||||
|
||||
/**
|
||||
* This type represents the common management container of the POI Information Blocks.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field serviceProviderId: identifier of the organization that provided the POI Information Block.
|
||||
*
|
||||
* @field blockIdentificationNumber: identifier of the POI Information Block, as assigned by the organization identified in serviceProviderId.
|
||||
*
|
||||
* @field timestamp: timestamp of the generation or last change of the POI Information Block
|
||||
*
|
||||
* @field linkedIvims: the optional list of references to IVIMs that are semantically connected because providing signage information applying to the POI.
|
||||
*
|
||||
* @field linkedMapem: the optional list of references to MAPEMs that are semantically connected because providing information applying to the POI.
|
||||
*
|
||||
*/
|
||||
PoiBlockManagementContainer::= SEQUENCE {
|
||||
serviceProviderId Provider,
|
||||
blockIdentificationNumber Identifier2B,
|
||||
timestamp TimestampIts,
|
||||
linkedIvims IvimReferences OPTIONAL,
|
||||
linkedMapems MapReferences OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type can be used to reference to other related POI Information Blocks.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field poiInfoBlockType: the type of related POI Information Blocks
|
||||
*
|
||||
* @field serviceProviderId: identifier of the organization that provided the related POI Information Block.
|
||||
*
|
||||
* @field blockIdentificationNumber: identifier of the related POI Information Block, as assigned by the organization identified in serviceProviderId.
|
||||
*
|
||||
* @field timestamp: optional timestamp of the generation or last change of the related POI Information Block
|
||||
*
|
||||
*/
|
||||
|
||||
RelatedPoiInfoBlock::= SEQUENCE{
|
||||
poiInfoBlockType PoiType,
|
||||
serviceProviderId Provider,
|
||||
blockIdentificationNumber Identifier2B,
|
||||
timestamp TimestampIts OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of @ref RelatedPoiInfoBlock and represents a commmon container to refer to other POI Information Blocks.
|
||||
*
|
||||
*/
|
||||
RelatedPoiInfoBlockContainer::= SEQUENCE OF RelatedPoiInfoBlock
|
||||
|
||||
END
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
POIM-PDU-Description {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) poi(103916) poim(0) major-version-1 (1) minor-version-1 (1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
ItsPduHeader
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-1 (1)} WITH SUCCESSORS
|
||||
|
||||
ParkingAvailabilityBlock
|
||||
FROM POIM-ParkingAvailability {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) poi(103916) parkingAvailability(1) major-version-1 (1) minor-version-1 (1)} WITH SUCCESSORS
|
||||
|
||||
-- other block imports from separate standards to be added here when needed.
|
||||
;
|
||||
|
||||
/**
|
||||
* This type represents the POIM PDU.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field header: the header of the POIM PDU.
|
||||
*
|
||||
* @field payload: the payload of the POIM PDU.
|
||||
*/
|
||||
|
||||
POIM ::= SEQUENCE {
|
||||
header ItsPduHeader (WITH COMPONENTS {... , protocolVersion (1), messageId(poim)}),
|
||||
payload WrappedPoiInformationBlocks
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents a list of POI information blocks, each with their type identifier.
|
||||
*/
|
||||
WrappedPoiInformationBlocks::= SEQUENCE (SIZE (1..8,...)) OF WrappedPoiInformationBlock
|
||||
|
||||
/**
|
||||
* This information object class is an abstract template to instantiate POI Information Blocks.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field &id: the identifier of the block type.
|
||||
*
|
||||
* @field &Type: the block content.
|
||||
*
|
||||
*/
|
||||
BLOCK-TYPE ::= CLASS {
|
||||
&id PoiType,
|
||||
&Content
|
||||
} WITH SYNTAX {&Content IDENTIFIED BY &id}
|
||||
|
||||
/**
|
||||
* This DE represents the identifier of the container type.
|
||||
*
|
||||
*/
|
||||
PoiType::= INTEGER(1..128,...)
|
||||
|
||||
/**
|
||||
* These value assignements represent specific values of the block type identifier.
|
||||
*/
|
||||
parkingAvailability PoiType ::= 1
|
||||
|
||||
/**
|
||||
* This information object set represents the association between the block type and the block content.
|
||||
*/
|
||||
|
||||
PoiInformationSet BLOCK-TYPE ::= {
|
||||
{ParkingAvailabilityBlock IDENTIFIED BY parkingAvailability}, ...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents a POI Information Block preceded by its type identifier and a lenght indicator.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field poiType: the identifier of the POI Information Block type.
|
||||
*
|
||||
* @field poiBlock: the POI Information Block.
|
||||
*
|
||||
*/
|
||||
WrappedPoiInformationBlock ::= SEQUENCE {
|
||||
poiType BLOCK-TYPE.&id({PoiInformationSet}),
|
||||
poiBlock BLOCK-TYPE.&Content({PoiInformationSet}{@poiType})
|
||||
}
|
||||
|
||||
END
|
||||
+743
@@ -0,0 +1,743 @@
|
||||
POIM-ParkingAvailability {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) poi(103916) parkingAvailability(1) major-version-1 (1) minor-version-1 (1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
AltitudeValue, ConfidenceLevel, DangerousGoodsBasic, DeltaLatitude, DeltaLongitude, DeltaReferencePosition, EuVehicleCategoryCode, GeoPosition, Identifier2B, Latitude, Longitude,
|
||||
SpecialTransportType, TimestampIts, VehicleHeight, Wgs84Angle
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-1 (1)} WITH SUCCESSORS
|
||||
|
||||
PoiBlockManagementContainer, RelatedPoiInfoBlockContainer
|
||||
FROM POIM-CommonContainers {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) poi(103916) common(99) major-version-1 (1) minor-version-1 (1)} WITH SUCCESSORS
|
||||
;
|
||||
|
||||
-- Parking Availability Block for usage within the Point of Interest Message (POIM):
|
||||
|
||||
/**
|
||||
* This type represents the POI Information Block concerning a parking availability at a given facility.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field managementContainer: the management container of the parking availability POI Information Block.
|
||||
*
|
||||
* @field placeInfo: general information about the parking facility.
|
||||
*
|
||||
* @field aggregatedStatus: aggregated status information about the parking facility.
|
||||
*
|
||||
* @field detailedStatus: detailed topology and status information about the parking areas and spaces.
|
||||
*
|
||||
* @field relatedPoi: reference to other relevant POI Information Blocks.
|
||||
*
|
||||
*/
|
||||
ParkingAvailabilityBlock::= SEQUENCE{
|
||||
managementContainer PoiBlockManagementContainer,
|
||||
placeInfo GeneralParkingPlaceContainer,
|
||||
aggregatedStatus ParkingStatusContainer,
|
||||
detailedStatus ParkingSupplyCapabilitiesContainer OPTIONAL,
|
||||
relatedPoi RelatedPoiInfoBlockContainer OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
-- POIM-PA Containers:
|
||||
|
||||
/**
|
||||
* This type represents the General Parking Facility Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field position: the position of the parking facility.
|
||||
*
|
||||
* @field name: the name of the parking facility.
|
||||
*
|
||||
* @field openingPeriods: the optional opening periods of the parking facility.
|
||||
*
|
||||
* @field address: the address of the parking facility.
|
||||
*
|
||||
* @field phoneNumber: the phone number of the operator of the parking facility.
|
||||
*
|
||||
* @field website: the URL of the website of the operator of the parking facility.
|
||||
*
|
||||
*/
|
||||
GeneralParkingPlaceContainer::= SEQUENCE{
|
||||
position GeoPosition,
|
||||
name UTF8String (SIZE (1..31)),
|
||||
openingPeriods Periods OPTIONAL,
|
||||
address UTF8String (SIZE (1..255)) OPTIONAL,
|
||||
phoneNumber UTF8String (SIZE (1..31)) OPTIONAL,
|
||||
website UTF8String (SIZE (1..31)) OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the Parking Status Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field currentFacilityStatus: the current status of the facility.
|
||||
*
|
||||
* @field currentOccupancy: the optional current occupancy of the entire facility.
|
||||
* This component is only representative if the entire facility has areas and spaces of the same type. e.g. personal car parking spaces only.
|
||||
*
|
||||
* @field detailedStatus: the optional detailed parking availability status of the facility.
|
||||
*
|
||||
*/
|
||||
ParkingStatusContainer::= SEQUENCE {
|
||||
currentFacilityStatus OpeningStatus,
|
||||
currentOccupancy OccupancyInformation OPTIONAL,
|
||||
detailedStatus ParkingStatusList OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the ParkingSupplyCapabilitiesContainer and is a list of @ref ParkingAreas.
|
||||
*
|
||||
*/
|
||||
ParkingSupplyCapabilitiesContainer::= SEQUENCE OF ParkingAreas
|
||||
|
||||
-- DFs for parking availability:
|
||||
|
||||
/**
|
||||
* This DF indicates a geographical position with reference to a reference position.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field deltaLatitude: the delta latitude of the geographical position.
|
||||
*
|
||||
* @field deltaLongitude: the delta longitude of the geographical position.
|
||||
*
|
||||
*/
|
||||
DeltaPosition::=SEQUENCE{
|
||||
deltaLatitude DeltaLatitude,
|
||||
deltaLongitude DeltaLongitude
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF shall contain an an ordered sequence of @ref DeltaPosition with respect to the previous position
|
||||
* with the first instance referring to a reference position and with the order implicitly defining a direction.
|
||||
*
|
||||
*/
|
||||
DeltaPositions::= SEQUENCE (SIZE (1..32, ...)) OF DeltaPosition
|
||||
|
||||
/**
|
||||
* This DF indicates a geographical position.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field latitude: the latitude of the geographical position.
|
||||
*
|
||||
* @field longitude: the longitude of the geographical position.
|
||||
*
|
||||
* @field altitude: the altitude of the geographical position.
|
||||
*
|
||||
*/
|
||||
-- Redundant with GeoPosition from CDD (TS102894-2v221-CDD.asn)
|
||||
-- GeoPosition::= SEQUENCE{
|
||||
-- latitude Latitude,
|
||||
-- longitude Longitude,
|
||||
-- altitude AltitudeValue DEFAULT unavailable
|
||||
-- }
|
||||
|
||||
/**
|
||||
* This DF indicates a the load type of the vehicle.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field goodsType: optional information about the goods being transported.
|
||||
*
|
||||
* @field dangerousGoodsType: the optional type of dangerous goods according to the European Agreement concerning the International Carriage of Dangerous Goods by Road (ADR).
|
||||
*
|
||||
* @field specialTransportType: the type of special transport according to local regulations.
|
||||
*
|
||||
*/
|
||||
LoadType::= SEQUENCE{
|
||||
goodsType GoodsType OPTIONAL,
|
||||
dangerousGoodsType DangerousGoodsBasic OPTIONAL,
|
||||
specialTransportType SpecialTransportType,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents occupancy information.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field rate: the current occupancy in percentage, nominally = ((totalSpaces-freeSpaces)/totalSpaces) * 100.
|
||||
*
|
||||
* @field trend: the current trend of the occupancy.
|
||||
*
|
||||
* @field freeSpaces: the number of spaces that are actually available.
|
||||
*
|
||||
* @field totalSpaces: the total number of spaces.
|
||||
*
|
||||
* @field confidence: the confidence level of the above information.
|
||||
*
|
||||
*/
|
||||
OccupancyInformation::= SEQUENCE{
|
||||
rate OccupancyRate,
|
||||
trend OccupancyTrend,
|
||||
freeSpaces NumberOfSpaces,
|
||||
totalSpaces NumberOfSpaces,
|
||||
confidence ConfidenceLevel,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF provides information about the parking capabilities and availabilities of a parking identified area.
|
||||
*
|
||||
* @note:a parking area possibly groups all spaces with the same characteristics.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field id: the identifier of the parking area within the parking place/facility.
|
||||
*
|
||||
* @field currentOccupancy: the current occupancy information of the parking area.
|
||||
*
|
||||
* @field location: the location of the parking area.
|
||||
*
|
||||
* @field level: the level under/over ground floor of the parking area.
|
||||
*
|
||||
* @field arrangementType: the common arrangement of the parking spaces within the area.
|
||||
* the value ´mixed´ shall be used if there is no common arrangement. In this case the arrangement of the single spaces may be defined in the component spacesDetailed.
|
||||
*
|
||||
* @field boundary: the optional physical boundary of the parking area as a polygon using the component location as reference position.
|
||||
*
|
||||
* @field orientation: the optional common orientation of the parking spaces within the area.
|
||||
* This is component shall be absent if there is no common orientation. In this case the orientation of the single spaces may be defined in the component spacesDetailed.
|
||||
*
|
||||
* @field accessViaLane: the optional identifier of a lane that provides access to the parking area.
|
||||
*
|
||||
* @field allowedVehicleCategories: the categories of vehicles that are allowed in the parking area.
|
||||
*
|
||||
* @field notAllowedEngineCharacteristics: the optional characteristic(s) of engines that are not allowed in the parking area.
|
||||
*
|
||||
* @field allowedLoadTypes: the optional load type(s) that are allowed in the parking area.
|
||||
*
|
||||
* @field notallowedLoadTypes: the optional load type(s) that are not allowed in the parking area.
|
||||
*
|
||||
* @field heightRestriction: the optional applicable vehicle height restriction.
|
||||
*
|
||||
* @field reservationType: the optional parking reservation type(s) associated to the parking area.
|
||||
* This is component shall be absent if there is no common reservation type. In this case the reservation type of the single spaces may be defined in the component spacesDetailed.
|
||||
*
|
||||
* @field pricingInformation: the optional pricing information applicable to the parking area.
|
||||
*
|
||||
* @field paymentInformation: the optional payment information applicable to the parking area.
|
||||
*
|
||||
* @field bookingContactInfo: the optional booking contact information applicable to the parking area.
|
||||
*
|
||||
* @field accessCharachteristics: the optional access information to the area.
|
||||
*
|
||||
* @field freeSpacesPosition: the optional list of positions of free spaces.
|
||||
*
|
||||
* @field freeSpacesId: the optional list of Ids of free spaces.
|
||||
*
|
||||
* @field spacesBasic: the optional basic information about none, some or all parking spaces within the area.
|
||||
*
|
||||
* @field spacesDetailed: the optional detailed information about none, some or all parking spaces within the area.
|
||||
*
|
||||
*/
|
||||
ParkingArea::=SEQUENCE{
|
||||
id Identifier2B,
|
||||
currentOccupancy OccupancyInformation,
|
||||
location GeoPosition,
|
||||
level INTEGER(-8..16,...) DEFAULT 0,
|
||||
arrangementType ParkingAreaArrangementType,
|
||||
boundary DeltaPositions OPTIONAL,
|
||||
orientation Wgs84Angle OPTIONAL,
|
||||
accessViaLane Identifier2B OPTIONAL,
|
||||
allowedVehicleCategories SEQUENCE (SIZE(1..4,...)) OF EuVehicleCategoryCode,
|
||||
notAllowedEngineCharacteristics SEQUENCE (SIZE(1..4,...)) OF EngineCharacteristicsFromIso OPTIONAL,
|
||||
allowedLoadTypes SEQUENCE (SIZE(1..4,...)) OF LoadType OPTIONAL,
|
||||
notAllowedLoadTypes SEQUENCE (SIZE(1..4,...)) OF LoadType OPTIONAL,
|
||||
heightRestriction VehicleHeight OPTIONAL,
|
||||
reservationType SEQUENCE (SIZE(1..4,...)) OF ParkingReservationType OPTIONAL,
|
||||
pricingInformation UTF8String OPTIONAL,
|
||||
paymentInformation UTF8String OPTIONAL,
|
||||
bookingContactInfo UTF8String OPTIONAL,
|
||||
accessCharachteristics UTF8String OPTIONAL,
|
||||
freeSpacesPosition SEQUENCE OF DeltaPosition OPTIONAL,
|
||||
freeSpacesId SEQUENCE OF Identifier2B OPTIONAL,
|
||||
spacesBasic ParkingSpacesBasic OPTIONAL,
|
||||
spacesDetailed ParkingSpacesDetailed OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of @ref ParkingArea.
|
||||
*
|
||||
*/
|
||||
ParkingAreas::= SEQUENCE OF ParkingArea
|
||||
|
||||
/**
|
||||
* This DF indicates the allowed type of occupancy of a parking space/area in terms of time and/or usage.
|
||||
*
|
||||
* The following options are available:
|
||||
*
|
||||
* @field unknown: indicates that the allowed type of occupancy is unknown.
|
||||
*
|
||||
* @field unlimitedOccupancy: indicates that it can be occupied without limits.
|
||||
*
|
||||
* @field onlyWhileCharging: indicates that it can be occupied only while charging an electric vehicle.
|
||||
*
|
||||
* @field limitedDuration: indicates that it can be occupied for a limited and indicated duration in minutes.
|
||||
*
|
||||
* @field onlyWhileChargingLimitedDuration: indicates that it can be occupied only while charging an electric vehicle and only for a limited and indicated duration in minutes.
|
||||
*
|
||||
* @field parkingAllowedUntil: indicates that it can be occupied only until an indicated moment in time.
|
||||
*
|
||||
* @field forcedParkingUntil: indicates that it can be occupied and departure is possible only after an indicated moment in time.
|
||||
*
|
||||
*/
|
||||
ParkingOccupancyInfo::= CHOICE {
|
||||
unknown NULL,
|
||||
unlimitedOccupancy NULL,
|
||||
onlyWhileCharging NULL,
|
||||
limitedDuration INTEGER,
|
||||
onlyWhileChargingLimitedDuration INTEGER,
|
||||
parkingAllowedUntil TimestampIts,
|
||||
forcedParkingUntil TimestampIts,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF provides basic information about the parking capabilities and availabilities of a single parking space.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field id: the unqiue identifier of the parking space within the parking area.
|
||||
*
|
||||
* @field location: the optional location of the geometrical center of the parking space w.r.t. the location of the parking area.
|
||||
*
|
||||
* @field status: the actual status of the parking space.
|
||||
*
|
||||
*/
|
||||
ParkingSpaceBasic ::= SEQUENCE{
|
||||
id Identifier2B,
|
||||
location DeltaReferencePosition OPTIONAL,
|
||||
status ParkingSpaceStatus
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF provides detailed information about the parking capabilities and availabilities of a single parking space.
|
||||
*
|
||||
* It is an extension of @ref ParkingSpaceBasic and it shall additionally include the following additional components:
|
||||
*
|
||||
* @field arrangementType: the optional arrangement of the parking space w.r.t. other spaces.
|
||||
* This is component, if present, overrides the common arrangementType defined in the @ref ParkingArea.
|
||||
*
|
||||
* @field boundary: the optional physical boundary of the parking space as a polygon w.r.t. the location of the parking space.
|
||||
*
|
||||
* @field orientation: the optional orientation of the parking space.
|
||||
* This is component, if present, overrides the common orientation defined in the @ref ParkingArea.
|
||||
*
|
||||
* @field occupancyRule: the occupancy rule applicable to the parking space.
|
||||
*
|
||||
* @field chargingStationId: the optional identitfier of a charging station that serves the parking space.
|
||||
*
|
||||
* @field accessViaLane: the optional identifier of a lane that provides access to the parking space.
|
||||
*
|
||||
* @field accessViaParkingSpaces: the optional identifier(s) of a parking spaces that provide access to the parking space.
|
||||
*
|
||||
* @field reservationType: the optional parking reservation type(s) associated to the parking space.
|
||||
* This is component, if present, overrides the common reservationType defined in the @ref ParkingArea.
|
||||
*
|
||||
*/
|
||||
ParkingSpaceDetailed ::= SEQUENCE{
|
||||
COMPONENTS OF ParkingSpaceBasic,
|
||||
arrangementType ParkingAreaArrangementType OPTIONAL,
|
||||
boundary DeltaPositions OPTIONAL,
|
||||
orientation Wgs84Angle OPTIONAL,
|
||||
occupancyRule ParkingOccupancyInfo,
|
||||
chargingStationId Identifier2B OPTIONAL,
|
||||
accessViaLane Identifier2B OPTIONAL,
|
||||
accessViaParkingSpaces SEQUENCE (SIZE(0..7)) OF Identifier2B OPTIONAL,
|
||||
reservationType SEQUENCE (SIZE(1..4,...)) OF ParkingReservationType OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of @ref ParkingSpaceBasic.
|
||||
*
|
||||
*/
|
||||
ParkingSpacesBasic ::= SEQUENCE OF ParkingSpaceBasic
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of @ref ParkingSpaceDetailed.
|
||||
*
|
||||
*/
|
||||
ParkingSpacesDetailed ::= SEQUENCE OF ParkingSpaceDetailed
|
||||
|
||||
/**
|
||||
* This DF indicates the status of parking space.
|
||||
*
|
||||
* The following options are available:
|
||||
*
|
||||
* @field unknown: indicates that the status is unknown.
|
||||
*
|
||||
* @field free: indicates that the parking space is free and hence available to be used.
|
||||
*
|
||||
* @field freeUntil: indicates that the parking space is free to be used until an indicated moment in time.
|
||||
*
|
||||
* @field fullyOccupied: indicates that the parking space is interely occupied.
|
||||
*
|
||||
* @field partiallyOccupied: indicates that the parking space that allows parking of multiple vehicles is occupied by an indicated percentage.
|
||||
*
|
||||
* @field occupiedUntil: indicates that the parking space is entirely occupied until an indicated moment in time.
|
||||
*
|
||||
* @field reservedUntil: indicates that the parking space is reserved (but not necessarily occupied) until an indicated moment in time.
|
||||
*
|
||||
* @field accessBlocked: indicates that the parking space cannot accessed, e.g. due to obstructing vehicles.
|
||||
*
|
||||
* @field retrictedUsage: indicates that the parking space is available but that it is not an official parking space and that there are some phyiscal restrictions applicable,
|
||||
* such as parking behind or in front of other vehicles that, depending on the situation, may then have problems entering or leaving their respective parking spaces.
|
||||
*
|
||||
*/
|
||||
ParkingSpaceStatus::= CHOICE {
|
||||
unknown NULL,
|
||||
free NULL,
|
||||
freeUntil TimestampIts,
|
||||
fullyOccupied NULL,
|
||||
partiallyOccupied INTEGER(0..100),
|
||||
occupiedUntil TimestampIts,
|
||||
reservedUntil TimestampIts,
|
||||
accessBlocked NULL,
|
||||
retrictedUsage NULL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF provides information about the status of a defined type of parking.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field vehicleTypes: the optional types of vehicle for which the parking status is provided.
|
||||
*
|
||||
* @field reservationTypes: the optional reservation types for which the parking status is provided.
|
||||
*
|
||||
* @field loadTypes: the optional load types for which the parking status is provided.
|
||||
*
|
||||
* @field parkingFeeTypes: the optional fee types for which the parking status is provided.
|
||||
*
|
||||
* @field occupancyTypes: the optional occupancy types for which the parking status is provided.
|
||||
*
|
||||
* @field currentOccupancy: the occupancy for the logical AND combination of the components defined above.
|
||||
*
|
||||
*/
|
||||
ParkingStatus ::= SEQUENCE {
|
||||
vehicleTypes SEQUENCE (SIZE(1..4,...)) OF EuVehicleCategoryCode OPTIONAL,
|
||||
reservationTypes SEQUENCE (SIZE(1..4,...)) OF ParkingReservationType OPTIONAL,
|
||||
loadTypes SEQUENCE (SIZE(1..4,...)) OF LoadType OPTIONAL,
|
||||
parkingFeeTypes SEQUENCE (SIZE(1..4,...)) OF ParkingFeeType OPTIONAL,
|
||||
occupancyTypes SEQUENCE (SIZE(1..4,...)) OF ParkingOccupancyInfo OPTIONAL,
|
||||
currentOccupancy OccupancyInformation,
|
||||
...
|
||||
}
|
||||
((WITH COMPONENTS {..., vehicleTypes PRESENT}) |
|
||||
(WITH COMPONENTS {..., reservationTypes PRESENT}) |
|
||||
(WITH COMPONENTS {..., loadTypes PRESENT}) |
|
||||
(WITH COMPONENTS {..., parkingFeeTypes PRESENT}) |
|
||||
(WITH COMPONENTS {..., occupancyTypes PRESENT}))
|
||||
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of @ref ParkingStatus.
|
||||
*
|
||||
*/
|
||||
ParkingStatusList::= SEQUENCE (SIZE(1..16,...)) OF ParkingStatus
|
||||
|
||||
/**
|
||||
* This DF indicates a period occuring on defined days of the week.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field days: the applicable day(s) of the week.
|
||||
*
|
||||
* @field opening: the opening time in local time.
|
||||
*
|
||||
* @field closing: the closing time in local time.
|
||||
*
|
||||
*/
|
||||
Period ::= SEQUENCE {
|
||||
days DayOfWeek,
|
||||
opening TimeOfDay,
|
||||
closing TimeOfDay
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of up to 8 @ref Period.
|
||||
*
|
||||
*/
|
||||
Periods ::= SEQUENCE (SIZE(1..8,...)) OF Period
|
||||
|
||||
/**
|
||||
* This DF indicates the time of the day.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field hours: the number of hours after midnight.
|
||||
*
|
||||
* @field mins: the number of minutes after the hour.
|
||||
*
|
||||
*/
|
||||
TimeOfDay::= SEQUENCE {
|
||||
hours INTEGER (0..23),
|
||||
mins INTEGER (0..59)
|
||||
}
|
||||
|
||||
-- DEs for parking availability:
|
||||
|
||||
/**
|
||||
* This DE indicates the applicable day(s) of the week.
|
||||
*
|
||||
*/
|
||||
DayOfWeek::= BIT STRING {unused(0), monday(1), tuesday(2), wednesday(3), thursday(4), friday(5), saturday(6), sunday(7)} (SIZE (8))
|
||||
|
||||
/**
|
||||
* This DE indicates the type of goods of a vehicle.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate: Transport of ammunition.
|
||||
* - `1` to indicate: Transport of chemicals of unspecified type.
|
||||
* - `2` to indicate: Empty load.
|
||||
* - `3` to indicate: Transport of fuel of unspecified type.
|
||||
* - `4` to indicate: Transport of glass.
|
||||
* - `5` to indicate: Transport of materials classified as of dangerous or hazardous nature.
|
||||
* - `6` to indicate: Transport of liquids of an unspecified nature.
|
||||
* - `7` to indicate: Transport of livestock.
|
||||
* - `8` to indicate: Transport of materials classed as being of a danger to people or animals.
|
||||
* - `9` to indicate: Transport of materials classed as being potentially dangerous to the environment.
|
||||
* - `10` to indicate: Transport of materials classed as being dangerous when exposed to water.
|
||||
* - `11` to indicate: Transport of fresh products or produce that will significantly degrade in quality or freshness over a short period of time.
|
||||
* - `12` to indicate: Transport of pharmaceutical materials.
|
||||
* - `13` to indicate: Transport of vehicles of any type.
|
||||
* - `14` to indicate: Refrigerated transport.
|
||||
*
|
||||
*/
|
||||
GoodsType::= INTEGER {
|
||||
ammunition (0),
|
||||
chemicals (1),
|
||||
empty (2),
|
||||
fuel (3),
|
||||
glass (4),
|
||||
dangerous (5),
|
||||
liquid (6),
|
||||
liveStock (7),
|
||||
dangerousForPeople (8),
|
||||
dangerousForTheEnvironment (9),
|
||||
dangerousForWater (10),
|
||||
perishableProducts (11),
|
||||
pharmaceutical (12),
|
||||
vehicles (13),
|
||||
refrigerated (14)
|
||||
-- other values reserved for future use
|
||||
} (0..15,...)
|
||||
|
||||
|
||||
/**
|
||||
* This DE represents a number of parking spaces.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `n` (`n > 0` and `n < 16383`) : for the number of spaces.
|
||||
* - `16383` : in case the number of spaces is not available.
|
||||
*
|
||||
*/
|
||||
NumberOfSpaces ::= INTEGER {
|
||||
unavailable (16383)
|
||||
} (1..16383)
|
||||
|
||||
/**
|
||||
* This DE represents an occupancy rate in percentage.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `n` (`n > 0` and `n < 101`) : for the occupany rate in %,
|
||||
* - `101` : in case the occupany rate is not available.
|
||||
*
|
||||
*/
|
||||
OccupancyRate ::= INTEGER {
|
||||
unavailable (101)
|
||||
} (1..101)
|
||||
|
||||
/**
|
||||
* This DE indicates the trend of occupancy.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that occupancy is decreasing,
|
||||
* - `1` to indicate that occupancy is decreasing quickly,
|
||||
* - `2` to indicate that occupancy is decreasing slowly,
|
||||
* - `3` to indicate that occupancy is increasing,
|
||||
* - `4` to indicate that occupancy is increasing quickly,
|
||||
* - `5` to indicate that occupancy is increasing slowly,
|
||||
* - `6` to indicate that occupancy is stable,
|
||||
* - `7` to indicate that occupancy is variable with no clear trend,
|
||||
* - `15` to indicate that occupancy is unknown,
|
||||
* - 8-14 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
OccupancyTrend ::= INTEGER {
|
||||
decreasing (0),
|
||||
decreasingQuickly (1),
|
||||
decreasingSlowly (2),
|
||||
increasing (3),
|
||||
increasingQuickly (4),
|
||||
increasingSlowly (5),
|
||||
stable (6),
|
||||
variable (7),
|
||||
unknown (15)
|
||||
} (0..15)
|
||||
|
||||
/**
|
||||
* This DE indicates the opening status.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that the opening status is: closed,
|
||||
* - `1` to indicate that the opening status is: open,
|
||||
* - `2` to indicate that the opening status is: open for subscribers only,
|
||||
* - `3` to indicate that the opening status is: open but currently full, i.e. no parking spaces available,
|
||||
* - `15` to indicate that occupancy is unknown,
|
||||
* - 4-14 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
OpeningStatus ::= INTEGER {
|
||||
closed (0),
|
||||
open (1),
|
||||
subscribersOnly (2),
|
||||
full (3),
|
||||
unknown (15)
|
||||
} (0..15)
|
||||
|
||||
/**
|
||||
* This DE indicates the arrangement of parking space in a parking area.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that the parking spaces are arranged in a line and parallel to a road or curb,
|
||||
* - `1` to indicate that the parking spaces are arranged side-by-side and diagonally to a curb,
|
||||
* - `2` to indicate that the parking spaces are arranged side-by-side and perpendicularly to a curb,
|
||||
* - `3` to indicate that the parking spaces are arranged so that vehicles form a queue,
|
||||
* - `4` to indicate that the parking spaces are arranged in a mixed fashion,
|
||||
* - 5-7 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
ParkingAreaArrangementType ::= INTEGER {
|
||||
parallelParkingSpace(0),
|
||||
diagonalParkingSpace(1),
|
||||
perpendicularParkingSpace(2),
|
||||
queueParking (3),
|
||||
mixed(4),
|
||||
unknown(7)
|
||||
} (0..7)
|
||||
|
||||
/**
|
||||
* This DE indicates the type of a reservation of a parking space/area.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that it is reserved to disabled persons,
|
||||
* - `1` to indicate that it is reserved to pregnant women,
|
||||
* - `2` to indicate that it is reserved to women,
|
||||
* - `3` to indicate that it is reserved to parents with small children,
|
||||
* - `4` to indicate that it is reserved for loading and unloading of goods,
|
||||
* - `5` to indicate that it is reserved for manual charging of electric vehicles,
|
||||
* - `6` to indicate that it is reserved for automated charging of electric vehicles,
|
||||
* - `7` to indicate that it is reserved for vehicles carrying out refrigerated transport of goods,
|
||||
* - `8` to indicate that it is reserved for VIPs,
|
||||
* - `9` to indicate that it is reserved for pre-booked reservations only,
|
||||
* - `10` to indicate that it is not reserved and can still be reserved,
|
||||
* - `11` to indicate that it cannot be reserved,
|
||||
* - `12` to indicate that it reserved for drop-off and pick-up of vehicles for automated valet parking,
|
||||
* - `13` to indicate that it is reserved for vehicles with a permit,
|
||||
* - 14-31 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
ParkingReservationType ::= INTEGER {
|
||||
disabled(0),
|
||||
pregnant(1),
|
||||
womenOnly(2),
|
||||
parentAndChild(3),
|
||||
loadAndOffloadGoods(4),
|
||||
manualElectricVehicleCharging (5),
|
||||
automatedElectricVehicleCharging (6),
|
||||
refriferatedTransport(7),
|
||||
vip(8),
|
||||
preBooking (9),
|
||||
freeToBeReserved (10),
|
||||
reservationNotPossible (11),
|
||||
automatedValetparking (12),
|
||||
permit (13)
|
||||
}(0..31)
|
||||
|
||||
|
||||
/**
|
||||
* This DE indicates the applicable type of parking fee.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that the applicable fee is time dependent, e.g. an hourly fee,
|
||||
* - `1` to indicate that ithe applicable fee is flat for a certain period, e.g. a flat fee for daily parking,
|
||||
* - `2` to indicate that the applicable fee is included in the subscription, e.g. a monthly subscription,
|
||||
* - 3-7 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
ParkingFeeType::= INTEGER {
|
||||
timeDependentFee(0),
|
||||
flatFee(1),
|
||||
subscription(2)
|
||||
}(0..7)
|
||||
|
||||
EngineCharacteristicsFromIso ::= INTEGER {
|
||||
noEntry (0),
|
||||
noEngine (1),
|
||||
petrolUnleaded (2),
|
||||
petrolLeaded (3),
|
||||
diesel (4),
|
||||
lpg (5),
|
||||
battery (6),
|
||||
solar (7),
|
||||
hybrid (8),
|
||||
hydrogen (9),
|
||||
multiFuel (10),
|
||||
bivalentPetrolLpg (11),
|
||||
bivalentPetrolCng (12),
|
||||
combinedPetrolElectric (13),
|
||||
cng (14),
|
||||
lng (15),
|
||||
combinedDieselElectric (16),
|
||||
combinedHydrogenElectric (17),
|
||||
bivalentHydrogenPetrol (18),
|
||||
bivalentHydrogenPetrolElectricEngine (19),
|
||||
fuelCellHydrogen (20),
|
||||
fuelCellPetrol (21),
|
||||
fuelCellMethanol (22),
|
||||
fuelCellEthanol (23),
|
||||
fuelCellDiesel (24),
|
||||
combinedMultiFuelElectricEngine (25),
|
||||
combinedCngElectricEngine (26),
|
||||
combinedLngElectricEngine (27),
|
||||
petrolEthanol (28),
|
||||
combinedLpgElectricEngine (29),
|
||||
hybridPetrolExternalBattery (30),
|
||||
hybridDieselExternalBattery (31),
|
||||
hybridLpgExternalBattery (32),
|
||||
hybridHydrogenExternalBattery (33),
|
||||
hybridMultiFuelExternalBattery (34),
|
||||
hybridCngExternalBattery (35),
|
||||
hybridLngExternalBattery (36),
|
||||
hybridBivalentHydrogenPetrolExternalBattery (37),
|
||||
hydrogenCng (38),
|
||||
hydrogenLng (39),
|
||||
hybridHydrogenCngExternalBattery (40),
|
||||
hybridHydrogenLngExternalBattery (41),
|
||||
ethanol (42),
|
||||
hybridFuelCellHydrogen (43),
|
||||
hybridFuelCellHydrogenExternalBattery (44),
|
||||
dualFuelLngDiesel (45),
|
||||
electricExternal (46),
|
||||
biogas (47),
|
||||
bioDiesel (48),
|
||||
bioPetrol (49),
|
||||
bivalentPetrolBiogas (50),
|
||||
combinedBiogasElectricEngine (51),
|
||||
dualFuelCngDiesel (52),
|
||||
-- (53-254) are reserved for future CEN and ISO use
|
||||
other (255)
|
||||
} (0..255)
|
||||
|
||||
END
|
||||
Vendored
+688
@@ -0,0 +1,688 @@
|
||||
POIM-ParkingAvailability {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) poi(103916) parkingAvailability(1) major-version-1 (1) minor-version-1 (1)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
|
||||
AltitudeValue, ConfidenceLevel, DangerousGoodsBasic, DeltaLatitude, DeltaLongitude, DeltaReferencePosition, EuVehicleCategoryCode, Identifier2B, Latitude, Longitude,
|
||||
SpecialTransportType, TimestampIts, VehicleHeight, Wgs84Angle
|
||||
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-1 (1)} WITH SUCCESSORS
|
||||
|
||||
PoiBlockManagementContainer, RelatedPoiInfoBlockContainer
|
||||
FROM POIM-CommonContainers {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) poi(103916) common(99) major-version-1 (1) minor-version-1 (1)} WITH SUCCESSORS
|
||||
|
||||
EngineCharacteristics
|
||||
FROM EfcDataDictionary {iso(1) standard(0) 17573 dd(3) version1(1) minorVersion3(3)} WITH SUCCESSORS
|
||||
-- available at https://standards.iso.org/iso/17573/-3/
|
||||
;
|
||||
|
||||
-- Parking Availability Block for usage within the Point of Interest Message (POIM):
|
||||
|
||||
/**
|
||||
* This type represents the POI Information Block concerning a parking availability at a given facility.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field managementContainer: the management container of the parking availability POI Information Block.
|
||||
*
|
||||
* @field placeInfo: general information about the parking facility.
|
||||
*
|
||||
* @field aggregatedStatus: aggregated status information about the parking facility.
|
||||
*
|
||||
* @field detailedStatus: detailed topology and status information about the parking areas and spaces.
|
||||
*
|
||||
* @field relatedPoi: reference to other relevant POI Information Blocks.
|
||||
*
|
||||
*/
|
||||
ParkingAvailabilityBlock::= SEQUENCE{
|
||||
managementContainer PoiBlockManagementContainer,
|
||||
placeInfo GeneralParkingPlaceContainer,
|
||||
aggregatedStatus ParkingStatusContainer,
|
||||
detailedStatus ParkingSupplyCapabilitiesContainer OPTIONAL,
|
||||
relatedPoi RelatedPoiInfoBlockContainer OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
-- POIM-PA Containers:
|
||||
|
||||
/**
|
||||
* This type represents the General Parking Facility Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field position: the position of the parking facility.
|
||||
*
|
||||
* @field name: the name of the parking facility.
|
||||
*
|
||||
* @field openingPeriods: the optional opening periods of the parking facility.
|
||||
*
|
||||
* @field address: the address of the parking facility.
|
||||
*
|
||||
* @field phoneNumber: the phone number of the operator of the parking facility.
|
||||
*
|
||||
* @field website: the URL of the website of the operator of the parking facility.
|
||||
*
|
||||
*/
|
||||
GeneralParkingPlaceContainer::= SEQUENCE{
|
||||
position GeoPosition,
|
||||
name UTF8String (SIZE (1..31)),
|
||||
openingPeriods Periods OPTIONAL,
|
||||
address UTF8String (SIZE (1..255)) OPTIONAL,
|
||||
phoneNumber UTF8String (SIZE (1..31)) OPTIONAL,
|
||||
website UTF8String (SIZE (1..31)) OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the Parking Status Container.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field currentFacilityStatus: the current status of the facility.
|
||||
*
|
||||
* @field currentOccupancy: the optional current occupancy of the entire facility.
|
||||
* This component is only representative if the entire facility has areas and spaces of the same type. e.g. personal car parking spaces only.
|
||||
*
|
||||
* @field detailedStatus: the optional detailed parking availability status of the facility.
|
||||
*
|
||||
*/
|
||||
ParkingStatusContainer::= SEQUENCE {
|
||||
currentFacilityStatus OpeningStatus,
|
||||
currentOccupancy OccupancyInformation OPTIONAL,
|
||||
detailedStatus ParkingStatusList OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This type represents the ParkingSupplyCapabilitiesContainer and is a list of @ref ParkingAreas.
|
||||
*
|
||||
*/
|
||||
ParkingSupplyCapabilitiesContainer::= SEQUENCE OF ParkingAreas
|
||||
|
||||
-- DFs for parking availability:
|
||||
|
||||
/**
|
||||
* This DF indicates a geographical position with reference to a reference position.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field deltaLatitude: the delta latitude of the geographical position.
|
||||
*
|
||||
* @field deltaLongitude: the delta longitude of the geographical position.
|
||||
*
|
||||
*/
|
||||
DeltaPosition::=SEQUENCE{
|
||||
deltaLatitude DeltaLatitude,
|
||||
deltaLongitude DeltaLongitude
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF shall contain an an ordered sequence of @ref DeltaPosition with respect to the previous position
|
||||
* with the first instance referring to a reference position and with the order implicitly defining a direction.
|
||||
*
|
||||
*/
|
||||
DeltaPositions::= SEQUENCE (SIZE (1..32, ...)) OF DeltaPosition
|
||||
|
||||
/**
|
||||
* This DF indicates a geographical position.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field latitude: the latitude of the geographical position.
|
||||
*
|
||||
* @field longitude: the longitude of the geographical position.
|
||||
*
|
||||
* @field altitude: the altitude of the geographical position.
|
||||
*
|
||||
*/
|
||||
GeoPosition::= SEQUENCE{
|
||||
latitude Latitude,
|
||||
longitude Longitude,
|
||||
altitude AltitudeValue DEFAULT unavailable
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF indicates a the load type of the vehicle.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field goodsType: optional information about the goods being transported.
|
||||
*
|
||||
* @field dangerousGoodsType: the optional type of dangerous goods according to the European Agreement concerning the International Carriage of Dangerous Goods by Road (ADR).
|
||||
*
|
||||
* @field specialTransportType: the type of special transport according to local regulations.
|
||||
*
|
||||
*/
|
||||
LoadType::= SEQUENCE{
|
||||
goodsType GoodsType OPTIONAL,
|
||||
dangerousGoodsType DangerousGoodsBasic OPTIONAL,
|
||||
specialTransportType SpecialTransportType,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF represents occupancy information.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field rate: the current occupancy in percentage, nominally = ((totalSpaces-freeSpaces)/totalSpaces) * 100.
|
||||
*
|
||||
* @field trend: the current trend of the occupancy.
|
||||
*
|
||||
* @field freeSpaces: the number of spaces that are actually available.
|
||||
*
|
||||
* @field totalSpaces: the total number of spaces.
|
||||
*
|
||||
* @field confidence: the confidence level of the above information.
|
||||
*
|
||||
*/
|
||||
OccupancyInformation::= SEQUENCE{
|
||||
rate OccupancyRate,
|
||||
trend OccupancyTrend,
|
||||
freeSpaces NumberOfSpaces,
|
||||
totalSpaces NumberOfSpaces,
|
||||
confidence ConfidenceLevel,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF provides information about the parking capabilities and availabilities of a parking identified area.
|
||||
*
|
||||
* @note:a parking area possibly groups all spaces with the same characteristics.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field id: the identifier of the parking area within the parking place/facility.
|
||||
*
|
||||
* @field currentOccupancy: the current occupancy information of the parking area.
|
||||
*
|
||||
* @field location: the location of the parking area.
|
||||
*
|
||||
* @field level: the level under/over ground floor of the parking area.
|
||||
*
|
||||
* @field arrangementType: the common arrangement of the parking spaces within the area.
|
||||
* the value ´mixed´ shall be used if there is no common arrangement. In this case the arrangement of the single spaces may be defined in the component spacesDetailed.
|
||||
*
|
||||
* @field boundary: the optional physical boundary of the parking area as a polygon using the component location as reference position.
|
||||
*
|
||||
* @field orientation: the optional common orientation of the parking spaces within the area.
|
||||
* This is component shall be absent if there is no common orientation. In this case the orientation of the single spaces may be defined in the component spacesDetailed.
|
||||
*
|
||||
* @field accessViaLane: the optional identifier of a lane that provides access to the parking area.
|
||||
*
|
||||
* @field allowedVehicleCategories: the categories of vehicles that are allowed in the parking area.
|
||||
*
|
||||
* @field notAllowedEngineCharacteristics: the optional characteristic(s) of engines that are not allowed in the parking area.
|
||||
*
|
||||
* @field allowedLoadTypes: the optional load type(s) that are allowed in the parking area.
|
||||
*
|
||||
* @field notallowedLoadTypes: the optional load type(s) that are not allowed in the parking area.
|
||||
*
|
||||
* @field heightRestriction: the optional applicable vehicle height restriction.
|
||||
*
|
||||
* @field reservationType: the optional parking reservation type(s) associated to the parking area.
|
||||
* This is component shall be absent if there is no common reservation type. In this case the reservation type of the single spaces may be defined in the component spacesDetailed.
|
||||
*
|
||||
* @field pricingInformation: the optional pricing information applicable to the parking area.
|
||||
*
|
||||
* @field paymentInformation: the optional payment information applicable to the parking area.
|
||||
*
|
||||
* @field bookingContactInfo: the optional booking contact information applicable to the parking area.
|
||||
*
|
||||
* @field accessCharachteristics: the optional access information to the area.
|
||||
*
|
||||
* @field freeSpacesPosition: the optional list of positions of free spaces.
|
||||
*
|
||||
* @field freeSpacesId: the optional list of Ids of free spaces.
|
||||
*
|
||||
* @field spacesBasic: the optional basic information about none, some or all parking spaces within the area.
|
||||
*
|
||||
* @field spacesDetailed: the optional detailed information about none, some or all parking spaces within the area.
|
||||
*
|
||||
*/
|
||||
ParkingArea::=SEQUENCE{
|
||||
id Identifier2B,
|
||||
currentOccupancy OccupancyInformation,
|
||||
location GeoPosition,
|
||||
level INTEGER(-8..16,...) DEFAULT 0,
|
||||
arrangementType ParkingAreaArrangementType,
|
||||
boundary DeltaPositions OPTIONAL,
|
||||
orientation Wgs84Angle OPTIONAL,
|
||||
accessViaLane Identifier2B OPTIONAL,
|
||||
allowedVehicleCategories SEQUENCE (SIZE(1..4,...)) OF EuVehicleCategoryCode,
|
||||
notAllowedEngineCharacteristics SEQUENCE (SIZE(1..4,...)) OF EngineCharacteristics OPTIONAL,
|
||||
allowedLoadTypes SEQUENCE (SIZE(1..4,...)) OF LoadType OPTIONAL,
|
||||
notAllowedLoadTypes SEQUENCE (SIZE(1..4,...)) OF LoadType OPTIONAL,
|
||||
heightRestriction VehicleHeight OPTIONAL,
|
||||
reservationType SEQUENCE (SIZE(1..4,...)) OF ParkingReservationType OPTIONAL,
|
||||
pricingInformation UTF8String OPTIONAL,
|
||||
paymentInformation UTF8String OPTIONAL,
|
||||
bookingContactInfo UTF8String OPTIONAL,
|
||||
accessCharachteristics UTF8String OPTIONAL,
|
||||
freeSpacesPosition SEQUENCE OF DeltaPosition OPTIONAL,
|
||||
freeSpacesId SEQUENCE OF Identifier2B OPTIONAL,
|
||||
spacesBasic ParkingSpacesBasic OPTIONAL,
|
||||
spacesDetailed ParkingSpacesDetailed OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of @ref ParkingArea.
|
||||
*
|
||||
*/
|
||||
ParkingAreas::= SEQUENCE OF ParkingArea
|
||||
|
||||
/**
|
||||
* This DF indicates the allowed type of occupancy of a parking space/area in terms of time and/or usage.
|
||||
*
|
||||
* The following options are available:
|
||||
*
|
||||
* @field unknown: indicates that the allowed type of occupancy is unknown.
|
||||
*
|
||||
* @field unlimitedOccupancy: indicates that it can be occupied without limits.
|
||||
*
|
||||
* @field onlyWhileCharging: indicates that it can be occupied only while charging an electric vehicle.
|
||||
*
|
||||
* @field limitedDuration: indicates that it can be occupied for a limited and indicated duration in minutes.
|
||||
*
|
||||
* @field onlyWhileChargingLimitedDuration: indicates that it can be occupied only while charging an electric vehicle and only for a limited and indicated duration in minutes.
|
||||
*
|
||||
* @field parkingAllowedUntil: indicates that it can be occupied only until an indicated moment in time.
|
||||
*
|
||||
* @field forcedParkingUntil: indicates that it can be occupied and departure is possible only after an indicated moment in time.
|
||||
*
|
||||
*/
|
||||
ParkingOccupancyInfo::= CHOICE {
|
||||
unknown NULL,
|
||||
unlimitedOccupancy NULL,
|
||||
onlyWhileCharging NULL,
|
||||
limitedDuration INTEGER,
|
||||
onlyWhileChargingLimitedDuration INTEGER,
|
||||
parkingAllowedUntil TimestampIts,
|
||||
forcedParkingUntil TimestampIts,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF provides basic information about the parking capabilities and availabilities of a single parking space.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field id: the unqiue identifier of the parking space within the parking area.
|
||||
*
|
||||
* @field location: the optional location of the geometrical center of the parking space w.r.t. the location of the parking area.
|
||||
*
|
||||
* @field status: the actual status of the parking space.
|
||||
*
|
||||
*/
|
||||
ParkingSpaceBasic ::= SEQUENCE{
|
||||
id Identifier2B,
|
||||
location DeltaReferencePosition OPTIONAL,
|
||||
status ParkingSpaceStatus
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF provides detailed information about the parking capabilities and availabilities of a single parking space.
|
||||
*
|
||||
* It is an extension of @ref ParkingSpaceBasic and it shall additionally include the following additional components:
|
||||
*
|
||||
* @field arrangementType: the optional arrangement of the parking space w.r.t. other spaces.
|
||||
* This is component, if present, overrides the common arrangementType defined in the @ref ParkingArea.
|
||||
*
|
||||
* @field boundary: the optional physical boundary of the parking space as a polygon w.r.t. the location of the parking space.
|
||||
*
|
||||
* @field orientation: the optional orientation of the parking space.
|
||||
* This is component, if present, overrides the common orientation defined in the @ref ParkingArea.
|
||||
*
|
||||
* @field occupancyRule: the occupancy rule applicable to the parking space.
|
||||
*
|
||||
* @field chargingStationId: the optional identitfier of a charging station that serves the parking space.
|
||||
*
|
||||
* @field accessViaLane: the optional identifier of a lane that provides access to the parking space.
|
||||
*
|
||||
* @field accessViaParkingSpaces: the optional identifier(s) of a parking spaces that provide access to the parking space.
|
||||
*
|
||||
* @field reservationType: the optional parking reservation type(s) associated to the parking space.
|
||||
* This is component, if present, overrides the common reservationType defined in the @ref ParkingArea.
|
||||
*
|
||||
*/
|
||||
ParkingSpaceDetailed ::= SEQUENCE{
|
||||
COMPONENTS OF ParkingSpaceBasic,
|
||||
arrangementType ParkingAreaArrangementType OPTIONAL,
|
||||
boundary DeltaPositions OPTIONAL,
|
||||
orientation Wgs84Angle OPTIONAL,
|
||||
occupancyRule ParkingOccupancyInfo,
|
||||
chargingStationId Identifier2B OPTIONAL,
|
||||
accessViaLane Identifier2B OPTIONAL,
|
||||
accessViaParkingSpaces SEQUENCE (SIZE(0..7)) OF Identifier2B OPTIONAL,
|
||||
reservationType SEQUENCE (SIZE(1..4,...)) OF ParkingReservationType OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of @ref ParkingSpaceBasic.
|
||||
*
|
||||
*/
|
||||
ParkingSpacesBasic ::= SEQUENCE OF ParkingSpaceBasic
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of @ref ParkingSpaceDetailed.
|
||||
*
|
||||
*/
|
||||
ParkingSpacesDetailed ::= SEQUENCE OF ParkingSpaceDetailed
|
||||
|
||||
/**
|
||||
* This DF indicates the status of parking space.
|
||||
*
|
||||
* The following options are available:
|
||||
*
|
||||
* @field unknown: indicates that the status is unknown.
|
||||
*
|
||||
* @field free: indicates that the parking space is free and hence available to be used.
|
||||
*
|
||||
* @field freeUntil: indicates that the parking space is free to be used until an indicated moment in time.
|
||||
*
|
||||
* @field fullyOccupied: indicates that the parking space is interely occupied.
|
||||
*
|
||||
* @field partiallyOccupied: indicates that the parking space that allows parking of multiple vehicles is occupied by an indicated percentage.
|
||||
*
|
||||
* @field occupiedUntil: indicates that the parking space is entirely occupied until an indicated moment in time.
|
||||
*
|
||||
* @field reservedUntil: indicates that the parking space is reserved (but not necessarily occupied) until an indicated moment in time.
|
||||
*
|
||||
* @field accessBlocked: indicates that the parking space cannot accessed, e.g. due to obstructing vehicles.
|
||||
*
|
||||
* @field retrictedUsage: indicates that the parking space is available but that it is not an official parking space and that there are some phyiscal restrictions applicable,
|
||||
* such as parking behind or in front of other vehicles that, depending on the situation, may then have problems entering or leaving their respective parking spaces.
|
||||
*
|
||||
*/
|
||||
ParkingSpaceStatus::= CHOICE {
|
||||
unknown NULL,
|
||||
free NULL,
|
||||
freeUntil TimestampIts,
|
||||
fullyOccupied NULL,
|
||||
partiallyOccupied INTEGER(0..100),
|
||||
occupiedUntil TimestampIts,
|
||||
reservedUntil TimestampIts,
|
||||
accessBlocked NULL,
|
||||
retrictedUsage NULL,
|
||||
...
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF provides information about the status of a defined type of parking.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field vehicleTypes: the optional types of vehicle for which the parking status is provided.
|
||||
*
|
||||
* @field reservationTypes: the optional reservation types for which the parking status is provided.
|
||||
*
|
||||
* @field loadTypes: the optional load types for which the parking status is provided.
|
||||
*
|
||||
* @field parkingFeeTypes: the optional fee types for which the parking status is provided.
|
||||
*
|
||||
* @field occupancyTypes: the optional occupancy types for which the parking status is provided.
|
||||
*
|
||||
* @field currentOccupancy: the occupancy for the logical AND combination of the components defined above.
|
||||
*
|
||||
*/
|
||||
ParkingStatus ::= SEQUENCE {
|
||||
vehicleTypes SEQUENCE (SIZE(1..4,...)) OF EuVehicleCategoryCode OPTIONAL,
|
||||
reservationTypes SEQUENCE (SIZE(1..4,...)) OF ParkingReservationType OPTIONAL,
|
||||
loadTypes SEQUENCE (SIZE(1..4,...)) OF LoadType OPTIONAL,
|
||||
parkingFeeTypes SEQUENCE (SIZE(1..4,...)) OF ParkingFeeType OPTIONAL,
|
||||
occupancyTypes SEQUENCE (SIZE(1..4,...)) OF ParkingOccupancyInfo OPTIONAL,
|
||||
currentOccupancy OccupancyInformation,
|
||||
...
|
||||
}
|
||||
((WITH COMPONENTS {..., vehicleTypes PRESENT}) |
|
||||
(WITH COMPONENTS {..., reservationTypes PRESENT}) |
|
||||
(WITH COMPONENTS {..., loadTypes PRESENT}) |
|
||||
(WITH COMPONENTS {..., parkingFeeTypes PRESENT}) |
|
||||
(WITH COMPONENTS {..., occupancyTypes PRESENT}))
|
||||
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of @ref ParkingStatus.
|
||||
*
|
||||
*/
|
||||
ParkingStatusList::= SEQUENCE (SIZE(1..16,...)) OF ParkingStatus
|
||||
|
||||
/**
|
||||
* This DF indicates a period occuring on defined days of the week.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field days: the applicable day(s) of the week.
|
||||
*
|
||||
* @field opening: the opening time in local time.
|
||||
*
|
||||
* @field closing: the closing time in local time.
|
||||
*
|
||||
*/
|
||||
Period ::= SEQUENCE {
|
||||
days DayOfWeek,
|
||||
opening TimeOfDay,
|
||||
closing TimeOfDay
|
||||
}
|
||||
|
||||
/**
|
||||
* This DF shall contain a list of up to 8 @ref Period.
|
||||
*
|
||||
*/
|
||||
Periods ::= SEQUENCE (SIZE(1..8,...)) OF Period
|
||||
|
||||
/**
|
||||
* This DF indicates the time of the day.
|
||||
*
|
||||
* It shall include the following components:
|
||||
*
|
||||
* @field hours: the number of hours after midnight.
|
||||
*
|
||||
* @field mins: the number of minutes after the hour.
|
||||
*
|
||||
*/
|
||||
TimeOfDay::= SEQUENCE {
|
||||
hours INTEGER (0..23),
|
||||
mins INTEGER (0..59)
|
||||
}
|
||||
|
||||
-- DEs for parking availability:
|
||||
|
||||
/**
|
||||
* This DE indicates the applicable day(s) of the week.
|
||||
*
|
||||
*/
|
||||
DayOfWeek::= BIT STRING {unused(0), monday(1), tuesday(2), wednesday(3), thursday(4), friday(5), saturday(6), sunday(7)} (SIZE (8))
|
||||
|
||||
/**
|
||||
* This DE indicates the type of goods of a vehicle.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate: Transport of ammunition.
|
||||
* - `1` to indicate: Transport of chemicals of unspecified type.
|
||||
* - `2` to indicate: Empty load.
|
||||
* - `3` to indicate: Transport of fuel of unspecified type.
|
||||
* - `4` to indicate: Transport of glass.
|
||||
* - `5` to indicate: Transport of materials classified as of dangerous or hazardous nature.
|
||||
* - `6` to indicate: Transport of liquids of an unspecified nature.
|
||||
* - `7` to indicate: Transport of livestock.
|
||||
* - `8` to indicate: Transport of materials classed as being of a danger to people or animals.
|
||||
* - `9` to indicate: Transport of materials classed as being potentially dangerous to the environment.
|
||||
* - `10` to indicate: Transport of materials classed as being dangerous when exposed to water.
|
||||
* - `11` to indicate: Transport of fresh products or produce that will significantly degrade in quality or freshness over a short period of time.
|
||||
* - `12` to indicate: Transport of pharmaceutical materials.
|
||||
* - `13` to indicate: Transport of vehicles of any type.
|
||||
* - `14` to indicate: Refrigerated transport.
|
||||
*
|
||||
*/
|
||||
GoodsType::= INTEGER {
|
||||
ammunition (0),
|
||||
chemicals (1),
|
||||
empty (2),
|
||||
fuel (3),
|
||||
glass (4),
|
||||
dangerous (5),
|
||||
liquid (6),
|
||||
liveStock (7),
|
||||
dangerousForPeople (8),
|
||||
dangerousForTheEnvironment (9),
|
||||
dangerousForWater (10),
|
||||
perishableProducts (11),
|
||||
pharmaceutical (12),
|
||||
vehicles (13),
|
||||
refrigerated (14)
|
||||
-- other values reserved for future use
|
||||
} (0..15,...)
|
||||
|
||||
|
||||
/**
|
||||
* This DE represents a number of parking spaces.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `n` (`n > 0` and `n < 16383`) : for the number of spaces.
|
||||
* - `16383` : in case the number of spaces is not available.
|
||||
*
|
||||
*/
|
||||
NumberOfSpaces ::= INTEGER {
|
||||
unavailable (16383)
|
||||
} (1..16383)
|
||||
|
||||
/**
|
||||
* This DE represents an occupancy rate in percentage.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `n` (`n > 0` and `n < 101`) : for the occupany rate in %,
|
||||
* - `101` : in case the occupany rate is not available.
|
||||
*
|
||||
*/
|
||||
OccupancyRate ::= INTEGER {
|
||||
unavailable (101)
|
||||
} (1..101)
|
||||
|
||||
/**
|
||||
* This DE indicates the trend of occupancy.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that occupancy is decreasing,
|
||||
* - `1` to indicate that occupancy is decreasing quickly,
|
||||
* - `2` to indicate that occupancy is decreasing slowly,
|
||||
* - `3` to indicate that occupancy is increasing,
|
||||
* - `4` to indicate that occupancy is increasing quickly,
|
||||
* - `5` to indicate that occupancy is increasing slowly,
|
||||
* - `6` to indicate that occupancy is stable,
|
||||
* - `7` to indicate that occupancy is variable with no clear trend,
|
||||
* - `15` to indicate that occupancy is unknown,
|
||||
* - 8-14 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
OccupancyTrend ::= INTEGER {
|
||||
decreasing (0),
|
||||
decreasingQuickly (1),
|
||||
decreasingSlowly (2),
|
||||
increasing (3),
|
||||
increasingQuickly (4),
|
||||
increasingSlowly (5),
|
||||
stable (6),
|
||||
variable (7),
|
||||
unknown (15)
|
||||
} (0..15)
|
||||
|
||||
/**
|
||||
* This DE indicates the opening status.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that the opening status is: closed,
|
||||
* - `1` to indicate that the opening status is: open,
|
||||
* - `2` to indicate that the opening status is: open for subscribers only,
|
||||
* - `3` to indicate that the opening status is: open but currently full, i.e. no parking spaces available,
|
||||
* - `15` to indicate that occupancy is unknown,
|
||||
* - 4-14 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
OpeningStatus ::= INTEGER {
|
||||
closed (0),
|
||||
open (1),
|
||||
subscribersOnly (2),
|
||||
full (3),
|
||||
unknown (15)
|
||||
} (0..15)
|
||||
|
||||
/**
|
||||
* This DE indicates the arrangement of parking space in a parking area.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that the parking spaces are arranged in a line and parallel to a road or curb,
|
||||
* - `1` to indicate that the parking spaces are arranged side-by-side and diagonally to a curb,
|
||||
* - `2` to indicate that the parking spaces are arranged side-by-side and perpendicularly to a curb,
|
||||
* - `3` to indicate that the parking spaces are arranged so that vehicles form a queue,
|
||||
* - `4` to indicate that the parking spaces are arranged in a mixed fashion,
|
||||
* - 5-7 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
ParkingAreaArrangementType ::= INTEGER {
|
||||
parallelParkingSpace(0),
|
||||
diagonalParkingSpace(1),
|
||||
perpendicularParkingSpace(2),
|
||||
queueParking (3),
|
||||
mixed(4),
|
||||
unknown(7)
|
||||
} (0..7)
|
||||
|
||||
/**
|
||||
* This DE indicates the type of a reservation of a parking space/area.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that it is reserved to disabled persons,
|
||||
* - `1` to indicate that it is reserved to pregnant women,
|
||||
* - `2` to indicate that it is reserved to women,
|
||||
* - `3` to indicate that it is reserved to parents with small children,
|
||||
* - `4` to indicate that it is reserved for loading and unloading of goods,
|
||||
* - `5` to indicate that it is reserved for manual charging of electric vehicles,
|
||||
* - `6` to indicate that it is reserved for automated charging of electric vehicles,
|
||||
* - `7` to indicate that it is reserved for vehicles carrying out refrigerated transport of goods,
|
||||
* - `8` to indicate that it is reserved for VIPs,
|
||||
* - `9` to indicate that it is reserved for pre-booked reservations only,
|
||||
* - `10` to indicate that it is not reserved and can still be reserved,
|
||||
* - `11` to indicate that it cannot be reserved,
|
||||
* - `12` to indicate that it reserved for drop-off and pick-up of vehicles for automated valet parking,
|
||||
* - `13` to indicate that it is reserved for vehicles with a permit,
|
||||
* - 14-31 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
ParkingReservationType ::= INTEGER {
|
||||
disabled(0),
|
||||
pregnant(1),
|
||||
womenOnly(2),
|
||||
parentAndChild(3),
|
||||
loadAndOffloadGoods(4),
|
||||
manualElectricVehicleCharging (5),
|
||||
automatedElectricVehicleCharging (6),
|
||||
refriferatedTransport(7),
|
||||
vip(8),
|
||||
preBooking (9),
|
||||
freeToBeReserved (10),
|
||||
reservationNotPossible (11),
|
||||
automatedValetparking (12),
|
||||
permit (13)
|
||||
}(0..31)
|
||||
|
||||
|
||||
/**
|
||||
* This DE indicates the applicable type of parking fee.
|
||||
*
|
||||
* The value shall be set to:
|
||||
* - `0` to indicate that the applicable fee is time dependent, e.g. an hourly fee,
|
||||
* - `1` to indicate that ithe applicable fee is flat for a certain period, e.g. a flat fee for daily parking,
|
||||
* - `2` to indicate that the applicable fee is included in the subscription, e.g. a monthly subscription,
|
||||
* - 3-7 - reserved for future usage.
|
||||
*
|
||||
*/
|
||||
ParkingFeeType::= INTEGER {
|
||||
timeDependentFee(0),
|
||||
flatFee(1),
|
||||
subscription(2)
|
||||
}(0..7)
|
||||
|
||||
END
|
||||
@@ -0,0 +1,8 @@
|
||||
The TS 103916 v2.1.1 POIM ASN1 files are copied from its [ETSI repository](https://forge.etsi.org/rep/ITS/asn1/poim_ts103916/-/tree/v2.1.1).
|
||||
The submodule TS 103916 v2.1.1 PA (Parking Availability) ASN1 files are copied instead from [ETSI repository](https://forge.etsi.org/rep/ITS/asn1/pa_ts103916/-/tree/release2?ref_type=heads), due to a missing bug fix.
|
||||
|
||||
Finally, the current ASN1 definition is manually patched to:
|
||||
- Import GeoPosition field from CDD 2.2.1, instead of redefining it
|
||||
- Define locally the EngineCharacteristics (renamed EngineCharacteristicsFromIso) field to avoid generation of all fields from ISO17573-3-1.asn
|
||||
|
||||
See [ETSI License](https://forge.etsi.org/rep/ITS/asn1/poim_ts103916/-/blob/v2.1.1/LICENSE) for copyright details.
|
||||
@@ -0,0 +1,52 @@
|
||||
# SystemX Hybrid-PQC ASN.1 Profile
|
||||
|
||||
This directory keeps the experimental certificate additions separate from
|
||||
Vanetza's standard ASN.1 inputs. `hybrid-pqc.patch` contains the complete
|
||||
experimental delta. The unmodified input modules are fetched from pinned
|
||||
official ETSI Forge revisions during regeneration instead of being duplicated
|
||||
in the source tree.
|
||||
|
||||
The IEEE inputs are from the official `v2025` tag of the ETSI Forge mirror:
|
||||
|
||||
* repository: `https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.git`
|
||||
* commit: `77e2c822a11bf8adbe9848ad3fd4f311925aff30`
|
||||
* `Ieee1609Dot2.asn` SHA-256:
|
||||
`82b5e35cbaadae1c6b2f087626b10d52afc73779c9ac6700c6445830d8824e0b`
|
||||
* `Ieee1609Dot2BaseTypes.asn` SHA-256:
|
||||
`bf2b3d66d394449319323f8a59d8084d963c3ad55d6790e1436ab897221690fe`
|
||||
|
||||
The two ETSI TS 103 097 inputs are fetched from the official Release 2
|
||||
repository:
|
||||
|
||||
* repository: `https://forge.etsi.org/rep/ITS/asn1/sec_ts103097.git`
|
||||
* commit: `65e6d8ea88b2bfb3aca3151dbedf07d89b97fd00`
|
||||
|
||||
* `EtsiTs103097Module.asn` SHA-256:
|
||||
`245a3c10c176497f658c6a4d9ec804d3226dda2ac10a4351e382ddb5afe9ff72`
|
||||
* `EtsiTs103097ExtensionModule.asn` SHA-256:
|
||||
`b94c9b373567dd9bfb15d61c8c206d5630f6b0c481ef41ddd574c96784a9eb1a`
|
||||
|
||||
The patch adds only the certificate material used by this implementation:
|
||||
|
||||
* the fixed-size `FnDsa512Key` and `FnDsa512Signature` types;
|
||||
* FN-DSA-512 choices in `PublicVerificationKey` and `Signature`;
|
||||
* `altVerificationKey` and `altSignatureValue` in
|
||||
`ToBeSignedCertificate`.
|
||||
|
||||
## Regeneration
|
||||
|
||||
Normal builds compile the committed generated files and do not need network
|
||||
access, `asn1c`, Docker, or the patch utility. Regeneration is an explicit
|
||||
maintainer action:
|
||||
|
||||
```shell
|
||||
cmake -S . -B build-asn1 \
|
||||
-DVANETZA_WITH_PQC=ON \
|
||||
-DVANETZA_ASN1_WITH_ASN1C=ON \
|
||||
-DVANETZA_ASN1_WITH_ISO=ON
|
||||
cmake --build build-asn1 --target generate_asn1c
|
||||
```
|
||||
|
||||
The generation target fetches and verifies the pristine inputs in its build
|
||||
directory, applies `hybrid-pqc.patch`, invokes `asn1c`, and refreshes the
|
||||
committed output under `vanetza/asn1/systemx-pqc`.
|
||||
@@ -0,0 +1,101 @@
|
||||
--- a/Ieee1609Dot2.asn
|
||||
+++ b/Ieee1609Dot2.asn
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
Ieee1609Dot2 {iso(1) identified-organization(3) ieee(111)
|
||||
standards-association-numbered-series-standards(2) wave-stds(1609)
|
||||
- dot2(2) base(1) schema(1) major-version-2(2) minor-version-7(7)}
|
||||
+ dot2(2) base(1) schema(1) major-version-2(2) minor-version-8(8)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
EXT-TYPE,
|
||||
Extension,
|
||||
ExtId,
|
||||
+ FnDsa512Key,
|
||||
GeographicRegion,
|
||||
GroupLinkageValue,
|
||||
HashAlgorithm,
|
||||
@@ -1048,6 +1049,13 @@
|
||||
* @param certRequestExtensions: indicates additional permissions to request
|
||||
* certificates containing endEntityExtensions.
|
||||
*
|
||||
+ * @param altVerificationKey: carries the alternative FN-DSA-512 public key
|
||||
+ * in a hybrid authority certificate. It is absent from end-entity
|
||||
+ * authorization tickets.
|
||||
+ *
|
||||
+ * @param altSignatureValue: carries the FN-DSA-512 signature generated by
|
||||
+ * the issuer over this certificate.
|
||||
+ *
|
||||
* @note In IEEE Std 1609.2-2022 these were not marked optional; they are in
|
||||
* this version of the standard; this is technically not backwards compatible
|
||||
* but in practice there are no scenarios in which a legacy system will break
|
||||
@@ -1160,7 +1168,9 @@
|
||||
flags BIT STRING {usesCubk (0)} (SIZE (8)) OPTIONAL,
|
||||
appExtensions SequenceOfAppExtensions OPTIONAL,
|
||||
certIssueExtensions SequenceOfCertIssueExtensions OPTIONAL,
|
||||
- certRequestExtension SequenceOfCertRequestExtensions OPTIONAL
|
||||
+ certRequestExtension SequenceOfCertRequestExtensions OPTIONAL,
|
||||
+ altVerificationKey PublicVerificationKey OPTIONAL,
|
||||
+ altSignatureValue Signature OPTIONAL
|
||||
}
|
||||
(WITH COMPONENTS { ..., appPermissions PRESENT} |
|
||||
WITH COMPONENTS { ..., certIssuePermissions PRESENT} |
|
||||
--- a/Ieee1609Dot2BaseTypes.asn
|
||||
+++ b/Ieee1609Dot2BaseTypes.asn
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
Ieee1609Dot2BaseTypes {iso(1) identified-organization(3) ieee(111)
|
||||
standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2)
|
||||
- base(1) base-types(2) major-version-2(2) minor-version-5(5)}
|
||||
+ base(1) base-types(2) major-version-2(2) minor-version-6(6)}
|
||||
|
||||
DEFINITIONS AUTOMATIC TAGS ::= BEGIN
|
||||
|
||||
@@ -724,7 +724,8 @@
|
||||
...,
|
||||
ecdsaBrainpoolP384r1Signature EcdsaP384Signature,
|
||||
ecdsaNistP384Signature EcdsaP384Signature,
|
||||
- sm2Signature EcsigP256Signature
|
||||
+ sm2Signature EcsigP256Signature,
|
||||
+ fnDsa512Signature FnDsa512Signature
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -821,6 +822,12 @@
|
||||
}
|
||||
|
||||
/**
|
||||
+ * @brief This type contains an FN-DSA-512 signature as a fixed-size octet
|
||||
+ * string.
|
||||
+ */
|
||||
+FnDsa512Signature ::= OCTET STRING (SIZE (666))
|
||||
+
|
||||
+/**
|
||||
* @brief This structure specifies a point on an elliptic curve in Weierstrass
|
||||
* form defined over a 256-bit prime number. The curves supported in this
|
||||
* standard are NIST p256 as defined in FIPS 186-5, Brainpool p256r1 as
|
||||
@@ -888,6 +895,12 @@
|
||||
}
|
||||
|
||||
/**
|
||||
+ * @brief This type contains an FN-DSA-512 public verification key as a
|
||||
+ * fixed-size octet string.
|
||||
+ */
|
||||
+FnDsa512Key ::= OCTET STRING (SIZE (897))
|
||||
+
|
||||
+/**
|
||||
* @brief This enumerated value indicates supported symmetric algorithms. The
|
||||
* algorithm identifier identifies both the algorithm itself and a specific
|
||||
* mode of operation. The symmetric algorithms supported in this version of
|
||||
@@ -1045,7 +1058,8 @@
|
||||
... ,
|
||||
ecdsaBrainpoolP384r1 EccP384CurvePoint,
|
||||
ecdsaNistP384 EccP384CurvePoint,
|
||||
- ecsigSm2 EccP256CurvePoint
|
||||
+ ecsigSm2 EccP256CurvePoint,
|
||||
+ fnDsa512 FnDsa512Key
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,80 @@
|
||||
if(NOT AUTOTALKS_CRATON)
|
||||
find_path(
|
||||
AUTOTALKS_ROOT
|
||||
NAMES "include/atlk/v2x_service.h"
|
||||
PATH_SUFFIXES "autotalks_secton_api"
|
||||
PATHS $ENV{HOME}
|
||||
CMAKE_FIND_ROOT_PATH_BOTH # Seems like this is not needed in newer CMake
|
||||
)
|
||||
|
||||
set(AUTOTALKS_INCLUDE_DIRS "${AUTOTALKS_ROOT}/include" "${AUTOTALKS_ROOT}/ref_src/include" "${AUTOTALKS_ROOT}/depend/device/include" "${AUTOTALKS_ROOT}/src/include" "${AUTOTALKS_ROOT}/src/core/include")
|
||||
set(AUTOTALKS_LIBS_DIR ${AUTOTALKS_ROOT}/output.sec/x86/lib)
|
||||
set(AUTOTALKS_OBJ_DIR ${AUTOTALKS_ROOT}/output.sec/x86/obj)
|
||||
|
||||
# Secton does not need ToMcrypt and ToMmath as Craton
|
||||
|
||||
set(AUTOTALKS_OBJECTS target_type/target_type_remote.o platform_type/platform_type_linux_u.o link_layer/linux_u/remote/link_layer_remote.o link_layer/linux_u/ipc/link_layer_ipc.o link_layer/linux_u/tee/link_layer_tee_stub.o link_layer/link_layer_interface.o flash_reader/linux_u/remote/flash_reader_remote.o ref_sys/ref_sys.o ref_sys/ref_sys_logger.o log_reader/log_reader.o secure_hdif_crypto_layer/crypto_layer_ref_sys.o secure_hdif_crypto_layer/crypto_layer_interface.o secure_hdif_crypto_layer/crypto_lib_wrapper.o secure_storage/secure_storage.o time_sync/time_sync.o time_sync/time_sync_poti.o poti_lib/gnss/gnss.o poti_lib/nmea/nmea.o poti_lib/nmea/nmea_io.o poti_lib/nmea/nmea_io_check.o poti_lib/nmea/nmea_nav.o poti_lib/nmea/nmea_parse.o poti_lib/gnss/teseo/teseo.o poti_lib/gnss/teseo/teseo_commands.o poti_lib/coord/coord.o poti_lib/periodic_alarm/periodic_alarm.o poti_lib/api/poti_api.o poti_lib/ubx/serial_driver.o poti_lib/ubx/ubx_driver.o poti_lib/ubx/ubx_nav.o)
|
||||
list(TRANSFORM AUTOTALKS_OBJECTS PREPEND ${AUTOTALKS_OBJ_DIR}/)
|
||||
|
||||
if (NOT TARGET Autotalks::AtlkRemote)
|
||||
add_library(Autotalks::AtlkRemote UNKNOWN IMPORTED)
|
||||
set_target_properties(Autotalks::AtlkRemote PROPERTIES
|
||||
IMPORTED_LOCATION "${AUTOTALKS_LIBS_DIR}/libatlkremote_linux_u.so"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${AUTOTALKS_INCLUDE_DIRS}")
|
||||
set_property(TARGET Autotalks::AtlkRemote APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES ${AUTOTALKS_OBJECTS} rt)
|
||||
# target_link_libraries not working properly in CMake v3.5.1 used in Ubuntu 16.04
|
||||
endif()
|
||||
|
||||
else() # Craton device
|
||||
find_path(
|
||||
AUTOTALKS_ROOT
|
||||
NAMES "include/atlk/v2x_service.h"
|
||||
PATHS $ENV{HOME}
|
||||
PATH_SUFFIXES "autotalks_craton_api"
|
||||
CMAKE_FIND_ROOT_PATH_BOTH # Seems like this is not needed in newer CMake
|
||||
)
|
||||
|
||||
set(AUTOTALKS_INCLUDE_DIRS "${AUTOTALKS_ROOT}/include" "${AUTOTALKS_ROOT}/ref_src/include" "${AUTOTALKS_ROOT}/depend/device/include" "${AUTOTALKS_ROOT}/src/include" "${AUTOTALKS_ROOT}/src/core/include")
|
||||
|
||||
set(AUTOTALKS_LIBS_DIR ${AUTOTALKS_ROOT}/output.cr2_lnx/armv7-32/lib)
|
||||
set(AUTOTALKS_OBJ_DIR ${AUTOTALKS_ROOT}/output.cr2_lnx/armv7-32/obj)
|
||||
|
||||
if (NOT TARGET Autotalks::ToMcrypt)
|
||||
add_library(Autotalks::ToMcrypt UNKNOWN IMPORTED)
|
||||
set_target_properties(Autotalks::ToMcrypt PROPERTIES
|
||||
IMPORTED_LOCATION "${AUTOTALKS_LIBS_DIR}/libtomcrypt.a"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${AUTOTALKS_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
if (NOT TARGET Autotalks::ToMmath)
|
||||
add_library(Autotalks::ToMmath UNKNOWN IMPORTED)
|
||||
set_target_properties(Autotalks::ToMmath PROPERTIES
|
||||
IMPORTED_LOCATION "${AUTOTALKS_LIBS_DIR}/libtommath.a"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${AUTOTALKS_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
if (NOT TARGET Autotalks::Optee)
|
||||
add_library(Autotalks::Optee UNKNOWN IMPORTED)
|
||||
set_target_properties(Autotalks::Optee PROPERTIES
|
||||
IMPORTED_LOCATION "${AUTOTALKS_ROOT}/depend/optee/lib/libteec.so"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${AUTOTALKS_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
set(AUTOTALKS_OBJECTS target_type/target_type_local.o platform_type/platform_type_linux_u.o link_layer/linux_u/local/link_layer_local_shared_memory.o link_layer/linux_u/ipc/link_layer_ipc.o link_layer/linux_u/tee/static_list.o link_layer/linux_u/tee/link_layer_tee.o link_layer/link_layer_interface.o flash_reader/linux_u/local/flash_reader_local.o ref_sys/ref_sys.o ref_sys/ref_sys_logger.o log_reader/log_reader.o secure_hdif_crypto_layer/crypto_layer_stubs.o time_sync/time_sync.o time_sync/time_sync_poti.o poti_lib/gnss/gnss.o poti_lib/nmea/nmea.o poti_lib/nmea/nmea_io.o poti_lib/nmea/nmea_io_check.o poti_lib/nmea/nmea_nav.o poti_lib/nmea/nmea_parse.o poti_lib/gnss/teseo/teseo.o poti_lib/gnss/teseo/teseo_commands.o poti_lib/coord/coord.o poti_lib/periodic_alarm/periodic_alarm.o poti_lib/api/poti_api.o poti_lib/ubx/serial_driver.o poti_lib/ubx/ubx_driver.o poti_lib/ubx/ubx_nav.o)
|
||||
list(TRANSFORM AUTOTALKS_OBJECTS PREPEND ${AUTOTALKS_OBJ_DIR}/)
|
||||
|
||||
if (NOT TARGET Autotalks::AtlkLocal)
|
||||
add_library(Autotalks::AtlkLocal SHARED IMPORTED)
|
||||
set_target_properties(Autotalks::AtlkLocal PROPERTIES
|
||||
IMPORTED_LOCATION "${AUTOTALKS_LIBS_DIR}/libatlklocal_linux_u.so"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${AUTOTALKS_INCLUDE_DIRS}")
|
||||
set_property(TARGET Autotalks::AtlkLocal APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES Autotalks::ToMcrypt Autotalks::ToMmath ${AUTOTALKS_OBJECTS} rt Autotalks::Optee)
|
||||
# target_link_libraries not working properly in CMake v3.5.1 used in Ubuntu 16.04
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Autotalks "Autotalks libraries not found" AUTOTALKS_ROOT)
|
||||
@@ -0,0 +1,14 @@
|
||||
# FindCapnProto.cmake – thin wrapper around the upstream CapnProtoConfig.cmake
|
||||
#
|
||||
# The upstream CapnProtoTargets.cmake unconditionally calls add_library(... IMPORTED)
|
||||
# and will therefore fail on repeated find_package() invocations in the same configure run.
|
||||
# This wrapper short-circuits the second call when the targets already exist.
|
||||
|
||||
if(NOT TARGET CapnProto::capnp)
|
||||
# Forward to upstream CapnProtoConfig.cmake.
|
||||
# Always QUIET, find_package_handle_standard_args below controls options and output
|
||||
find_package(CapnProto CONFIG QUIET)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CapnProto CONFIG_MODE)
|
||||
@@ -0,0 +1,20 @@
|
||||
find_path(COHDA_ROOT
|
||||
NAMES "ieee1609/app/lib1609/include/lib1609.h" "cohda/kernel/include/linux/cohda/llc/llc-api.h"
|
||||
PATHS "/home/duser"
|
||||
PATH_SUFFIXES mk5 mk2
|
||||
CMAKE_FIND_ROOT_PATH_BOTH
|
||||
DOC "Cohda SDK")
|
||||
|
||||
set(COHDA_KERNEL_INCLUDE_DIR ${COHDA_ROOT}/ieee1609/kernel/include)
|
||||
set(COHDA_LIB1609_INCLUDE_DIR ${COHDA_ROOT}/ieee1609/app/lib1609/include)
|
||||
set(COHDA_LLC_INCLUDE_DIR ${COHDA_ROOT}/cohda/kernel/include/linux/cohda/llc)
|
||||
set(COHDA_INCLUDE_DIRS ${COHDA_KERNEL_INCLUDE_DIR} ${COHDA_LIB1609_INCLUDE_DIR} ${COHDA_LLC_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Cohda "Cohda SDK not found" COHDA_ROOT)
|
||||
mark_as_advanced(COHDA_ROOT)
|
||||
if(COHDA_FOUND AND NOT TARGET Cohda::headers)
|
||||
add_library(Cohda::headers UNKNOWN IMPORTED)
|
||||
set_target_properties(Cohda::headers PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${COHDA_INCLUDE_DIRS}")
|
||||
endif()
|
||||
@@ -0,0 +1,31 @@
|
||||
find_path(CryptoPP_INCLUDE_DIR NAMES cryptopp/config.h DOC "CryptoPP include directory")
|
||||
find_library(CryptoPP_LIBRARY NAMES cryptopp DOC "CryptoPP library")
|
||||
|
||||
if(CryptoPP_INCLUDE_DIR)
|
||||
# CRYPTOPP_VERSION has been moved to config_ver.h starting with Crypto++ 8.3
|
||||
if(EXISTS ${CryptoPP_INCLUDE_DIR}/cryptopp/config_ver.h)
|
||||
set(CryptoPP_VERSION_HEADER "config_ver.h")
|
||||
else()
|
||||
set(CryptoPP_VERSION_HEADER "config.h")
|
||||
endif()
|
||||
file(STRINGS ${CryptoPP_INCLUDE_DIR}/cryptopp/${CryptoPP_VERSION_HEADER} _config_version REGEX "CRYPTOPP_VERSION")
|
||||
string(REGEX MATCH "([0-9])([0-9])([0-9])" _match_version "${_config_version}")
|
||||
set(CryptoPP_VERSION_STRING "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CryptoPP
|
||||
REQUIRED_VARS CryptoPP_INCLUDE_DIR CryptoPP_LIBRARY
|
||||
FOUND_VAR CryptoPP_FOUND
|
||||
VERSION_VAR CryptoPP_VERSION_STRING)
|
||||
|
||||
if(CryptoPP_FOUND AND NOT TARGET CryptoPP::CryptoPP)
|
||||
add_library(CryptoPP::CryptoPP UNKNOWN IMPORTED)
|
||||
set_target_properties(CryptoPP::CryptoPP PROPERTIES
|
||||
IMPORTED_LOCATION "${CryptoPP_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CryptoPP_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(CryptoPP_INCLUDE_DIR CryptoPP_LIBRARY)
|
||||
set(CryptoPP_INCLUDE_DIRS ${CryptoPP_INCLUDE_DIR})
|
||||
set(CryptoPP_LIBRARIES ${CryptoPP_LIBRARY})
|
||||
@@ -0,0 +1,27 @@
|
||||
find_path(GPS_INCLUDE_DIR NAMES gps.h DOC "libgps include directory")
|
||||
find_library(GPS_LIBRARY NAMES gps DOC "libgps library")
|
||||
|
||||
if(GPS_INCLUDE_DIR)
|
||||
file(STRINGS ${GPS_INCLUDE_DIR}/gps.h _version_lines REGEX "GPSD_API_(MAJOR|MINOR)_VERSION")
|
||||
string(REGEX MATCH "MAJOR_VERSION[ \t]+([0-9]+)" _version_major ${_version_lines})
|
||||
set(GPS_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||
string(REGEX MATCH "MINOR_VERSION[ \t]+([0-9]+)" _version_minor ${_version_lines})
|
||||
set(GPS_VERSION_MINOR ${CMAKE_MATCH_1})
|
||||
set(GPS_VERSION_STRING "${GPS_VERSION_MAJOR}.${GPS_VERSION_MINOR}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GPS
|
||||
REQUIRED_VARS GPS_INCLUDE_DIR GPS_LIBRARY
|
||||
VERSION_VAR GPS_VERSION_STRING)
|
||||
|
||||
if(GPS_FOUND AND NOT TARGET GPS::GPS)
|
||||
add_library(GPS::GPS UNKNOWN IMPORTED)
|
||||
set_target_properties(GPS::GPS PROPERTIES
|
||||
IMPORTED_LOCATION "${GPS_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GPS_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GPS_INCLUDE_DIR GPS_LIBRARY)
|
||||
set(GPS_INCLUDE_DIRS ${GPS_INCLUDE_DIR})
|
||||
set(GPS_LIBRARIES ${GPS_LIBRARY})
|
||||
@@ -0,0 +1,54 @@
|
||||
option(GeographicLib_PREFER_PACKAGE_CONFIG "Prefer CMake config mode" ON)
|
||||
mark_as_advanced(GeographicLib_PREFER_PACKAGE_CONFIG)
|
||||
|
||||
if(GeographicLib_PREFER_PACKAGE_CONFIG)
|
||||
find_package(GeographicLib ${GeographicLib_FIND_VERSION} QUIET CONFIG)
|
||||
if (GeographicLib_FOUND)
|
||||
message(STATUS "GeographicLib: using found CMake configuration")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "GeographicLib: using lookup code by Vanetza")
|
||||
|
||||
find_path(GeographicLib_INCLUDE_DIR NAMES GeographicLib/Config.h DOC "GeographicLib include directory")
|
||||
find_library(GeographicLib_LIBRARY_RELEASE NAMES Geographic GeographicLib DOC "GeographicLib library (release)")
|
||||
find_library(GeographicLib_LIBRARY_DEBUG NAMES Geographic_d GeographicLib_d DOC "GeographicLib library (debug)")
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(GeographicLib)
|
||||
|
||||
if(GeographicLib_INCLUDE_DIR)
|
||||
file(STRINGS ${GeographicLib_INCLUDE_DIR}/GeographicLib/Config.h _config_version REGEX "GEOGRAPHICLIB_VERSION_STRING")
|
||||
string(REGEX MATCH "\"([0-9.]+)\"$" _match_version ${_config_version})
|
||||
set(GeographicLib_VERSION_STRING ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GeographicLib
|
||||
REQUIRED_VARS GeographicLib_INCLUDE_DIR GeographicLib_LIBRARY
|
||||
FOUND_VAR GeographicLib_FOUND
|
||||
VERSION_VAR GeographicLib_VERSION_STRING)
|
||||
|
||||
if(GeographicLib_FOUND AND NOT TARGET GeographicLib::GeographicLib)
|
||||
add_library(GeographicLib::GeographicLib UNKNOWN IMPORTED)
|
||||
set_target_properties(GeographicLib::GeographicLib PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GeographicLib_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${GeographicLib_LIBRARY}"
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
|
||||
if(EXISTS "${GeographicLib_LIBRARY_RELEASE}")
|
||||
set_property(TARGET GeographicLib::GeographicLib APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(GeographicLib::GeographicLib PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${GeographicLib_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
if(EXISTS "${GeographicLib_LIBRARY_DEBUG}")
|
||||
set_property(TARGET GeographicLib::GeographicLib APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(GeographicLib::GeographicLib PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${GeographicLib_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(GeographicLib_INCLUDE_DIR GeographicLib_LIBRARY)
|
||||
set(GeographicLib_INCLUDE_DIRS ${GeographicLib_INCLUDE_DIR})
|
||||
# GeographicLib_LIBRARIES is set by SelectLibraryConfigurations
|
||||
@@ -0,0 +1,66 @@
|
||||
set(GTest_VERSION 1.16.0)
|
||||
set(GTest_ARCHIVE_NAME googletest-${GTest_VERSION})
|
||||
set(GTest_ARCHIVE ${GTest_ARCHIVE_NAME}.tar.gz)
|
||||
set(GTest_ARCHIVE_SHA1 517f27ed21b40f9927ab91f2abc147519cedb5a5)
|
||||
set(GTest_URL https://github.com/google/googletest/releases/download/v${GTest_VERSION}/${GTest_ARCHIVE})
|
||||
|
||||
option(GTest_BUILD_DIRECTORY_DOWNLOAD "Download GoogleTest in build directory" OFF)
|
||||
mark_as_advanced(GTest_BUILD_DIRECTORY_DOWNLOAD)
|
||||
if(GTest_BUILD_DIRECTORY_DOWNLOAD)
|
||||
set(GTest_DIR ${PROJECT_BINARY_DIR}/gtest)
|
||||
else()
|
||||
set(GTest_DIR ${PROJECT_SOURCE_DIR}/gtest)
|
||||
endif()
|
||||
set(GTest_ARCHIVE_DIR ${GTest_DIR}/${GTest_ARCHIVE_NAME}/googletest)
|
||||
set(GTest_SOURCE_DIR ${GTest_ARCHIVE_DIR}/src)
|
||||
set(GTest_INCLUDE_DIR ${GTest_ARCHIVE_DIR}/include)
|
||||
|
||||
set(GTest_LIBRARY gtest)
|
||||
set(GTest_LIBRARY_SOURCES ${GTest_SOURCE_DIR}/gtest-all.cc)
|
||||
set(GTest_MAIN_LIBRARY gtest_main)
|
||||
set(GTest_MAIN_LIBRARY_SOURCES ${GTest_SOURCE_DIR}/gtest_main.cc)
|
||||
|
||||
file(DOWNLOAD
|
||||
${GTest_URL}
|
||||
${GTest_DIR}/${GTest_ARCHIVE}
|
||||
EXPECTED_HASH SHA1=${GTest_ARCHIVE_SHA1})
|
||||
add_custom_target(download_gtest DEPENDS ${GTest_DIR}/${GTest_ARCHIVE})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${GTest_LIBRARY_SOURCES} ${GTest_MAIN_LIBRARY_SOURCES}
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xfz ${GTest_DIR}/${GTest_ARCHIVE}
|
||||
DEPENDS download_gtest
|
||||
COMMENT "Extracting ${GTest_ARCHIVE} in ${GTest_DIR}"
|
||||
WORKING_DIRECTORY ${GTest_DIR}
|
||||
VERBATIM)
|
||||
add_custom_target(extract_gtest DEPENDS ${GTest_LIBRARY_SOURCES} ${GTest_MAIN_LIBRARY_SOURCES})
|
||||
|
||||
# GTest library for tests with own main function
|
||||
add_library(${GTest_LIBRARY} ${GTest_LIBRARY_SOURCES})
|
||||
target_include_directories(${GTest_LIBRARY} PRIVATE ${GTest_ARCHIVE_DIR})
|
||||
target_include_directories(${GTest_LIBRARY} SYSTEM PUBLIC ${GTest_INCLUDE_DIR})
|
||||
add_dependencies(${GTest_LIBRARY} extract_gtest)
|
||||
|
||||
# GTest library providing main function for tests
|
||||
add_library(${GTest_MAIN_LIBRARY} ${GTest_MAIN_LIBRARY_SOURCES})
|
||||
target_link_libraries(${GTest_MAIN_LIBRARY} PUBLIC ${GTest_LIBRARY})
|
||||
add_dependencies(${GTest_MAIN_LIBRARY} extract_gtest)
|
||||
|
||||
# Look for threading library and configure GTest accordingly
|
||||
if(NOT DEFINED CMAKE_USE_PTHREADS_INIT)
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads MODULE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_USE_PTHREADS_INIT)
|
||||
message(STATUS "Build GTest with pthread support")
|
||||
target_compile_definitions(${GTest_LIBRARY} PUBLIC "GTEST_HAS_PTHREAD=1")
|
||||
target_link_libraries(${GTest_LIBRARY} PUBLIC Threads::Threads)
|
||||
else()
|
||||
message(STATUS "Build GTest without threading")
|
||||
target_compile_definitions(${GTest_LIBRARY} PUBLIC "GTEST_HAS_PTHREAD=0")
|
||||
endif()
|
||||
|
||||
set_target_properties(download_gtest extract_gtest ${GTest_LIBRARY} ${GTest_MAIN_LIBRARY}
|
||||
PROPERTIES FOLDER "GTest")
|
||||
@@ -0,0 +1,8 @@
|
||||
set(CMAKE_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "aarch64")
|
||||
set(CMAKE_C_COMPILER "aarch64-linux-gnu-gcc")
|
||||
set(CMAKE_CXX_COMPILER "aarch64-linux-gnu-g++")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
@@ -0,0 +1,16 @@
|
||||
set(CMAKE_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "arm")
|
||||
set(POKY_CRATON2 "/opt/poky-craton2/4.0.1")
|
||||
set(CMAKE_C_COMPILER "${POKY_CRATON2}/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc")
|
||||
set(CMAKE_CXX_COMPILER "${POKY_CRATON2}/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++")
|
||||
set(CMAKE_C_FLAGS "--sysroot=${POKY_CRATON2}/sysroots/cortexa7t2hf-neon-poky-linux-gnueabi -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "--sysroot=${POKY_CRATON2}/sysroots/cortexa7t2hf-neon-poky-linux-gnueabi -I${POKY_CRATON2}/sysroots/cortexa7t2hf-neon-poky-linux-gnueabi/usr/include -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7" CACHE STRING "" FORCE)
|
||||
set(THREADS_PTHREAD_ARG "2" CACHE STRING "Forced by Autotalks toolchain" FORCE)
|
||||
# Cache string needed in cmake v3.5.1, in v3.16.3 not anymore
|
||||
# THREADS_PTHREAD_ARG needed for a bug that is also not present in v3.16.3 anymore
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(AUTOTALKS_CRATON true)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
set(CMAKE_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "arm")
|
||||
set(CMAKE_C_COMPILER "arm-linux-gnueabihf-gcc")
|
||||
set(CMAKE_CXX_COMPILER "arm-linux-gnueabihf-g++")
|
||||
set(THREADS_PTHREAD_ARG "2" CACHE STRING "Forced by Cohda toolchain" FORCE)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
#
|
||||
# configure_gtest_directory(
|
||||
# [SOURCES <srcs...>]
|
||||
# [LINK_LIBRARIES <libs...>]
|
||||
# [INCLUDE_DIRECTORIES <dirs...>]
|
||||
# [COMPILE_DEFINITIONS <defs...>])
|
||||
#
|
||||
# Set GTest properties common for all unit test executables in current directory.
|
||||
#
|
||||
function(configure_gtest_directory)
|
||||
cmake_parse_arguments(args "" "" "SOURCES;LINK_LIBRARIES;INCLUDE_DIRECTORIES;COMPILE_DEFINITIONS" ${ARGN})
|
||||
if(args_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "unknown arguments given to configure_gtest_directory: ${args_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
|
||||
set_property(DIRECTORY PROPERTY GTEST_SOURCES ${args_SOURCES})
|
||||
set_property(DIRECTORY PROPERTY GTEST_LINK_LIBRARIES ${args_LINK_LIBRARIES})
|
||||
set_property(DIRECTORY PROPERTY GTEST_INCLUDE_DIRECTORIES ${args_INCLUDE_DIRECTORIES})
|
||||
set_property(DIRECTORY PROPERTY GTEST_COMPILE_DEFINITIONS ${args_COMPILE_DEFINITIONS})
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# add_gtest(<name>
|
||||
# [SOURCES] <srcs...>
|
||||
# [LINK_LIBRARIES <libs...>]
|
||||
# [INCLUDE_DIRECTORIES <dirs...>]
|
||||
# [COMPILE_DEFINITIONS <defs...>])
|
||||
#
|
||||
# Add a CTest unit test executable using Google Test.
|
||||
# The executable will be built as specified by given arguments and directory properties.
|
||||
#
|
||||
function(add_gtest name)
|
||||
set(target GTest_${name})
|
||||
cmake_parse_arguments(args "" "" "SOURCES;LINK_LIBRARIES;INCLUDE_DIRECTORIES;COMPILE_DEFINITIONS" ${ARGN})
|
||||
|
||||
get_directory_property(sources GTEST_SOURCES)
|
||||
list(APPEND sources "${args_SOURCES}" "${args_UNPARSED_ARGUMENTS}")
|
||||
get_directory_property(link_libraries GTEST_LINK_LIBRARIES)
|
||||
list(APPEND link_libraries "${args_LINK_LIBRARIES}" ${GTest_MAIN_LIBRARY})
|
||||
get_directory_property(include_directories GTEST_INCLUDE_DIRECTORIES)
|
||||
list(APPEND include_directories "${args_INCLUDE_DIRECTORIES}" ${GTest_INCLUDE_DIR})
|
||||
get_directory_property(compile_definitions GTEST_COMPILE_DEFINITIONS)
|
||||
list(APPEND compile_definitions "${args_COMPILE_DEFINITIONS}")
|
||||
|
||||
if(NOT sources)
|
||||
message(FATAL_ERROR "no sources given to add_gtest")
|
||||
endif()
|
||||
|
||||
add_executable(${target} ${sources})
|
||||
set_target_properties(${target} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/tests
|
||||
FOLDER "GTest"
|
||||
LINK_LIBRARIES "${link_libraries}"
|
||||
INCLUDE_DIRECTORIES "${include_directories}"
|
||||
COMPILE_DEFINITIONS "${compile_definitions}")
|
||||
add_test(NAME ${name}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${target})
|
||||
endfunction()
|
||||
@@ -0,0 +1,56 @@
|
||||
#
|
||||
# vanetza_optional_dependency(<package> [<version>] <option> <description>)
|
||||
#
|
||||
# Probe for <package> quietly, create a CMake option defaulting to whether it
|
||||
# was found, and require it if the option is enabled.
|
||||
#
|
||||
macro(vanetza_optional_dependency package)
|
||||
if(${ARGC} EQUAL 4)
|
||||
set(_vanetza_dep_version ${ARGV1})
|
||||
set(_vanetza_dep_option ${ARGV2})
|
||||
set(_vanetza_dep_description "${ARGV3}")
|
||||
else()
|
||||
set(_vanetza_dep_version)
|
||||
set(_vanetza_dep_option ${ARGV1})
|
||||
set(_vanetza_dep_description "${ARGV2}")
|
||||
endif()
|
||||
find_package(${package} ${_vanetza_dep_version} QUIET)
|
||||
option(${_vanetza_dep_option} "${_vanetza_dep_description}" ${${package}_FOUND})
|
||||
if(${_vanetza_dep_option})
|
||||
find_package(${package} ${_vanetza_dep_version} REQUIRED)
|
||||
endif()
|
||||
unset(_vanetza_dep_version)
|
||||
unset(_vanetza_dep_option)
|
||||
unset(_vanetza_dep_description)
|
||||
endmacro()
|
||||
|
||||
#
|
||||
# add_vanetza_component(<name> <sources...>)
|
||||
#
|
||||
function(add_vanetza_component name)
|
||||
set(sources ${ARGN})
|
||||
|
||||
add_library(${name} ${sources})
|
||||
add_library(Vanetza::${name} ALIAS ${name})
|
||||
target_include_directories(${name} PUBLIC
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
set_target_properties(${name} PROPERTIES
|
||||
OUTPUT_NAME vanetza_${name}
|
||||
SOVERSION ${VANETZA_SOVERSION}
|
||||
INSTALL_RPATH $ORIGIN)
|
||||
target_compile_features(${name} PUBLIC cxx_std_14)
|
||||
install(TARGETS ${name} EXPORT ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
set_property(GLOBAL APPEND PROPERTY VANETZA_COMPONENTS ${name})
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# add_test_subdirectory(<directory>)
|
||||
#
|
||||
# Add subdirectory only when tests are enabled via BUILD_TESTS
|
||||
#
|
||||
function(add_test_subdirectory directory)
|
||||
if(BUILD_TESTS)
|
||||
add_subdirectory(${directory})
|
||||
endif()
|
||||
endfunction(add_test_subdirectory)
|
||||
@@ -0,0 +1,38 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
# Temporarily extend module path for bundled find package scripts
|
||||
set(_vanetza_save_cmake_module_path ${CMAKE_MODULE_PATH})
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(Boost @Boost_VERSION_STRING@ CONFIG COMPONENTS date_time)
|
||||
|
||||
if(@VANETZA_WITH_GEOGRAPHICLIB@)
|
||||
find_dependency(GeographicLib @GeographicLib_VERSION_STRING@)
|
||||
endif()
|
||||
|
||||
if(@VANETZA_WITH_RPC@)
|
||||
find_dependency(CapnProto @CapnProto_VERSION@)
|
||||
endif()
|
||||
|
||||
if(@VANETZA_WITH_CRYPTOPP@)
|
||||
find_dependency(CryptoPP @CryptoPP_VERSION_STRING@)
|
||||
endif()
|
||||
|
||||
if(@VANETZA_WITH_OPENSSL@)
|
||||
# remove patch letter found with OpenSSL 1.x
|
||||
string(REGEX REPLACE "[a-z]+$" "" OpenSSL_VERSION_WITHOUT_PATCH "@OpenSSL_VERSION@")
|
||||
find_dependency(OpenSSL ${OpenSSL_VERSION_WITHOUT_PATCH})
|
||||
endif()
|
||||
|
||||
if(@VANETZA_WITH_PQC@)
|
||||
find_dependency(liboqs 0.14 CONFIG)
|
||||
endif()
|
||||
|
||||
# Restore previous module path
|
||||
set(CMAKE_MODULE_PATH ${_vanetza_save_cmake_module_path})
|
||||
unset(_vanetza_save_cmake_module_path)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/VanetzaTargets.cmake")
|
||||
|
||||
set_and_check(VANETZA_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
|
||||
@@ -0,0 +1,34 @@
|
||||
# Temporarily extend module path for bundled find package scripts
|
||||
set(_vanetza_save_cmake_module_path ${CMAKE_MODULE_PATH})
|
||||
list(APPEND CMAKE_MODULE_PATH "@PROJECT_SOURCE_DIR@/cmake")
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(Boost @Boost_VERSION_STRING@ CONFIG COMPONENTS date_time)
|
||||
|
||||
if(@VANETZA_WITH_GEOGRAPHICLIB@)
|
||||
find_dependency(GeographicLib @GeographicLib_VERSION_STRING@)
|
||||
endif()
|
||||
|
||||
if(@VANETZA_WITH_RPC@)
|
||||
find_dependency(CapnProto @CapnProto_VERSION@)
|
||||
endif()
|
||||
|
||||
if(@VANETZA_WITH_CRYPTOPP@)
|
||||
find_dependency(CryptoPP @CryptoPP_VERSION_STRING@)
|
||||
endif()
|
||||
|
||||
if(@VANETZA_WITH_OPENSSL@)
|
||||
# remove patch letter found with OpenSSL 1.x
|
||||
string(REGEX REPLACE "[a-z]+$" "" OpenSSL_VERSION_WITHOUT_PATCH "@OpenSSL_VERSION@")
|
||||
find_dependency(OpenSSL ${OpenSSL_VERSION_WITHOUT_PATCH})
|
||||
endif()
|
||||
|
||||
if(@VANETZA_WITH_PQC@)
|
||||
find_dependency(liboqs 0.14 CONFIG)
|
||||
endif()
|
||||
|
||||
# Restore previous module path
|
||||
set(CMAKE_MODULE_PATH ${_vanetza_save_cmake_module_path})
|
||||
unset(_vanetza_save_cmake_module_path)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/VanetzaExports.cmake")
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
import os
|
||||
import re
|
||||
|
||||
from conan import ConanFile
|
||||
from conan.errors import ConanException
|
||||
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout
|
||||
from conan.tools.scm import Git
|
||||
|
||||
|
||||
class VanetzaConan(ConanFile):
|
||||
name = "vanetza"
|
||||
url = "https://github.com/riebl/vanetza"
|
||||
description = "Open-source implementation of the ETSI C-ITS protocol stack"
|
||||
license = "LGPL-3.0-or-later"
|
||||
package_type = "library"
|
||||
languages = "C", "C++"
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {
|
||||
"fPIC": [True, False],
|
||||
"shared": [True, False],
|
||||
"testing": [True, False],
|
||||
"with_cryptopp": [True, False],
|
||||
"with_openssl": [True, False],
|
||||
"build_socktap": [True, False],
|
||||
"build_certify": [True, False],
|
||||
"build_benchmark": [True, False],
|
||||
}
|
||||
default_options = {
|
||||
"fPIC": True,
|
||||
"shared": False,
|
||||
"testing": True,
|
||||
"with_cryptopp": False,
|
||||
"with_openssl": True,
|
||||
"build_socktap": False,
|
||||
"build_certify": False,
|
||||
"build_benchmark": False,
|
||||
}
|
||||
|
||||
def read_project_version(self) -> str | None:
|
||||
version_re = re.compile(r"project\(Vanetza VERSION ([\d.]+)\)")
|
||||
with open(os.path.join(self.recipe_folder, "CMakeLists.txt")) as f:
|
||||
for line in f:
|
||||
match = version_re.search(line)
|
||||
if match:
|
||||
return match.group(1)
|
||||
return None
|
||||
|
||||
def set_version(self):
|
||||
project_version = self.read_project_version()
|
||||
if not project_version:
|
||||
raise ConanException("Could not read version from CMakeLists.txt")
|
||||
|
||||
git = Git(self)
|
||||
try:
|
||||
count = int(git.run(f"rev-list --count v{project_version}..HEAD"))
|
||||
if count > 0:
|
||||
short_hash = git.run("rev-parse --short HEAD")
|
||||
self.version = f"{project_version}-dev+{count}.{short_hash}"
|
||||
except Exception:
|
||||
self.version = project_version
|
||||
|
||||
def config_options(self):
|
||||
if self.settings.os == "Windows":
|
||||
del self.options.fPIC
|
||||
|
||||
def configure(self):
|
||||
if self.options.shared:
|
||||
self.options.rm_safe("fPIC")
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
||||
|
||||
def requirements(self):
|
||||
self.requires("boost/[>=1.70]")
|
||||
self.requires("geographiclib/[>=1.37]")
|
||||
if self.options.with_cryptopp:
|
||||
self.requires("cryptopp/[>=5.6.1]")
|
||||
if self.options.with_openssl:
|
||||
self.requires("openssl/[>=1.1 <4]")
|
||||
|
||||
def validate(self):
|
||||
from conan.tools.build import check_min_cppstd
|
||||
|
||||
check_min_cppstd(self, "14")
|
||||
|
||||
def generate(self):
|
||||
tc = CMakeToolchain(self)
|
||||
tc.variables["BUILD_SHARED_LIBS"] = self.options.shared
|
||||
tc.variables["BUILD_TESTS"] = self.options.testing
|
||||
tc.variables["VANETZA_WITH_CRYPTOPP"] = self.options.with_cryptopp
|
||||
tc.variables["VANETZA_WITH_OPENSSL"] = self.options.with_openssl
|
||||
tc.variables["BUILD_SOCKTAP"] = self.options.build_socktap
|
||||
tc.variables["BUILD_CERTIFY"] = self.options.build_certify
|
||||
tc.variables["BUILD_BENCHMARK"] = self.options.build_benchmark
|
||||
tc.generate()
|
||||
deps = CMakeDeps(self)
|
||||
deps.generate()
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
if self.options.testing:
|
||||
cmake.test()
|
||||
|
||||
def package(self):
|
||||
cmake = CMake(self)
|
||||
cmake.install()
|
||||
|
||||
def package_info(self):
|
||||
# ordered from dependents to dependencies for correct static linking
|
||||
self.cpp_info.libs = [
|
||||
"vanetza_facilities",
|
||||
"vanetza_btp",
|
||||
"vanetza_geonet",
|
||||
"vanetza_security",
|
||||
"vanetza_dcc",
|
||||
"vanetza_access",
|
||||
"vanetza_net",
|
||||
"vanetza_gnss",
|
||||
"vanetza_common",
|
||||
"vanetza_asn1",
|
||||
"vanetza_asn1_its",
|
||||
"vanetza_asn1_pki",
|
||||
"vanetza_asn1_security",
|
||||
"vanetza_asn1_support",
|
||||
]
|
||||
@@ -0,0 +1,5 @@
|
||||
flatten_single_child_sections: true
|
||||
nav:
|
||||
- index.md
|
||||
- "*"
|
||||
- legal.md
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user