Skip to Main Content Skip to Search
Product Documentation

ghsmulti - Create handle object to interact with MULTI IDE

Syntax

IDE_Obj = ghsmulti
IDE_Obj=ghsmulti('propertyname1',propertyvalue1,'propertyname2',…propertyvalue2,'timeout',value)

IDEs

This function supports the following IDEs:

Description

IDE_Obj = ghsmulti returns object IDE_Obj that communicates with a target processor. Before you use this command for the first time, use ghsmulticonfig to configure your MULTI software installation to identify the location of your MULTI software, your processor configuration, your debug server, and the host name and port number of the service.

ghsmulti creates an interface between MATLAB and Green Hills® MULTI®.

The first time you use ghsmulti, supply the properties and property values shown in following table as input arguments.

Property NameDefault ValueDescription
hostnamelocalhostSpecifies the name of the machine hosting the service. The default host name indicates that the service is on the local PC. Replace localhost with the name you entered as the Host name when you ran ghsmulticonfig.
portnum4444Specifies the port to connect to the service on the host machine. Replace portnum with the number you entered as the Port number when you ran ghsmulticonfig.

When you invoke ghsmulti, it starts a service on your localhost. If you selected the Show server status window option when you ran ghsmulticonfig, the service appears in your Microsoft Windows task bar. If you clear Show server status window, the service does not appear.

Parameters that you pass as input arguments to ghsmulti are interpreted as object property definitions. Each property definition consists of a property name followed by the desired property value (often called a PV, or property name/property value, pair).

IDE_Obj = ghsmulti('hostname','name','portnum','number',...) returns a ghsmulti object IDE_Obj that you use to interact with a processor in the IDE from the MATLAB command prompt. If you enter a hostname or portnum that are not the same as the ones you provided when you configured your MULTI installation, the software returns an error that it could not connect to the specified host and port and does not create the object.

You use the debugging methods with this object to access memory and control the execution of the processor. ghsmulti also enables you to create an array of objects for a multiprocessor board, where each object refers to one processor on the board. When IDE_Obj is an array of objects, any method called with IDE_Obj as an input argument is sent sequentially to all processors connected to the ghsmulti object. Green Hills MULTI provides the communication between the IDE and the processor.

After you build the ghsmulti object IDE_Obj, you can review the object property values with get, but you cannot modify the hostname and portnum property values. You can use set to change the value of other properties.

IDE_Obj=ghsmulti('propertyname1',propertyvalue1,'propertyname2',…
propertyvalue2,'timeout',value)
sets the global time-out value in seconds to value in IDE_Obj. MATLAB waits for the specified time-out period to get a response from the IDE application. If the IDE does not respond within the allotted time-out period, MATLAB exits from the evaluation of this function.

Examples

This example demonstrates ghsmulti using default values.

IDE_Obj = ghsmulti('hostname','localhost','portnum',4444);

returns a handle to the default host and port number—localhost and 4444.

IDE_Obj = ghsmulti('hostname','localhost','portnum',4444)

MULTI Object:
  Host Name        : localhost
  Port Num         : 4444
  Default timeout  : 10.00 secs
  MULTI Dir        : C:\ghs\multi500\ppc\

See Also

ghsmulticonfig

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS