You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a little-endian IEEE 754-compliant machine the following definition (comments removed) can be (de-)serialized in C/C++ using memcpy (possibly DMA-assisted). In Python, serialization can be delegated to the standard struct module.
truncateduint64unique_iduavcan.si.unit.mass.Scalar.1.0massuavcan.si.unit.electric_charge.Scalar.1.0design_capacityuavcan.si.unit.voltage.Scalar.1.0[2] design_cell_voltage_min_maxuavcan.si.unit.electric_current.Scalar.1.0discharge_currentuavcan.si.unit.electric_current.Scalar.1.0discharge_current_burstuavcan.si.unit.electric_current.Scalar.1.0charge_currentuavcan.si.unit.electric_current.Scalar.1.0charge_current_fastuavcan.si.unit.electric_current.Scalar.1.0charge_termination_tresholduavcan.si.unit.voltage.Scalar.1.0charge_voltageuint16cycle_countvoid8uint8series_cell_countuint7state_of_health_pctvoid1Technology.0.1technology# This is an enumeration
PyDSDL should detect such zero-cost types automatically. Probably it makes sense to express the availability of zero-cost (de-)serialization as a function of platform properties:
Zero-cost (de-)serialization is not possible.
ZCS is possible for little-endian IEEE 754-compliant platforms with a conventional memory model.
ZCS is possible for little-endian platforms with a conventional memory model (when floating point fields are not present).
ZCS is possible for any platform with a conventional memory model (when the largest field is not larger than one byte).
The text was updated successfully, but these errors were encountered:
On a little-endian IEEE 754-compliant machine the following definition (comments removed) can be (de-)serialized in C/C++ using
memcpy
(possibly DMA-assisted). In Python, serialization can be delegated to the standardstruct
module.This is based on https://forum.uavcan.org/t/future-zero-cost-serialization-constraint/469, but this capability is just an implementation detail that does not require any support from the Specification.
PyDSDL should detect such zero-cost types automatically. Probably it makes sense to express the availability of zero-cost (de-)serialization as a function of platform properties:
The text was updated successfully, but these errors were encountered: