-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Welcome to the starting point for working with the MtconnectTranspiler! This guide will walk you through the basic components involved in the transpilation process, providing a high-level understanding of how the MtconnectTranspiler transforms the SysML model into usable code.
Transpiling the SysML model into another format, such as C# code, involves a series of steps and components working together seamlessly. Here’s what you need to know to get started.
-
XML Document of the SysML Model: This is your starting point, containing the SysML model that describes the structure and semantics of the information you wish to transpile.
-
MtconnectTranspiler (The Core Deserializer): Acts as the bridge between the raw SysML model and the contextual model by deserializing the XML document into a format that is easier to work with programmatically.
-
ITranspilerSink Implementation: This component takes the contextual model provided by the MtconnectTranspiler and turns it into the desired output format (e.g., C# code). It’s where the actual conversion process happens, tailored to your specific needs.
The transpilation process is illustrated in the sequence diagram below, which outlines the interactions between the SysML model, MtconnectTranspiler, ITranspilerSink implementation, and the final output.
sequenceDiagram
participant SysML as SysML XML Model
participant MtconnectTranspiler as MtconnectTranspiler
participant ITranspilerSink as ITranspilerSink Implementation
participant Output as Output (e.g., CSharp Code)
SysML->>MtconnectTranspiler: Deserialize
MtconnectTranspiler->>ITranspilerSink: Provide Contextual Model
ITranspilerSink-->>MtconnectTranspiler: Lookup References (if needed)
ITranspilerSink->>Output: Compile into Output Format
-
Prepare Your SysML Model: Ensure you have the SysML model ready in an XML document format. This model is the blueprint for the information you wish to convert.
-
Set Up MtconnectTranspiler: Install and configure the MtconnectTranspiler to be ready to take your SysML model and deserialize it into a contextual model.
-
Implement ITranspilerSink: Depending on your output requirements (e.g., generating C# code), implement the
ITranspilerSink
interface to define how the contextual model should be transformed into your desired format. -
Run the Process: With all components in place, initiate the transpilation process. The MtconnectTranspiler will deserialize the SysML model and pass the contextual model to your
ITranspilerSink
implementation, which then generates the final output.
By following this guide and understanding each component’s role in the process, you’ll be well on your way to effectively utilizing the MtconnectTranspiler for your development needs.