In the example test codes there is a nnNET2.c file which contains the C program that runs the NN on the Beaglebone.
Idea was to have 3 separate NN running on separate machines and communicating with each other.
nnNET2's input is mapped to the output of the nnNET1 and nnNET2's output is mapped to the input of nnNET3.
First wrote a large switch() which contains all the state of the nnNET2 communicating with nnNET1 and nnNET3. Soon it became apparent that such approach is inefficient and no serious control can be added to the NN.
What was needed was a multi-tasking software that allows for asynchronous communication as well. Petri Net's are the theoretical apparatus for such applications in general.
A restricted simpler version of the Petri Nets allows for a seamless linear algebra formulation for its firing. Since the Beaglebone does have a vector floating point silicon engine, then the choice was obvious. Therefore the firings are modelled by matrix operations.
The Petri Net below starts with a token at the place 1, and immediately fires its transition which executes the function progBoot2(). The developer places whatever code needed into progBoot2() or make his or her own progBootMINE().
Immediately afterwards place 2 fires its transition and listen to the configured sockets for network communications. Places 4 and 5 are then deposited with a token.
Transition progGenesis() is fired/executed. Token placed in Places 5 and 9. Transition for Place 9 fires and executes the progAxon2Input() which reads the network socket for incoming data.
Once the network socket is read, then one of the places 6-8 is deposited and corresponding firing of the transition or the execution of the progXXX() occurs.