Highlights from
Embedded Coder Support Package for Green Hills MULTI IDE (R2012b)

image thumbnail

Embedded Coder Support Package for Green Hills MULTI IDE (R2012b)

by

 

Embedded Coder integration for creating models that run directly in Green Hills MULTI IDE

ghsmultishutdown(hostname, portnum)
function ghsmultishutdown(hostname, portnum)
% GHSMULTISHUTDOWN Shuts down the IDE Link Service.
%    GHSMULTISHUTDOWN(HOSTNAME, PORTNUM) shuts down the IDE Link Service 
%    running on the host specified by HOSTNAME and listening on port specified
%    PORTNUM.
%
%    GHSMULTISHUTDOWN with no arguments uses the HOSTNAME and PORTNUM 
%    set in the preferences.
%
% See also GHSMULTI, GHSMULTICONFIG.

% Copyright 2007-2010 The MathWorks, Inc.
% $Revision: 1.1.6.1 $ 
% $Date: 2012/04/02 21:36:26 $

error(nargchk(0,2,nargin));

myHostname = ghsmultiext.Utilities.multilinkpref('getpref','hostname');
myPortnum  = uint16(ghsmultiext.Utilities.multilinkpref('getpref','portnum'));
switch (nargin)
    case 1,
        if (ischar(hostname))
            myHostname = hostname;
        else
            myPortnum  = uint16(hostname);
        end
    case 2,
        myHostname = hostname;
        myPortnum  = uint16(portnum);
end
try
    h = ghsmultiext.autointerface.TransactionModule(myHostname, myPortnum, false, 4);
    h.ShutdownServer();
catch ex
    fprintf('%s\n',ex.message);
end

Contact us