1 /*!
2 * \file AlignmentSubsystemForClients.cpp
3 *
4 * \author Roger James
5 * \date 13th November 2013
6 *
7 */
8
9 #include "AlignmentSubsystemForClients.h"
10
11 namespace INDI
12 {
13 namespace AlignmentSubsystem
14 {
Initialise(const char * DeviceName,INDI::BaseClient * BaseClient)15 void AlignmentSubsystemForClients::Initialise(const char *DeviceName, INDI::BaseClient *BaseClient)
16 {
17 AlignmentSubsystemForClients::DeviceName = DeviceName;
18 ClientAPIForAlignmentDatabase::Initialise(BaseClient);
19 ClientAPIForMathPluginManagement::Initialise(BaseClient);
20 }
21
ProcessNewBLOB(IBLOB * BLOBPointer)22 void AlignmentSubsystemForClients::ProcessNewBLOB(IBLOB *BLOBPointer)
23 {
24 if (strcmp(BLOBPointer->bvp->device, DeviceName.c_str()) == 0)
25 {
26 IDLog("newBLOB %s\n", BLOBPointer->bvp->name);
27 ClientAPIForAlignmentDatabase::ProcessNewBLOB(BLOBPointer);
28 }
29 }
30
ProcessNewDevice(INDI::BaseDevice * DevicePointer)31 void AlignmentSubsystemForClients::ProcessNewDevice(INDI::BaseDevice *DevicePointer)
32 {
33 if (strcmp(DevicePointer->getDeviceName(), DeviceName.c_str()) == 0)
34 {
35 IDLog("Receiving %s Device...\n", DevicePointer->getDeviceName());
36 ClientAPIForAlignmentDatabase::ProcessNewDevice(DevicePointer);
37 ClientAPIForMathPluginManagement::ProcessNewDevice(DevicePointer);
38 }
39 }
40
ProcessNewNumber(INumberVectorProperty * NumberVectorPropertyPointer)41 void AlignmentSubsystemForClients::ProcessNewNumber(INumberVectorProperty *NumberVectorPropertyPointer)
42 {
43 if (strcmp(NumberVectorPropertyPointer->device, DeviceName.c_str()) == 0)
44 {
45 IDLog("newNumber %s\n", NumberVectorPropertyPointer->name);
46 ClientAPIForAlignmentDatabase::ProcessNewNumber(NumberVectorPropertyPointer);
47 }
48 }
49
ProcessNewProperty(INDI::Property * PropertyPointer)50 void AlignmentSubsystemForClients::ProcessNewProperty(INDI::Property *PropertyPointer)
51 {
52 if (strcmp(PropertyPointer->getDeviceName(), DeviceName.c_str()) == 0)
53 {
54 IDLog("newProperty %s\n", PropertyPointer->getName());
55 ClientAPIForAlignmentDatabase::ProcessNewProperty(PropertyPointer);
56 ClientAPIForMathPluginManagement::ProcessNewProperty(PropertyPointer);
57 }
58 }
59
ProcessNewSwitch(ISwitchVectorProperty * SwitchVectorPropertyPointer)60 void AlignmentSubsystemForClients::ProcessNewSwitch(ISwitchVectorProperty *SwitchVectorPropertyPointer)
61 {
62 if (strcmp(SwitchVectorPropertyPointer->device, DeviceName.c_str()) == 0)
63 {
64 IDLog("newSwitch %s\n", SwitchVectorPropertyPointer->name);
65 ClientAPIForAlignmentDatabase::ProcessNewSwitch(SwitchVectorPropertyPointer);
66 ClientAPIForMathPluginManagement::ProcessNewSwitch(SwitchVectorPropertyPointer);
67 }
68 }
69
70 } // namespace AlignmentSubsystem
71 } // namespace INDI
72