TwiceAsNice
2019-02-18
|
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... | |
AlignmentDatabaseType & | GetAlignmentDatabase () |
Get a reference to the in memory database. More... | |
bool | GetDatabaseReferencePosition (ln_lnlat_posn &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... | |
Private Attributes | |
AlignmentDatabaseType | MySyncPoints |
ln_lnlat_posn | DatabaseReferencePosition |
bool | DatabaseReferencePositionIsValid |
LoadDatabaseCallbackPointer_t | LoadDatabaseCallback |
void * | LoadDatabaseCallbackThisPointer |
This class provides the driver side API to the in memory alignment database.
typedef std::vector<AlignmentDatabaseEntry> INDI::AlignmentSubsystem::InMemoryDatabase::AlignmentDatabaseType |
typedef void(* INDI::AlignmentSubsystem::InMemoryDatabase::LoadDatabaseCallbackPointer_t) (void *) |
INDI::AlignmentSubsystem::InMemoryDatabase::InMemoryDatabase | ( | ) |
Default constructor.
|
inlinevirtual |
Virtual destructor.
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%) |
|
inline |
Get a reference to the in memory database.
bool INDI::AlignmentSubsystem::InMemoryDatabase::GetDatabaseReferencePosition | ( | ln_lnlat_posn & | Position | ) |
Get the database reference position.
[in] | Position | A pointer to a ln_lnlat_posn object to retunr the current position in |
Load the database from persistent storage.
[in] | DeviceName | The name of the current device. |
Save the database to persistent storage.
[in] | DeviceName | The name of the current device. |
void INDI::AlignmentSubsystem::InMemoryDatabase::SetDatabaseReferencePosition | ( | double | Latitude, |
double | Longitude | ||
) |
Set the database reference position.
[in] | Latitude | |
[in] | Longitude |
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 |
|
private |
|
private |
|
private |
|
private |
|
private |