Nixes / iotHubLib

a library for the esp8266 arduino platform that allows easy writing of sensor node programs for the iotHub platform
0 stars 1 forks source link

How to allow multiple actors with different state types? #13

Closed Nixes closed 7 years ago

Nixes commented 7 years ago

Some ideas so far:

Nixes commented 7 years ago

std::variant is perfect but only supported in c++17. So arduino compiler support will take a few years. For now I think I'll have to use something like a tagged union http://en.cppreference.com/w/cpp/language/union

Nixes commented 7 years ago

Ended up with a tagged union, works great!