DeterministicESPAsyncWebServer v6.28.0
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
j2735.h File Reference

SAE J2735 V2X - ASN.1 UPER primitive codec + Basic Safety Message core (DETWS_ENABLE_J2735). More...

#include "ServerConfig.h"
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Detailed Description

SAE J2735 V2X - ASN.1 UPER primitive codec + Basic Safety Message core (DETWS_ENABLE_J2735).

J2735 (the Vehicle-to-Everything message dictionary: BSM, SPaT, MAP) is serialized with ASN.1 UPER (Unaligned Packed Encoding Rules). UPER packs fields at the bit level with no padding, so the codec is a bit-writer / bit-reader plus the UPER rules for the common types:

  • a constrained INTEGER in [lo, hi] is the offset (value - lo) in exactly ceil(log2(range)) bits;
  • a BOOLEAN is one bit;
  • an unconstrained/length-prefixed OCTET STRING uses a length determinant then the bytes.

This provides that bit-level UPER primitive layer (host-testable against hand-computed bit patterns) and, on top of it, the J2735 BSMcore position block (msgCnt, id, secMark, lat, long, elev, speed, heading) encode/decode - the high-rate safety kernel every BSM carries. The DSRC / C-V2X radio is an external module; this is the message codec. Pure, zero heap, no stdlib, host-testable.

Definition in file j2735.h.