Target Environment Services
Target platform and custom services supplement tasks performed by an operating system to support the execution of applications and components. Service code insulates application code from target implementations. Platform services can consist of:
Scheduling and task execution services
Communication services, including support for device driver, send-receive, client-server, message-trigger and data transfer communication
Auxiliary services, such as timer, nonvolatile memory, parameter tuning, and measurement services
Custom services include specialized device drivers and middleware.
This figure and the table that follows identify services with which embedded system application and component code typically interact.
|Scheduler||Selects a task to execute based on a sample time (period or offset) or an event and execution order. Goals of the service include maximizing throughput, minimizing wait time, minimizing latency, maximizing fairness, and meeting deadlines.|
|Receiver||Receives input data from applications or components, nonvolatile memory, or the target environment.|
|Sender||Sends output data to applications or components, nonvolatile memory, or the target environment.|
|Data transfer||Handles sharing of data between callable entry-point functions. A callable function is an entry-point that target environment software can call. The service takes complete ownership of the shared data, including the setting of initial values.|
|Nonvolatile memory||Reads data from and writes data to nonvolatile memory.|
|Timer||Implements aspects to time, such as a clock tick with a specific tick resolution.|
|Parameter tuning||Enables access to and the ability to change parameter values while algorithm code executes.|
|Measurement||Enables access to and the ability read signal data while algorithm code executes.|
When designing a model, in addition to aspects of the algorithm, consider how the application or component will interact with the target environment services. The interaction occurs through generated code interfaces. For the code generator to produce interface code that can interact with a service, you must provide the code generator with information about the target environment interface requirements, such as the service function name and data access method. Model inports, for example, represent requests to a target platform receiver service. You inform the code generator about how to generate interface code for the service requests by mapping the inports to a defined code interface.