\emph{``any component in a system in which only the input and output
characteristics are of interest, without regard to its internal mechanism
or structure''}.
+I would add something very important to this definition :
+not only the inputs and outputs are of interest but also
+\emph{what the box does} !
+Hence, I would say that a black box is any \emph{\bf documented}
+component of a system, letting know the user
+\emph{\bf what} the box is supposed to do and
+\emph{\bf how to use it}
+but not \emph{\bf how it does it}.
\BBTK provides a systematic framework
to encapsulate (or ``wrap'') any
method allows, say, to set a particular input or
get a particular output of the box.
One can use a black box in a purely abstract way.
-\item{\bf symbolic} means a particular
+\item{\bf symbolic} means that a particular
input or output is referenced by a 'name', that is by a symbol
which identifies the input or output.
It also means that symbolic information (text!) is
\BBTK provides one: \bbi (the Black Box Interpreter).
\item {\bf Automatic documentation} of existing packages.
\texttt{html} documentation of packages is proposed by
-the \bbdoc application.
+\bbi.
\end{itemize}
Finally, these different components allow {\bf efficient}:
\begin{itemize}
-\item {\bf capitalization and reuse} of existing processings,
+\item {\bf capitalization and reuse} of existing processing units,
including {\bf documentation}
\item {\bf testing, prototyping} in a very simple script language
\item {\bf inter-operability} between atomic processings which
\begin{itemize}
\item \bbfy generates the \CPP code of a black box from a
description file written in \texttt{xml}.
-\item \bbdoc generates the html documentation of a black box package
-(author, description, description of its black boxes:
-author, description, inputs, outputs, and so on).
-\item \bbCreatePackage creates a directory on disk which contains the basic files to start the development of a new black box package.
+%\item \bbdoc generates the html documentation of a black box package
+%(author, description, description of its black boxes:
+%author, description, inputs, outputs, and so on).
+\item \bbCreatePackage allows to create the basic file architecture
+to start the development of a new black box package.
\end{itemize}
\end{itemize}
To run the black box interpreter,
open a console and type \texttt{bbi}
or double click on the application icon.
-You get a message and a prompt:
-\begin{verbatim}
-$$ bbi
-BBI (Black Box Interpreter) - bbtk "1.0.0" - (c) Creatis 2007
->
-\end{verbatim}
+You get a window which looks like the one in figure
+\ref{bbi-fig-bbi-gui}
+(the exact appearance of \bbi is system and \bbtk version dependent)
+\footnote{If you compiled \bbtk without \wx then \bbi does not have a
+graphical interface but a simple prompt}.
+
+\begin{figure}[!ht]
+\caption{\label{bbi-fig-bbi-gui}The black box interpreter interface}
+\begin{center}
+\includegraphics[width=0.7\textwidth]{bbi-gui.png}
+\end{center}
+\end{figure}
-If you type:
+The 'Command' tab is subdivided into two parts :
+one single line zone at the bottom in which you can enter your commands and
+one multiple line zone in which \bbi prints out the result of your commands.
+
+
+Try typing in the input zone (in this manual,
+the commands entered by the user will be preceded by a prompt '>') :
\begin{verbatim}
> help
\end{verbatim}
\begin{verbatim}
Available commands:
author
+ category
config
connect
define
delete
description
endefine
+ endpackage
exec
graph
help
include
+ index
input
load
message
new
output
+ package
print
quit
reset
Complex Black Box <user::workspace>
User's workspace
By: bbi (internal)
+ Category(s) : complex box;
* No inputs
* No outputs
* No boxes
To load it, type:
\begin{verbatim}
-> load std
+> include std
\end{verbatim}
Then if you type:
\begin{verbatim}
Black Box <std::Add>
Adds its inputs
- By: laurent.guigues@creatis.insa-lyon.fr
+ By: laurent.guigues at creatis.insa-lyon.fr
+ Categories : atomic box;math;
* Inputs:
- 'In1' <double>: First number to add
- 'In2' <double>: Second number to add
- 'ProcessMode' <int> : Set the process mode of the box (0=Pipeline | 1=Always | 2=Reactive)
- * Outputs:
- 'Out' <double>: Result
+ 'BoxExecute' <bbtk::Void> : Any signal received by this input executes the box
+ 'BoxProcessMode' <String> : Sets the processing mode of the box (Pipeline | Always | Reactive)
+ 'In1' <Double> : First number to add
+ 'In2' <Double> : Second number to add
+ * Outputs :
+ 'BoxChange' <bbtk::Void> : Signal modifications of the box
+ 'Out' <Double> : Result'In1' <double>: First number to add
\end{verbatim}
Like previously,
belongs to the \texttt{std} package.
Then comes a description
(the one which was provided by the author of the box),
-the author(s) of the box (usually e-mail adress(es)).
+the author(s) of the box (usually e-mail adress(es)) and
+the categories to which the box belong.
Finally comes the lists of inputs and outputs of the box.
For each input or output, \bbi provides
its \emph{name} (between quotes, e.g. \texttt{'ProcessMode'}),
-its \emph{type} (between \texttt{<>}, e.g. \texttt{<int>})
+its \emph{type} (between \texttt{<>}, e.g. \texttt{<Int>})
and a description.
Remark that the box \texttt{Add} is not a 'complex' black box
but an 'atomic' box, hence its help does not
Complex Black Box <user::workspace>
User's workspace
By: bbi (internal)
+ Category(s) : complex box;
* No inputs
* No outputs
* Boxes:
Box processing is needed if:
\begin{itemize}
\item at least input has changed since last processing or
-\item the input \texttt{'ProcessMode'} of the box is set to
-\texttt{1}, which forces box reprocessing.
+\item the input \texttt{'BoxProcessMode'} of the box is set to
+\texttt{'Always'}, which forces box reprocessing.
\end{itemize}
-Note that all boxes have the input \texttt{'ProcessMode'}.
+Note that all boxes have the input \texttt{'BoxProcessMode'}.
Another way to process the box \texttt{a} is to issue the command:
\begin{verbatim}
\paragraph{Summary}
%\hrule
\begin{itemize}
-\item The \texttt{load} command allows to load a package.
+\item The \texttt{include} command allows to load a package.
\item \texttt{help} gives help on:
\begin{itemize}
\item Available commands if you just type \texttt{help}.
\label{bbi-connecting-black-boxes}
% ==========================================
+LG : THE GUIDE IS UP TO DATE UNTIL HERE
+
\BBTK allows to create
and execute processing chains,
also called \emph{pipelines},
First start \bbi and load the package \texttt{std}:
\begin{verbatim}
-$$ bbi
-BBI (Black Box Interpreter) - bbtk "1.0.0" - (c) Creatis 2007
-> load std
+> include std
\end{verbatim}
Assume you want to compute $1+2+3$. You can do it by
Type \texttt{help wx}, you get something like:
\begin{verbatim}
-Package wx v1.0.0- eduardo.davila/laurent.guigues@creatis.insa-lyon.fr
+Package wx v1.0.0- info-dev@creatis.insa-lyon.fr
Basic graphical interface elements (slider, button ...) based on wxWidgets
Black boxes:
- Button : Button that gives a string
- FileDialog : FileDialog widget (wxFileDialog)
- RadioButton : RadioButton group widget (wxRadioButton) 0-9 entries
- Sizer : Sizer widget (wxSizer)
- Slider : Slider widget (wxSlider)
- Split : Split widget (wxSplitterWindow)
- StaticText : wxWidget Static text
- TextCtrl : TextCtrl widget (wxTextCtrl)
+ Button : Button that gives a string
+ ColourSelectorButton :
+ ColourSelector : Colour Selector widget (wxColourDialog)
+ CommandButton :
+ DirectorySelector :
+ FileSelector : FileDialog widget (wxFileDialog)
+ InputText : TextCtrl widget (wxTextCtrl)
+ LayoutLine : Sizer widget (wxSizer)
+ LayoutSplit : Split widget (wxSplitterWindow)
+ NoteBook :
+ OutputText : wxWidget Static text
+ RadioButton : RadioButton group widget (wxRadioButton) 0-9 entries
+ Slider : Slider widget (wxSlider)
+
\end{verbatim}
You can reproduce the same experiment as above using a