hasNewUpdate
Class: slreq.Reference
Package: slreq
Check if import node has available update
Syntax
tf = hasNewUpdate(topRef)
Description
checks if the external document associated with the import node tf
= hasNewUpdate(topRef
)topRef
has changed since the document was last imported.
Input Arguments
topRef
— Import node
slreq.Reference
object
Import node, specified as an slreq.Reference
object.
Output Arguments
tf
— Available update indicator
0
|
1
Available update indicator, returned as a 1
or
0
of data type logical
.
Examples
Check Import Node for Available Update and Update Referenced Requirements
This example shows how to check if the import node has an available update and update the referenced requirements.
Open the Requirements Definition for a Cruise Control Model project.
slreqCCProjectStart;
Load the crs_req
requirement set.
rs = slreq.load("crs_req");
Get a handle to the import node of the requirement set.
topRef = children(rs);
Check if the import node has an available update.
tf = hasNewUpdate(topRef)
tf = logical
1
A result of 1
means that topRef
has been updated since the last time it was imported. Update the referenced requirements under the import node.
[status,changelist] = updateFromDocument(topRef)
status = 'Update completed. Refer to Comments on Import1.'
changelist = 'Updated: CC003_01. Properties: description Updated: CC003_02. Properties: description Updated: CC003_03. Properties: description Updated: CC003_04. Properties: description Updated: Cruise control buttons. Properties: description Updated: Cruise control mode indicator. Properties: description Updated: Cruise control modes. Properties: description Updated: Dashboard image. Properties: description Updated: Deactivating cruise control. Properties: description Updated: Disabling cruise control. Properties: description Updated: Enabling cruise control. Properties: description Updated: Other inputs. Properties: description Updated: ROM. Properties: description Updated: Resuming cruise control. Properties: description Updated: System Inputs. Properties: description Updated: System outputs. Properties: description Updated: Throttle value calculation. Properties: description '
Version History
Introduced in R2019b
See Also
Beispiel öffnen
Sie haben eine geänderte Version dieses Beispiels. Möchten Sie dieses Beispiel mit Ihren Änderungen öffnen?
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)