User Tools

Site Tools


runtime-adaptation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
runtime-adaptation [2018/08/18 13:19]
barryfp [Adaptation example]
runtime-adaptation [2018/08/18 13:25]
barryfp
Line 18: Line 18:
 ====== Adaptation example ====== ====== Adaptation example ======
  
-Here we provide a complete example of dynamically building a system and adapting it, using the above adaptation API.+Here we provide a complete example of dynamically building a system and adapting it, using the above adaptation API. You can download the entire project as a {{ :​adaptation.zip |single zip here}}, or follow the below steps to get individual files.
  
 Create a new project directory with the usual resources folder. Create a new project directory with the usual resources folder.
Line 73: Line 73:
 <file d Main.dn> <file d Main.dn>
  uses Core  uses Core
- uses Counter 
    
  ​component provides App requires Loader loader, io.Output out,  ​component provides App requires Loader loader, io.Output out,
Line 87: Line 86:
  
  //bind our required interface to its initial configuration  //bind our required interface to its initial configuration
- dana.rewire(myComponent :> Counter, variantA :< Counter)+ dana.rewire(myComponent :> "Counter", variantA :< "Counter")
  
  Core myObject = new Core() from myComponent  Core myObject = new Core() from myComponent
runtime-adaptation.txt ยท Last modified: 2019/07/24 13:19 by barryfp