Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Samples:Basics

Amanda Coelho edited this page Jun 24, 2016 · 8 revisions

###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:

simple.svg 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.

###cmdline-args.fbp

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:

cmdline-args.svg 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: fibonacci.svg

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

Clone this wiki locally