RumPi 1.0
A self-assembling C++ sensor & actuator library for the Raspberry Pi 5
RumPi.h File Reference
#include <string>
#include <vector>
#include "Common.h"
#include "Components/BaseComponent.h"
#include "ComponentManager.h"
#include "Components/Receiver.h"
Include dependency graph for RumPi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  RumPi
 RumPi is the library's top-level facade.
 

Functions

void RumPi::Initialize ()
 Brings the library up: initializes the logger, loads and validates the configuration, hooks Ctrl+C, sets up WiringPi, creates the component manager, self-assembles the sensors from the manifest, and (if enabled) starts the remote receiver. More...
 
void RumPi::Start (bool runAndUpdateOnSeparateThread)
 Turns on every managed component. More...
 
void RumPi::Stop ()
 Cleanly shuts down after a pull-based Start(false): wakes anything waiting, then tears down (turns components off, frees the component manager, drains and closes the logger). More...
 
void RumPi::AddComponent (BaseComponent *theComponent)
 Adds the provided component to the manager so it is polled and reported alongside the rest. More...
 
int RumPi::GetNumberOfComponents ()
 Gets how many components the manager currently holds. More...
 
void RumPi::UpdateComponents ()
 Polls every managed component once, refreshing the values that GetRawJsonDataFromComponentManager() reports. More...
 
void RumPi::UpdateComponentsOfType (const EComponentType typeOfComponentToUpdate)
 Polls just the components of one type, letting a pull-based consumer sample a fast sensor (e.g. More...
 
std::string RumPi::GetRawJsonDataFromComponentManager ()
 Gets every managed component's current readings as a JSON string, keyed by each component's unique name. More...
 
bool RumPi::GetComponentTypes (std::vector< EComponentType > &outComponentTypes)
 Fills the provided vector with the distinct component types the manager currently holds. More...
 
std::string RumPi::GetLogFilePath ()
 Gets the path of the library's log file, so a client can reveal or open it without hardcoding the path. More...
 
SelectedSensorReadings RumPi::GetSelectedSensorReadings ()
 Gets the curated set of current sensor readings for the Home dashboard, assembled by the ComponentManager. More...