HPInc / HP-Digital-Microfluidics

HP Digital Microfluidics Software Platform and Libraries
MIT License
2 stars 0 forks source link

Support pad reservation in macro language #242

Open EvanKirshenbaum opened 5 months ago

EvanKirshenbaum commented 5 months ago

For low-level macro-language programming, in which states are twiddled rather than walking drops, it would be useful to be able to reserve pads.

My initial thought is to make this a form of the with statement (#234):

with p1, p2, p3 reserved { ... }
with p1 to p1+2 up+3 right reserved { ... }
with p1 to p1+(2,3) reserved { ... }

(The last form would require coordinates to be their own type, which is a good idea.)

Note that we will want to use logic like that in ExtractionPoint.reserve_pads() to get all of the pads reserved. But note that the logic there was that we want everything pinned in place, but it was okay if there were drops in the region. That probably won't be the case here, although that might be okay. The problem is that we are fine with there being drops there if we expect them to be there, but we won't want anybody else walking in, and we might not want anybody else there at all.

To handle that, we might want something like

with region clear [except p1, p2] { ... }

which waits for the region to be clear and reserves it.

Migrated from internal repository. Originally created by @EvanKirshenbaum on Feb 11, 2023 at 11:54 AM PST.