Schedule is used to manage the times when a member can access data using two sets of RepetitiveInterval as follows. More...
#include <schedule.hpp>
Classes | |
| class | Result |
Public Member Functions | |
| Schedule () | |
| Create a Schedule with empty whiteIntervalList and blackIntervalList. | |
| Schedule & | addWhiteInterval (const ptr_lib::shared_ptr< RepetitiveInterval > &repetitiveInterval) |
| Add the repetitiveInterval to the whiteIntervalList. More... | |
| Schedule & | addBlackInterval (const ptr_lib::shared_ptr< RepetitiveInterval > &repetitiveInterval) |
| Add the repetitiveInterval to the blackIntervalList. More... | |
| Result | getCoveringInterval (MillisecondsSince1970 timeStamp) const |
| Get the interval that covers the time stamp. More... | |
| Blob | wireEncode () const |
| Encode this Schedule. More... | |
| void | wireDecode (const uint8_t *input, size_t inputLength) |
| Decode the input and update this Schedule. More... | |
| void | wireDecode (const std::vector< uint8_t > &input) |
| Decode the input and update this Schedule. More... | |
| void | wireDecode (const Blob &input) |
| Decode the input and update this Schedule. More... | |
Static Public Member Functions | |
| static MillisecondsSince1970 | fromIsoString (const std::string &dateString) |
| static std::string | toIsoString (MillisecondsSince1970 msSince1970) |
Schedule is used to manage the times when a member can access data using two sets of RepetitiveInterval as follows.
whiteIntervalList is an ordered set for the times a member is allowed to access to data, and blackIntervalList is for the times a member is not allowed.
|
inline |
Add the repetitiveInterval to the blackIntervalList.
| repetitiveInterval | The RepetitiveInterval to add. If the list already contains the same RepetitiveInterval, this does nothing. |
|
inline |
Add the repetitiveInterval to the whiteIntervalList.
| repetitiveInterval | The RepetitiveInterval to add. If the list already contains the same RepetitiveInterval, this does nothing. |
| Schedule::Result ndn::Schedule::getCoveringInterval | ( | MillisecondsSince1970 | timeStamp | ) | const |
Get the interval that covers the time stamp.
This iterates over the two repetitive interval sets and find the shortest interval that allows a group member to access the data. If there is no interval covering the time stamp, this returns false for isPositive and returns a negative interval.
| timeStamp | The time stamp as milliseconds since Jan 1, 1970 UTC. |
| void ndn::Schedule::wireDecode | ( | const uint8_t * | input, |
| size_t | inputLength | ||
| ) |
Decode the input and update this Schedule.
| input | The input byte array to be decoded. |
| inputLength | The length of input. |
|
inline |
Decode the input and update this Schedule.
| input | The input byte array to be decoded. |
|
inline |
1.8.6