# EDK The EDK (Entertainment Development Kit) main goal is to demonstrate how to use the streaming API's of the HUE system. It is build and tested for Windows, Linux and MacOSX. Mobile platforms (Android / iOS) and game console platforms will come soon. EDK has a libary `libhuestream` and developer support tools. The library consits of 3 sub libraries: * `huestream` (main libarary) * `bridgediscovery` (discovering hue bridges) * `support` (platform support) Developer support tools include: * `examples` * `tools` * `wrappers` An external library is used for DTLS (security over UDP) support, which by default is `mbedTLS`. ## Component structure EDK EDK consists of a number of components shown in the following picture: ![alt tag](doc/package_overview.png) ## Common SDK libraries EDK uses two parts of the regular HUE SDK: * `edk_support` for platform support primitives (networking, threading etc) * `bridge_discovery` for bridge discovery primitives (UPNP/NUPNP/IPSCAN) These are located in external repositories included via git submodules. In principle porting EDK to other platforms should only require adding and or changing interfaces in the support library. ## `huestream` This is the core library of EDK. It consists following components * `huestream/common/` contains shared functionality for the other components * `huestream/config/` contains configuration settings and object factories/repositories for dependency injection * `huestream/connect/` contains state machine to easily connect to a bridge * `huestream/stream/` contains the main streaming API to stream light updates * `huestream/effect/` contains a rendering engine to render layered effects * `huestream/HueStream.h` is the main interface for EDK. This class aggregates `config`, `connect`, `stream` and `effect`. The `HueStream` class is setup by default to use the `connect`, `stream` and `effect` components. Yet depending on your requirements components can be left out or replaced by own implementations. For instance, if you only want to use the `connect` and `stream` component, but not the rendering of `effect`, then modify the `HueStream` implementation. Further details can be found in the next paragraphs. _TODO: decide how much detail is needed here_ ### `libhuestream/common` _TODO: write documentation_ ### `libhuestream/config` _TODO: write documentation_ ### `libhuestream/connect` _TODO: write documentation_ ### `libhuestream/stream` _TODO: write documentation_ ### `libhuestream/effect` _TODO: write documentation_ ## `examples` To hit the ground running some examples have been created: * `examples/Effects/` Small commandline executable showing library in action with connection flow and some effects * `examples/StreamTest/` Windows test tool making bridge connection and effect playing available with a GUI ## Building EDK When cloning the git archive make sure to also initialize the submodules: git clone /EDK.git git submodule update --init --recursive As main build system CMAKE is used, please install the latest version from `https://cmake.org/` ### CMAKE Build options The following CMAKE options are supported: Option | Description :---|:--- `BUILD_TEST` | toggles building of tests | `BUILD_EXAMPLES` | toggles building of examples `BUILD_CURL` | toggles building of CURL `BUILD_WRAPPERS` | toggles building of wrappers, currently only C# `BUILD_SWIG` | toggles building of SWIG, when switched to off make sure to use latest SWIG version 3.0.10 `BUILD_WITHOUT_RTTI` | toggles disabling RTTI (libary does not require RTTI) `BUILD_WITHOUT_EXCEPTIONS` | toggles disabling exceptions (library does not require exceptions) Use these vars on the commandline: `cmake -D