|
|
|
## Idea of the EE-System
|
|
|
|
|
|
|
|
> *__EE__ comes from "Electrical & Electronic Systems"*
|
|
|
|
|
|
|
|
The `eesimulator` sub-project of the `simulation` project defines the bases of the *EE-System*.
|
|
|
|
|
|
|
|
The EE-System models the different electronic components in a vehicle and how they **communicate**.
|
|
|
|
The communication is modelled through **messages** sent between the components.
|
|
|
|
|
|
|
|
### Message Model
|
|
|
|
|
|
|
|
In contrast to communication between *clients* in protocols such as ethernet or email, the communication in the vehicle is *message-based*.
|
|
|
|
This means a component does not send data directly to another component, but rather broadcasts a message with a given name/id.
|
|
|
|
All components listen to the messages and filter out those that are relevant based on their name/id.
|
|
|
|
|
|
|
|
Each component registers which types of messages it wants to send or receive.
|
|
|
|
This is done through **ports**.
|
|
|
|
A port specifies the **name** and **data-type** of the messages it send or receives.
|
|
|
|
|
|
|
|
When a component sends a message on one of its port, the ee-system will transport it to components that have input ports of the same name/type.
|
|
|
|
The transportation of the message is modelled through **bus** and **bridge** components.
|
|
|
|
The EE-system also ensures that the **data-types** expected by the components **match** for the same message type.
|
|
|
|
|
|
|
|
Note that components can be connected directly together bypassing the modelling of communication.
|
|
|
|
|
|
|
|
### Simple Example
|
|
|
|
|
|
|
|
The following example shows a (minimalist/theoretical) example of how a vehicle could be setup.
|
|
|
|
It contains a sensor component with a `velocity` output port (sending doubles), an actuator component with a `set_gas` input port and an autopilot components with the corresponding input/output ports.
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
# Implementation
|
|
|
|
|
|
|
|
## Event-based simulation
|
|
|
|
|
|
|
|
The EE-System is simulated using **Discrete-Event simulation** (see "Discrete-Event-Simulation" in [Simulation Methods](/dev-docs/simulation/Simulation-Methods)).
|
|
|
|
|
|
|
|
TODO eecomponents as event targets
|
|
|
|
|
|
|
|
### Message Events
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
- Send, receive
|
|
|
|
|
|
|
|
### ExecuteEvents (and others?)
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
## Message modelling classes
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
- [DataType System](/dev-docs/commons/DataType-System)
|
|
|
|
- [Type Mappings](/dev-docs/commons/DataType-System#type-mappings)
|
|
|
|
- DataType
|
|
|
|
- ProgramInterface/PortInformation
|
|
|
|
- MessageInformation/Message, Type Mappings
|
|
|
|
- Graphic
|
|
|
|
|
|
|
|
## Sockets & Tags (or in previous section?)
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
## Routing
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
- routing tables graphic
|
|
|
|
|
|
|
|
TODO:
|
|
|
|
|
|
|
|
|
|
|
|
- fixed "interface" for components -> if want dynamic content -> needs to be wrapped as string or binary
|
|
|
|
- Class ref
|
|
|
|
- Message
|
|
|
|
- Component
|
|
|
|
- MessageInfo
|
|
|
|
- EESystem:
|
|
|
|
- EEComponents
|
|
|
|
- connected
|
|
|
|
- msgRouting
|
|
|
|
- events
|
|
|
|
- computeRouting
|
|
|
|
- "EEComponents "Folder": Pages for buses, sensors, ...
|
|
|
|
- "ProgramInterface" page
|
|
|
|
|
|
|
|
old TODO/EE-System.md |
|
|
|
\ No newline at end of file |