flync_4_app¶
The app layer describes applications of a system in a top-level apps directory.
Applications are then bind inside an ECU Controller in an optional app_bindings file.
Applications (experimental)¶
Each file in the top-level apps directory defines one set that maps onto transport services.
The set name is implied from the filename on disk.
- class App¶
Bases:
FLYNCBaseModelDefinition of an application in the system.
Parameters¶
- name: str
Name of this application. Implied from filename.
- service_consumer_refs: list of
ServiceConsumerReference Reference of all Consumer Instances of this application.
- service_provider_refs: list of
ServiceProviderReference Reference of all Provider Instances of this application.
- can_frame_refs: list of
AppCANFrameRef CAN / CAN FD frames this application sends or receives.
- j1939_frame_refs: list of
AppJ1939FrameRef J1939 frames this application sends or receives.
- can_pdu_refs: list of
AppCANPDURef PDUs this application sends or receives within CAN / CAN FD frames.
- j1939_pdu_refs: list of
AppJ1939PDURef PDUs this application sends or receives within J1939 frames.
- ipc_refs: list of
IPCChannelReference ECU-internal IPC channels this application takes part in.
- class ServiceConsumerReference¶
Bases:
FLYNCBaseModelReference to resolve a SOME/IP Consumer Instance.
Parameters¶
- type: Literal[“consumer”]
Type of the service reference.
- service_id: int
Service ID of the referenced service instance (> 0 and < 65535).
- instance_id: int
Instance ID of the referenced service instance.
- major_version: int
Major version of the referenced service instance.
- class ServiceProviderReference¶
Bases:
FLYNCBaseModelReference to resolve a SOME/IP Provider Instance.
Parameters¶
- type: Literal[“provider”]
Type of the service reference.
- service_id: int
Service ID of the referenced service instance (> 0 and < 65535).
- instance_id: int
Instance ID of the referenced service instance.
- major_version: int
Major version of the referenced service instance.
CAN and J1939 references (experimental)¶
An application lists the CAN / CAN FD frames, J1939 frames and PDUs it sends or receives. Each reference names the
CAN bus and a direction. A frame reference that does not resolve on its bus is an error; a bound controller
without a matching CAN interface only produces a warning.
- class AppCANFrameRef¶
Bases:
FLYNCBaseModelReference to a CAN or CAN FD frame an application sends or receives.
Parameters¶
- bus_ref: str
Name of the
CANBuscarrying the frame.- frame_ref: int
CAN ID of the referenced frame on that bus.
- id_format: Literal[“standard_11bit”, “extended_29bit”]
Identifier format of the referenced frame.
- direction: Literal[“sender”, “receiver”]
Whether the application transmits or receives the frame.
- class AppJ1939FrameRef¶
Bases:
FLYNCBaseModelReference to a J1939 frame, identified by its PGN, an application sends or receives.
Parameters¶
- bus_ref: str
Name of the
CANBuscarrying the frame.- pgn: int
18-bit Parameter Group Number of the referenced frame on that bus.
- direction: Literal[“sender”, “receiver”]
Whether the application transmits or receives the frame.
- class AppCANPDURef¶
Bases:
FLYNCBaseModelReference to a PDU an application sends or receives within a CAN or CAN FD frame.
Parameters¶
- pdu_ref: str
Name of the referenced
PDU.- bus_ref: str
Name of the CAN bus on which a CAN / CAN FD frame packs the PDU.
- direction: Literal[“sender”, “receiver”]
Whether the application transmits or receives the PDU.
- class AppJ1939PDURef¶
Bases:
FLYNCBaseModelReference to a PDU an application sends or receives within a J1939 frame.
Parameters¶
- pdu_ref: str
Name of the referenced
PDU.- bus_ref: str
Name of the CAN bus on which a J1939 frame packs the PDU.
- direction: Literal[“sender”, “receiver”]
Whether the application transmits or receives the PDU.
ECU-internal IPC channels (experimental)¶
An ECU declares its IPC channels in ipc_channels.flync.yaml. Apps bound inside that ECU join a channel through
ipc_refs; a reference to a channel the ECU does not declare is an error, and a channel without a producer or
consumer among its bound apps produces a warning.
- class IPCChannel¶
Bases:
FLYNCBaseModelCommunication channel between applications inside a single ECU.
The channel never leaves the ECU. Which applications take part is declared by the applications through
IPCChannelReference; the channel itself only carries the transport configuration.Parameters¶
- name: str
Name of the channel. Unique within the ECU.
- transport: Literal[“shared_memory”, “unix_socket”, “message_queue”, “pipe”, “other”]
Mechanism used to carry the data.
- description: str, optional
Free-text description of the channel.
- max_payload_size: int, optional
Maximum size of a single message or of the shared memory region in bytes.
- queue_depth: int, optional
Number of messages the channel buffers. Only meaningful for queue-like transports.
- class IPCChannelReference¶
Bases:
FLYNCBaseModelParticipation of an application in an
IPCChannel.Parameters¶
- channel_ref: str
Name of an
IPCChannelof the ECU hosting the application.- role: Literal[“producer”, “consumer”, “bidirectional”]
Role the application plays on the channel.
App Bindings (experimental)¶
Each controller can declare one app_bindings.flync.yaml file where system applications are referenced.
- class AppBindings¶
Bases:
FLYNCBaseModelReference of Applications a Controller should bind to.
Parameters¶
- app_refs: list of str
List of application names to bind to.
Private Attributes¶
- _appslist of
App Applications to bind to. Managed internally.