Base class for all navigation message filters used by NavFilterMgr.
Definition at line 55 of file NavFilter.hpp.
#include <NavFilter.hpp>
Public Types | |
typedef std::list< NavFilterKey * > | NavMsgList |
Public Member Functions | |
virtual void | dumpRejected (std::ostream &out) const |
Debug support. More... | |
virtual std::string | filterName () const noexcept=0 |
virtual void | finalize (NavMsgList &msgBitsOut)=0 |
NavFilter () | |
virtual unsigned | processingDepth () const noexcept=0 |
virtual std::string | reasonTerse () const noexcept |
virtual std::vector< std::string > | reasonVerbose () const noexcept |
virtual void | validate (NavMsgList &msgBitsIn, NavMsgList &msgBitsOut)=0 |
Public Attributes | |
NavMsgList | rejected |
Protected Member Functions | |
void | accept (const NavMsgList &valid, NavMsgList &msgBitsOut) |
void | accept (NavFilterKey *data, NavMsgList &msgBitsOut) |
void | reject (const NavMsgList &invalid) |
void | reject (NavFilterKey *data) |
typedef std::list<NavFilterKey*> gnsstk::NavFilter::NavMsgList |
Definition at line 58 of file NavFilter.hpp.
gnsstk::NavFilter::NavFilter | ( | ) |
Definition at line 45 of file NavFilter.cpp.
|
inlineprotected |
Add a list of validated nav messages to the output list. This method should be used by derived classes to pass validated navigation message back to the NavFilterMgr user ONLY once the nav data is no longer being internally stored by the derived filter class.
Definition at line 178 of file NavFilter.hpp.
|
inlineprotected |
Add a validated nav msg to the output list. This method should be used by derived classes to pass validated navigation message back to the NavFilterMgr user ONLY once the nav data is no longer being internally stored by the derived filter class.
Definition at line 172 of file NavFilter.hpp.
|
virtual |
Debug support.
Definition at line 50 of file NavFilter.cpp.
|
pure virtualnoexcept |
Return a simple string containing the name of the filter for the purposes of providing some user feedback as to which filter rejected a message. As an example, LNavEmptyFilter would return "Empty". The reason for using this method instead of type_id.name() is that the latter often returns compiler-munged names rather than human-readable ones.
Implemented in BunkFilter2, gnsstk::LNavOrderFilter, gnsstk::NavOrderFilter, gnsstk::LNavEphMaker, BunkFilter1, gnsstk::LNavCrossSourceFilter, gnsstk::CNavCrossSourceFilter, gnsstk::CNavCookFilter, gnsstk::LNavCookFilter, gnsstk::LNavTLMHOWFilter, gnsstk::CNav2SanityFilter, gnsstk::CNavTOWFilter, gnsstk::CNavEmptyFilter, gnsstk::LNavAlmValFilter, gnsstk::LNavEmptyFilter, gnsstk::CNavParityFilter, and gnsstk::LNavParityFilter.
|
pure virtual |
Flush the filter's stored data, if any. This method is called by NavFilterMgr::finalize() which is in turn called by the user. This method allows any lingering data stored internally by filters to be output.
[out] | msgBitsOut | The messages successfully passing the filter. |
Implemented in BunkFilter2, gnsstk::LNavOrderFilter, gnsstk::NavOrderFilter, gnsstk::LNavEphMaker, BunkFilter1, gnsstk::LNavCrossSourceFilter, gnsstk::CNavCrossSourceFilter, gnsstk::LNavTLMHOWFilter, gnsstk::CNav2SanityFilter, gnsstk::CNavCookFilter, gnsstk::CNavTOWFilter, gnsstk::LNavCookFilter, gnsstk::CNavEmptyFilter, gnsstk::LNavAlmValFilter, gnsstk::LNavEmptyFilter, gnsstk::CNavParityFilter, and gnsstk::LNavParityFilter.
|
pure virtualnoexcept |
Return the number of epochs worth of navigation data that the filter child class stores internally to function properly. This can be used to determine the size of a nav data buffer to allocate. A return value of 0 means that the subframes in msgBitsIn for the validate() call are immediately put in msgBitsOut or in rejected. A return value of 1 means that nav subframes of time t will not be accepted or rejected until validate is called with a nav subframe of time t+1 or later, and so on. Most filters will return a value of 0, indicating an immediate validation of the data.
Implemented in BunkFilter2, gnsstk::LNavOrderFilter, gnsstk::NavOrderFilter, gnsstk::LNavEphMaker, BunkFilter1, gnsstk::LNavCrossSourceFilter, gnsstk::CNavCrossSourceFilter, gnsstk::LNavTLMHOWFilter, gnsstk::CNav2SanityFilter, gnsstk::CNavCookFilter, gnsstk::CNavTOWFilter, gnsstk::LNavCookFilter, gnsstk::CNavEmptyFilter, gnsstk::LNavAlmValFilter, gnsstk::LNavEmptyFilter, gnsstk::CNavParityFilter, and gnsstk::LNavParityFilter.
|
inlinevirtualnoexcept |
Return a human-readable string containing a terse (short, 1-line) description of the reasons for the current contents of the rejected data. In most cases this will be an empty string as most filters are single-purpose and the filter name is sufficient to determine the cause. This method is meant to be used by complex filters with multiple pass/fail criteria.
Definition at line 114 of file NavFilter.hpp.
|
inlinevirtualnoexcept |
Return a human-readable string containing a verbose description containing the detailed reasoning behind the current rejected data. As an example, reasonTerse() might only return "Ahalf", while this method might return "Ahalf=10" i.e. include the rejected value.
Definition at line 121 of file NavFilter.hpp.
|
inlineprotected |
Add a list of invalid nav messages to the reject list. This method should be used by derived classes to pass validated navigation message back to the NavFilterMgr user ONLY once the nav data is no longer being internally stored by the derived filter class.
Definition at line 191 of file NavFilter.hpp.
|
inlineprotected |
Add an invalid nav message to the reject list. This method should be used by derived classes to pass validated navigation message back to the NavFilterMgr user ONLY once the nav data is no longer being internally stored by the derived filter class.
Definition at line 185 of file NavFilter.hpp.
|
pure virtual |
Validate/filter navigation messages. This method is called by NavFilterMgr. Messages are ingested and filtered results returned, but not necessarily all in a single call to this method. Multiple calls may be required to accumulate sufficient data to give meaningful results. This behavior is filter-specific.
[in,out] | msgBitsIn | A list of NavFilterKey* objects containing navigation messages. |
[out] | msgBitsOut | The messages successfully passing the filter. The data from msgBitsIn will not appear here until it successfully passes the filter, which may require multiple calls of validate with multiple epochs of data. |
Implemented in BunkFilter2, gnsstk::LNavOrderFilter, gnsstk::NavOrderFilter, gnsstk::LNavEphMaker, BunkFilter1, gnsstk::LNavCrossSourceFilter, gnsstk::CNavCrossSourceFilter, gnsstk::LNavTLMHOWFilter, gnsstk::CNav2SanityFilter, gnsstk::CNavCookFilter, gnsstk::CNavTOWFilter, gnsstk::LNavCookFilter, gnsstk::CNavEmptyFilter, gnsstk::LNavAlmValFilter, gnsstk::LNavEmptyFilter, gnsstk::CNavParityFilter, and gnsstk::LNavParityFilter.
NavMsgList gnsstk::NavFilter::rejected |
Rejected nav messages go here. If using NavFilterMgr, this list will be cleared prior to the validate message being called (to prevent memory bloat).
Filter users may want to examine the contents of this list after each NavFilterMgr::validate() call.
Definition at line 137 of file NavFilter.hpp.