herald  2.0.0
Namespaces | Classes | Typedefs | Functions | Variables
herald Namespace Reference

Acts as a non-global memory arena for arbitrary classes. More...


 Contains all low-level Herald datatype implementations.
 Engine classes provide for task scheduling, including complex inter-dependent tasks.
 Internal zephyr namespace DO NOT USE - API MAY CHANGE WITHOUT WARNING.


struct  Context
 Compile-time Context class, customisable via template traits. Provides generic access to OS system features. More...
struct  DefaultPlatformType
class  DefaultSensorDelegate
 Default implementation that provides implementations for each delegate callback. More...
class  Device
 Generic abstraction of a particular local proximate device type. More...
class  SensorArray
 Manages all Sensors and sensor delegates for Herald. More...
struct  TypeT
class  SensorDelegateSet
 A set of variant typed Sensor Delegate instances. Delegate callbacks can be invoked on the whole set, if supported by each. More...
class  ZephyrContextProvider
 Holds generic state across our application for any Zephyr RTOS device. More...


template<typename T , typename... Args>
using HasSensorFunctionT = decltype(hasSensorFunction(std::declval< T >(), std::declval< Args >()...))


template<typename F , typename... Args, typename = decltype(std::declval<F>()(std::declval<Args&&>()...))>
std::true_type isValidImpl (void *)
template<typename F , typename... Args>
std::false_type isValidImpl (...)
template<typename T >
valueT (TypeT< T >)


constexpr auto isValid
template<typename T >
constexpr auto type = TypeT<T>{}
constexpr auto hasSensorFunction
template<typename T , typename... Args>
constexpr auto HasSensorFunctionV = HasSensorFunctionT<T,Args...>::value

Detailed Description

Acts as a non-global memory arena for arbitrary classes.

Main Herald library include for C++ Native platforms.

We may not use C++20 or similar ranges - we need to be super memory efficient in our implementation for embedded devices, and we cannot use compiler features not yet present in gcc-arm.

The main Herald Proximity namespace in C++

Variable Documentation

◆ hasSensorFunction

constexpr auto herald::hasSensorFunction
Initial value:
= isValid(
[](auto&& s,auto&& sensor,auto&& didRead,auto&& fromTarget) ->
decltype(((decltype(s))s).get().sensor(sensor,didRead,fromTarget)) {}

◆ isValid

constexpr auto herald::isValid
Initial value:
= [] (auto f) {
return [](auto&&... args) {
return decltype(isValidImpl<decltype(f),decltype(args)&&...>(nullptr)){};