Overview

This document describes what is and how should look Project Architecture (Architecture) used with Swart Service (Service).

Architecture describes topology and componentwise organization of the client’s project. The client is obligate to provide Architecture and to follow the rules how to define it explained in this document, if he wants to use Service.

There are two ways how components are treated: as a regular software component and as a layer. Layer is a component which contains other software components and it is used for structuring components organization. Also, layer component can contain other layer component. Component is treated as layer if has value for property layerorder.

Undefined Software Component is used to store objects which do not belong to any specific component. It must be treated as regular component and included in a component list.

Undefined Ram Space Component is used to store Ram space that do not belong to any specified component. It must be treated as regular component and included in a component list.

Undefined Rom Space Component is used to store Rom space that do not belong to any specified component. It must be treated as regular component and included in a component list.

General Architecture Rules

  • Architecture should contain only component relative data and nothing else
  • Architecture should be encoded with UTF-8 settings
  • Architecture should be saved as xml file
  • Root element of the xml must be ARCHITECTURE with no attributes
  • Child element of the root must be SW with no attributes
  • All other elements should be components, either LAYER or SWC element, contained in SW element
  • LAYER elements should be organized tree like
  • SWC elements does not have child elements
  • Component properties should be defined as element attributes
  • If component is contained in some layer, it should be defined as child element of that layer element

Component Rules 

  • Every component must contain following attributes:
    • name – mandatory
    • apiprefix – mandatory
    • shortname – mandatory
    • layerorder – optional
    • rambudget – optional
    • rombudget – optional
    • asillevel – optional
  • If component’s property is optional but with no value insert “” (empty string) as value
  • Undefined Software Component must contain name “N_SWC” and shortname “UNDEFINED SOFTWARE COMPONENT”, all other properties except layerorder will be ignored
  • Undefined Ram Space Component must contain name “N_RAM” and shortname “UNDEFINED RAM SPACE”, all other properties except layer and layerorder will be ignored
  • Undefined Rom Space Component must contain name “N_ROM” and shortname “UNDEFINED ROM SPACE”, all other properties except layer and layerorder will be ignored
  • If component have additional attributes, that attributes will be treated as user defined properties

Component’s Properties 

name– defines a name of the component

apiprefix – collection of API prefixes used for matching source files to components

shortname – represents a component’s name description

layerorder – current position of a component in parent scope; used for visualization process

rambudget – RAM budget of a component, in bytes

rombudget – ROM budget of a component, in bytes

asillevel – Safety Asil level of a component

user defined – any other property defined by user; ignored by default Service actions

Property Rules 

name:

  • only letters, numbers and underscore are allowed
  • one word
  • “HW”, “SW”, “N_SWC”, “N_RAM” and “N_ROM” are reserved words

apiprefix:

  • every apiprefix rule must be ended with “;”
  • used to match source files
  • no limit in number of api prefixes rules
  • every apiprefix rule must have at least 3 characters

shortname:

  • only letters, numbers, underscore and space are allowed

layerorder:

  • only numbers allowed
  • should start from 0 as first child in parent component’s
  • incremented value

rambudget:

  • only numbers allowed

rombudget:

  • only numbers allowed

asillevel:

  • predefined values; possible values to use: QM, A, B, C, D

user defined:

  • can contain any data
  • ignored by default Service actions
  • can be used with Service custom plugins
<ARCHITECTURE>
    <SW>
        <LAYER name="APPL" apiprefix="" shortname="APPLICATION" layerorder="0" rambudget="0" rombudget="0" asillevel="">
            <SWC name="BS" apiprefix="bs_;bsclassic_;" shortname="BS" layerorder="" rambudget="0" rombudget="0" asillevel="QM"/>
            <SWC name="BUTIL" apiprefix="butil;" shortname="BUTIL" layerorder="" rambudget="0" rombudget="0" asillevel="QM"/>
            <SWC name="DLTSATELLITE" apiprefix="dltsatellite;" shortname="DLTSATELLITE" layerorder="" rambudget="12288" rombudget="1024" asillevel="QM"/>
            <SWC name="N_SWC" apiprefix="" shortname="UNDEFINED SOFTWARE COMPONENT" layerorder="" rambudget="0" rombudget="0" asillevel=""/>
            <SWC name="N_RAM" apiprefix="" shortname="UNDEFINED RAM SPACE" layerorder="" rambudget="0" rombudget="0" asillevel=""/>
            <SWC name="N_ROM" apiprefix="" shortname="UNDEFINED ROM SPACE" layerorder="" rambudget="0" rombudget="0" asillevel=""/>
        </LAYER>
        <LAYER name="RTE" apiprefix="rte$;schm$;rte_" shortname="RUNTIME ENVIRONMENT" layerorder="1" rambudget="0" rombudget="0" asillevel=""/>
        <LAYER name="BSW" apiprefix="" shortname="BASIC SOFTWARE" layerorder="2" rambudget="0" rombudget="0" asillevel="">
            <LAYER name="SEL" apiprefix="" shortname="SERVICES LAYER" layerorder="0" rambudget="0" rombudget="0" asillevel=""/>
                <LAYER name="SYSTEMSERVICES" apiprefix="" shortname="SYSTEM SERVICES" layerorder="0" rambudget="0" rombudget="0" asillevel="">
                    <SWC name="DLT" apiprefix="dlt;dltcom;" shortname="DLT" layerorder="" rambudget="0" rombudget="0" asillevel="QM"/>
                </LAYER>
        </LAYER>
    </SW>
</ARCHITECTURE>

API Prefix Rules

Api prefixes are parsed using the following scripting file:

<SWART Installation Folder>/scripts/api-prefix-regex.js

For custom api prefix parsing rules change this file.

Go to Top