Commit f367db9ba86d759430288b16a0e0d4f82fbefc95
Committed by
Moritz Wirger
1 parent
b74756e3
Update documentation after review.
Showing
11 changed files
with
26 additions
and
5 deletions
include/hueplusplus/BaseDevice.h
| ... | ... | @@ -120,9 +120,13 @@ public: |
| 120 | 120 | virtual void refresh(bool force = false); |
| 121 | 121 | |
| 122 | 122 | //! \brief Sets custom refresh interval for this device. |
| 123 | + //! \param refreshDuration The new minimum duration between refreshes. May be 0 or \ref c_refreshNever. | |
| 123 | 124 | virtual void setRefreshDuration(std::chrono::steady_clock::duration refreshDuration); |
| 124 | 125 | |
| 125 | 126 | protected: |
| 127 | + //! \brief Protected ctor that is used by subclasses, construct with shared cache. | |
| 128 | + //! \param id Integer that specifies the id of this device | |
| 129 | + //! \param baseCache Cache of the ResourceList containing this device (must not be null). | |
| 126 | 130 | BaseDevice(int id, const std::shared_ptr<APICache>& baseCache); |
| 127 | 131 | //! \brief Protected ctor that is used by subclasses. |
| 128 | 132 | //! | ... | ... |
include/hueplusplus/Bridge.h
| ... | ... | @@ -164,6 +164,7 @@ public: |
| 164 | 164 | void refresh(); |
| 165 | 165 | |
| 166 | 166 | //! \brief Sets refresh interval for the whole bridge state. |
| 167 | + //! \param refreshDuration The new minimum duration between refreshes. May be 0 or \ref c_refreshNever. | |
| 167 | 168 | void setRefreshDuration(std::chrono::steady_clock::duration refreshDuration); |
| 168 | 169 | |
| 169 | 170 | //! \brief Function to get the ip address of the hue bridge | ... | ... |
include/hueplusplus/BridgeConfig.h
| ... | ... | @@ -68,6 +68,7 @@ public: |
| 68 | 68 | void refresh(bool force = false); |
| 69 | 69 | |
| 70 | 70 | //! \brief Sets custom refresh interval for the config. |
| 71 | + //! \param refreshDuration The new minimum duration between refreshes. May be 0 or \ref c_refreshNever. | |
| 71 | 72 | void setRefreshDuration(std::chrono::steady_clock::duration refreshDuration); |
| 72 | 73 | |
| 73 | 74 | //! \brief Get the list of whitelisted users | ... | ... |
include/hueplusplus/Group.h
| ... | ... | @@ -41,6 +41,9 @@ namespace hueplusplus |
| 41 | 41 | class Group |
| 42 | 42 | { |
| 43 | 43 | public: |
| 44 | + //! \brief Creates group with shared cache | |
| 45 | + //! \param id Group id in the bridge | |
| 46 | + //! \param baseCache Cache of the group list. | |
| 44 | 47 | Group(int id, const std::shared_ptr<APICache>& baseCache); |
| 45 | 48 | //! \brief Creates group with id |
| 46 | 49 | //! \param id Group id in the bridge |
| ... | ... | @@ -59,6 +62,7 @@ public: |
| 59 | 62 | void refresh(bool force = false); |
| 60 | 63 | |
| 61 | 64 | //! \brief Sets custom refresh interval for this group. |
| 65 | + //! \param refreshDuration The new minimum duration between refreshes. May be 0 or \ref c_refreshNever. | |
| 62 | 66 | void setRefreshDuration(std::chrono::steady_clock::duration refreshDuration); |
| 63 | 67 | |
| 64 | 68 | //! \name General information | ... | ... |
include/hueplusplus/HueDeviceTypes.h
| ... | ... | @@ -41,6 +41,7 @@ public: |
| 41 | 41 | //! \brief Create a Light with the correct type from the JSON state. |
| 42 | 42 | //! \param lightState Light JSON as returned from the bridge (not only the "state" part of it). |
| 43 | 43 | //! \param id Light id. |
| 44 | + //! \param baseCache Optional shared cache for the light. | |
| 44 | 45 | //! \returns Light with matching id, strategies and \ref ColorType. |
| 45 | 46 | //! \throws std::system_error when system or socket operations fail |
| 46 | 47 | //! \throws HueException when light type is unknown | ... | ... |
include/hueplusplus/Light.h
| ... | ... | @@ -554,7 +554,7 @@ public: |
| 554 | 554 | ///@} |
| 555 | 555 | |
| 556 | 556 | protected: |
| 557 | - //! \brief Protected ctor that is used by \ref Bridge class. | |
| 557 | + //! \brief Protected ctor that is used by \ref LightFactory. | |
| 558 | 558 | //! |
| 559 | 559 | //! \param id Integer that specifies the id of this light |
| 560 | 560 | //! \param commands HueCommandAPI for communication with the bridge |
| ... | ... | @@ -562,9 +562,15 @@ protected: |
| 562 | 562 | //! leaves strategies unset |
| 563 | 563 | Light(int id, const HueCommandAPI& commands); |
| 564 | 564 | |
| 565 | + //! \brief Protected ctor that is used by \ref LightFactory. | |
| 566 | + //! | |
| 567 | + //! \param id Integer that specifies the id of this light | |
| 568 | + //! \param baseCache Cache of the light list (must not be null). | |
| 569 | + //! | |
| 570 | + //! leaves strategies unset | |
| 565 | 571 | Light(int id, const std::shared_ptr<APICache>& baseCache); |
| 566 | 572 | |
| 567 | - //! \brief Protected ctor that is used by \ref Bridge class, also sets | |
| 573 | + //! \brief Protected ctor that is used by \ref LightFactory, also sets | |
| 568 | 574 | //! strategies. |
| 569 | 575 | //! |
| 570 | 576 | //! \param id Integer that specifies the id of this light | ... | ... |
include/hueplusplus/ResourceList.h
| ... | ... | @@ -46,9 +46,6 @@ template <typename Resource, typename IdT> |
| 46 | 46 | class ResourceList |
| 47 | 47 | { |
| 48 | 48 | public: |
| 49 | - struct SharedStateTag | |
| 50 | - { }; | |
| 51 | - | |
| 52 | 49 | using ResourceType = Resource; |
| 53 | 50 | using IdType = IdT; |
| 54 | 51 | static_assert(std::is_integral<IdType>::value || std::is_same<std::string, IdType>::value, |
| ... | ... | @@ -95,6 +92,7 @@ public: |
| 95 | 92 | void refresh() { stateCache->refresh(); } |
| 96 | 93 | |
| 97 | 94 | //! \brief Sets custom refresh interval for this list and all resources created. |
| 95 | + //! \param refreshDuration The new minimum duration between refreshes. May be 0 or \ref c_refreshNever. | |
| 98 | 96 | void setRefreshDuration(std::chrono::steady_clock::duration refreshDuration) |
| 99 | 97 | { |
| 100 | 98 | stateCache->setRefreshDuration(refreshDuration); | ... | ... |
include/hueplusplus/Rule.h
| ... | ... | @@ -59,6 +59,7 @@ public: |
| 59 | 59 | void refresh(bool force = false); |
| 60 | 60 | |
| 61 | 61 | //! \brief Sets custom refresh interval for this rule. |
| 62 | + //! \param refreshDuration The new minimum duration between refreshes. May be 0 or \ref c_refreshNever. | |
| 62 | 63 | void setRefreshDuration(std::chrono::steady_clock::duration refreshDuration); |
| 63 | 64 | |
| 64 | 65 | //! \brief Get rule identifier | ... | ... |
include/hueplusplus/Scene.h
| ... | ... | @@ -140,6 +140,7 @@ public: |
| 140 | 140 | void refresh(bool force = false); |
| 141 | 141 | |
| 142 | 142 | //! \brief Sets custom refresh interval for this group. |
| 143 | + //! \param refreshDuration The new minimum duration between refreshes. May be 0 or \ref c_refreshNever. | |
| 143 | 144 | void setRefreshDuration(std::chrono::steady_clock::duration refreshDuration); |
| 144 | 145 | |
| 145 | 146 | //! \brief Get scene identifier | ... | ... |
include/hueplusplus/Schedule.h
| ... | ... | @@ -49,6 +49,7 @@ public: |
| 49 | 49 | void refresh(); |
| 50 | 50 | |
| 51 | 51 | //! \brief Sets custom refresh interval for this schedule. |
| 52 | + //! \param refreshDuration The new minimum duration between refreshes. May be 0 or \ref c_refreshNever. | |
| 52 | 53 | void setRefreshDuration(std::chrono::steady_clock::duration refreshDuration); |
| 53 | 54 | |
| 54 | 55 | //! \brief Get schedule identifier | ... | ... |
include/hueplusplus/Sensor.h
| ... | ... | @@ -59,6 +59,9 @@ Alert alertFromString(const std::string& s); |
| 59 | 59 | class Sensor : public BaseDevice |
| 60 | 60 | { |
| 61 | 61 | public: |
| 62 | + //! \brief Construct Sensor with shared cache | |
| 63 | + //! \param id Integer that specifies the id of this sensor | |
| 64 | + //! \param baseCache Cache of the SensorList. | |
| 62 | 65 | Sensor(int id, const std::shared_ptr<APICache>& baseCache); |
| 63 | 66 | |
| 64 | 67 | //! \brief Construct Sensor. | ... | ... |