target.Object Class
Namespace: target
Base class for target types
Description
target.Object
is an abstract base class that enables target types to
inherit common functionality.
Class Attributes
Abstract | true |
HandleCompatible | true |
For information on class attributes, see Class Attributes.
Properties
IsValid
— Data validity
true | false
true
if object passes validation procedure.false
otherwise.
Attributes:
GetAccess | public |
SetAccess | private |
Data Types: logical
Methods
Public Methods
validate | Validate data integrity of target feature object |
Examples
Validate Hardware Device Data
To validate the data integrity of target objects, use the IsValid
property or the validate
method of the target.Object
base class.
Consider an example where you create a target.Processor
object and associate an existing language implementation with the object.
myProcessor = target.create("Processor"); myProcessor.LanguageImplementations = target.get("LanguageImplementation", ... "ARM Compatible-ARM Cortex");
To see that the newly created object is not valid, enter myProcessor.IsValid
.
myProcessor.IsValid
ans = logical
0
If you try to validate the object with the method myProcessor.validate()
, you get an error.
myProcessor.validate()
Error using target.internal.Processor/validate Target data validation failed. * Undefined property "Name" in "Processor" object. * Undefined identifier in "Processor" object.
The validation fails because these target.Processor
properties are not specified:
Name
— Processor nameId
— Object identifier
You can specify a processor name, which also specifies the object identifier.
myProcessor.Name = "MyProcessor";
Check the validity of myProcessor
again to see that the validity of the object is established.
myProcessor.IsValid
ans = logical
1
myProcessor.validate()
Note: When you use the target.add
function to register a target object, the software also checks the validity of the object.
Version History
Introduced in R2019b
See Also
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)