39 static std::unique_ptr<Beaver>
dome(
new Beaver());
60 RotatorStatusTP[0].
fill(
"RSTATUS",
"Status",
"Idle");
64 ShutterStatusTP[0].
fill(
"SSTATUS",
"Status",
"Idle");
68 ShutterVoltsNP[0].
fill(
"SHUTTERvolts",
"Volts",
"%.2f", 0.00, 15.00, 0.00, 0.00);
72 GotoHomeSP[0].
fill(
"ROTATOR_HOME_GOTO",
"Home",
ISS_OFF);
80 HomePositionNP[0].
fill(
"HOME_AZ",
"AZ D:M:S",
"%10.6m", 0.0, 360.0, 0.0, 0);
84 HomeOptionsSP[HOMECURRENT].
fill(
"HOME_CURRENT",
"Current",
ISS_OFF);
85 HomeOptionsSP[HOMEDEFAULT].
fill(
"HOME_DEFAULT",
"Default (0)",
ISS_OFF);
89 RotatorCalibrationSP[ROTATOR_HOME_FIND].
fill(
"ROTATOR_HOME_FIND",
"Find Home",
ISS_OFF);
90 RotatorCalibrationSP[ROTATOR_HOME_MEASURE].
fill(
"ROTATOR_HOME_MEASURE",
"Measure Home",
ISS_OFF);
95 RotatorSettingsNP[ROTATOR_MAX_SPEED].
fill(
"ROTATOR_MAX_SPEED",
"Max Speed (m/s)",
"%.f", 1, 1000, 10, 800);
96 RotatorSettingsNP[ROTATOR_MIN_SPEED].
fill(
"ROTATOR_MIN_SPEED",
"Min Speed (m/s)",
"%.f", 1, 1000, 10, 400);
97 RotatorSettingsNP[ROTATOR_ACCELERATION].
fill(
"ROTATOR_ACCELERATION",
"Acceleration (m/s^2)",
"%.f", 1, 1000, 10, 500);
98 RotatorSettingsNP[ROTATOR_TIMEOUT].
fill(
"ROTATOR_TIMEOUT",
"Timeout (s)",
"%.f", 1, 1000, 10, 83);
105 ShutterCalibrationSP[SHUTTER_HOME_FIND].
fill(
"SHUTTER_HOME_FIND",
"AutoCalibrate",
ISS_OFF);
109 ShutterSettingsNP[SHUTTER_MAX_SPEED].
fill(
"SHUTTER_MAX_SPEED",
"Max Speed (m/s)",
"%.f", 1, 1000, 10, 800);
110 ShutterSettingsNP[SHUTTER_MIN_SPEED].
fill(
"SHUTTER_MIN_SPEED",
"Min Speed (m/s)",
"%.f", 1, 1000, 10, 400);
111 ShutterSettingsNP[SHUTTER_ACCELERATION].
fill(
"SHUTTER_ACCELERATION",
"Acceleration (m/s^2)",
"%.f", 1, 1000, 10, 500);
112 ShutterSettingsNP[SHUTTER_SAFE_VOLTAGE].
fill(
"SHUTTER_SAFE_VOLTAGE",
"Safe Voltage",
"%.1f", 10, 14, .5, 11);
115 ShutterSettingsTimeoutNP[0].
fill(
"SHUTTER_TIMEOUT",
"Timeout (s)",
"%.f", 1, 1000, 10, 83);
122 VersionTP[0].
fill(
"CVERSION",
"Controller",
"");
144 if (!sendCommand(
"!domerot getpark#", curPark))
203 LOG_DEBUG(
"Shutter in online, enabling Dome has shutter property");
218 return "NexDome Beaver";
229 char result[DRIVER_LEN] = {0};
230 if (!sendRawCommand(
"!seletek tversion#", result))
235 std::string resString = result;
236 LOGF_DEBUG(
"Version string returned %s", resString.c_str());
237 std::regex e(R
"(.*:\d*:(.*))");
238 std::sregex_iterator iter(resString.begin(), resString.end(), e);
239 VersionTP[0].setText((*iter)[1]);
248 if (!sendCommand(
"!domerot gethome#", res))
252 HomePositionNP[0].setValue(res);
253 LOGF_INFO(
"Dome reports home offset: %f", res);
257 if (!sendCommand(
"!domerot getpark#", res))
262 LOGF_INFO(
"Dome reports park: %.1f", res);
266 if (!rotatorGetSettings())
272 if (!shutterGetSettings())
290 RotatorCalibrationSP.
update(states, names, n);
294 case ROTATOR_HOME_FIND:
295 rc = rotatorFindHome();
299 case ROTATOR_HOME_MEASURE:
300 rc = rotatorMeasureHome();
304 RotatorCalibrationSP.
apply();
313 GotoHomeSP.
update(states, names, n);
315 rc = rotatorGotoHome();
326 HomeOptionsSP.
update(states, names, n);
328 double newAz, curHome;
332 if (!sendCommand(
"!domerot getpark#", curHome))
334 newAz = 360.0 - curHome + rotatorGetAz();
335 rc = rotatorSetHome(newAz);
336 LOGF_DEBUG(
"New home az %.1f (from 360 - %1f + %1f)", newAz, curHome, rotatorGetAz());
341 rc = rotatorSetHome(0.0);
345 HomeOptionsSP.
apply();
355 ShutterCalibrationSP.
update(states, names, n);
356 bool rc = shutterFindHome();
360 ShutterCalibrationSP.
apply();
380 RotatorSettingsNP.
update(values, names, n);
381 RotatorSettingsNP.
setState(rotatorSetSettings(RotatorSettingsNP[ROTATOR_MAX_SPEED].getValue(),
382 RotatorSettingsNP[ROTATOR_MIN_SPEED].getValue(),
383 RotatorSettingsNP[ROTATOR_ACCELERATION].getValue(),
384 RotatorSettingsNP[ROTATOR_TIMEOUT].getValue()
386 RotatorSettingsNP.
apply();
395 ShutterSettingsNP.
update(values, names, n);
396 ShutterSettingsNP.
setState(shutterSetSettings(ShutterSettingsNP[SHUTTER_MAX_SPEED].getValue(),
397 ShutterSettingsNP[SHUTTER_MIN_SPEED].getValue(),
398 ShutterSettingsNP[SHUTTER_ACCELERATION].getValue(),
399 ShutterSettingsNP[SHUTTER_SAFE_VOLTAGE].getValue()
401 ShutterSettingsNP.
apply();
410 HomePositionNP.
update(values, names, n);
411 if (rotatorSetHome(HomePositionNP[0].getValue()))
413 HomePositionNP.
apply();
458 uint16_t domeStatus = 0;
459 if (!getDomeStatus(domeStatus))
471 RotatorStatusTP.
apply();
477 RotatorStatusTP.
apply();
492 std::string rStatus =
"Parked";
493 RotatorStatusTP[0].setText(rStatus);
498 else if (!strcmp(RotatorStatusTP[0].
getText(),
"Measuring Home"))
502 RotatorCalibrationSP.
apply();
503 std::string rStatus =
"Home";
504 RotatorStatusTP[0].setText(rStatus);
508 else if (!strcmp(RotatorStatusTP[0].
getText(),
"Finding Home"))
512 RotatorCalibrationSP.
apply();
513 std::string rStatus =
"Home";
514 RotatorStatusTP[0].setText(rStatus);
518 else if (!strcmp(RotatorStatusTP[0].
getText(),
"Homing"))
521 std::string rStatus =
"Home";
522 RotatorStatusTP[0].setText(rStatus);
531 RotatorStatusTP.
apply();
534 RotatorCalibrationSP.
apply();
535 std::string rStatus =
"Idle";
536 RotatorStatusTP[0].setText(rStatus);
538 LOG_DEBUG(
"Dome reached target position.");
540 RotatorStatusTP.
apply();
553 std::string rStatus =
"Mechanical Error";
554 ShutterStatusTP[0].setText(rStatus);
555 ShutterStatusTP.
apply();
566 std::string rStatus =
"Opening";
567 ShutterStatusTP[0].setText(rStatus);
568 LOG_DEBUG(
"Shutter state set to Opening");
573 std::string rStatus =
"Closing";
574 ShutterStatusTP[0].setText(rStatus);
575 LOG_DEBUG(
"Shutter state set to Closing");
580 std::string rStatus =
"Moving";
581 ShutterStatusTP[0].setText(rStatus);
591 std::string rStatus =
"Open";
592 ShutterStatusTP[0].setText(rStatus);
598 std::string rStatus =
"Closed";
599 ShutterStatusTP[0].setText(rStatus);
600 LOG_DEBUG(
"Shutter state set to CLOSED");
602 ShutterStatusTP.
apply();
607 if (sendCommand(
"!dome getshutterbatvoltage#", res))
609 LOGF_DEBUG(
"Shutter voltage currently is: %.2f", res);
610 ShutterVoltsNP[0].setValue(res);
611 (res < ShutterSettingsNP[SHUTTER_SAFE_VOLTAGE].getValue()) ? ShutterVoltsNP.
setState(
IPS_ALERT) : ShutterVoltsNP.
setState(
613 ShutterVoltsNP.
apply();
625 if (rotatorGotoAz(az))
627 m_TargetRotatorAz = az;
629 std::string rStatus =
"Moving";
630 RotatorStatusTP[0].setText(rStatus);
631 RotatorStatusTP.
apply();
643 azDiff = domeDir * azDiff;
650 LOGF_DEBUG(
"Requested rel move of %.1f", azDiff);
651 lastAzDiff = fabs(azDiff);
652 return MoveAbs(m_TargetRotatorAz);
660 LOG_DEBUG(
"Re-implemented move was called");
685 if (sendCommand(
"!dome openshutter#", res))
687 std::string rStatus =
"Opening";
688 ShutterStatusTP[0].setText(rStatus);
689 ShutterStatusTP.
apply();
698 if (sendCommand(
"!dome closeshutter#", res))
700 std::string rStatus =
"Shutting";
701 ShutterStatusTP[0].setText(rStatus);
702 ShutterStatusTP.
apply();
724 bool Beaver::rotatorGotoAz(
double az)
726 char cmd[DRIVER_LEN] = {0};
728 snprintf(
cmd, DRIVER_LEN,
"!dome gotoaz %.2f#", az);
730 std::string rStatus =
"Moving";
731 RotatorStatusTP[0].setText(rStatus);
732 RotatorStatusTP.
apply();
733 return sendCommand(
cmd, res);
739 bool Beaver::rotatorGetAz()
742 if (sendCommand(
"!dome getaz#", res))
754 bool Beaver::rotatorSetHome(
double az)
756 char cmd[DRIVER_LEN] = {0};
758 snprintf(
cmd, DRIVER_LEN,
"!domerot sethome %.2f#", az);
759 if (sendCommand(
cmd, res))
773 if (sendCommand(
"!dome gopark#", res))
775 std::string rStatus =
"Parking";
776 RotatorStatusTP[0].setText(rStatus);
777 RotatorStatusTP.
apply();
799 std::string rStatus =
"unParked";
800 RotatorStatusTP[0].setText(rStatus);
801 RotatorStatusTP.
apply();
819 bool Beaver::rotatorSetPark(
double az)
822 char cmd[DRIVER_LEN] = {0};
823 snprintf(
cmd, DRIVER_LEN,
"!domerot setpark %.2f#", az);
824 if (sendCommand(
cmd, res))
840 char cmd[DRIVER_LEN] = {0};
841 snprintf(
cmd, DRIVER_LEN,
"!domerot setpark %.2f#",
DomeAbsPosN[0].value);
842 if (sendCommand(
cmd, res))
858 char cmd[DRIVER_LEN] = {0};
859 snprintf(
cmd, DRIVER_LEN,
"!domerot setpark %d#", 0);
860 if (sendCommand(
cmd, res))
863 LOG_INFO(
"Park set to default: 0.00");
874 bool Beaver::rotatorGotoHome()
877 if (sendCommand(
"!dome gohome#", res))
880 std::string rStatus =
"Homing";
881 RotatorStatusTP[0].setText(rStatus);
882 RotatorStatusTP.
apply();
891 bool Beaver::rotatorMeasureHome()
894 if (sendCommand(
"!dome autocalrot 1#", res))
897 std::string rStatus =
"Measuring Home";
898 RotatorStatusTP[0].setText(rStatus);
899 RotatorStatusTP.
apply();
908 bool Beaver::rotatorFindHome()
911 if (sendCommand(
"!dome autocalrot 0#", res))
914 std::string rStatus =
"Finding Home";
915 RotatorStatusTP[0].setText(rStatus);
916 RotatorStatusTP.
apply();
925 bool Beaver::rotatorIsHome()
928 if (sendCommand(
"!dome athome#", status))
933 LOGF_DEBUG(
"Rotator Home? %s", (status == 1) ?
"true" :
"false");
944 bool Beaver::rotatorIsParked()
947 if (!sendCommand(
"!dome atpark#", status))
952 LOGF_DEBUG(
"Rotator Parked? %s", (status == 1) ?
"true" :
"false");
962 bool Beaver::getDomeStatus(uint16_t &domeStatus)
965 if (!sendCommand(
"!dome status#", res))
970 domeStatus =
static_cast<uint16_t
>(res);
978 bool Beaver::shutterOnLine()
982 bool shutterIsUp =
false;
984 if (!sendCommand(
"!dome shutterisup#", res))
986 LOG_ERROR(
"Shutter status cmd errored out");
991 shutterIsUp =
static_cast<bool>(res);
992 if (!getDomeStatus(domeStatus))
994 LOG_ERROR(
"Shutter status cmd errored out");
998 LOGF_DEBUG(
"ShutterIsUp %s Comms error %s", shutterIsUp ?
"true" :
"false",
1001 LOGF_DEBUG(
"ShuttOnLine %s", status ?
"true" :
"false");
1016 bool Beaver::abortAll()
1019 if (sendCommand(
"!dome abort 1 1 1#", res))
1021 std::string rStatus =
"Idle";
1022 RotatorStatusTP[0].setText(rStatus);
1023 RotatorStatusTP.
apply();
1024 if (!rotatorGetAz())
1035 bool Beaver::shutterAbort()
1038 return sendCommand(
"!dome abort 0 0 1#", res);
1044 bool Beaver::shutterSetSettings(
double maxSpeed,
double minSpeed,
double acceleration,
double voltage)
1046 if (shutterOnLine())
1048 char cmd[DRIVER_LEN] = {0};
1051 snprintf(
cmd, DRIVER_LEN,
"!dome setshuttermaxspeed %.2f#", maxSpeed);
1052 if (!sendCommand(
cmd, res))
1054 LOG_ERROR(
"Problem setting shutter max speed");
1057 snprintf(
cmd, DRIVER_LEN,
"!dome setshutterminspeed %.2f#", minSpeed);
1058 if (!sendCommand(
cmd, res))
1060 LOG_ERROR(
"Problem setting shutter min speed");
1063 snprintf(
cmd, DRIVER_LEN,
"!dome setshutteracceleration %.2f#", acceleration);
1064 if (!sendCommand(
cmd, res))
1066 LOG_ERROR(
"Problem setting shutter acceleration");
1069 snprintf(
cmd, DRIVER_LEN,
"!dome setshuttersafevoltage %.2f#", voltage);
1070 if (!sendCommand(
cmd, res))
1072 LOG_ERROR(
"Problem setting shutter safe voltage");
1075 if(!sendCommand(
"!seletek savefs#", res))
1077 LOG_ERROR(
"Problem setting shutter savefs");
1080 LOG_INFO(
"Shutter parameters have been updated");
1089 bool Beaver::shutterGetSettings()
1092 if (shutterOnLine())
1094 if (!sendCommand(
"!dome getshuttermaxspeed#", res))
1096 LOG_ERROR(
"Problem getting shutter max speed");
1101 ShutterSettingsNP[SHUTTER_MAX_SPEED].setValue(res);
1102 LOGF_DEBUG(
"Shutter reports max speed of: %.1f", res);
1104 if (!sendCommand(
"!dome getshutterminspeed#", res))
1106 LOG_ERROR(
"Problem getting shutter min speed");
1111 ShutterSettingsNP[SHUTTER_MIN_SPEED].setValue(res);
1112 LOGF_DEBUG(
"Shutter reports min speed of: %.1f", res);
1114 if (!sendCommand(
"!dome getshutteracceleration#", res))
1116 LOG_ERROR(
"Problem getting shutter acceleration");
1121 ShutterSettingsNP[SHUTTER_ACCELERATION].setValue(res);
1122 LOGF_DEBUG(
"Shutter reports acceleration of: %.1f", res);
1124 if (!sendCommand(
"!dome getshuttertimeoutopenclose#", res))
1126 LOG_ERROR(
"Problem getting shutter timeout");
1131 ShutterSettingsTimeoutNP[0].setValue(res);
1132 LOGF_DEBUG(
"Shutter reports safe timeout of: %.1f", res);
1134 if (!sendCommand(
"!dome getshuttersafevoltage#", res))
1136 LOG_ERROR(
"Problem getting shutter safe voltage");
1141 ShutterSettingsNP[SHUTTER_SAFE_VOLTAGE].setValue(res);
1142 LOGF_DEBUG(
"Shutter reports safe voltage of: %.1f", res);
1144 ShutterSettingsNP.
apply();
1153 bool Beaver::rotatorSetSettings(
double maxSpeed,
double minSpeed,
double acceleration,
double timeout)
1155 char cmd[DRIVER_LEN] = {0};
1158 snprintf(
cmd, DRIVER_LEN,
"!domerot setmaxspeed %.2f#", maxSpeed);
1159 if (!sendCommand(
cmd, res))
1161 LOG_ERROR(
"Problem setting rotator max speed");
1164 snprintf(
cmd, DRIVER_LEN,
"!domerot setminspeed %.2f#", minSpeed);
1165 if (!sendCommand(
cmd, res))
1167 LOG_ERROR(
"Problem setting rotator min speed");
1170 snprintf(
cmd, DRIVER_LEN,
"!domerot setacceleration %.2f#", acceleration);
1171 if (!sendCommand(
cmd, res))
1173 LOG_ERROR(
"Problem setting rotator acceleration");
1176 snprintf(
cmd, DRIVER_LEN,
"!domerot setmaxfullrotsecs %.2f#", timeout);
1177 if (!sendCommand(
cmd, res))
1179 LOG_ERROR(
"Problem setting rotator full rot secs");
1182 if(!sendCommand(
"!seletek savefs#", res))
1187 LOG_INFO(
"Rotator parameters have been updated");
1195 bool Beaver::rotatorGetSettings()
1198 if (!sendCommand(
"!domerot getmaxspeed#", res))
1200 LOG_ERROR(
"Problem getting rotator max speed");
1205 RotatorSettingsNP[ROTATOR_MAX_SPEED].setValue(res);
1206 LOGF_DEBUG(
"Rotator reports max speed of: %.1f", res);
1208 if (!sendCommand(
"!domerot getminspeed#", res))
1210 LOG_ERROR(
"Problem getting rotator min speed");
1215 RotatorSettingsNP[ROTATOR_MIN_SPEED].setValue(res);
1216 LOGF_DEBUG(
"Rotator reports min speed of: %.1f", res);
1218 if (!sendCommand(
"!domerot getacceleration#", res))
1220 LOG_ERROR(
"Problem getting rotator acceleration");
1225 RotatorSettingsNP[ROTATOR_ACCELERATION].setValue(res);
1226 LOGF_DEBUG(
"Rotator reports acceleration of: %.1f", res);
1228 if (!sendCommand(
"!domerot getmaxfullrotsecs#", res))
1230 LOG_ERROR(
"Problem getting rotator full rot secs");
1235 RotatorSettingsNP[ROTATOR_TIMEOUT].setValue(res);
1236 LOGF_DEBUG(
"Rotator reports timeout(s) of: %.1f", res);
1238 RotatorSettingsNP.
apply();
1246 bool Beaver::shutterFindHome()
1248 if (shutterOnLine())
1251 return sendCommand(
"!dome autocalshutter#", res);
1259 bool Beaver::sendRawCommand(
const char *
cmd,
char * response)
1262 for (
int i = 0; i < 3; i++)
1264 int nbytes_written = 0, nbytes_read = 0;
1271 LOGF_ERROR(
"Serial write error: %s.", errstr);
1285 response[nbytes_read - 1] = 0;
1286 LOGF_DEBUG(
"Command Response: %s", response);
1295 LOGF_ERROR(
"Serial read error: %s.", errstr);
1302 bool Beaver::sendCommand(
const char *
cmd,
double &res)
1304 char response[DRIVER_LEN] = {0};
1305 sendRawCommand(
cmd, response);
1307 std::regex rgx(R
"(.*:((-*\d+(\.\d*)*)))");
1309 std::string input(response);
1311 if (std::regex_search(input, match, rgx))
1315 res = std::stof(match.str(1));
1320 LOGF_ERROR(
"Failed to process response: %s.", response);
1324 LOGF_DEBUG(
"Command error: %s response: %d",
cmd, response);
virtual IPState UnPark() override
Rotator unpark.
virtual IPState ControlShutter(ShutterOperation operation) override
open or close the shutter (will not show if shutter is not present)
virtual IPState Move(DomeDirection dir, DomeMotionCommand operation) override
Rotator move (calc's offset and calles abs move)
virtual IPState MoveRel(double azDiff) override
Rotator relative move (calc's offset and calles abs move)
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual IPState Park() override
Rotator park.
virtual bool SetCurrentPark() override
Rotator set park position to current.
virtual void TimerHit() override
Timer hit - update appropriate fields.
virtual bool SetDefaultPark() override
Rotator set park position to default (0 az)
virtual bool Abort() override
abort everything
const char * getDefaultName() override
Set default name.
bool Handshake() override
Handshake.
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
@ DOME_STATUS_SHUTTER_CLOSING
@ DOME_STATUS_SHUTTER_COMM
@ DOME_STATUS_SHUTTER_OPENED
@ DOME_STATUS_SHUTTER_CLOSED
@ DOME_STATUS_ROTATOR_MOVING
@ DOME_STATUS_SHUTTER_MOVING
@ DOME_STATUS_SHUTTER_OPENING
@ DOME_STATUS_SHUTTER_ERROR
virtual IPState MoveAbs(double az) override
Rotator absolute move.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Number field updated.
virtual bool saveConfigItems(FILE *fp) override
INDI save config.
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Switch field updated.
void setDefaultBaudRate(BaudRate newRate)
setDefaultBaudRate Set default baud rate. The default baud rate is 9600 unless otherwise changed by t...
void setDefaultHost(const char *addressHost)
void setConnectionType(int type)
TODO should be renamed to setDefaultConnectionType.
void setDefaultPort(uint32_t addressPort)
const char * getDeviceName() const
INDI::PropertyText getText(const char *name) const
void setVersion(uint16_t vMajor, uint16_t vMinor)
Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor.
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
void defineProperty(INumberVectorProperty *property)
uint32_t getCurrentPollingPeriod() const
getCurrentPollingPeriod Return the current polling period.
int SetTimer(uint32_t ms)
Set a timer to call the function TimerHit after ms milliseconds.
void addDebugControl()
Add Debug control to the driver.
Connection::TCP * tcpConnection
void SetParked(bool isparked)
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
void SetDomeCapability(uint32_t cap)
SetDomeCapability set the dome capabilities. All capabilities must be initialized.
void setDomeConnection(const uint8_t &value)
setDomeConnection Set Dome connection mode. Child class should call this in the constructor before Do...
void SetAxis1Park(double value)
SetRAPark Set current AZ parking position. The data park file (stored in ~/.indi/ParkData....
ISwitch ShutterParkPolicyS[2]
void SetAxis1ParkDefault(double steps)
SetAxis1Park Set default AZ parking position.
ShutterOperation
Shutter operation command.
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
INumberVectorProperty DomeAbsPosNP
INumberVectorProperty ParkPositionNP
uint32_t GetDomeCapability() const
GetDomeCapability returns the capability of the dome.
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Saves the Device Port and Dome Presets in the configuration file
void setShutterState(const ShutterState &value)
void setDomeState(const DomeState &value)
bool InitPark()
InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking...
Connection::Serial * serialConnection
void SetParkDataType(DomeParkData type)
setParkDataType Sets the type of parking data stored in the park data file and presented to the user.
ShutterState getShutterState() const
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
DomeState getDomeState() const
void setState(IPState state)
void apply(const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
const char * getName() const
bool isNameMatch(const char *otherName) const
bool update(const double values[], const char *const names[], int n)
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, double timeout, IPState state)
bool update(const ISState states[], const char *const names[], int n)
int findOnSwitchIndex() const
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, ISRule rule, double timeout, IPState state)
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, double timeout, IPState state)
const char * MAIN_CONTROL_TAB
MAIN_CONTROL_TAB Where all the primary controls for the device are located.
const char * SITE_TAB
SITE_TAB Where all site information setting are located.
std::unique_ptr< Dome > dome(new Dome())
void tty_set_generic_udp_format(int enabled)
int tty_write_string(int fd, const char *buf, int *nbytes_written)
Writes a null terminated string to fd.
void tty_error_msg(int err_code, char *err_msg, int err_msg_len)
Retrieve the tty error message.
int tty_nread_section(int fd, char *buf, int nsize, char stop_char, int timeout, int *nbytes_read)
read buffer from terminal with a delimiter
Implementations for common driver routines.
void IDSetNumber(const INumberVectorProperty *nvp, const char *fmt,...)
int IUUpdateNumber(INumberVectorProperty *nvp, double values[], char *names[], int n)
Update all numbers in a number vector property.
#define LOGF_INFO(fmt,...)
#define LOGF_DEBUG(fmt,...)
#define LOG_ERROR(txt)
Shorter logging macros. In order to use these macros, the function (or method) "getDeviceName()" must...
#define LOGF_ERROR(fmt,...)
const char * CONNECTION_TAB