-
Notifications
You must be signed in to change notification settings - Fork 108
Samples:Basics
###simple.fbp
This sample is a simple flow that has a 1000ms (1 second) timer as source of events, each tick it will toggle a boolean value that goes to console_toggle (the result of the toggle) and also to a boolean inverter (not), that also goes to console via console_not.
Diagram:
Expected behavior/results: Outputs 2 boolean values per second, one the negation of the another. There are details in the comments in the fbp file.
This sample will handle command line arguments (usually referred as argc (the count - number of arguments) and argv (the vector - list of arguments). It is an example of: integer manipulation (constant, subtraction, equal comparison), looping using the int/accumulator, converter (boolean to empty) and others.
Diagram:
Expected behavior/results: Outputs the command line arguments received, including argv[0]. More details in the comments in the fbp file.
This sample shows a Fibonacci implementation. The main idea of this file is show how to declare nodes without a connection, integer node types, toggle node type, switcher node types, console node type, anonymous nodes, quit the application. Another thing in this sample is how to work with closed loops, multiple connections per port and how handle with error.
Diagram:
Expected behavior/results: First output is '1', then output each result of sum. More details in the comments in the fbp file.
Found more information about node types here