XCube Stream Reader SDK
Public Member Functions | Static Public Member Functions | Friends
CTimeFilter Class Reference
Inheritance diagram for CTimeFilter:
CStreamFilter

List of all members.

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

Constructor & Destructor Documentation

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


Member Function Documentation

bool CTimeFilter::afterEnd ( UINT32  frameTime)

Check to see if the given time is efter the end time.

Returns:
- false if the packet time is less than endTime, otherwise true
bool CTimeFilter::beforeStart ( UINT32  frameTime)

Check to see if the given time is before the start time.

Returns:
- false if the packet time is greater than startTime, otherwise true
static bool CTimeFilter::checkTime ( const char *  time = NULL,
const char *  fmt = NULL 
) [static]

Check to make sure the the parameters actually return a time.

Returns:
- true if the strings given create a time, false otherwise
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.

Returns:
- the number of seconds since 1970, 0 if invalid values given.
void CTimeFilter::setEndTime ( std::string const &  time,
std::string const &  format 
)

Set the end time for this filter

Parameters:
timeA string representation of the end time
formatThe format string
void CTimeFilter::setEndTime ( timespec const &  ts)

Set the end time for this filter

Parameters:
tsan 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

Parameters:
timeA string representation of the start time
formatThe format string
void CTimeFilter::setStartTime ( timespec const &  ts)

Set the start time for this filter

Parameters:
tsan 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.

Returns:
- false if the packet time is greater than startTime and less than endTime, otherwise true

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Friends Defines