image thumbnail

Simulink Support Package for Pandaboard Hardware (R2012b)

by

 

12 Sep 2012 (Updated )

Low-cost, single-board computer designed for audio, video, and digital signal processing

panda(varargin)
function h = panda(varargin)
% PANDA Establish connection with PandaBoard hardware.
% 
% C = panda creates a connection object, C, for communicating with 
% PandaBoard hardware.
%
% C = panda(hostname, username, password, builddir) allows specification
% of non-default values for the IP address, user name, password, and the
% build directory on the PandaBoard hardware.
%
% Methods:
% 
% [status, msg] = C.connect tests SSH connection to the PandaBoard
% hardware. If connection is successful, the return value for status is
% zero. Otherwise an error has occurred during connection. The output
% argument msg provides diagnostic messages if the connection fails.
%
% [status, msg] = C.execute('command') executes the Linux command on the
% PandaBoard hardware and returns the resulting status and standard output. 
%
% C.execute('command', true) executes the Linux command on the PandaBoard
% hardware and forces the output to the MATLAB command window.
%
% C.run(modelName) runs the previously compiled Simulink model on the
% PandaBoard hardware.
%
% C.stop(modelName) stops the execution of the Simulink model on the
% PandaBoard hardware.
%
% C.openShell('ssh') launches a SSH terminal session. Once the terminal
% session is started, you can execute commands on the PandaBoard hardware
% interactively.
% 
% C.openShell('serial') launches a serial terminal session. You must have a
% serial connection between your host computer and the PandaBoard hardware.
% The parameters of the serial connection must be set to the following:
% 
% Baud Rate   : 115200
% Data bits   : 8
% Stop bits   : 1
% Parity      : None
% Flow control: None
%
% Examples:
%
%    C = panda;
%    C.execute('ls -al ~', true);
%
%  lists the contents of the home directory for the current user on the
%  PandaBoard hardware.
%
%    [st, msg] = C.connect
%
%  tests the SSH connection to the PandaBoard hardware. 
%
%    C.run('pandaboard_gettingstarted') 
%
%  runs the model 'pandaboard_gettingstarted' on the PandaBoard hardware.
%  The model must have run previously on the PandaBoard hardware for this
%  method to work properly.
%
%    C.openShell('ssh') 
%
%  launches a SSH terminal session. You must enter the user name and the
%  password to login to the Linux shell running over SSH. Once logged in,
%  you can execute interactive shell commands.


%   Copyright 2012 The MathWorks, Inc.

narginchk(0, 4);
if nargin > 0
    h = realtime.internal.getLinuxServicesHandle('PandaBoard', varargin{:});
else
    h = realtime.internal.getLinuxServicesHandle('PandaBoard');
end

end

Contact us