0.14.x → 0.15.x¶
No field was renamed, moved or removed, and every 0.14 workspace keeps its layout. Constraints the
model always intended are now declared on the fields themselves, so they appear in the JSON Schema
exported from FLYNCModel and a few previously tolerated values now fail
validation. The xMII model moved to its own module and was extended, and a switch can control port extenders.
flync migrate <path> updates a 0.14 workspace with the migration v0_14_to_0_15 (see
Schema Migrations). Each change it handles says so below; the others carry data that cannot be derived
and must be fixed by hand.
Breaking — YAML schema¶
Empty identifiers and references are rejected¶
Required identifier and reference strings declare min_length=1. An empty value used to surface late as a
confusing reference error (e.g. unknown PDU '') or silently produce an unnamed object. Affected are the
required name, id, label, group, service, profile_id, ecu_name, controller_name,
interface_name, bus_name and *_ref (pdu_ref, bus_ref, socket_ref, frame_ref) fields.
Optional fields are unaffected.
# no longer valid
- name: ""
pdu_ref: ""
CAN frame references drop bus_ref and gain id_format¶
CANFrameRef (sender_frames / receiver_frames) no longer has a bus_ref; the bus is the
bus_ref of the owning CAN interface. The new required id_format (standard_11bit or
extended_29bit) is combined with frame_ref to locate the frame, since a standard and an extended frame
may share one numeric ID.
# before
sender_frames:
- bus_ref: ChassisCAN
frame_ref: 0x123
# after
sender_frames:
- frame_ref: 0x123
id_format: standard_11bit
Migrated by v0_14_to_0_15: bus_ref is removed and id_format is copied from the referenced frame on
that bus (the last one, as 0.14 resolved it, if a standard and an extended frame share the ID). A reference to a
frame the bus does not declare was already invalid; it gets standard_11bit for IDs up to 0x7FF, else
extended_29bit, and a warning is logged.
CAN frame forwarders reference their frame by CAN ID¶
CANFrameForwarder (forwarder_frames of a CAN interface) is now a CANFrameRef: frame_ref is the
integer CAN ID of the ingress frame instead of the frame’s name, and id_format is required.
# before
forwarder_frames:
- frame_ref: Frame_EngineStatus
egresses: [...]
# after
forwarder_frames:
- frame_ref: 0x101
id_format: standard_11bit
egresses: [...]
Migrated by v0_14_to_0_15: the name is replaced with the frame’s can_id and id_format, looked up
across all CAN buses as 0.14 did. A name that matches no frame is left unchanged and a warning is logged.
CAN frame egresses gain id_format¶
CANFrameEgress (egress_type: can_frame in the egresses of a CAN frame forwarder or a socket
pdu_forwarder) requires id_format next to bus_ref and frame_ref.
# after
egresses:
- egress_type: can_frame
bus_ref: PowertrainCAN
frame_ref: 0x301
id_format: standard_11bit
Migrated by v0_14_to_0_15: id_format is copied from the target frame on bus_ref, with the same
rules and fallback as for CAN frame references.
J1939 frame references drop bus_ref¶
J1939FrameRef (j1939_sender_frames / j1939_receiver_frames) no longer has a bus_ref, for the
same reason. The class moved to flync.model.flync_4_signal.j1939_frame_ref and stays importable from
flync.model.flync_4_ecu.can_interface.
# before
j1939_sender_frames:
- bus_ref: J1939BusCAN
pgn: 61441
# after
j1939_sender_frames:
- pgn: 61441
Migrated by v0_14_to_0_15: bus_ref is removed. J1939 was introduced during 0.15 development, so this
only affects workspaces written by a pre-release build.
Negative values are rejected where they make no sense¶
ge=0 was added to:
MACsec MKA timers:
hello_time,bounded_hello_time,life_time,sak_retire_time,PTP time-receiver timeouts:
sync_timeout,sync_followup_timeout,HTB shaping:
classid,rate,ceil,priorityandHTBFilter.filter_priority.
Container PDU header widths are capped at 32 bits¶
ContainerPDUHeader.id_length_bits and length_field_bits now also declare le=32 (besides
multiple_of=8), so only 0, 8, 16, 24 or 32 are valid. No supported container format uses more.
Enum entries and bitfield fields reject undeclared keys¶
EnumEntry, BitfieldEntry and BitfieldEntryValue now forbid keys they do not declare, like every other
model class. 0.14 silently ignored them.
Migrated by v0_14_to_0_15: such keys are removed from entries of an enum and from fields (and
their values) of a bitfield, and a warning names each one. The loaded model is the same as on 0.14.
Additive — YAML schema¶
SOME/IP eventgroup members are written by name¶
SOMEIPEventgroup.events serializes to the list of event and field names
(events: [TestEventUINT8, TestFieldUINT8]). Loading still accepts full inline definitions and YAML
aliases, so existing files need no change; saving them rewrites the members as names.
SOME/IP eventgroup members can be referenced by identifier¶
events: [0x8001, TestFieldUINT8] mixes an identifier and a name. Loading still accepts full inline
definitions and YAML aliases, so existing files need no change; saving them rewrites the members as
references. Referencing a name shared by several events/fields raises FLYNC-SOM-MIN-REF-421.
J1939Frame.length supports Transport Protocol payloads¶
length was fixed at 8 bytes; it is now an int in 1..1785 (default 8), so a Transport
Protocol message spanning several physical frames can be modelled as one PDU. Existing frames load unchanged.
Apps reference CAN / J1939 frames and PDUs, and ECUs declare IPC channels¶
An experimental App gains the optional lists can_frame_refs,
j1939_frame_refs, can_pdu_refs, j1939_pdu_refs and ipc_refs. Frame and PDU references name the
bus_ref (an app has no interface of its own) and a direction (sender or receiver); frames are located by
frame_ref + id_format (CAN) or pgn (J1939). An ECU gains the optional
ipc_channels file declaring IPCChannel entries (name, transport and
optional max_payload_size / queue_depth); an app joins a channel of its ECU with ipc_refs
(channel_ref + role). All fields default to empty, so no migration is needed.
# apps/application1.flync.yaml
can_frame_refs:
- bus_ref: DiagCAN
frame_ref: 0x7DF
id_format: standard_11bit
direction: receiver
ipc_refs:
- channel_ref: telemetry_shm
role: producer
# ecus/<ecu>/ipc_channels.flync.yaml
ipc_channels:
- name: telemetry_shm
transport: shared_memory
max_payload_size: 4096
Optional instrumentation overlay¶
The optional instrumentation/ folder (flync_4_instrumentation) adds an
Instrumentation container: flync_model.instrumentation is None without the folder, otherwise its
measurement_points load from instrumentation/measurement_points.flync.yaml. Each measurement point is
identified by its ASAM CMP / TECMP interface ids and taps exactly one medium:
type: ethernet_ports: one or two ports of a point-to-point link, oneinterface_idper port (two ports must be the two ends of the same connection),type: ethernet_bus: one interface id for anethernet_multidropsegment, by connection id,type: can_bus: one interface id plus the capturedpayload_types(can_fdis required exactly onfd_enabledbuses),type: lin_bus: one interface id for a LIN bus.
name and every interface id are unique across the overlay.
New xMII types: USXGMII, USGMII¶
mii_config on ECUPort, SwitchPort
and EthernetInterfaceConfig also accepts
USXGMII and USGMII.
MII, RMII, SGMII, RGMII and XFI keep their shape.
Port extenders¶
SwitchConfig gained port_extenders (default: empty list), a list of
PortExtender with name, uplink and ports. The
extender’s ports stay ordinary SwitchPort entries in ports. The
uplink is either tagged (one single-port xMII link, port tag per frame) or channelized (a multi-port
USXGMII / USGMII lane, one channel per port).
New validation: FLYNC-ECU-...-391 to -403, see Error Catalog.
Breaking — Python API¶
List fields are typed as plain lists¶
These fields are list[...] instead of Optional[list[...]], which removes null from the JSON Schema.
Type checkers now reject None for them; at runtime None is still accepted and becomes [].
TrafficClass.frame_priority_values,TrafficClass.internal_priority_valuesPTPTimeTransmitterConfig.tlvVirtualControllerInterface.multicast,VLANEntry.multicastPortScopedAction.ports,TCAMRule.match_ports,TCAMRule.action
For the following, a null used to load as None and now loads as []:
Socket.multicast_tx,AVTPMulticastEndpoint.multicast_txthe runtime-only
ECU.multicast_groupsandIPv4AddressEndpoint.sockets/IPv6AddressEndpoint.sockets
Value encoding bounds are always integers¶
TextEntry and BitfieldState from_value / to_value are int instead of Optional[int];
None was never a valid bound. An explicit value: null without from_value / to_value is now a
type error instead of an internal assertion error.
EthernetInterfaceConfig.name is typed str | None¶
The name is propagated from the owning EthernetInterface and is
None until then. Runtime behavior is unchanged; type checkers now require a None check.
FLYNCWorkspace.get_semantic_object_from_model() removed¶
Use get_semantic_objects_from_model(); objects[0] if objects else None gives the former result.
InternalConnection.ecu returns the owning ECU¶
It was always None before, so code checking connection.ecu is None now takes the other branch.
Deprecated — Python API¶
ECUPort.get_internal_connected_component() ignores its ecus argument. It is still accepted, but any
value other than None emits a DeprecationWarning. Call it without arguments.
Additive — Python API¶
ECUPort.qualified_name:"<ecu>:<port>"once the port is bound to its ECU, else the port name.SOMEIPMethod.has_response:Truefor request/response methods,Falsefor fire-and-forget ones. It replaces the empty__init__overrides that keptSOMEIPMethodabstract, so constructing the concrete method classes is now type-checked.