pixled-lib  1.0
Public Member Functions | List of all members
pixled::Runtime Class Reference

#include <runtime.h>

Public Member Functions

 Runtime (Mapping &mapping, Output &output, Animation &animation)
 
void prev ()
 
void next ()
 
time current_time () const
 

Detailed Description

The purpose of the Runtime is to aggregate a Mapping and an Animation to perform the proper Output::write() operations.

Since the Output interface is generic, the Runtime can be used on any device.

However, there is no notion of fps in this class, since this concept is highly dependent on the device (and so on the Output) on which pixled is used.

Examples
pixled/animation/blink.cpp, pixled/animation/blooming.cpp, pixled/animation/linear_unit_wave.cpp, pixled/animation/radial_unit_wave.cpp, pixled/animation/rainbow.cpp, pixled/animation/sequence.cpp, pixled/conditional/conditional.cpp, pixled/geometry/index.cpp, pixled/random/normal.cpp, pixled/random/uniform.cpp, pixled/signal/sawtooth.cpp, pixled/signal/sine.cpp, pixled/signal/square.cpp, and pixled/signal/triangle.cpp.

Constructor & Destructor Documentation

◆ Runtime()

pixled::Runtime::Runtime ( Mapping mapping,
Output output,
Animation animation 
)
inline

Runtime constructor.

Parameters
mappingled mapping: specifies the leds currently in the system
outputled output: writes animation colors to each led
animationanimation to run

Member Function Documentation

◆ prev()

void pixled::Runtime::prev ( )

Steps the Runtime backward, builds the correspondind frame using the provided animation, and writes each color to leds defined in mapping using the output.

◆ next()

void pixled::Runtime::next ( )

Steps the Runtime forward, builds the correspondind frame using the provided animation, and writes each color to leds defined in mapping using the output.

◆ current_time()

time pixled::Runtime::current_time ( ) const

Returns the current time step of the Runtime.

Returns
current time

The documentation for this class was generated from the following files: