mirror of
https://github.com/nasa/fpp.git
synced 2026-04-17 13:33:41 -05:00
59 lines
1.2 KiB
Plaintext
59 lines
1.2 KiB
Plaintext
=== Port Interface Instance Specifiers
|
|
|
|
A *port interface instance specifier*
|
|
specifies that a
|
|
<<Definitions_Component-Instance-Definitions,component instance>>
|
|
_I_ or a
|
|
<<Definitions_Topology-Definitions,topology>> _T'_
|
|
is part of a topology _T_.
|
|
_I_ or _T'_ provides a <<Ports_Port-Interfaces,port interface>>
|
|
that can be used in connections in _T_.
|
|
|
|
==== Syntax
|
|
|
|
_instance-or-import_
|
|
<<Scoping-of-Names_Qualified-Identifiers,_qual-ident_>>
|
|
|
|
_instance-or-import_ is one of `instance` or `import`.
|
|
The syntax `instance` is standard.
|
|
The syntax `import` exists for backwards compatibility with previous versions
|
|
of FPP.
|
|
|
|
==== Semantics
|
|
|
|
The qualified identifier must
|
|
<<Scoping-of-Names_Resolution-of-Qualified-Identifiers,refer to>>
|
|
a
|
|
<<Ports_Port-Interface-Instances,port interface instance>>,
|
|
i.e., a component instance definition or a topology definition.
|
|
|
|
==== Example
|
|
|
|
[source,fpp]
|
|
----
|
|
port P
|
|
|
|
passive component A { output port p: P }
|
|
passive component B { sync input port p: P }
|
|
|
|
instance a: A base id 0x100
|
|
instance b: B base id 0x200
|
|
|
|
topology T1 {
|
|
instance a
|
|
port a = a.p
|
|
}
|
|
|
|
topology T2 {
|
|
|
|
instance b
|
|
instance T1
|
|
|
|
connections C {
|
|
T.p -> b.p
|
|
}
|
|
|
|
}
|
|
----
|
|
|