रिक्वायरमेंट डायग्राम
रिक्वायरमेंट डायग्राम आवश्यकताओं तथा उनके आपसी कनेक्शन संबंधों, और अन्य दस्तावेज़ तत्वों के साथ संबंधों की विज़ुअलाइज़ेशन प्रदान करता है।
कॉपी करें
एम्बेड
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
सिंटैक्स
रिक्वायरमेंट डायग्राम में तीन प्रकार के घटक होते हैं: आवश्यकता, तत्व और संबंध।
कोण कोष्ठक में लिखे शब्द एनम कुंजीशब्द हैं, जैसे , जिनके विकल्प तालिका में विस्तार से बताए गए हैं। user_defined... का उपयोग वहाँ किया जाता है जहाँ उपयोगकर्ता इनपुट की आवश्यकता होती है।
उपयोगकर्ता टेक्स्ट के बारे में महत्वपूर्ण नोट: सभी इनपुट को दोहरे उद्धरण चिह्नों में लपेटा जा सकता है, या बिना दोहरे उद्धरण चिह्नों के रखा जा सकता है। हालाँकि, बिना उद्धरण वाले इनपुट का उपयोग करते समय उपयोगकर्ता को सावधान रहना चाहिए। यदि अन्य कुंजीशब्द पाए जाते हैं, तो एडिटर रेंडर विफल हो जाएगा।
आवश्यकता
आवश्यकता परिभाषा में आवश्यकता प्रकार, नाम, ID, टेक्स्ट, जोखिम और सत्यापन विधि शामिल होते हैं। सिंटैक्स इस प्रकार है:
कॉपी करें
एम्बेड
<type> user_defined_name {
id: user_defined_id
text: user_defined text
risk: <risk>
verifymethod: <method>
}
प्रकार, जोखिम और विधि SysML में परिभाषित एनम हैं।
| कुंजीशब्द | विकल्प |
|---|---|
| प्रकार | आवश्यकता, कार्यात्मक आवश्यकता, इंटरफ़ेस आवश्यकता, प्रदर्शन आवश्यकता, भौतिक आवश्यकता, डिज़ाइन बाधा |
| जोखिम | निम्न, मध्यम, उच्च |
| सत्यापन विधि | विश्लेषण, निरीक्षण, परीक्षण, प्रदर्शन |
तत्व
तत्व परिभाषा में तत्व का नाम, प्रकार और दस्तावेज़ संदर्भ शामिल होते हैं, ये तीनों उपयोगकर्ता-परिभाषित होते हैं। तत्व सुविधा का उद्देश्य हल्का रहना है, साथ ही आवश्यकताओं को अन्य दस्तावेज़ों के भागों से जोड़ने की अनुमति देना है।
कॉपी करें
एम्बेड
element myElement {
type: string
docref: some/doc/path
}
Markdown फ़ॉर्मेट
जहाँ उपयोगकर्ता को कस्टम टेक्स्ट की अनुमति है (जैसे नाम, आवश्यकता टेक्स्ट, तत्व दस्तावेज़ संदर्भ आदि), वहाँ आप:
- टेक्स्ट को दोहरे उद्धरण चिह्नों में लपेटें
- दोहरे उद्धरण चिह्नों के भीतर markdown फ़ॉर्मेट का उपयोग करें
कॉपी करें
एम्बेड
requirementDiagram
requirement "__test_req__" {
id: 1
text: "*italicized text* **bold text**"
risk: high
verifymethod: test
}
संबंध
संबंध स्रोत नोड, लक्ष्य नोड और संबंध प्रकार से बना होता है।
निम्नलिखित परिभाषा फ़ॉर्मेट का पालन करें:
कॉपी करें
एम्बेड
{name of source} - <type> -> {name of destination}
या
कॉपी करें
एम्बेड
{name of destination} <- <type> - {name of source}
"स्रोत नोड" और "लक्ष्य नोड" उन आवश्यकता या तत्व नोड के नाम होने चाहिए जो कहीं और परिभाषित किए गए हैं।
संबंध प्रकार समाहित, प्रतिलिपि, व्युत्पन्न, संतुष्ट, सत्यापित, परिष्कृत या ट्रैक में से एक हो सकता है।
विस्तृत उदाहरण
यह उदाहरण इस चार्ट की सभी सुविधाओं का उपयोग करता है।
कॉपी करें
एम्बेड
requirementDiagram
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
functionalRequirement test_req2 {
id: 1.1
text: the second test text.
risk: low
verifymethod: inspection
}
performanceRequirement test_req3 {
id: 1.2
text: the third test text.
risk: medium
verifymethod: demonstration
}
interfaceRequirement test_req4 {
id: 1.2.1
text: the fourth test text.
risk: medium
verifymethod: analysis
}
physicalRequirement test_req5 {
id: 1.2.2
text: the fifth test text.
risk: medium
verifymethod: analysis
}
designConstraint test_req6 {
id: 1.2.3
text: the sixth test text.
risk: medium
verifymethod: analysis
}
element test_entity {
type: simulation
}
element test_entity2 {
type: word doc
docRef: reqs/test_entity
}
element test_entity3 {
type: "test suite"
docRef: github.com/all_the_tests
}
test_entity - satisfies -> test_req2
test_req - traces -> test_req2
test_req - contains -> test_req3
test_req3 - contains -> test_req4
test_req4 - derives -> test_req5
test_req5 - refines -> test_req6
test_entity3 - verifies -> test_req5
test_req <- copies - test_entity2
दिशा
चार्ट को विभिन्न दिशाओं में रेंडर करने के लिए direction कथन का उपयोग किया जा सकता है; मान्य मान हैं:
- TB - ऊपर से नीचे (डिफ़ॉल्ट)
- BT - नीचे से ऊपर
- LR - बाएँ से दाएँ
- RL - दाएँ से बाएँ
कॉपी करें
एम्बेड
requirementDiagram
direction LR
requirement test_req {
id: 1
text: the test text.
risk: high
verifymethod: test
}
element test_entity {
type: simulation
}
test_entity - satisfies -> test_req
शैली
आवश्यकता और तत्वों को प्रत्यक्ष शैली या क्लास का उपयोग करके स्टाइल किया जा सकता है। सामान्यतः, शैली या क्लास लागू करते समय, यह आवश्यकता या तत्व नामों की एक सूची तथा क्लास नामों की एक सूची स्वीकार करता है, जिससे एक बार में कई क्लास असाइन करने की अनुमति मिलती है। एकमात्र अपवाद शॉर्टहैंड सिंटैक्स ::: है, जहाँ ऑपरेटर कई क्लास असाइन कर सकता है, लेकिन एक बार में केवल एक आवश्यकता या तत्व को।
प्रत्यक्ष शैली
कॉपी करें
एम्बेड
requirementDiagram
requirement test_req {
id: 1
text: styling example
risk: low
verifymethod: test
}
element test_entity {
type: simulation
}
style test_req fill:#ffa,stroke:#000, color: green
style test_entity fill:pink,stroke:#333, color: blue
क्लास परिभाषा नीचे दिए गए उदाहरण की तरह है:
classDef का उपयोग करके पुनः प्रयोग योग्य शैली परिभाषित करें:
कॉपी करें
एम्बेड
requirementDiagram
requirement test_req {
id: 1
text: "class styling example"
risk: low
verifymethod: test
}
element test_entity {
type: simulation
}
classDef important fill:#f96,stroke:#333,stroke-width:4px
classDef test fill:#ffa,stroke:#000
डिफ़ॉल्ट क्लास
यदि कोई क्लास default नाम से है, तो यह सभी नोड्स पर लागू होगी। विशिष्ट शैलियाँ और क्लास इनके बाद परिभाषित की जानी चाहिए, ताकि लागू की गई डिफ़ॉल्ट शैली को ओवरराइड किया जा सके।
कॉपी करें
एम्बेड
classDef default fill:pink,stroke:#333,stroke-width:4px;
अनुप्रयोग क्लास
क्लास दो तरीकों से लागू की जा सकती है:
1. class सिंटैक्स का उपयोग करें:
कॉपी करें
एम्बेड
class test_req,test_entity important
2. परिभाषा के दौरान या बाद में ::: ऑपरेटर शॉर्टहैंड सिंटैक्स का उपयोग करें:
कॉपी करें
एम्बेड
requirement test_req:::important {
id: 1
text: class styling example
risk: low
verifymethod: test
}
कॉपी करें
एम्बेड
element test_elem {}
test_elem:::myClass
संयोजन उदाहरण
कॉपी करें
एम्बेड
requirementDiagram
requirement test_req:::important {
id: 1
text: "class styling example"
risk: low
verifymethod: test
}
element test_entity {
type: simulation
}
classDef important font-weight:bold
class test_entity important
style test_entity fill:pink,stroke:#333