cgsl_0406: Data send for component deployment
ID: Title | cgsl_0406: Data send for component deployment | ||
---|---|---|---|
Description | A | To model a call to the target platform sender service, use an Out Bus Element or Outport block. | |
B | To safeguard data for concurrent access, map the component outports to a service interface that is configured to use the During Execution or Outside execution communication method.
| ||
C | When concurrent access to data is not a concern, map component outports to a service interface that is configured to use the Direct Access communication method. In this case, no safeguard for data access is provided. | ||
Rationale | The generated code aligns with the data communication method that is required by the target platform environment. | ||
Model Advisor Check | A Model Advisor check is not necessary for this guideline because a service interface for a sender service must be configured to use one of the three data communication methods. | ||
Example | Specifying the Data Communication Method for Calling the Target Platform Data Sender Service In this example, the data communication method is set to Outside Execution. void CD_accumulator(void) { . . . for (i = 0; i < 10; i++) { . (set_CD_accumulator_out())[i] = CD_param.tunable_gain * CD_sig.delay[i]; } } In this example, the data communication method is set to During Execution. void CD_accumulator(void) { real_T out[10]; . . . for (i = 0; i < 10; i++) { . out[i] = CD_param.tunable_gain * CD_sig.delay[i]; } set_CD_accumulator_out(&out[0]); } In this example, the data communication method is set to Direct Access. void CD_accumulator(void) { . . . for (i = 0; i < 10; i++) { . . . CD_sig.out[i] = CD_param.tunable_gain * CD_sig.delay[i]; } } |
See Also
Code Interfaces and Code Interface Specification (Embedded Coder)
Receiver and Sender Service Interfaces (Embedded Coder)
Data Communication Methods (Embedded Coder)
Embedded Coder Dictionary (Embedded Coder)
Select Code Generation Output for Target Platform Deployment (Embedded Coder)
set
(Embedded Coder)