|
Instrument Neutral Distributed Interface INDI 2.2.5
|
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. | |
| virtual | ~InMemoryDatabase () |
| Virtual destructor. | |
| bool | CheckForDuplicateSyncPoint (const AlignmentDatabaseEntry &CandidateEntry, double Tolerance=0.1) const |
| Check if a entry already exists in the database. | |
| void | RemoveSyncPoint (const AlignmentDatabaseEntry &CandidateEntry, double Tolerance=0.1) |
| Remove a sync point that falls within the tolerance of a candidate point. | |
| AlignmentDatabaseType & | GetAlignmentDatabase () |
| Get a reference to the in memory database. | |
| bool | GetDatabaseReferencePosition (IGeographicCoordinates &Position) |
| Get the database reference position. | |
| bool | LoadDatabase (const char *DeviceName) |
| Load the database from persistent storage. | |
| bool | SaveDatabase (const char *DeviceName) |
| Save the database to persistent storage. | |
| void | SetDatabaseReferencePosition (double Latitude, double Longitude) |
| Set the database reference position. | |
| void | SetDatabaseReferencePosition (const IGeographicCoordinates &Position) |
| Set the database reference position. | |
| void | SetLoadDatabaseCallback (LoadDatabaseCallbackPointer_t CallbackPointer, void *ThisPointer) |
| Set the function to be called when the database is loaded or reloaded. | |
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 77 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 return 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 | ( | const IGeographicCoordinates & | Position | ) |
Set the database reference position.
| [in] | Position |
Definition at line 248 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 254 of file InMemoryDatabase.cpp.