Instrument Neutral Distributed Interface INDI  2.0.2
ClientAPIForMathPluginManagement.h
Go to the documentation of this file.
1 
9 #pragma once
10 
11 #include "basedevice.h"
12 #include "baseclient.h"
13 
14 #include <string>
15 #include <vector>
16 #include <pthread.h>
17 
18 namespace INDI
19 {
20 namespace AlignmentSubsystem
21 {
28 {
29  public:
32 
33  typedef std::vector<std::string> MathPluginsList;
34 
35  // Public methods
36 
42  bool EnumerateMathPlugins(MathPluginsList &AvailableMathPlugins);
43 
47 
54  void ProcessNewDevice(INDI::BaseDevice *DevicePointer);
55 
62  void ProcessNewProperty(INDI::Property *PropertyPointer);
63 
70  void ProcessNewSwitch(ISwitchVectorProperty *SwitchVectorProperty);
71 
77  bool SelectMathPlugin(const std::string &MathPluginName);
78 
84 
85  private:
86  // Private methods
87 
88  bool SetDriverBusy();
89  bool SignalDriverCompletion();
90  bool WaitForDriverCompletion();
91 
92  // Private properties
93 
95  pthread_cond_t DriverActionCompleteCondition;
96  pthread_mutex_t DriverActionCompleteMutex;
97  bool DriverActionComplete;
98  INDI::BaseDevice *Device;
99  INDI::Property *MathPlugins;
100  INDI::Property *PluginInitialise;
101 };
102 
103 } // namespace AlignmentSubsystem
104 } // namespace INDI
This class provides the client API for driver side math plugin management. It communicates with the d...
bool EnumerateMathPlugins(MathPluginsList &AvailableMathPlugins)
Return a list of the names of the available math plugins.
void ProcessNewDevice(INDI::BaseDevice *DevicePointer)
Process new device message from driver. This routine should be called from within the newDevice handl...
void ProcessNewProperty(INDI::Property *PropertyPointer)
Process new property message from driver. This routine should be called from within the newProperty h...
void Initialise(INDI::BaseClient *BaseClient)
Intialise the API.
void ProcessNewSwitch(ISwitchVectorProperty *SwitchVectorProperty)
Process new switch message from driver. This routine should be called from within the newSwitch handl...
bool SelectMathPlugin(const std::string &MathPluginName)
Selects, loads and initialises the named math plugin.
Class to provide basic client functionality.
Definition: baseclient.h:52
Class to provide basic INDI device functionality.
Definition: basedevice.h:52
Provides generic container for INDI properties.
Definition: indiproperty.h:48
Namespace to encapsulate INDI client, drivers, and mediator classes.
Switch vector property descriptor.
Definition: indiapi.h:367