Main Content

Data Communication Methods

When designing an application or component model, for some target environment services, you must consider data communication methods that the services use. Data communication methods are direct-access, outside-execution, and during-execution. These methods coordinate the communication of data for tasks, including concurrent access to data. Generated function code must honor the data communication methods that target environment services use.

The direct-access method specifies that application or component code accesses data directly from memory provided by the target environment services.

This figure shows differences between the outside-execution and during-execution communication methods.

Comparison of outside-execution and during-execution communication methods

The gray dashed arrows show component code usage of communicated data. When communicating with a service that uses outside-execution data access, the values of input data remain unchanged as the component code executes. Each time the component code accesses the data, the code uses the same value. When communicating with a service that uses during-execution data access, the values of input data can change as the component code executes. Each time the component code accesses the data, the code might use a different value.

For each data communication method, this table describes the service behavior and the expected corresponding behavior of generated code that uses the service that applies the data communication method.

Data Communication MethodTarget Environment Service BehaviorGenerated Code Behavior
Direct access
  • Provides functions that have direct access to data that is stored in target environment memory. Memory is persistent for the duration of a power cycle.

  • Assumes that generated functions do not access a memory buffer concurrently. Does not apply data concurrency safeguards.

  • Maximizes performance.

Communicates with other functions directly by using memory that the target environment manages.
Outside execution
  • Applies data concurrency safeguards.

  • Communicates data to other functions outside (before and after) function execution.

  • Favors memory optimization over data freshness.

  • Communicates with other functions indirectly.

  • Interacts with memory provided by the target environment.

During execution
  • Applies data concurrency safeguards.

  • Communicates data to other functions immediately during function execution.

  • Favors data freshness over memory usage.

  • Communicates with other functions indirectly.

  • Interacts with target environment services by using target environment local memory.

Design your model and configure model data elements based on the data communication methods that the target environment services apply.

Related Topics