Skip to content

FlexRay

feral3gp.feral.flexray(config, director=Simulation.director_de)

Source code in feral3gp/feral/network/flex_ray.py
48
49
50
51
52
53
54
55
56
def flexray(config: FlexRayConfig, director=Simulation.director_de):
    number_of_nodes = len(config.nodes)
    java_flexray_network = JFlexRayNetwork(config.name, director, number_of_nodes)
    __configure_flex_ray_network(config, java_flexray_network)

    __configure_nodes(config, java_flexray_network, __configure_flex_ray_node)
    __configure_console(java_flexray_network, config.console)

    return java_flexray_network

feral3gp.feral.FlexRayConfig dataclass

Bases: NetworkConfig

The configuration of the FlexRay network

Source code in feral3gp/feral/network/flex_ray_config.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@dataclass
class FlexRayConfig(NetworkConfig):
    """
    The configuration of the FlexRay network
    """

    name: str = "unnamed Flex Ray Network"
    """the name of the network"""

    pd_micro_tick: int = feral.micros(1)
    """
    The micro tick duration - Default 1µs
    """

    gd_macro_tick: int = feral.micros(1)
    """
    The macro tick duration - Default 1µs
    """

    gd_mini_slot: int = 2
    """
    Store length of minislot (# macroticks)
    """

    latest_tx: int = 200
    """
    Store latest transmission start in dynamic segment (minislot)
    """

    is_echo_frame: bool = False
    """
    If the echo frames flag set to true, the FlexRay network will echo transmitted frames back to sender nodes. 
    If false, transmitters will not receive their transmitted frames.
    """

    cycle_start: int = 8
    """
    The cycle to start with the simulation
    """

    macro_per_cycle: int = 1000
    """
    The number of macro ticks in a communication cycle. This is cluster parameter. This parameter must have the same 
    value in all nodes in a cluster
    """

    gd_static_slot: int = 10
    """
    The the duration of a static slot in macro ticks. This is cluster parameter. This parameter must have the same 
    value in all nodes in a cluster.
    """

    number_of_static_slots: int = 60
    """
    The number of static slots in the static segment. This is cluster parameter. This parameter must have the 
    same value in all nodes in a cluster.
    """

    number_of_mini_slots: int = 0
    """
    The number of mini slots in the dynamic segment. This is cluster parameter. This parameter must have the same value 
    in all nodes in a cluster.
    """

    gd_symbol_window: int = 0
    """
    The duration of the symbol window in macro ticks. The symbol window is optional within a FlexRay simulation. 
    If set to zero no symbol window is part in the communication cycle. This is global cluster parameter. This 
    parameter must have the same value in all nodes in a cluster.
    """

    gd_NIT: int = 0
    """
    The duration of the Network Idle Time in macro ticks. This is global cluster parameter. This parameter must have 
    the same value in all nodes in a cluster.
    """

cycle_start: int = 8 class-attribute instance-attribute

The cycle to start with the simulation

gd_NIT: int = 0 class-attribute instance-attribute

The duration of the Network Idle Time in macro ticks. This is global cluster parameter. This parameter must have the same value in all nodes in a cluster.

gd_macro_tick: int = feral.micros(1) class-attribute instance-attribute

The macro tick duration - Default 1µs

gd_mini_slot: int = 2 class-attribute instance-attribute

Store length of minislot (# macroticks)

gd_static_slot: int = 10 class-attribute instance-attribute

The the duration of a static slot in macro ticks. This is cluster parameter. This parameter must have the same value in all nodes in a cluster.

gd_symbol_window: int = 0 class-attribute instance-attribute

The duration of the symbol window in macro ticks. The symbol window is optional within a FlexRay simulation. If set to zero no symbol window is part in the communication cycle. This is global cluster parameter. This parameter must have the same value in all nodes in a cluster.

is_echo_frame: bool = False class-attribute instance-attribute

If the echo frames flag set to true, the FlexRay network will echo transmitted frames back to sender nodes. If false, transmitters will not receive their transmitted frames.

latest_tx: int = 200 class-attribute instance-attribute

Store latest transmission start in dynamic segment (minislot)

macro_per_cycle: int = 1000 class-attribute instance-attribute

The number of macro ticks in a communication cycle. This is cluster parameter. This parameter must have the same value in all nodes in a cluster

name: str = 'unnamed Flex Ray Network' class-attribute instance-attribute

the name of the network

number_of_mini_slots: int = 0 class-attribute instance-attribute

The number of mini slots in the dynamic segment. This is cluster parameter. This parameter must have the same value in all nodes in a cluster.

number_of_static_slots: int = 60 class-attribute instance-attribute

The number of static slots in the static segment. This is cluster parameter. This parameter must have the same value in all nodes in a cluster.

pd_micro_tick: int = feral.micros(1) class-attribute instance-attribute

The micro tick duration - Default 1µs

feral3gp.feral.FlexRayNodeConfig dataclass

Bases: NodeConfig

Data class to configure the behaviour of an FlexRay node

Source code in feral3gp/feral/network/flex_ray_config.py
 7
 8
 9
10
11
12
13
14
15
@dataclass
class FlexRayNodeConfig(NodeConfig):
    """Data class to configure the behaviour of an FlexRay node"""

    address: str = None
    """
    The address of the node. Only relevant, if the node is a RAW interface. Otherwise the address will be 
    specified within the 'MessageTypeConfiguration'
    """

address: str = None class-attribute instance-attribute

The address of the node. Only relevant, if the node is a RAW interface. Otherwise the address will be specified within the 'MessageTypeConfiguration'