Instrument Neutral Distributed Interface INDI  1.9.5
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
basedevice.h
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement::~ClientAPIForMathPluginManagement
virtual ~ClientAPIForMathPluginManagement()
Virtual destructor.
Definition: ClientAPIForMathPluginManagement.h:31
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement::SelectMathPlugin
bool SelectMathPlugin(const std::string &MathPluginName)
Selects, loads and initialises the named math plugin.
Definition: ClientAPIForMathPluginManagement.cpp:79
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement::ReInitialiseMathPlugin
bool ReInitialiseMathPlugin()
Re-initialises the current math plugin.
Definition: ClientAPIForMathPluginManagement.cpp:108
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement::EnumerateMathPlugins
bool EnumerateMathPlugins(MathPluginsList &AvailableMathPlugins)
Return a list of the names of the available math plugins.
Definition: ClientAPIForMathPluginManagement.cpp:19
INDI::Property
Provides generic container for INDI properties.
Definition: indiproperty.h:43
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement
This class provides the client API for driver side math plugin management. It communicates with the d...
Definition: ClientAPIForMathPluginManagement.h:27
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement::ProcessNewProperty
void ProcessNewProperty(INDI::Property *PropertyPointer)
Process new property message from driver. This routine should be called from within the newProperty h...
Definition: ClientAPIForMathPluginManagement.cpp:44
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement::ProcessNewSwitch
void ProcessNewSwitch(ISwitchVectorProperty *SwitchVectorProperty)
Process new switch message from driver. This routine should be called from within the newSwitch handl...
Definition: ClientAPIForMathPluginManagement.cpp:65
INDI::BaseClient
Class to provide basic client functionality.
Definition: baseclient.h:54
INDI
Namespace to encapsulate INDI client, drivers, and mediator classes.
Definition: AlignmentSubsystemForClients.cpp:11
baseclient.h
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement::ProcessNewDevice
void ProcessNewDevice(INDI::BaseDevice *DevicePointer)
Process new device message from driver. This routine should be called from within the newDevice handl...
Definition: ClientAPIForMathPluginManagement.cpp:39
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement::Initialise
void Initialise(INDI::BaseClient *BaseClient)
Intialise the API.
Definition: ClientAPIForMathPluginManagement.cpp:34
INDI::BaseDevice
Class to provide basic INDI device functionality.
Definition: basedevice.h:45
INDI::AlignmentSubsystem::ClientAPIForMathPluginManagement::MathPluginsList
std::vector< std::string > MathPluginsList
Definition: ClientAPIForMathPluginManagement.h:33
_ISwitchVectorProperty
Switch vector property descriptor.
Definition: indiapi.h:365