Signal programming is used in the same sense as
dataflow programming
In computer programming, dataflow programming is a programming paradigm that models a program as a directed graph of the data flowing between operations, thus implementing dataflow principles and architecture. Dataflow programming languages share ...
, and is similar to
event-driven programming.
The word
signal
In signal processing, a signal is a function that conveys information about a phenomenon. Any quantity that can vary over space or time can be used as a signal to share messages between observers. The '' IEEE Transactions on Signal Processing' ...
is used instead of the word
dataflow
In computing, dataflow is a broad concept, which has various meanings depending on the application and context. In the context of software architecture, data flow relates to stream processing or reactive programming.
Software architecture
Da ...
in documentation of such
libraries
A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
as
Qt,
GTK+
GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and prop ...
and
libsigc++. The time instants when the signal value (or dataflow value) changes correspond to
events in event-driven programming.
The signal flow of a program or a signal processing system is described graphically in a
signal-flow graph
A signal-flow graph or signal-flowgraph (SFG), invented by Claude Shannon, but often called a Mason graph after Samuel Jefferson Mason who coined the term, is a specialized Flow graph (mathematics), flow graph, a directed graph in which nodes repr ...
or a
data-flow diagram.
Synchronous signal programming
In software development, a ''signal'' can mean
synchronous events (sequences of samples,
video frames, etc., with constant
sample rate
In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of "samples".
A sample is a value of the signal at a point in time and/or s ...
or
frame rate
Frame rate (expressed in or FPS) is the frequency (rate) at which consecutive images ( frames) are captured or displayed. The term applies equally to film and video cameras, computer graphics, and motion capture systems. Frame rate may also ...
) rather than
asynchronous events, while the word ''event'' and ''data flow'' is often used for asynchronous
event queues, but this is by no means universal. This language was created in the 1950s Konrad Zuse. Especially in telecommunications, electrical engineering and signal processing, a digital signal is a sampled representation of an analog physical entity.
In telecommunications, the term
signalling means asynchronous phone call
metadata information exchange, for example of telephone numbers.
One application of synchronous signal programming is
observer pattern
In software design and engineering, the observer pattern is a software design pattern in which an object, named the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by ...
.
Asynchronous signal programming
In databases and operational systems, a signal is a sequence or flow of messages within a message passing architecture that a software agent can subscribe on. Note that these signals are asynchronous. Also ''signal programming'' is used in a narrow sense of programming with
Unix signals such as
SIGTERM
Signals are standardized messages sent to a running program to trigger specific behavior, such as quitting or error handling. They are a limited form of inter-process communication (IPC), typically used in Unix, Unix-like, and other POSIX-co ...
,
SIGSEGV,
SIGPOLL etc.
See also
*
Event-driven programming
*
Signal (computing)
Signals are standardized messages sent to a running program to trigger specific behavior, such as quitting or error handling. They are a limited form of inter-process communication (IPC), typically used in Unix, Unix-like, and other POSIX-comp ...
Programming paradigms
Events (computing)