File: AlignmentSubsystemForClients.cpp

package info (click to toggle)
indi 2.1.9%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 15,888 kB
  • sloc: cpp: 217,447; ansic: 31,363; xml: 1,195; sh: 311; makefile: 13
file content (71 lines) | stat: -rw-r--r-- 2,404 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*!
 * \file AlignmentSubsystemForClients.cpp
 *
 * \author Roger James
 * \date 13th November 2013
 *
 */

#include "AlignmentSubsystemForClients.h"

namespace INDI
{
namespace AlignmentSubsystem
{
void AlignmentSubsystemForClients::Initialise(const char *DeviceName, INDI::BaseClient *BaseClient)
{
    AlignmentSubsystemForClients::DeviceName = DeviceName;
    ClientAPIForAlignmentDatabase::Initialise(BaseClient);
    ClientAPIForMathPluginManagement::Initialise(BaseClient);
}

void AlignmentSubsystemForClients::ProcessNewBLOB(IBLOB *BLOBPointer)
{
    if (strcmp(BLOBPointer->bvp->device, DeviceName.c_str()) == 0)
    {
        IDLog("newBLOB %s\n", BLOBPointer->bvp->name);
        ClientAPIForAlignmentDatabase::ProcessNewBLOB(BLOBPointer);
    }
}

void AlignmentSubsystemForClients::ProcessNewDevice(INDI::BaseDevice *DevicePointer)
{
    if (strcmp(DevicePointer->getDeviceName(), DeviceName.c_str()) == 0)
    {
        IDLog("Receiving %s Device...\n", DevicePointer->getDeviceName());
        ClientAPIForAlignmentDatabase::ProcessNewDevice(DevicePointer);
        ClientAPIForMathPluginManagement::ProcessNewDevice(DevicePointer);
    }
}

void AlignmentSubsystemForClients::ProcessNewNumber(INumberVectorProperty *NumberVectorPropertyPointer)
{
    if (strcmp(NumberVectorPropertyPointer->device, DeviceName.c_str()) == 0)
    {
        IDLog("newNumber %s\n", NumberVectorPropertyPointer->name);
        ClientAPIForAlignmentDatabase::ProcessNewNumber(NumberVectorPropertyPointer);
    }
}

void AlignmentSubsystemForClients::ProcessNewProperty(INDI::Property *PropertyPointer)
{
    if (strcmp(PropertyPointer->getDeviceName(), DeviceName.c_str()) == 0)
    {
        IDLog("newProperty %s\n", PropertyPointer->getName());
        ClientAPIForAlignmentDatabase::ProcessNewProperty(PropertyPointer);
        ClientAPIForMathPluginManagement::ProcessNewProperty(PropertyPointer);
    }
}

void AlignmentSubsystemForClients::ProcessNewSwitch(ISwitchVectorProperty *SwitchVectorPropertyPointer)
{
    if (strcmp(SwitchVectorPropertyPointer->device, DeviceName.c_str()) == 0)
    {
        IDLog("newSwitch %s\n", SwitchVectorPropertyPointer->name);
        ClientAPIForAlignmentDatabase::ProcessNewSwitch(SwitchVectorPropertyPointer);
        ClientAPIForMathPluginManagement::ProcessNewSwitch(SwitchVectorPropertyPointer);
    }
}

} // namespace AlignmentSubsystem
} // namespace INDI