%% Generate C API Data Definition File for Exchanging Data with a Target System
% This example shows how to use the target-based C API to interface with generated
% code that represents signals, states, parameters, and root-level I/O.  
%% Open Example Model
% Open the example model |rtwdemo_capi|.
open_system('rtwdemo_capi');
%%
% The C API is useful for interacting with application data in generated code, 
% without stopping program execution or recompiling the generated code.  
% To use the C API interface, for a top model and its referenced models:
%  
% 1. Set up a client/server protocol (such as TCP/IP or a dual-port memory 
% connection) between your development computer and the target computer. 
% 
% 2. On the Configuration Parameters dialog box, on the *Code Generation 
% > Interface* pane, select at least one of the C API parameters: *signals*,
% *parameters*, *states*, and *roo-level I/O*. 
%
% 3. Configure the data elements that you want to access with the C API
% with addressable storage classes.
% 
% C API configuration settings for the top model and referenced models must
% match.
% 
% The code generator places the C API interface in the file |_model__capi.c|.
% Depending on your configuration settings, the data can represent signals, 
% states, parameters, and root-level I/O configured with addressable storage 
% classes. The file includes structures that provide an interface to data
% properties.


%% 
% Copyright 2019 The MathWorks, Inc.