#!/usr/bin/env sol-fbp-runner # This file is part of the Soletta (TM) Project # # Copyright (C) 2015 Intel Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # This file 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. # # It is an example of: # # - timer node type (timeout mainloop primitive) # # - boolean node types (toggle and not) # # - console node type (by default prefixes messages with node names) # # Diagram: # # .-------. .--------. .----------------. # | timer |OUT--->IN| toggle |OUT-+->IN| console_toggle | # `-------' `--------' | `----------------' # | .-----. .-------------. # `->IN| not |OUT--->| console_not | # `-----' `-------------' # timer(timer:interval=1000) OUT -> IN toggle(boolean/toggle) toggle OUT -> IN console_toggle(console) toggle OUT -> IN not(boolean/not) not OUT -> IN console_not(console)