Instrument Neutral Distributed Interface INDI 2.2.5
INDI::AlignmentSubsystem::MapPropertiesToInMemoryDatabase Class Reference

An entry in the sync point database is defined by the following INDI properties. More...

#include <MapPropertiesToInMemoryDatabase.h>

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

Public Member Functions

virtual ~MapPropertiesToInMemoryDatabase ()
 Virtual destructor.
void InitProperties (Telescope *pTelescope)
 Initialize alignment database properties. It is recommended to call this function within initProperties() of your primary device.
void ProcessBlobProperties (Telescope *pTelescope, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
 Call this function from within the ISNewBLOB processing path. The function will handle any alignment database related properties.
void ProcessNumberProperties (Telescope *, const char *name, double values[], char *names[], int n)
 Call this function from within the ISNewNumber processing path. The function will handle any alignment database related properties.
void ProcessSwitchProperties (Telescope *pTelescope, const char *name, ISState *states, char *names[], int n)
 Call this function from within the ISNewSwitch processing path. The function will handle any alignment database related properties.
void UpdateLocation (double latitude, double longitude, double elevation)
 Call this function from within the updateLocation processing path.
void UpdateSize ()
 Call this function when the number of entries in the database changes.
Public Member Functions inherited from INDI::AlignmentSubsystem::InMemoryDatabase
 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.

Additional Inherited Members

Public Types inherited from INDI::AlignmentSubsystem::InMemoryDatabase
typedef std::vector< AlignmentDatabaseEntry > AlignmentDatabaseType
typedef void(* LoadDatabaseCallbackPointer_t) (void *)

Detailed Description

An entry in the sync point database is defined by the following INDI properties.

  • ALIGNMENT_POINT_ENTRY_OBSERVATION_JULIAN_DATE
    The Julian date of the sync point observation (number)
  • ALIGNMENT_POINT_ENTRY_OBSERVATION_LOCAL_SIDEREAL_TIME
    The local sidereal time of the sync point observation (number)
  • ALIGNMENT_POINT_ENTRY_RA
    The right ascension of the sync point (number)
  • ALIGNMENT_POINT_ENTRY_DEC
    The declination of the sync point (number)
  • ALIGNMENT_POINT_ENTRY_VECTOR_X
    The x component of the telescope direction vector of the sync point (number)
  • ALIGNMENT_POINT_ENTRY_VECTOR_Y
    The y component of the telescope direction vector of the sync point (number)
  • ALIGNMENT_POINT_ENTRY_VECTOR_Z
    The z component of the telescope direction vector of the sync point (number)
  • ALIGNMENT_POINT_ENTRY_PRIVATE
    An optional binary blob for communication between the client and the math plugin

The database is accessed using the following properties

  • ALIGNMENT_POINTSET_SIZE
    The count of the number of sync points in the set (number)
  • ALIGNMENT_POINTSET_CURRENT_ENTRY
    A zero based number that sets/shows the current entry (number) Only valid if ALIGNMENT_POINTSET_SIZE is greater than zero
  • ALIGNMENT_POINTSET_ACTION
    Determines the action to take when the COMMIT property is written
    • APPEND
      Append a new entry to the set.
    • INSERT
      Insert a new entry at the pointer.
    • EDIT
      Overwrites the entry at the pointer.
    • DELETE
      Delete the entry at the pointer.
    • CLEAR
      Delete all entries.
    • READ
      Read the entry at the pointer.
    • READ INCREMENT
      Increment the pointer before reading the entry.
    • LOAD DATABASE
      Load the database from local storage.
    • SAVE DATABASE
      Save the database to local storage.
  • ALIGNMENT_POINTSET_COMMIT
    When written take the action defined above.
    • COMMIT

Definition at line 70 of file MapPropertiesToInMemoryDatabase.h.

Constructor & Destructor Documentation

◆ ~MapPropertiesToInMemoryDatabase()

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

Virtual destructor.

Definition at line 74 of file MapPropertiesToInMemoryDatabase.h.

Member Function Documentation

◆ InitProperties()

void INDI::AlignmentSubsystem::MapPropertiesToInMemoryDatabase::InitProperties ( Telescope * pTelescope)

Initialize alignment database properties. It is recommended to call this function within initProperties() of your primary device.

Parameters
[in]pTelescopePointer to the child INDI::Telecope class

Definition at line 17 of file MapPropertiesToInMemoryDatabase.cpp.

◆ ProcessBlobProperties()

void INDI::AlignmentSubsystem::MapPropertiesToInMemoryDatabase::ProcessBlobProperties ( Telescope * pTelescope,
const char * name,
int sizes[],
int blobsizes[],
char * blobs[],
char * formats[],
char * names[],
int n )

Call this function from within the ISNewBLOB processing path. The function will handle any alignment database related properties.

Parameters
[in]pTelescopePointer to the child INDI::Telecope class
[in]namevector property name
[in]sizes
[in]blobsizes
[in]blobs
[in]formats
[in]names
[in]n

Definition at line 75 of file MapPropertiesToInMemoryDatabase.cpp.

◆ ProcessNumberProperties()

void INDI::AlignmentSubsystem::MapPropertiesToInMemoryDatabase::ProcessNumberProperties ( Telescope * ,
const char * name,
double values[],
char * names[],
int n )

Call this function from within the ISNewNumber processing path. The function will handle any alignment database related properties.

Parameters
[in]pTelescopePointer to the child INDI::Telecope class
[in]namevector property name
[in]valuesvalue as passed by the client
[in]namesnames as passed by the client
[in]nnumber of values and names pair to process.

Definition at line 101 of file MapPropertiesToInMemoryDatabase.cpp.

◆ ProcessSwitchProperties()

void INDI::AlignmentSubsystem::MapPropertiesToInMemoryDatabase::ProcessSwitchProperties ( Telescope * pTelescope,
const char * name,
ISState * states,
char * names[],
int n )

Call this function from within the ISNewSwitch processing path. The function will handle any alignment database related properties.

Parameters
[in]pTelescopePointer to the child INDI::Telecope class
[in]namevector property name
[in]statesstates as passed by the client
[in]namesnames as passed by the client
[in]nnumber of values and names pair to process.

Definition at line 121 of file MapPropertiesToInMemoryDatabase.cpp.

◆ UpdateLocation()

void INDI::AlignmentSubsystem::MapPropertiesToInMemoryDatabase::UpdateLocation ( double latitude,
double longitude,
double elevation )

Call this function from within the updateLocation processing path.

Parameters
[in]latitudeSite latitude in degrees.
[in]longitudeSite latitude in degrees increasing eastward from Greenwich (0 to 360).
[in]elevationSite elevation in meters.

Definition at line 256 of file MapPropertiesToInMemoryDatabase.cpp.

◆ UpdateSize()

void INDI::AlignmentSubsystem::MapPropertiesToInMemoryDatabase::UpdateSize ( )

Call this function when the number of entries in the database changes.

Definition at line 273 of file MapPropertiesToInMemoryDatabase.cpp.


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