Lightgraph
C++17 light-graph engine API reference
Loading...
Searching...
No Matches
lightgraph::Engine Class Reference

Engine facade with internal method-level synchronization. More...

#include <engine.hpp>

Public Member Functions

 Engine (const EngineConfig &config=EngineConfig{})
 Construct an engine instance from configuration.
 
 ~Engine ()
 
 Engine (const Engine &)=delete
 
Engineoperator= (const Engine &)=delete
 
 Engine (Engine &&) noexcept
 
Engineoperator= (Engine &&) noexcept
 
Result< int8_temit (const EmitCommand &command)
 Emit a new light list using a value command.
 
void update (uint64_t millis)
 Advance runtime to an absolute timestamp (milliseconds).
 
void tick (uint64_t delta_millis)
 Advance runtime by a delta in milliseconds.
 
void stopAll ()
 Stop all active lights/lists.
 
bool isOn () const
 Return whether runtime output is enabled.
 
void setOn (bool on)
 Enable or disable runtime output.
 
bool autoEmitEnabled () const
 Return auto-emit state.
 
void setAutoEmitEnabled (bool enabled)
 Enable or disable auto-emit.
 
uint16_t pixelCount () const
 Return total pixel count for the active object.
 
Result< Colorpixel (uint16_t index, uint8_t max_brightness=255) const
 Fetch a rendered pixel color by index.
 

Detailed Description

Engine facade with internal method-level synchronization.

Engine wraps the legacy topology/runtime implementation behind value-based commands and typed status/error returns. Calls on the same instance are serialized, but process-global runtime state is still shared across instances.

Definition at line 23 of file engine.hpp.

Constructor & Destructor Documentation

◆ Engine() [1/3]

lightgraph::Engine::Engine ( const EngineConfig config = EngineConfig{})
explicit

Construct an engine instance from configuration.

◆ ~Engine()

lightgraph::Engine::~Engine ( )

◆ Engine() [2/3]

lightgraph::Engine::Engine ( const Engine )
delete

◆ Engine() [3/3]

lightgraph::Engine::Engine ( Engine &&  )
noexcept

Member Function Documentation

◆ autoEmitEnabled()

bool lightgraph::Engine::autoEmitEnabled ( ) const

Return auto-emit state.

◆ emit()

Result< int8_t > lightgraph::Engine::emit ( const EmitCommand command)

Emit a new light list using a value command.

Returns
list index on success, otherwise an error code/message.

◆ isOn()

bool lightgraph::Engine::isOn ( ) const

Return whether runtime output is enabled.

◆ operator=() [1/2]

Engine & lightgraph::Engine::operator= ( const Engine )
delete

◆ operator=() [2/2]

Engine & lightgraph::Engine::operator= ( Engine &&  )
noexcept

◆ pixel()

Result< Color > lightgraph::Engine::pixel ( uint16_t  index,
uint8_t  max_brightness = 255 
) const

Fetch a rendered pixel color by index.

◆ pixelCount()

uint16_t lightgraph::Engine::pixelCount ( ) const

Return total pixel count for the active object.

◆ setAutoEmitEnabled()

void lightgraph::Engine::setAutoEmitEnabled ( bool  enabled)

Enable or disable auto-emit.

◆ setOn()

void lightgraph::Engine::setOn ( bool  on)

Enable or disable runtime output.

◆ stopAll()

void lightgraph::Engine::stopAll ( )

Stop all active lights/lists.

◆ tick()

void lightgraph::Engine::tick ( uint64_t  delta_millis)

Advance runtime by a delta in milliseconds.

◆ update()

void lightgraph::Engine::update ( uint64_t  millis)

Advance runtime to an absolute timestamp (milliseconds).


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