Instrument Neutral Distributed Interface INDI
2.0.2
|
This class provides the driver side API to the in memory alignment database. More...
#include <InMemoryDatabase.h>
Public Types | |
typedef std::vector< AlignmentDatabaseEntry > | AlignmentDatabaseType |
typedef void(* | LoadDatabaseCallbackPointer_t) (void *) |
Public Member Functions | |
InMemoryDatabase () | |
Default constructor. More... | |
virtual | ~InMemoryDatabase () |
Virtual destructor. More... | |
bool | CheckForDuplicateSyncPoint (const AlignmentDatabaseEntry &CandidateEntry, double Tolerance=0.1) const |
Check if a entry already exists in the database. More... | |
void | RemoveSyncPoint (const AlignmentDatabaseEntry &CandidateEntry, double Tolerance=0.1) |
Remove a sync point that falls within the tolerance of a candidate point. More... | |
AlignmentDatabaseType & | GetAlignmentDatabase () |
Get a reference to the in memory database. More... | |
bool | GetDatabaseReferencePosition (IGeographicCoordinates &Position) |
Get the database reference position. More... | |
bool | LoadDatabase (const char *DeviceName) |
Load the database from persistent storage. More... | |
bool | SaveDatabase (const char *DeviceName) |
Save the database to persistent storage. More... | |
void | SetDatabaseReferencePosition (double Latitude, double Longitude) |
Set the database reference position. More... | |
void | SetLoadDatabaseCallback (LoadDatabaseCallbackPointer_t CallbackPointer, void *ThisPointer) |
Set the function to be called when the database is loaded or reloaded. More... | |
This class provides the driver side API to the in memory alignment database.
Definition at line 23 of file InMemoryDatabase.h.
typedef std::vector<AlignmentDatabaseEntry> INDI::AlignmentSubsystem::InMemoryDatabase::AlignmentDatabaseType |
Definition at line 32 of file InMemoryDatabase.h.
typedef void(* INDI::AlignmentSubsystem::InMemoryDatabase::LoadDatabaseCallbackPointer_t) (void *) |
Definition at line 74 of file InMemoryDatabase.h.
INDI::AlignmentSubsystem::InMemoryDatabase::InMemoryDatabase | ( | ) |
Default constructor.
Definition at line 23 of file InMemoryDatabase.cpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 30 of file InMemoryDatabase.h.
bool INDI::AlignmentSubsystem::InMemoryDatabase::CheckForDuplicateSyncPoint | ( | const AlignmentDatabaseEntry & | CandidateEntry, |
double | Tolerance = 0.1 |
||
) | const |
Check if a entry already exists in the database.
[in] | CandidateEntry | The candidate entry to check |
[in] | Tolerance | The % tolerance used in the checking process (default 0.1%) |
Definition at line 28 of file InMemoryDatabase.cpp.
|
inline |
Get a reference to the in memory database.
Definition at line 49 of file InMemoryDatabase.h.
bool INDI::AlignmentSubsystem::InMemoryDatabase::GetDatabaseReferencePosition | ( | IGeographicCoordinates & | Position | ) |
Get the database reference position.
[in] | Position | A pointer to a IGeographicCoordinates object to retunr the current position in |
Definition at line 57 of file InMemoryDatabase.cpp.
bool INDI::AlignmentSubsystem::InMemoryDatabase::LoadDatabase | ( | const char * | DeviceName | ) |
Load the database from persistent storage.
[in] | DeviceName | The name of the current device. |
Definition at line 68 of file InMemoryDatabase.cpp.
void INDI::AlignmentSubsystem::InMemoryDatabase::RemoveSyncPoint | ( | const AlignmentDatabaseEntry & | CandidateEntry, |
double | Tolerance = 0.1 |
||
) |
Remove a sync point that falls within the tolerance of a candidate point.
[in] | CandidateEntry | The candidate entry to check |
[in] | Tolerance | The % tolerance used in the checking process (default 0.1%) |
Definition at line 41 of file InMemoryDatabase.cpp.
bool INDI::AlignmentSubsystem::InMemoryDatabase::SaveDatabase | ( | const char * | DeviceName | ) |
Save the database to persistent storage.
[in] | DeviceName | The name of the current device. |
Definition at line 177 of file InMemoryDatabase.cpp.
void INDI::AlignmentSubsystem::InMemoryDatabase::SetDatabaseReferencePosition | ( | double | Latitude, |
double | Longitude | ||
) |
Set the database reference position.
[in] | Latitude | |
[in] | Longitude |
Definition at line 240 of file InMemoryDatabase.cpp.
void INDI::AlignmentSubsystem::InMemoryDatabase::SetLoadDatabaseCallback | ( | LoadDatabaseCallbackPointer_t | CallbackPointer, |
void * | ThisPointer | ||
) |
Set the function to be called when the database is loaded or reloaded.
[in] | CallbackPointer | A pointer to the class function to call |
[in] | ThisPointer | A pointer to the class object of the callback function |
Definition at line 247 of file InMemoryDatabase.cpp.