Files
MicrOBU/obu-firmware/external/vanetza-idf/vanetza/rpc/vanetza.capnp
T
Ashin Walpola d107534eb2 Keep vanetza-idf in obu-firmware, so a plain clone builds the firmware
obu-firmware builds against the vanetza-idf C-ITS library, which until now
came from the colleague's microbu-esp32c5 tree beside the repository and was
not tracked here, so a clone of this repository could not build the firmware
it ships. The library alone is now part of obu-firmware, as
obu-firmware/external/vanetza-idf: their external/vanetza-idf at commit
cf4b99f, unchanged (9775 files; see its PROVENANCE.md). CMake takes it from
there by default; -DVANETZA_IDF_DIR still points the build elsewhere.

The rest of the colleague's tree (their own VAM firmware, PKI tooling,
station-link Python tools, the V2X2MAP bridge) stays out of this repository
and gitignored; nothing is pushed to their repository. NOTES.md, docs/06,
TODO.md and the pcap verifier's usage line point at the new location.
2026-09-24 10:56:05 +02:00

98 lines
2.3 KiB
Cap'n Proto

@0xcb50be3531badf53;
using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("vanetza::rpc");
interface LinkLayer
{
struct Frame
{
sourceAddress @0 :Data;
destinationAddress @1 :Data;
payload @2 :Data;
}
struct WlanParameters
{
# Parameters for WLAN devices in OCB mode (IEEE 802.11 p and bd)
priority @0 :UInt8; # 802.1 user priority (0-7)
power @1 :Int16; # dBm scaled by 8
datarate @2 :UInt16; # Mbps scaled by 2 (500kbps steps)
}
struct Cv2xParameters
{
# Parameters for C-V2X devices (LTE-V2X and 5G-V2X)
priority @0 :UInt8; # PPPP (0-7)
power @1 :Int16; # dBm scaled by 8
}
struct TxParameters
{
union
{
unspecified @0 :Void;
wlan @1 :WlanParameters;
cv2x @2 :Cv2xParameters;
}
}
struct RxParameters
{
union
{
unspecified @0 :Void;
wlan @1 :WlanParameters;
cv2x @2 :Cv2xParameters;
}
timestamp :union
{
none @3 :Void;
hardware @4 :UInt64;
# time stamp accurately generated by hardware
software @5 :UInt64;
# time stamp added by software (slightly inaccurate)
}
}
interface DataListener
{
onDataIndication @0 (frame: Frame, rxParams :RxParameters);
}
interface CbrListener
{
onCbrReport @0 (cbr :ChannelBusyRatio);
}
struct ChannelBusyRatio
{
busy @0 :UInt16; # number of samples sensed as busy
samples @1 :UInt16; # total number of samples in measurement interval
}
enum ErrorCode
{
ok @0;
invalidArgument @1;
unsupported @2;
internalError @3;
}
identify @0 () -> (id :UInt64, version :UInt32, info :Text);
# lookup identify of link layer device
transmitData @1 (frame :Frame, txParams :TxParameters) -> (error :ErrorCode, message :Text);
# request transmission of a data frame
subscribeData @2 (listener :DataListener);
# subscribe to received data frames
subscribeCbr @3 (listener :CbrListener);
# subscribe to channel busy ratio reports
setSourceAddress @4 (address :Data) -> (error :ErrorCode);
# set (own) source address of link layer (for ACKs)
}