flync_4_someip¶
SOME/IP Configuration¶
Note
Any SOME/IP related configuration such as service descriptions or timings profiles are placed in the directory 📁 general/someip/.
This is a non-mandatory directory for the FLYNC configuration.
- class SOMEIPConfig¶
Bases:
FLYNCBaseModelBasic configuration of SOME/IP for a target system.
Parameters¶
- version: Literal[ “1.0” ]
The version of this config.
- services: list[
SOMEIPServiceInterface] List of SOME/IP Services.
- sd_config:
SDConfig Configuration of the Service-Discovery.
Service Discovery¶
- class SDConfig¶
Bases:
FLYNCBaseModelallows to configure the SOME/IP Service-Discovery. Represent from the Chapter SD, the Endpoint and SD Endpoint.
Parameters¶
- ip_address
IPvAnyAddress IP on which the service discovery operates.
- portint
Port which the service discovery operates on. Must be greater than 0 and lower than 0xFFFF.
- sd_timingsList[
SDTimings] Timing Configurations for SOME/IP-SD.
- ip_address
- class SDTimings¶
Bases:
DictInstancesConfigurations for SOME/IP-SD Timings.
Parameters¶
- profile_idstr
A unique ID for the SOME/IP-SD timings profile.
- initial_delay_minint
Initial delay in milliseconds: This parameter keeps back service offers to pack more entries together. Must be greater or equal to 0. Defaults to 10.
- initial_delay_maxint
Initial delay in milliseconds: This parameter keeps back service offers to pack more entries together. Must be greater or equal to 0. Defaults to 10.
- repetitions_base_delayint
Repetitions Base delay in milliseconds: This parameter helps in fast startup and to make startup more robust.Loss of the first offer results in this delay. Must be greater or equal to 0. Defaults to 30.
- repetitions_maxint
Number of repetitions while doubling delay. Must be greater or equal to 0. Defaults to 3.
- request_response_delay_minint
Request response delay in milliseconds: This parameter keeps back subscribes to pack more entries together. Must be greater or equal to 0. Defaults to 10.
- request_response_delay_maxint
Request response delay in milliseconds: This parameter keeps back subscribes to pack more entries together.”, Must be greater or equal to 0. Defaults to 10.
- offer_cyclic_delay: int, optional
Offer cyclic delay in milliseconds: This parameter keeps system alive with cyclic offer. Must be greater or equal to 0. Defaults to 1000.
- offer_ttlint, optional
Time to live in milliseconds: This parameter determines how fast to age out state. Must be greater or equal to 0. Defaults to 3000.
- find_ttlint, optional
Offer cyclic delay in milliseconds: This parameter keeps system alive with cyclic offer. Must be greater or equal to 0. Defaults to 1000.
- subscribe_ttl: int, optional
Time to live in milliseconds: This parameter determines how fast to age out state. Must be greater or equal to 0. Defaults to 3.
Service Interface¶
- class SOMEIPServiceInterface¶
Bases:
DictInstancesClass to create a SOME/IP service interface definition.
Parameters¶
- namestr
Name of the service
description : str, optional
- idint
Unique identifier for the service. Must be greater than 0 and lower or equal than 0xFFFF.
- major_versionint
The major version of this service interface. Must be greater than 0 and lower or equal than 0xFF.
- minor_versionint
The minor version of this service interface. Must be greater than 0 and lower or equal than 0xFFFFFFFF.
- fieldsList[
SOMEIPField] Fields of the service.
- eventsList[
SOMEIPEvent] Events of the service.
- eventgroupsList[
SOMEIPEventgroup] Eventgroups of the service.
- methodsList[
SOMEIPFireAndForgetMethod|SOMEIPRequestResponseMethod] Methods of the service.
- meta
SOMEIPServiceMetadata Metadata for the SOME/IP Service.
Method¶
- class SOMEIPMethod¶
Bases:
FLYNCBaseModelDatastructure to model SOME/IP methods.
Parameters¶
- namestr
Name of the Method.
- descriptionstr, optional
Description of the Method.
- typeLiteral[“request_response”, “fire_and_forget”]
Type of the Method.
- idint
Unique method identifier for the service interface. Must be greater than 0 and lower or equal than 0xFFFF.
- reliablebool
Indicates whether the event is transmitted reliably.
- someip_tp
SOMEIPTP SOME/IP Transport Protocol configuration for this method.
- input_parameterslist[
SOMEIPParameters] The parameters of the Request
- someip_timingstr, optional
Name of the timings definition. Defaults to “method_default”.
- class SOMEIPFireAndForgetMethod¶
Bases:
SOMEIPMethodAllows to model SOME/IP methods which will not return a response.
- class SOMEIPRequestResponseMethod¶
Bases:
SOMEIPMethodAllows to model SOME/IP methods which will return a response.
Parameters¶
- output_parameterslist[
SOMEIPParameters], optional The parameters of the Response
- output_parameterslist[
- class SOMEIPTP¶
Bases:
FLYNCBaseModelSOME/IP Transport Protocol configuration.
Parameters¶
- enabledbool
Indicates whether SOME/IP-TP is enabled or not. Defaults to False.
- max_segment_lengthint
maximum segment length. Defaults to 0.
Eventgroup¶
- class SOMEIPEventgroup¶
Bases:
FLYNCBaseModelMain datastructure to model a SOME/IP Eventgroup.
Parameters¶
- namestr
Name of the Eventgroup.
description : str, optional
- idint
Identifies the Eventgroup. Must be greater than 0 and lower or equal than 0xFFFF.
- multicast_thresholdint, optional
Identifies the multicast threshold. Must be greater than 0. Defaults to 0.
- events: list[
SOMEIPEvent|SOMEIPField] The events and fields this eventgroup contains.
Event¶
- class SOMEIPEvent¶
Bases:
FLYNCBaseModelDefines a SOME/IP event definition.
This model is used to describe a SOME/IP event, including its identifier, reliability settings, optional E2E protection configuration, and the list of parameters that the event transports.
Parameters¶
- namestr
Name of the event.
- descriptionstr, optional
Human-readable description of the event.
- idint
Unique identifier of the event. Must be greater than 0 and lower or equal than 0xFFFF.
- reliablebool
Indicates whether the event is transmitted reliably.
- e2e
E2EConfig, optional E2E configuration for the event.
- parameters list[
SOMEIPParameters] Parameters of the event
- someip_timingstr, optional
Name of the timings definition. Defaults to “event_default”.
Field¶
- class SOMEIPField¶
Bases:
FLYNCBaseModelBase datastructure to design a SOME/IP Field
Parameters¶
- namestr
Name of the Field.
- parameters list[
SOMEIPParameters] List of Parameters of the Field.
- descriptionstr, optional
Description of the Field.
- notifier_idint, optional
Identifies the Field Notifier. Must be greater than 0 and lower or equal than 0xFFFF. Defaults to 1.
- setter_idint, optional
Identifies the Field Setter. Must be greater than 0 and lower or equal than 0xFFFF.
- getter_idint, optional
Identifies the Field Getter. Must be greater than 0 and lower or equal than 0xFFFF.
- reliablebool
Indicates whether the event is transmitted reliably.
- notifier_e2e
E2EConfig, optional E2E configuration for the field notifier.
- someip_timingstr, optional
Name of the timings definition. Defaults to “field_default”.
Service Deployment¶
Hint
Service Deployments are directly configured in a socket. For further details on the configuration go to: Socket Config.
- class SOMEIPServiceProvider¶
Bases:
SOMEIPServiceDeploymentDefines the provider of a SOME/IP service instance (like offering & sending responses, events).
Parameters¶
deployment_type : Literal[“someip_provider”]
- major_versionint
The major version of this service interface. Must be greater than 0 and less than 255.
- minor_versionint
The minor version of this service interface. Must be greater than 0 and less than 0xFFFFFFFF.
- class SOMEIPServiceConsumer¶
Bases:
SOMEIPServiceDeploymentDefines the consumer of a SOME/IP service instance (like subscribing & calling methods).
Parameters¶
deployment_type : Literal[“someip_consumer”]
- major_versionint
The major version of this service interface. Must be greater than 0 and less or equal 255.
consumed_eventgroups : List[str], optional
- class SOMEIPSDDeployment¶
Bases:
FLYNCBaseModelDefines the Service Discovery endpoint of SOME/IP.
Parameters¶
deployment_type: Literal[“someip_sd”]
- multicastOptional[
MulticastSDEndpoint] Multicast configuration for an SD endpoint.
- multicastOptional[
- class Layer4Endpoint¶
Bases:
FLYNCBaseModelLayer4Endpoint Class method for Layer4 endpoint .
Parameters¶
- protocolLiteral[“UDP”, “TCP”]
Protocol of the Layer4Endpoint. Defaults to UDP.
- portint
Layer4 Port. Must be greater than 0 and less or equal to 65535.
- class MulticastEndpoint¶
Bases:
BaseUDPDeploymentMulticastEndpoint for UDP Deployments.
Parameters¶
- ip_addressIPvAnyAddress
IP-Address of the Multicast Endpoint.
- class MulticastSDEndpoint¶
Bases:
MulticastEndpointMulticastSDEndpoint
Parameters¶
- ip_ttlint
IP Time-to-Live. Must be greater or equal to 0 and less or equal to 255.
- class SOMEIPServiceDeployment¶
Bases:
ABC,FLYNCBaseModelSOMEIPServiceDeployment Create a service deployment that will be used for provided service.
Parameters¶
deployment_type : Literal[“someip”]
- serviceint
Identifies the service. Must be greater than 0 and less than 0xFFFF.
- major_versionint
The major version of this service interface. Must be greater than 0 and less or equal 255.
- instance_id: int
Id of the Service Instance. Must be greater than 0 and less than 0xFFFF.
- someip_sd_timings_profile: str
The SOME/IP timings profile_id used for the deployment.
- class BaseUDPDeployment¶
Bases:
Layer4EndpointBase class for deploying a SOME/IP service onto a UDP-endpoint.
- class UDPDeployment¶
Bases:
BaseUDPDeploymentAllows deploying a SOME/IP service onto a UDP-endpoint (including multicast).
Parameters¶
- multicast
MulticastEndpoint, optional Multicast configuration for this endpoint.
- multicast
- class TCPDeployment¶
Bases:
Layer4EndpointBase class for deploying a SOME/IP service onto a TCP-endpoint
SOME/IP Datatypes¶
Note
SOME/IP Datatypes are used to describe the parameters of messages that are transported in the payload.
- class PrimitiveDatatype¶
Bases:
DatatypeBase class for primitive datatypes such as integers, floating-point values, or booleans.
Parameters¶
- namestr
Unique name of the datatype.
- descriptionstr, optional
Human-readable description of the datatype.
- typestr
Discriminator identifying the concrete primitive datatype kind.
- endiannessLiteral[“BE”, “LE”], optional
Byte order used for encoding multi-byte values. Defaults to big-endian (“BE”).
- bit_sizeint
Size in bits of the primitive datatype.
- class ComplexDatatype¶
Bases:
DatatypeBase class for complex datatypes such as structures, arrays, or unions.
Parameters¶
- namestr
Unique name of the datatype.
- descriptionstr, optional
Human-readable description of the datatype.
- typestr
Discriminator identifying the concrete complex datatype kind.
- endiannessLiteral[“BE”, “LE”], optional
Byte order used for encoding multi-byte values. Defaults to big-endian (“BE”).
- class BaseInt¶
Bases:
PrimitiveDatatypeBase class for all integer primitive datatypes.
This class provides shared semantics for signed and unsigned integer representations and defines common descriptive metadata.
- class BaseFloat¶
Bases:
PrimitiveDatatypeBase class for all floating-point primitive datatypes.
This class provides shared semantics for floating-point representations and defines common descriptive metadata.
- class Typedef¶
Bases:
ComplexDatatypeAlias datatype that references another datatype definition.
A typedef introduces an alternative name for an existing datatype without changing its underlying structure or serialization behavior.
Parameters¶
- namestr
Name of Typedef.
- typeLiteral[“typedef”]
Discriminator used to identify this datatype.
- namestr
Name of the typedef reference.
- datatyperefAllTypes
Referenced datatype definition that this typedef aliases.
- class ArrayType¶
Bases:
ComplexDatatypeGeneric multidimensional array type.
Parameters¶
- namestr
Name of Array.
- typeLiteral[“array”]
Discriminator identifying this datatype as an array.
- dimensionsList[
ArrayDimension] Ordered list of array dimensions (outer → inner). Must contain at least one dimension.
- element_type
AllTypes Datatype of the innermost array element. This may itself be a primitive, struct, union, or another array type.
- class ArrayDimension¶
Bases:
FLYNCBaseModelDescribes a single array dimension.
Parameters¶
- kindLiteral[“fixed”, “dynamic”]
Specifies whether the dimension has a fixed size or a dynamically encoded length.
- lengthint, optional
Number of elements for a fixed-length dimension. Must be greater than 0. Only valid when
kind="fixed".- length_of_length_fieldLiteral[0, 8, 16, 32], optional
Size in bits of the length field that precedes the array data for a dynamic dimension. Only valid when
kind="dynamic".- upper_limitint, optional
Upper bound on the number of elements. Must be greater than 0.
- lower_limitint, optional
Lower bound on the number of elements. Must be greater than or equal to 0.
- bit_alignmentLiteral[8, 16, 32, 64, 128, 256], optional
Optional padding alignment in bits applied after this dimension.
- class BitfieldEntryValue¶
Bases:
BaseModelRepresents a named value within a bitfield entry.
Parameters¶
- valueint
Numeric value represented by this bitfield entry value.
- namestr
Symbolic name associated with the value.
- descriptionstr, optional
Human-readable description of the value.
- class BitfieldEntry¶
Bases:
BaseModelDescribes a single field within a bitfield.
Parameters¶
- namestr
Name of the individual bitfield.
- bitpositionint
Bit position of the individual bitfield within the enclosing bitfield datatype.
- descriptionstr, optional
Human-readable description of the field.
- valueslist of
BitfieldEntryValue, optional Optional enumeration of named values defined for this bitfield entry.
- class Bitfield¶
Bases:
DatatypeAllows modeling of SOME/IP bitfields.
Parameters¶
- namestr
Unique name of the datatype.
- descriptionstr, optional
Human-readable description of the datatype.
- typeLiteral[“bitfield”]
Discriminator identifying this datatype as a bitfield.
- endiannessLiteral[“BE”, “LE”], optional
Byte order used for encoding multi-byte values. Defaults to big-endian (“BE”).
- lengthLiteral[8, 16, 32, 64], optional
Size of the bitfield in bits.
- fieldslist of
BitfieldEntry List of bitfield entries that define the individual bit ranges.
- class EnumEntry¶
Bases:
BaseModelRepresents a single entry in an enumeration.
Parameters¶
- valueint
Numeric value associated with the enumeration entry.
- namestr
Symbolic name of the enumeration entry.
- descriptionstr, optional
Human-readable description of the enumeration entry.
- class Enum¶
Bases:
DatatypeAllows modeling SOME/IP enumerations with value, name, and description.
Parameters¶
- namestr
Unique name of the datatype.
- descriptionstr, optional
Human-readable description of the datatype.
- typeLiteral[“enum”]
Datatype discriminator identifying this datatype as an enumeration.
- endiannessLiteral[“BE”, “LE”], optional
Byte order used for encoding multi-byte values. Defaults to big-endian (“BE”).
- base_typeInts, optional
Underlying integer datatype used to encode enumeration values. Defaults to
UInt8.- entrieslist of
EnumEntry, optional List of enumeration entries defining the mapping between numeric values and symbolic names.
- class Boolean¶
Bases:
PrimitiveDatatypeBoolean primitive datatype.
Parameters¶
- namestr
Datatype name. Defaults to
"BOOLEAN".- typeLiteral[“boolean”]
Discriminator identifying the primitive boolean datatype.
- signedLiteral[False]
Indicates that the boolean is unsigned.
- endiannessLiteral[“BE”]
Byte order used for encoding. Big-Endian (“BE”).
- bit_sizeint
Storage size in bits: 8.
- class UInt8¶
Bases:
BaseIntUnsigned 8-bit integer datatype.
Parameters¶
- namestr
Datatype name. Defaults to
"UINT8".- typeLiteral[“uint8”]
Discriminator identifying this datatype.
- signedLiteral[False]
Indicates that the integer is unsigned.
- endiannessLiteral[“BE”]
Byte order used for encoding. Big-Endian (“BE”).
- bit_sizeint
Storage size in bits: 8.
- class UInt16¶
Bases:
BaseIntUnsigned 16-bit integer datatype.
Parameters¶
- namestr
Datatype name. Defaults to
"UINT16".- typeLiteral[“uint16”]
Discriminator identifying this datatype.
- signedLiteral[False]
Indicates that the integer is unsigned.
- endiannessLiteral[“BE”, “LE”], optional
Byte order used for encoding multi-byte values. Defaults to big-endian (“BE”).
- bit_sizeint
Storage size in bits: 16.
- class UInt32¶
Bases:
BaseIntUnsigned 32-bit integer datatype.
Parameters¶
- namestr
Datatype name. Defaults to
"UINT32".- typeLiteral[“uint32”]
Discriminator identifying this datatype.
- signedLiteral[False]
Indicates that the integer is unsigned.
- endiannessLiteral[“BE”, “LE”], optional
Byte order used for encoding multi-byte values. Defaults to big-endian (“BE”).
- bit_sizeint
Storage size in bits: 32.
- class UInt64¶
Bases:
BaseIntUnsigned 64-bit integer datatype.
Parameters¶
- namestr
Datatype name. Defaults to
"UINT64".- typeLiteral[“uint64”]
Discriminator identifying this datatype.
- signedLiteral[False]
Indicates that the integer is unsigned.
- endiannessLiteral[“BE”, “LE”], optional
Byte order used for encoding multi-byte values. Defaults to big-endian (“BE”).
- bit_sizeint
Storage size in bits: 64.
- class Float32¶
Bases:
PrimitiveDatatype32-bit floating-point datatype.
Parameters¶
- namestr
Datatype name. Defaults to
"FLOAT32".- typeLiteral[“float32”]
Discriminator identifying this datatype.
- signedLiteral[True]
Indicates that the float is signed.
- endiannessLiteral[“BE”, “LE”], optional
Byte order used for encoding multi-byte values. Defaults to big-endian (“BE”).
- bit_sizeint
Storage size in bits: 32.
- class Float64¶
Bases:
BaseFloat64-bit floating-point datatype.
Parameters¶
- namestr
Datatype name. Defaults to
"FLOAT64".- typeLiteral[“float64”]
Discriminator identifying this datatype.
- signedLiteral[True]
Indicates that the float is signed.
- endiannessLiteral[“BE”, “LE”], optional
Byte order used for encoding multi-byte values. Defaults to big-endian (“BE”).
- bit_sizeint
Storage size in bits: 64.
- class BaseString¶
Bases:
DatatypeBase class for all string datatypes.
Parameters¶
- typestr
Discriminator identifying the concrete string type.
- encodingLiteral[“UTF-8”, “UTF-16BE”, “UTF-16LE”]
Character encoding used for the string payload.
- class FixedLengthString¶
Bases:
BaseStringFixed-length string datatype.
This string occupies a fixed number of bytes on the wire. If the actual content is shorter than the configured length, it is padded with zero bytes.
Parameters¶
- namestr
Name of the String.
- typeLiteral[“fixed_length_string”]
Discriminator used to identify this datatype.
- lengthint
Total length of the string in bytes, including zero-termination and any padding.
- length_of_length_fieldLiteral[0, 8, 16, 32]
Size of the optional length field in bits. A value of 0 indicates that no length field is present.
- class DynamicLengthString¶
Bases:
BaseStringDynamic-length string datatype.
The encoded representation starts with a length field, followed by the string content and a zero-termination character.
Parameters¶
- namestr
Name of the String.
- typeLiteral[“dynamic_length_string”]
Discriminator used to identify this datatype.
- length_of_length_fieldLiteral[8, 16, 32]
Size of the length field in bits that precedes the string data.
- bit_alignmentLiteral[8, 16, 32, 64, 128, 256]
Optional padding alignment applied after the string so that the next parameter starts at the specified bit boundary.
- class Struct¶
Bases:
ComplexDatatypeStructured datatype composed of multiple ordered members.
A struct groups several datatypes into a single composite element that is serialized in the order the members are defined.
Parameters¶
- typeLiteral[“struct”]
Discriminator used to identify this datatype.
- membersList[AllTypes]
Ordered list of datatypes that form the members of the struct.
- bit_alignmentLiteral[8, 16, 32, 64, 128, 256]
Optional padding alignment applied after the struct to ensure the next parameter starts at the specified bit boundary.
- length_of_length_fieldLiteral[0, 8, 16, 32]
Size of the optional length field in bits that prefixes the struct. A value of 0 indicates that no length field is present.
- class UnionMember¶
Bases:
DatatypeRepresents a single member entry of an union datatype.
Each union member defines a possible datatype that may be present, together with its selector index and a descriptive name.
Parameters¶
- typeAllTypes
Member datatype (discriminated by its
typefield).- indexint
Index of the union member. This value is used in the serialized union to indicate which member is currently active. Must be greater than or equal to 0.
- namestr
Name of the union member.
- class Union¶
Bases:
DatatypeRepresents an union datatype.
A union allows exactly one of several possible member datatypes to be encoded at runtime. The active member is identified using a type selector field.
Parameters¶
- namestr
Name of the Union.
- typeLiteral[“union”]
Discriminator used to identify this datatype.
- memberslist of
UnionMember List of the allowed datatypes a union can contain.
- bit_alignmentLiteral[8, 16, 32, 64, 128, 256], optional
Defines the optional alignment padding that can be added after the union to fix the alignment of the next parameter to 8, 16, 32, 64, 128 or 256 bits.
- length_of_length_fieldLiteral[0, 8, 16, 32], optional
Defines the length of the length-field in bits for the union.
- length_of_type_fieldLiteral[0, 8, 16, 32], optional
Defines the length of the type-selector field in bits for the union.
- someip_datatypes.AllTypes¶
alias of
Annotated[Annotated[Annotated[Int8|Int16|Int32|Int64, FieldInfo(annotation=NoneType, required=True, discriminator=’type’)] |Annotated[UInt8|UInt16|UInt32|UInt64, FieldInfo(annotation=NoneType, required=True, discriminator=’type’)], FieldInfo(annotation=NoneType, required=True, discriminator=’type’)] |Annotated[Float32|Float64, FieldInfo(annotation=NoneType, required=True, discriminator=’type’)] |Enum|Boolean|Struct|Union|ArrayType|DynamicLengthString|FixedLengthString|Bitfield, FieldInfo(annotation=NoneType, required=True, discriminator=’type’)]