File:Callback-async-notitle.svg

Summary

Description A simple diagram made with Graphviz of an asynchronous callback, including the application main program, a software platform registration function, the callback function, the software platform main loop. The initial step is registration, and the later steps are callbacks.
Date
Source Own work
Author TuukkaH
SVG development
InfoField
Source code
InfoField

Command line code

<callback-async.dot dot -Tsvg ┃ sed -e 's/<title>.*<\/title>//' >callback-async-notitle.svg

Data

Graphiz code
digraph Pipeline {
        rankdir=LR
        labeljust="l"
        style=filled
        color=lightgrey
        node [style=filled,fillcolor=white,color=white]

# phase 1: registration

        subgraph clusterApplication {
                style=filled
                label="Application program (Initial step)"
                program [label="Main program",shape=rect]
                callback [label="Callback function"]
# invisible content to match layout with intention:
                edge [style=invis]
                node [style=invis,label="",width=0.01,height=0.01]
                program -> callback
        }

        subgraph clusterLibrary {
                margin="5,5"
                label="Software platform"
                labelloc=b
                node [color=blue,fontcolor=blue]
                loop [label="Main loop",shape=rect]
                function [label="Registration function"]
                loop -> function [style=invis]
        }
        program -> function [label="calls",weight=100]

# phase 2: callback

        subgraph clusterApplication2 {
                label="Application program (Later steps)"
                program2 [label="Main program",shape=rect]
                callback2 [label="Callback function"]
# invisible content to match layout with intention:
                edge [style=invis]
                node [style=invis,label="",width=0.01,height=0.01]
                program2 -> callback2
        }

        subgraph clusterLibrary2 {
                margin="5,5"
                label="Software platform"
                labelloc=b
                node [color=blue,fontcolor=blue]
                loop2 [label="Main loop",shape=rect]
                function2 [label="Registration function"]

                loop2 -> function2 [style=invis]
        }


        callback2
        loop2 -> callback2 [label="calls"]

# vertical constraint between phases
        program -> callback2 [style=invis]
}


Licensing

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
Category:Self-published work#Callback-async-notitle.svgCategory:PD-self#Callback-async-notitle.svg Category:Pipeline (computer hardware) Category:Images with Graphviz source code Category:SVG flow charts
Category:Images with Graphviz source code Category:PD-self Category:Pipeline (computer hardware) Category:SVG flow charts Category:Self-published work Category:Valid SVG created with Graphviz code