Interface Assembly
access this type via: pal.Assembly (provides, requires or uses)
This is an interface from the PAL framework for emergent software systems. This interface controls the composition of a target program (starting at its 'main' component, which must implement the App interface) by discovering the possible ways in which it can be assembled and adapting it to one of those assemblies.
Functions
Assembly(char main[], storeAppParam params[], storeIDC perceptionModule)
String[] getConfigs()
bool setConfig(char conf[])
bool runApp()
Assembly(char main[], storeAppParam params[], storeIDC perceptionModule)
Constructor function which discovers the set of possible assemblies for a given 'main' component.
main Path to a compiled Dana component which impements the App interface.
perceptionModule A loaded Dana component which implements the pal.Perception interface.
String[] getConfigs()
Gets a list of all valid assemblies of the software system being managed, where each assembly is identified with a unique string.
bool setConfig(char conf[])
Changes the current assembly. The 'main' method of the assembled program is called the first time setConfig is called.
conf Identifier of the assembly to adapt to, which must be one previously returned by getConfigs()
returns: Returns true if adaptation was successful, false otherwise.
bool runApp()
Checks if the main method of the program has exited, returning true if so.