XCube Stream Reader SDK
|
Public Member Functions | |
CTimeFilter (bool isRelativeTime=false) | |
CTimeFilter (UINT64 startTime, UINT64 endTime, bool isRelativeTime=false) | |
CTimeFilter (std::string const &startTime, std::string const &startFormat, std::string const &endTime, std::string const &endFormat, bool isRelativeTime=false) | |
~CTimeFilter () | |
void | setStartTime (std::string const &time, std::string const &format) |
void | setEndTime (std::string const &time, std::string const &format) |
void | setStartTime (timespec const &ts) |
void | setStartTime (UINT32 sec, UINT32 nsec) |
void | setStartTime (struct x3c_timeval &tm) |
void | setEndTime (UINT32 sec, UINT32 nsec) |
void | setEndTime (struct x3c_timeval &tm) |
void | setEndTime (timespec const &ts) |
void | setRelativeTime (bool isRelativeTime) |
bool | isRelativeTime () const |
CStreamFilter::FilterReturn | shouldBeFiltered (UINT32 frameTime) |
CStreamFilter::FilterReturn | shouldBeFiltered (X3cPacket &pkt) |
bool | beforeStart (UINT32 frameTime) |
bool | afterEnd (UINT32 frameTime) |
UINT64 | getStartTime () const |
UINT64 | getEndTime () const |
Static Public Member Functions | |
static bool | checkTime (const char *time=NULL, const char *fmt=NULL) |
static time_t | parseTime (const char *time=NULL, const char *fmt=NULL) |
static time_t | setDate (time_t from, time_t to) |
Friends | |
class | CGenericPacketParser |
CTimeFilter::CTimeFilter | ( | bool | isRelativeTime = false | ) | [explicit] |
No Arg constructor
CTimeFilter::CTimeFilter | ( | UINT64 | startTime, |
UINT64 | endTime, | ||
bool | isRelativeTime = false |
||
) |
Construct from calendar times
CTimeFilter::CTimeFilter | ( | std::string const & | startTime, |
std::string const & | startFormat, | ||
std::string const & | endTime, | ||
std::string const & | endFormat, | ||
bool | isRelativeTime = false |
||
) |
Construct from string representations of start and end times
Destructor
bool CTimeFilter::afterEnd | ( | UINT32 | frameTime | ) |
Check to see if the given time is efter the end time.
bool CTimeFilter::beforeStart | ( | UINT32 | frameTime | ) |
Check to see if the given time is before the start time.
static bool CTimeFilter::checkTime | ( | const char * | time = NULL , |
const char * | fmt = NULL |
||
) | [static] |
Check to make sure the the parameters actually return a time.
static time_t CTimeFilter::parseTime | ( | const char * | time = NULL , |
const char * | fmt = NULL |
||
) | [static] |
Parse the strings to get out a number of seconds since 1970.
void CTimeFilter::setEndTime | ( | std::string const & | time, |
std::string const & | format | ||
) |
Set the end time for this filter
time | A string representation of the end time |
format | The format string |
void CTimeFilter::setEndTime | ( | timespec const & | ts | ) |
Set the end time for this filter
ts | an instance of struct timespec representing the end time in UNIX time. |
void CTimeFilter::setStartTime | ( | std::string const & | time, |
std::string const & | format | ||
) |
Set the start time for this filter
time | A string representation of the start time |
format | The format string |
void CTimeFilter::setStartTime | ( | timespec const & | ts | ) |
Set the start time for this filter
ts | an instance of struct timespec representing the start time in UNIX time. |
CStreamFilter::FilterReturn CTimeFilter::shouldBeFiltered | ( | UINT32 | frameTime | ) |
Check to see if the given time is outside the start and end times.