24 #include <libnova/julian_day.h>
179 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
180 virtual bool ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
override;
181 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
412 static void joystickHelper(
const char *joystick_n,
double mag,
double angle,
void *context);
413 static void axisHelper(
const char *axis_n,
double value,
void *context);
467 virtual bool Flip(
double ra,
double dec);
475 virtual bool Goto(
double ra,
double dec);
483 virtual bool Sync(
double ra,
double dec);
527 virtual bool Abort();
546 virtual bool SetTrackRate(
double raRate,
double deRate);
556 virtual int AddTrackMode(
const char *name,
const char *label,
bool isDefault =
false);
576 virtual bool updateTime(ln_date *utc,
double utc_offset);
587 virtual bool updateLocation(
double latitude,
double longitude,
double elevation);
654 void processJoystick(
const char *joystick_n,
double mag,
double angle);
655 void processAxis(
const char *axis_n,
double value);
704 bool CheckFile(
const std::string &file_name,
bool writable)
const;
928 bool processTimeInfo(
const char *utc,
const char *offset);
929 bool processLocationInfo(
double latitude,
double longitude,
double elevation);
930 void triggerSnoop(
const char *driverName,
const char *propertyName);
936 const char *LoadParkXML();
938 bool IsLocked {
true};
939 const char *ParkDeviceName {
nullptr};
940 const std::string ParkDataFileName;
941 XMLEle *ParkdataXmlRoot {
nullptr}, *ParkdeviceXml {
nullptr}, *ParkstatusXml {
nullptr}, *ParkpositionXml {
nullptr},
942 *ParkpositionAxis1Xml {
nullptr}, *ParkpositionAxis2Xml {
nullptr};
944 double Axis1ParkPosition {0};
945 double Axis1DefaultParkPosition {0};
946 double Axis2ParkPosition {0};
947 double Axis2DefaultParkPosition {0};
949 uint8_t nSlewRate {0};
954 Controller *controller {
nullptr};
956 float motionDirNSValue {0};
957 float motionDirWEValue {0};
959 bool m_simulatePierSide;
962 static constexpr
double EQ_NOTIFY_THRESHOLD {1.0 / (60 * 60 * 10)};
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
The TCP class manages connection with devices over the network via TCP/IP. Upon successfull connectio...
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
const std::string ScopeConfigGScopeFocXmlNode
INumberVectorProperty TrackRateNP
TelescopeStatus TrackState
bool isLocked() const
isLocked is mount currently locked?
ISwitchVectorProperty SimulatePierSideSP
virtual bool SetTrackMode(uint8_t mode)
SetTrackMode Set active tracking mode. Do not change track state.
ISwitchVectorProperty TrackStateSP
ISwitchVectorProperty ParkOptionSP
void SetAxis1Park(double value)
SetRAPark Set current RA/AZ parking position. The data park file (stored in ~/.indi/ParkData....
ISwitchVectorProperty DomePolicySP
bool HasPierSideSimulation()
TelescopePierSide currentPierSide
virtual bool Goto(double ra, double dec)
Move the scope to the supplied RA and DEC coordinates.
enum INDI::Telescope::@258 TelescopeCapability
ISwitchVectorProperty MovementNSSP
ITextVectorProperty ScopeConfigNameTP
void processButton(const char *button_n, ISState state)
static void axisHelper(const char *axis_n, double value, void *context)
ISwitchVectorProperty AbortSP
void processAxis(const char *axis_n, double value)
bool CheckFile(const std::string &file_name, bool writable) const
Check if a file exists and it is readable.
void SetAxis1ParkDefault(double steps)
SetRAPark Set default RA/AZ parking position.
virtual bool ReadScopeStatus()=0
Read telescope status.
void SetTelescopeCapability(uint32_t cap, uint8_t slewRateCount)
SetTelescopeCapability sets the Telescope capabilities. All capabilities must be initialized.
virtual bool Park()
Park the telescope to its home position.
INumberVectorProperty LocationNP
enum INDI::Telescope::@263 SatelliteTracking
@ MOTION_CONTROL_JOYSTICK
int GetScopeConfigIndex() const
Get the scope config index.
virtual bool SetCurrentPark()
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
TelescopeParkData parkDataType
INumberVectorProperty ScopeParametersNP
std::string GetHomeDirectory() const
Validate a file name.
virtual bool initProperties() override
Called to initialize basic properties required all the time.
ITextVectorProperty ActiveDeviceTP
const std::string ScopeConfigLabelApXmlNode
ITextVectorProperty TimeTP
virtual void TimerHit() override
Called when setTimer() time is up.
INumberVectorProperty TargetNP
ISwitch MotionControlModeT[2]
@ SAT_PASS_WINDOW_COUNT
Number of indices.
@ SAT_PASS_WINDOW_END
Index for end of the window.
@ SAT_PASS_WINDOW_START
Index for start of the window.
ITextVectorProperty SatPassWindowTP
Text Vector property defining the start and end of a satellite pass (window contains pass)....
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
TelescopePierSide lastPierSide
virtual bool SetTrackRate(double raRate, double deRate)
SetTrackRate Set custom tracking rates.
double GetAxis1Park() const
virtual bool UnPark()
Unpark the telescope if already parked.
const std::string ScopeConfigDeviceXmlNode
INumberVectorProperty ParkPositionNP
virtual bool SetSlewRate(int index)
SetSlewRate Set desired slew rate index.
bool getSimulatePierSide() const
ISwitchVectorProperty CoordSP
virtual bool SetDefaultPark()
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
void setTelescopeConnection(const uint8_t &value)
setTelescopeConnection Set telescope connection mode. Child class should call this in the constructor...
double GetAxis2Park() const
const std::string ScopeConfigScopeFocXmlNode
ISwitchVectorProperty ScopeConfigsSP
bool isParked()
isParked is mount currently parked?
ISwitchVectorProperty PECStateSP
void processNSWE(double mag, double angle)
virtual int AddTrackMode(const char *name, const char *label, bool isDefault=false)
AddTrackMode.
ISwitchVectorProperty TrackModeSP
ISwitchVectorProperty SlewRateSP
Connection::Serial * serialConnection
@ SAT_HALT
Halt signal (abort)
@ SAT_TRACK_COUNT
State counter.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
ISwitchVectorProperty PierSideSP
static void joystickHelper(const char *joystick_n, double mag, double angle, void *context)
void updateObserverLocation(double latitude, double longitude, double elevation)
Update location settings of the observer.
const std::string ScopeConfigFileName
The telescope/guide scope configuration file name.
double GetAxis1ParkDefault() const
virtual bool Handshake()
perform handshake with device to check communication
virtual bool SetTrackEnabled(bool enabled)
SetTrackEnabled Engages or disengages mount tracking. If there are no tracking modes available,...
const std::string ScopeConfigRootXmlNode
virtual void SetParked(bool isparked)
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
virtual bool updateTime(ln_date *utc, double utc_offset)
Update telescope time, date, and UTC offset.
Connection::TCP * tcpConnection
INumberVectorProperty EqNP
@ TELESCOPE_HAS_TRACK_RATE
@ TELESCOPE_HAS_PIER_SIDE
@ TELESCOPE_CAN_TRACK_SATELLITE
@ TELESCOPE_HAS_TRACK_MODE
@ TELESCOPE_HAS_PIER_SIDE_SIMULATION
@ TELESCOPE_CAN_CONTROL_TRACK
static void buttonHelper(const char *button_n, ISState state, void *context)
uint8_t getTelescopeConnection() const
const char * LoadParkData()
void setPECState(TelescopePECState state)
ISwitchVectorProperty TrackSatSP
Switch Vector property defining the state of the satellite tracking of the mount. Example implementat...
enum INDI::Telescope::@257 TelescopeConnection
ISwitchVectorProperty MotionControlModeTP
TelescopePierSide getPierSide()
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool updateLocation(double latitude, double longitude, double elevation)
Update telescope location settings.
virtual bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
virtual bool SetParkPosition(double Axis1Value, double Axis2Value)
SetParkPosition Set desired parking position to the supplied value. This ONLY sets the desired park p...
ISwitchVectorProperty ParkSP
INumber ScopeParametersN[4]
const std::string ScopeConfigNameXmlNode
ISwitch TrackSatS[SAT_TRACK_COUNT]
INDI::PropertySwitch ReverseMovementSP
const std::string ScopeConfigGScopeApXmlNode
IGeographicCoordinates m_Location
ISwitchVectorProperty LockAxisSP
void processJoystick(const char *joystick_n, double mag, double angle)
IText SatPassWindowT[SAT_PASS_WINDOW_COUNT]
bool callHandshake()
callHandshake Helper function that sets the port file descriptor before calling the actual Handshake ...
uint32_t GetTelescopeCapability() const
GetTelescopeCapability returns the capability of the Telescope.
bool LoadScopeConfig()
Load scope settings from XML files.
void NewRaDec(double ra, double dec)
The child class calls this function when it has updates.
bool UpdateScopeConfig()
Save scope settings to XML files.
virtual void SyncParkStatus(bool isparked)
SyncParkStatus Update the state and switches for parking.
void setSimulatePierSide(bool value)
void setPierSide(TelescopePierSide side)
bool InitPark()
InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking...
enum INDI::Telescope::@262 SatelliteWindow
ISwitchVectorProperty MovementWESP
void sendTimeFromSystem()
TelescopePECState getPECState()
virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command)
Move the telescope in the direction dir.
TelescopeStatus RememberTrackState
RememberTrackState Remember last state of Track State to fall back to in case of errors or aborts.
virtual bool Abort()
Abort any telescope motion including tracking if possible.
double GetAxis2ParkDefault() const
TelescopePECState currentPECState
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
void SetAxis2Park(double steps)
SetDEPark Set current DEC/ALT parking position. The data park file (stored in ~/.indi/ParkData....
const std::string ScopeConfigScopeApXmlNode
virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command)
Start or Stop the telescope motion in the direction dir.
ITextVectorProperty TLEtoTrackTP
Text Vector property defining the orbital elements of an artificial satellite (TLE)....
virtual bool Flip(double ra, double dec)
Move and flip the scope to the supplied RA and DEC coordinates.
bool HasDefaultScopeConfig()
Load scope settings from XML files.
ISwitch SimulatePierSideS[2]
void processSlewPresets(double mag, double angle)
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
const char * getPierSideStr(TelescopePierSide ps)
void SetParkDataType(TelescopeParkData type)
setParkDataType Sets the type of parking data stored in the park data file and presented to the user.
TelescopePECState lastPECState
TelescopePierSide expectedPierSide(double ra)
Calculate the expected pier side for scopes that do not report this property themselves.
IText ScopeConfigNameT[1]
void SetAxis2ParkDefault(double steps)
SetDEParkDefault Set default DEC/ALT parking position.
virtual bool Sync(double ra, double dec)
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
Namespace to encapsulate INDI client, drivers, and mediator classes.
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.