Scheduling Service : Server side implementation.
More...
#include <weekly_scheduling.h>
|
virtual Common::Result | define_event (const Protocol::Packet &packet, Scheduling::Entry< Day > &msg) |
| Callback that is called when a Scheduling::DEFINE_EVENT_CMD , is received. More...
|
|
virtual Common::Result | update_event_status (const Protocol::Packet &packet, const UpdateStatus &msg) |
| Callback that is called when a Scheduling::UPDATE_STATUS_CMD , is received. More...
|
|
virtual Common::Result | get_event_entry (const Protocol::Packet &packet, const GetEntry &msg) |
| Callback that is called when a Scheduling::GET_ENTRY_CMD , is received. More...
|
|
virtual Common::Result | delete_event (const Protocol::Packet &packet, const DeleteEvent &msg) |
| Callback that is called when a Scheduling::DELETE_CMD , is received. More...
|
|
virtual Common::Result | delete_all_events (const Protocol::Packet &packet) |
| Callback that is called when a Scheduling::DELETE_ALL_CMD , is received. More...
|
|
| IServer (Unit0 &unit) |
| Constructor.
|
|
virtual | ~IServer () |
| Destructor.
|
|
virtual IEntries< Day > & | entries () const =0 |
| Get a reference to the current object implementing the persistence API, for the device information. More...
|
|
Common::Pointer< Entry > | entry (const uint8_t id) const |
| Get the Weekly Scheduling entry given by id . More...
|
|
uint8_t | next_id () const |
| Return next available id for event. More...
|
|
uint16_t | uid () const |
| This method returns the interface UID. More...
|
|
Scheduling Service : Server side implementation.
This class provides the server side of the Scheduling interface.
Definition at line 363 of file weekly_scheduling.h.
◆ define_event()
Callback that is called when a Scheduling::DEFINE_EVENT_CMD
, is received.
- Parameters
-
[in] | packet | the packet received. |
[in] | msg | the define event message received. |
- Return values
-
Common::Result::OK | if the entry was created; |
Common::Result::FAIL_ARG | if the entry ID already exists; |
Common::Result::FAIL_RESOURCES | if the entry could not be created; |
Common::Result::FAIL_UNKNOWN | otherwise. |
◆ delete_all_events()
◆ delete_event()
Callback that is called when a Scheduling::DELETE_CMD
, is received.
- Parameters
-
[in] | packet | the packet received. |
[in] | msg | the delete event message received. |
- Return values
-
Common::Result::OK | if the entry was deleted, |
Common::Result::FAIL_ARG | otherwise. |
◆ entries()
virtual IEntries<Day>& HF::Core::Scheduling::Weekly::IServer::entries |
( |
| ) |
const |
|
pure virtual |
◆ entry()
Get the Weekly Scheduling entry given by id
.
- Parameters
-
[in] | id | event id of the event to retrieve. |
- Return values
-
pointer | to the event entry if it exists, |
nullptr | otherwise. |
Definition at line 470 of file weekly_scheduling.h.
References entries().
virtual IEntries< Day > & entries() const =0
Get a reference to the current object implementing the persistence API, for the device information...
◆ get_event_entry()
Callback that is called when a Scheduling::GET_ENTRY_CMD
, is received.
- Parameters
-
[in] | packet | the packet received. |
[in] | msg | the get event message received. |
- Return values
-
Common::Result::OK | if the entry exists, |
Common::Result::FAIL_ARG | otherwise. |
◆ next_id()
uint8_t HF::Core::Scheduling::Weekly::IServer::next_id |
( |
| ) |
const |
|
inline |
Return next available id for event.
- Returns
- the id to use in the next event, or
Scheduler::Entry::AVAILABLE_ID
if no id is available.
Definition at line 478 of file weekly_scheduling.h.
References entries().
virtual IEntries< Day > & entries() const =0
Get a reference to the current object implementing the persistence API, for the device information...
◆ update_event_status()
Callback that is called when a Scheduling::UPDATE_STATUS_CMD
, is received.
- Parameters
-
[in] | packet | the packet received. |
[in] | msg | the update event status message received. |
- Return values
-
Common::Result::OK | if the entry was updated; |
Common::Result::FAIL_ARG | if the entry does not exists; |
The documentation for this struct was generated from the following file: