Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
gnsstk::NavFilterMgr Class Reference

Detailed Description

Provides the top-level filtering for navigation messages. A single instance of this class should be created for each navigation message structure to be processed. Desired filters are added via addFilter() in the desired order of precedence. Navigation messages are validated using the validate() method.

Examples
navfilterex-pseudo-container.cpp, navfilterex-pseudo-inherit.cpp, and navfilterex-pseudo.cpp.

Definition at line 170 of file NavFilterMgr.hpp.

#include <NavFilterMgr.hpp>

Public Types

typedef std::list< NavFilter * > FilterList
 A list of navigation data filters. More...
 
typedef std::set< NavFilter * > FilterSet
 A set of unique filter pointers. More...
 

Public Member Functions

void addFilter (NavFilter *filt)
 
virtual NavFilter::NavMsgList finalize ()
 
 NavFilterMgr ()
 Do-nothing default constructor. More...
 
unsigned processingDepth () const noexcept
 
NavFilter::NavMsgList validate (NavFilterKey *msgBits)
 

Public Attributes

FilterSet rejected
 

Private Attributes

FilterList filters
 The collection of navigation message filters to apply. More...
 

Member Typedef Documentation

◆ FilterList

A list of navigation data filters.

Definition at line 174 of file NavFilterMgr.hpp.

◆ FilterSet

A set of unique filter pointers.

Definition at line 176 of file NavFilterMgr.hpp.

Constructor & Destructor Documentation

◆ NavFilterMgr()

gnsstk::NavFilterMgr::NavFilterMgr ( )

Do-nothing default constructor.

Definition at line 44 of file NavFilterMgr.cpp.

Member Function Documentation

◆ addFilter()

void gnsstk::NavFilterMgr::addFilter ( NavFilter filt)

Add a desired navigation message data filter to the list. Filters are expected to be for the same type of navigation message data, but this is not enforced.

Parameters
[in]filtThe filter to be added.
Warning
Do not add the exact same filter object more than once. Multiple instances of the same filter class may be added, but if the same instance is added more than once, memory allocated for rejected subframes will likely be leaked.
Examples
navfilterex-pseudo-container.cpp, navfilterex-pseudo-inherit.cpp, and navfilterex-pseudo.cpp.

Definition at line 50 of file NavFilterMgr.cpp.

◆ finalize()

NavFilter::NavMsgList gnsstk::NavFilterMgr::finalize ( )
virtual

Flush the stored data for all known filters. This method should be called by the user after all data has been added to the filter manager via validate().

Returns
The remaining messages successfully passing the filters.
Examples
navfilterex-pseudo-container.cpp, and navfilterex-pseudo-inherit.cpp.

Definition at line 78 of file NavFilterMgr.cpp.

◆ processingDepth()

unsigned gnsstk::NavFilterMgr::processingDepth ( ) const
noexcept

Gets the effective buffer size in epochs required for maintaining subframe data, given the filters that have been added using addFilter(). This is the sum of NavFilter::processingDepth() return values +1.

The method can be used as in this example:

struct Subframe { uint32_t word[10]; };
typedef vector<Subframe> SubframeBuf;
mgr.addFilter(...);
SubframeBuf buf(numRx * numCode * numChl * mgr.processingDepth());

Definition at line 123 of file NavFilterMgr.cpp.

◆ validate()

NavFilter::NavMsgList gnsstk::NavFilterMgr::validate ( NavFilterKey msgBits)

Validate a single navigation message.

Parameters
[in]msgBitsThe navigation message to validate/filter. This should not be a NavFilterKey pointer but rather should be a child class specific to the type of navigation message data being processed. Behavior is undefined if msgBits is not the expected type.
Returns
Any messages that have successfully passed all configured filters.
Examples
navfilterex-pseudo-container.cpp, navfilterex-pseudo-inherit.cpp, and navfilterex-pseudo.cpp.

Definition at line 57 of file NavFilterMgr.cpp.

Member Data Documentation

◆ filters

FilterList gnsstk::NavFilterMgr::filters
private

The collection of navigation message filters to apply.

Definition at line 237 of file NavFilterMgr.hpp.

◆ rejected

FilterSet gnsstk::NavFilterMgr::rejected

This set contains any filters with rejected data after a validate() or finalize() call. The set will be cleared at the beginning of the validate() or finalize() call so that only filters with rejected data from the most recent call will be present in the set. The rejected data itself can be accessed via the NavFilter::rejected data member.

Definition at line 233 of file NavFilterMgr.hpp.


The documentation for this class was generated from the following files:
gnsstk::StringUtils::word
std::string word(const std::string &s, const std::string::size_type wordNum=0, const char delimiter=' ')
Definition: StringUtils.hpp:1112
gnsstk::NavFilterMgr::NavFilterMgr
NavFilterMgr()
Do-nothing default constructor.
Definition: NavFilterMgr.cpp:44


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45