Practical Bwise

On request I make a start with practically making bwise useable for others. This text is to start bwise from the latest procsa4.tcl library, create a variety of blocks, and run networks.

Creating Blocks

The commands (typed on the console or a shell block on the bwise canvas) to create new blocks are:

newblock {name {}} {x {0}} {y {0}} {w {50}} {h {50}} {pinsin {in1 in2}} {pinsout {}} {moretags {}}
creates a new generic block, without any default functionality ascribed to it. There is no name.bfunc variable content made, to give the block a function.

newproc {f {}} {name {}} {in {in}} {out {out}} {width {40}} {height {}} {tags {}} {x {10}} {y {10}}
This is the easiest way to make a function, for instance 'newproc { set add1.out [expr ${}+1] } add1' to make a block add one to its input value.

newimage {file}
reads the image from disk, creates a block with the size of the image having 1 in and 1 output, and initializes the function of the block as a simple transfer from in to out.

newtext {width {60}} {height {40}} {tags {}} {name {}}
makes a bit bigger block with rom for text. It displays the plain text at its input.

Creates an entry on the canvas, where the cursor can be put in to enter an expression that is output when return is pressed. An event is generated by pressing return that 'runs' the coupled network.

Wire oriented commands

Run type of commands

By typing as command or using
uplevel #0 run Entry0
after having a network with an entry 'Entry0' (automatically generated by the first 'newentry' command), connected to at least one other block, for instance a function and a text or monitor window (newmon), the entries' content is put on its output, all connected block inputs get that data, and in turn are 'executed'.