BaseHardwareNodeBuilder

onera.pmlanalyzer.pml.model.hardware.BaseHardwareNodeBuilder

Base trait for all hardware node builder the name of the transporter is implicitly derived from the name of the variable used during instantiation. Usually an hardware can be constructed without arguments, where T can be Initiator, SimpleTransporter, Virtualizer, Target

        val myHardware = T()

It is also possible to give a specific name, for instance when creating the component in a loop then the following constructor can bee used

          val hardwareSeq = for { i <- O to N } yield T(s"myHardware$i")

It is also possible to add specific services, by default each hardware has a pml.model.service.Load and a pml.model.service.Store service.

        val myLoadService = Load()
        val myOtherLoadService = Load()
        val myStoreService = Store()
        val myHardware = T(Set(myLoadService,myOtherLoadService,myStoreService)))

It is also possible to provide the name and the services for instance

          val hardwareSeq = for { i <- O to N } yield T(s"myHardware$i", Set(Load(s"myLoad$i"), Store(s"myStore$i"))

Attributes

T

the concrete type of built object

See also:
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Initiator.type
object SimpleTransporter.type
object Target.type
object Virtualizer.type

Members list

Concise view

utilFun

final def formatName(name: Symbol, owner: Owner): Symbol

Formatting of object name

Formatting of object name

Attributes

name

the name of the object

owner

the name of its owner

Returns:

the formatted name

Note:

this method should not be used in models

embedFunctions

def all(implicit owner: Owner): Set[T]

Provide all the object of the current type created for the platform, including the ones created in composite components

Provide all the object of the current type created for the platform, including the ones created in composite components

Attributes

owner

the name of the platform owning the objects

Returns:

set of created objects

Inherited from:
PMLNodeBuilder
def allDirect(implicit owner: Owner): Set[T]

Provide all the object of the current type created for the platform, without the ones created in composite components

Provide all the object of the current type created for the platform, without the ones created in composite components

Attributes

owner

the name of the platform owning the objects

Returns:

set of created objects

Inherited from:
PMLNodeBuilder

publicConstructor

def apply(basics: Set[Service])(implicit implicitName: Name, p: ProvideRelation[Hardware, Service], owner: Owner): T

A physical component can be defined only with the basic services it provides The name will be retrieved by using the implicit declaration context (the name of the value enclosing the object)

A physical component can be defined only with the basic services it provides The name will be retrieved by using the implicit declaration context (the name of the value enclosing the object)

Attributes

basics

the set of basic services provided, if empty a default store and load services are added

implicitName

implicitly retrieved name from the declaration context

owner

implicitly retrieved name of the platform

p

implicitly retrieved relation linking components to their provided services

Returns:

the physical component

Example:
        val mySimpleTransporter = SimpleTransporter()
def apply(name: Symbol, basics: Set[Service])(implicit p: ProvideRelation[Hardware, Service], owner: Owner): T

A physical component can be defined by its name and the basic services it provides A transporter is only defined by its name, so if the transporter already exists it will simply add the services provided by basics

A physical component can be defined by its name and the basic services it provides A transporter is only defined by its name, so if the transporter already exists it will simply add the services provided by basics

Attributes

basics

the set of basic services provided, if empty a default store and load services are added

name

the physical component name

owner

implicitly retrieved name of the platform

p

implicitly retrieved relation linking components to their provided services

Returns:

the physical component

def apply(name: Symbol)(implicit p: ProvideRelation[Hardware, Service], owner: Owner): T

A physical component can be defined only its name, the services will be defined by default

A physical component can be defined only its name, the services will be defined by default

Attributes

name

the physical component name

owner

implicitly retrieved name of the platform

p

implicitly retrieved relation linking components to their provided services

Returns:

the physical component

Value members

Abstract methods

protected def builder(name: Symbol): T

The builder that must be implemented by specific builder

The builder that must be implemented by specific builder

Attributes

name

the name of the object

Returns:

the object

Note:

this method is implemented by concrete members (e.g. SimpleTransporter, no further extension should be provided

Inherited fields

protected val _memo: HashMap[(Symbol, Symbol), T]

Attributes

Inherited from:
PMLNodeBuilder