Index: 10_forge_imp.html =================================================================== --- 10_forge_imp.html (revision 8156) +++ 10_forge_imp.html (revision 8157) @@ -42,3 +42,47 @@ the value of attribute rail, because of suba). The last two operations ensure connect exists as an array type attribute and appends the new connection to it. + +

10.1. cschem implementation - stances and build options

+

{imp10:5} +Suppose the current project of 3 sheets is of an MCU controlled board with +various sensors. The MCU, the interface circuity and some of the +sensors are mandatory, but some of the more expensive sensors are optional. +A design decision is made so that there are models standard, +advanced and professinal. There is only one PCB is made +for all options, but different components are DNP'd for the different options. + +

{imp10:6} +The implementation in cschem is: +

+ +

{imp10:7} +For example take a sensor that should be on advanced and professinal +but not on standard. Create the array type attribute +forge-if/model-dnp (the model-dnp part is arbitrary) with this +content (each line is an array element): +

+(project.stance != "advanced") || (project.stance != "professinal")
+scalar,pcb/dnp
+sub,^.*$,DNP,pcb/dnp
+
+ +

{imp10:8} +The condition specifies when the component is DNP. Alternatively +it could be written as (project.stance == "standard"). + +

{imp10:9} +The rest of the forge is setting the pcb/dnp attribute to DNP. The value +could be anything, as long as the attribute exists and is non-empty, the +export mechanism should take it as true. Using DNP is practical for +dyntext printing the attribute value on the sheet. + +

{imp10:10} +Note: stances and lists of possible stance values shall be stored in the +project file (e.g. project role configuration) and not on sheet level +because it affects the abstract model, which uses all sheets of the project. +