Instrument Neutral Distributed Interface INDI  2.0.2
Public Types | Public Member Functions | List of all members
INDI::AlignmentSubsystem::InMemoryDatabase Class Reference

This class provides the driver side API to the in memory alignment database. More...

#include <InMemoryDatabase.h>

Inheritance diagram for INDI::AlignmentSubsystem::InMemoryDatabase:
INDI::AlignmentSubsystem::MapPropertiesToInMemoryDatabase INDI::AlignmentSubsystem::AlignmentSubsystemForDrivers AstroTrac DSC Scope ScopeSim SkywatcherAPIMount

Public Types

typedef std::vector< AlignmentDatabaseEntryAlignmentDatabaseType
 
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...
 
AlignmentDatabaseTypeGetAlignmentDatabase ()
 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...
 

Detailed Description

This class provides the driver side API to the in memory alignment database.

Definition at line 23 of file InMemoryDatabase.h.

Member Typedef Documentation

◆ AlignmentDatabaseType

Definition at line 32 of file InMemoryDatabase.h.

◆ LoadDatabaseCallbackPointer_t

typedef void(* INDI::AlignmentSubsystem::InMemoryDatabase::LoadDatabaseCallbackPointer_t) (void *)

Definition at line 74 of file InMemoryDatabase.h.

Constructor & Destructor Documentation

◆ InMemoryDatabase()

INDI::AlignmentSubsystem::InMemoryDatabase::InMemoryDatabase ( )

Default constructor.

Definition at line 23 of file InMemoryDatabase.cpp.

◆ ~InMemoryDatabase()

virtual INDI::AlignmentSubsystem::InMemoryDatabase::~InMemoryDatabase ( )
inlinevirtual

Virtual destructor.

Definition at line 30 of file InMemoryDatabase.h.

Member Function Documentation

◆ CheckForDuplicateSyncPoint()

bool INDI::AlignmentSubsystem::InMemoryDatabase::CheckForDuplicateSyncPoint ( const AlignmentDatabaseEntry CandidateEntry,
double  Tolerance = 0.1 
) const

Check if a entry already exists in the database.

Parameters
[in]CandidateEntryThe candidate entry to check
[in]ToleranceThe % tolerance used in the checking process (default 0.1%)
Returns
True if an entry already exists within the required tolerance

Definition at line 28 of file InMemoryDatabase.cpp.

◆ GetAlignmentDatabase()

AlignmentDatabaseType& INDI::AlignmentSubsystem::InMemoryDatabase::GetAlignmentDatabase ( )
inline

Get a reference to the in memory database.

Returns
A reference to the in memory database.

Definition at line 49 of file InMemoryDatabase.h.

◆ GetDatabaseReferencePosition()

bool INDI::AlignmentSubsystem::InMemoryDatabase::GetDatabaseReferencePosition ( IGeographicCoordinates Position)

Get the database reference position.

Parameters
[in]PositionA pointer to a IGeographicCoordinates object to retunr the current position in
Returns
True if successful

Definition at line 57 of file InMemoryDatabase.cpp.

◆ LoadDatabase()

bool INDI::AlignmentSubsystem::InMemoryDatabase::LoadDatabase ( const char *  DeviceName)

Load the database from persistent storage.

Parameters
[in]DeviceNameThe name of the current device.
Returns
True if successful

Definition at line 68 of file InMemoryDatabase.cpp.

◆ RemoveSyncPoint()

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.

Parameters
[in]CandidateEntryThe candidate entry to check
[in]ToleranceThe % tolerance used in the checking process (default 0.1%)

Definition at line 41 of file InMemoryDatabase.cpp.

◆ SaveDatabase()

bool INDI::AlignmentSubsystem::InMemoryDatabase::SaveDatabase ( const char *  DeviceName)

Save the database to persistent storage.

Parameters
[in]DeviceNameThe name of the current device.
Returns
True if successful

Definition at line 177 of file InMemoryDatabase.cpp.

◆ SetDatabaseReferencePosition()

void INDI::AlignmentSubsystem::InMemoryDatabase::SetDatabaseReferencePosition ( double  Latitude,
double  Longitude 
)

Set the database reference position.

Parameters
[in]Latitude
[in]Longitude

Definition at line 240 of file InMemoryDatabase.cpp.

◆ SetLoadDatabaseCallback()

void INDI::AlignmentSubsystem::InMemoryDatabase::SetLoadDatabaseCallback ( LoadDatabaseCallbackPointer_t  CallbackPointer,
void *  ThisPointer 
)

Set the function to be called when the database is loaded or reloaded.

Parameters
[in]CallbackPointerA pointer to the class function to call
[in]ThisPointerA pointer to the class object of the callback function

Definition at line 247 of file InMemoryDatabase.cpp.


The documentation for this class was generated from the following files: