| Link for TASKING | ![]() |
www.kxcad.net Home > CAE Software Index > MATLAB Index >
| Overview of Automation Interface Component | Introduction and definitions of Link for TASKING objects. |
| Classes | Classes provided with Link for TASKING. |
| Using Objects | How to create objects and find methods and properties. |
| List of Methods | Tables showing the methods available for Link for TASKING objects. |
| Details of Particular Methods | Information about particular methods, such as read/write memory units. |
The Link for TASKING Automation Interface Component provides powerful MATLAB API's for automating interacting with the TASKING EDE and CrossView Pro Debugger. See Automation Interface for a summary.
Link for TASKING uses object-oriented programming techniques and requires a basic knowledge of some object-oriented terminology. The following are some fundamental terms you should understand:
Object — Something you can operate on. An object is an instance of a class, created by calling the class constructor.
Class — A class defines the properties and methods common to all objects of the class.
Constructor — A function that creates an object, based on the class definition, and initializes it.
Method — An operation on an object, defined as part of the class definition.
Property — Part of an object, treated as a variable at times, that is defined as part of the class definition.
Handle — A mechanism to access any object that Link for TASKING creates. Used in this guide to refer to the object. Often the handle is the name you assign when you create the object.
The following sections describe how to use and get help for Link for TASKING objects. See Objects Demo Example for an example demonstrating some basic capabilities of Link for TASKING objects.
The following table shows the different classes that are provided with Link for TASKING.
| Class | Description |
|---|---|
| tasking.edeapi | Represents the TASKING EDE. |
| tasking.edeprojectspace | Represents a project space in the TASKING EDE. |
| tasking.edeproject | Represents a project in the TASKING EDE. |
| tasking.xviewapi | Represents the TASKING CrossView Pro debugger. |
| tasking.Tasking_Configuration | Property of a tasking.edeapi class representing TASKING configuration details. |
| tasking.EDE_Configuration | Property of a tasking.tasking_Configuration representing EDE configuration details. |
| tasking.CrossView_Pro_Configuration | Property of a tasking.tasking_Configuration representing CrossView Pro configuration details. |
The topics in this section are:
To find out how to create an object of a particular class you can use the tasking_help function to find help for the constructor. At the MATLAB command prompt, enter
tasking_help <classname>.<constructorname>
For example, for the tasking.edeapi class, enter
tasking_help tasking.edeapi.edeapi
For the tasking.edeprojectspace class, enter
tasking_help tasking.edeprojectspace.edeprojectspace
Follow these steps to create example objects.
To create a tasking.edeapi object, you call the constructor as follows:
Ede = tasking.edeapi
The name on the left side of the "=" could be any valid MATLAB identifier and is the handle to the object.
You must choose a configuration, then communication is tested with the TASKING EDE. At the command line you see the configuration target preferences.
To create a tasking.edeprojectspace object, you call the constructor as follows:
tasking.edeprojectspace(projspace, edeapi)
where projspace is the absolute path of the TASKING Project Space this object will relate to, and edeapi is a tasking.edeapi object, as shown in the following example:
ps = tasking.edeprojectspace('D:\MATLAB\work\
myprojspace.psp', Ede)To create a tasking.edeproject object, you call the constructor as follows:
tasking.edeproject(proj, edeprojspace)
where proj is the absolute path of the TASKING Project this object relates to, and edeapiprojspace is a tasking.edeprojectspace object, as shown in the following example:
proj = tasking.edeproject('D:\MATLAB\work\myproj.pjt', ps)To create a tasking.xviewapi object, you call the constructor as follows
xv = tasking.xviewapi
You must choose a configuration, then communication is tested with CrossView Pro. At the command line, you see the configuration target preferences.
After you create an object, you can find the available methods by running the "methods" function.
For example, to find the methods available on the tasking.edeapi object created above (in Creating an Object), enter methods(Ede).
To find the methods available on the tasking.edeprojectspace object previously created, enter methods(ps).
To find the methods available on the tasking.edeproject object previously created, enter methods(proj).
To find the methods available on the tasking.xviewapi object previously created, enter methods(xv).
To see the methods available, refer to the tables in List of Methods.
To get help for a class method, you can use the tasking_help function.
For example, to find out more about the getProject method of the tasking.edeapi class, you could enter the following command:
tasking_help tasking.edeapi.getProject
MATLAB returns the following output:
GETPROJECT - get the active Project in the EDE project = getProject project: edeproject object representing the active Project in the EDE project will be empty if there is no open project
To see the methods available, refer to the tables in List of Methods.
When you know the details of a class method, you can call it using dot (.) notation.
For example, to get a tasking.edeproject object representing the active project, run the following command:
project = Ede.getProject
After you create an object, you can find the available properties by running the get function.
For example, to find the properties available on the tasking.edeapi object created above, enter
get(Ede)
You can access a property of a class using dot (.) notation.
For example, to get the "configuration" property of the tasking.edeapi object created above, enter:
config = Ede.configuration
tasking.Tasking_Configuration (handle)
Configuration_Description: 'C166'
EDE_Configuration: [1x1 tasking.EDE_Configuration]
CrossView_Pro_Configuration: [1x1 tasking.CrossView_Pro_
Configuration]For experience using objects, you can work through the demo example, tasking_demo_objects.m, found under Link for TASKING Demos.
This example provides step-by-step instructions for using Link for TASKING objects to communicate with the TASKING EDE and CrossView Pro debugger from the MATLAB command line. You can use any command available in the powerful CrossView Pro command language. The demo illustrates using objects during the process of building and debugging projects.
See the following tables for lists of available methods:
The public methods are shown in the tables (methods beginning with "p" or "p_" are private methods and should not be used).
| close | getOptionSetNames |
| disp | getProject |
| display | getProjectSpace |
| edeapi | getTargetProject |
| exec | getToolchainInfo |
| execApiMacro | newProject |
| execRetNumeric | newProjectSpace |
| execRetString | newProjectTemplates |
| getCreatedEDEProcess | newProjectTemplatesViaUI |
| getOptionSet | newTempProjectSpaceIfNoneOpen |
| openProjectTemplates | processTemplateProject |
| pwd | validateToolchainDirectory |
| hilite_system | connect |
| isconnected |
| add | deleteParentDir |
| getEDE | isopen |
| checkValid | disp |
| getOriginalPath | new |
| checkValidProject | display |
| getPath | open |
| close | edeprojectspace |
| isequal | remove |
| add | getEDE | isopen |
| build | getFiles | new |
| checkValid | getHyperlink | open |
| close | getIncludes | rebuild |
| debug | getMakeCmd | remove |
| disp | getOriginalPath | run |
| display | getPath | setCDefines |
| edeproject | getProjectSpace | setIncludes |
| getBuildOutput | getTarget | setPerformToolchainNameCheck |
| getCDefines | hasFile | |
| getDir | isequal |
| addBreakpointCallback | getEventReporting |
| getFunctionConfiguration | debug |
| disp | halt |
| removeBreakpointCallbacks | display |
| isRunning | setEventReporting |
| downloadAndRun | execute |
| xviewapi | executeAndWait |
| getCommandResponse | getExecutable |
| getProject | hilite_system |
| readMemoryUnits | writeMemoryUnits |
| reset | stackProfile |
| stackProfileReset |
The following methods of the tasking.xviewapi object simplify reading from and writing to target memory units (the smallest addressable unit in the memory of the target).
readMemoryUnits
To see help for this function, enter
tasking_help tasking.edeapi.readMemoryUnits
at the MATLAB command line.
writeMemoryUnits
To see help for this function, enter
tasking_help tasking.edeapi.writeMemoryUnits
at the MATLAB command line.
Use these functions with the MATLAB functions, typecast and swapbytes, for reading and writing data of different datatypes.
To see examples of syntax, see the demo example, tasking_demo_objects.m, found under Link for TASKING Demos.
| Project Generator | Verification | ![]() |
© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments