25 #include <libnova/julian_day.h>
30 #include <sys/types.h>
35 static pthread_cond_t cv = PTHREAD_COND_INITIALIZER;
36 static pthread_mutex_t condMutex = PTHREAD_MUTEX_INITIALIZER;
38 static std::unique_ptr<CCDSim> ccdsim(
new CCDSim());
97 pthread_mutex_lock(&condMutex);
100 pthread_cond_signal(&cv);
101 pthread_mutex_unlock(&condMutex);
108 return "CCD Simulator";
163 IUFillNumber(&
FWHMN[0],
"SIM_FWHM",
"FWHM (arcseconds)",
"%4.2f", 0, 60, 0, 7.5);
192 #ifdef USE_EQUATORIAL_PE
213 #ifdef HAVE_WEBSOCKET
382 gettimeofday(&now,
nullptr);
385 (double)(now.tv_sec * 1000.0 + now.tv_usec / 1000) - (double)(start.tv_sec * 1000.0 + start.tv_usec / 1000);
386 timesince = timesince / 1000;
387 timeleft = req - timesince;
419 if (timeleft <= 0.001)
430 nextTimer = timeleft * 1000;
446 if (timeleft <= 0.001)
459 nextTimer = timeleft * 1000;
471 nextTimer = timeleft * 1000;
509 return pow(10, (z - mag) * k / 2.5);
517 uint16_t * ptr =
reinterpret_cast<uint16_t *
>(targetChip->
getFrameBuffer());
519 if (targetChip->
getXRes() == 500)
526 exposure_time *= (1 + sqrt(
GainN[0].value));
540 int nwidth = 0, nheight = 0;
549 timesince = difftime(now,
RunStart);
553 PESpot = PESpot * 2.0 * 3.14159;
555 PEOffset =
m_PEMax * std::sin(PESpot);
557 PEOffset = PEOffset / 3600;
568 double pa, pb, pc, pd, pe, pf;
575 double ccdW = targetChip->
getXRes();
578 pprx = targetFocalLength / targetChip->
getPixelSizeX() * 1000;
579 ppry = targetFocalLength / targetChip->
getPixelSizeY() * 1000;
585 Scalex = (targetChip->
getPixelSizeX() / targetFocalLength) * 206.3;
586 Scaley = (targetChip->
getPixelSizeY() / targetFocalLength) * 206.3;
591 "pprx: %g pixels per radian ppry: %g pixels per radian ScaleX: %g arcsecs/pixel ScaleY: %g arcsecs/pixel",
592 pprx, ppry, Scalex, Scaley);
603 pa = pprx * cos(theta * M_PI / 180.0);
604 pb = ppry * sin(theta * M_PI / 180.0);
606 pd = pprx * -sin(theta * M_PI / 180.0);
607 pe = ppry * cos(theta * M_PI / 180.0);
609 nwidth = targetChip->
getXRes();
612 nheight = targetChip->
getYRes();
618 #ifdef USE_EQUATORIAL_PE
633 double jd = ln_get_julian_from_sys();
651 #ifdef USE_EQUATORIAL_PE
657 rar = rad * 0.0174532925;
661 decr = cameradec * 0.0174532925;
666 decr += decDrift / 3600.0 * 0.0174532925;
669 double radius = sqrt((Scalex * Scalex * targetChip->
getXRes() / 2.0 * targetChip->
getXRes() / 2.0) +
670 (Scaley * Scaley * targetChip->
getYRes() / 2.0 * targetChip->
getYRes() / 2.0));
673 radius = radius / 60;
709 sprintf(gsccmd,
"gsc -c %8.6f %+8.6f -r %4.1f -m 0 %4.2f -n 3000",
715 pp = popen(gsccmd,
"r");
722 while (fgets(line, 256, pp) !=
nullptr)
738 int rc = sscanf(line,
"%10s %f %f %f %f %f %d %d %4s %2s %f %d",
id, &
ra, &
dec, &pose, &mag, &mage,
739 &band, &c, plate, ob, &dist, &dir);
753 srar =
ra * 0.0174532925;
754 sdecr =
dec * 0.0174532925;
761 sx = cos(sdecr) * sin(srar - rar) /
762 (cos(decr) * cos(sdecr) * cos(srar - rar) + sin(decr) * sin(sdecr));
763 sy = (sin(decr) * cos(sdecr) * cos(srar - rar) - cos(decr) * sin(sdecr)) /
764 (cos(decr) * cos(sdecr) * cos(srar - rar) + sin(decr) * sin(sdecr));
767 ccdx = pa * sx + pb * sy + pc;
768 ccdy = pd * sx + pe * sy + pf;
773 rc =
DrawImageStar(targetChip, mag, ccdx, ccdy, exposure_time);
778 LOGF_DEBUG(
"star %s scope %6.4f %6.4f star %6.4f %6.4f ccd %6.2f %6.2f",
id, rad, decPE,
ra,
dec, ccdx, ccdy);
779 LOGF_DEBUG(
"star %s ccd %6.2f %6.2f",
id, ccdx, ccdy);
788 LOG_ERROR(
"Error looking up stars, is gsc installed with appropriate environment variables set ??");
792 LOG_ERROR(
"Got no stars, is gsc installed with appropriate environment variables set ??");
814 float const skyflux =
flux(glow) * exposure_time;
816 uint16_t * pt =
reinterpret_cast<uint16_t *
>(targetChip->
getFrameBuffer());
818 nheight = targetChip->
getSubH();
819 nwidth = targetChip->
getSubW();
821 for (
int y = 0; y < nheight; y++)
823 float const sy = nheight / 2 - y;
825 for (
int x = 0; x < nwidth; x++)
827 float const sx = nwidth / 2 - x;
836 float const fa = exp(-2.0 * 0.7 * dc2 / (vig * vig));
839 float fp = (pt[0] + skyflux) * fa;
843 if (fp < pt[0]) fp = pt[0];
855 int subX = targetChip->
getSubX();
856 int subY = targetChip->
getSubY();
857 int subW = targetChip->
getSubW() + subX;
858 int subH = targetChip->
getSubH() + subY;
862 for (
int x = subX; x < subW; x++)
864 for (
int y = subY; y < subH; y++)
885 for (
int x = 0; x < nbuf; x++)
902 int subX = targetChip->
getSubX();
903 int subY = targetChip->
getSubY();
904 int subW = targetChip->
getSubW() + subX;
905 int subH = targetChip->
getSubH() + subY;
907 if ((x < subX) || (x > subW || (y < subY) || (y > subH)))
928 boxsizey =
static_cast<int>(qx);
933 for (sy = -boxsizey; sy <= boxsizey; sy++)
935 for (sx = -boxsizey; sx <= boxsizey; sx++)
945 float const sigma =
seeing / ( 2 * sqrt(2 * log(2)));
946 float const fa = 1 / (sigma * sqrt(2 * 3.1416)) * exp( -dc2 / (2 * sigma * sigma));
949 float fp = fa *
flux;
954 rc =
AddToPixel(targetChip, x + sx, y + sy, fp);
964 int nwidth = targetChip->
getSubW();
965 int nheight = targetChip->
getSubH();
1018 c = c / 3600.0 / 15.0;
1019 c = c / (cos(
currentDE * 0.0174532925));
1029 c = c / 3600.0 / 15.0;
1030 c = c / (cos(
currentDE * 0.0174532925));
1143 LOG_INFO(
"Cannot determine whether RGB simulation should be switched on or off.");
1185 if (dirp ==
nullptr)
1195 std::string d_dir = std::string(
DirectoryT[0].text);
1198 while ((dp = readdir(dirp)) != NULL)
1202 if (strstr(dp->d_name,
".fits"))
1220 LOGF_INFO(
"Directory-based images are enabled. Subsequent exposures will be loaded from directory %s",
DirectoryT[0].text);
1228 LOG_INFO(
"Directory-based images are disabled.");
1245 #ifdef USE_EQUATORIAL_PE
1267 if (!strcmp(propName,
"ABS_FOCUS_POSITION"))
1273 if (!strcmp(name,
"FOCUS_ABSOLUTE_POSITION"))
1285 seeing = 0.5625 * ticks * ticks + optimalFWHM;
1291 #ifdef USE_EQUATORIAL_PE
1296 int rc_ra = -1, rc_de = -1;
1297 double newra = 0, newdec = 0;
1303 if (!strcmp(elemName,
"RA_PE"))
1305 else if (!strcmp(elemName,
"DEC_PE"))
1309 if (rc_ra == 0 && rc_de == 0 && ((newra != raPE) || (newdec != decPE)))
1312 epochPos.ra = newra * 15.0;
1313 epochPos.dec = newdec;
1314 ln_get_equ_prec2(&epochPos, ln_get_julian_from_sys(), JD2000, &J2000Pos);
1315 raPE = J2000Pos.ra / 15.0;
1316 decPE = J2000Pos.dec;
1323 LOGF_DEBUG(
"raPE %g decPE %g Snooped raPE %g decPE %g", raPE, decPE, newra, newdec);
1375 pthread_mutex_lock(&condMutex);
1377 pthread_mutex_unlock(&condMutex);
1378 pthread_cond_signal(&cv);
1385 pthread_mutex_lock(&condMutex);
1387 pthread_mutex_unlock(&condMutex);
1388 pthread_cond_signal(&cv);
1398 bin_width = bin_width - (bin_width % 2);
1399 bin_height = bin_height - (bin_height % 2);
1401 Streamer->setSize(bin_width, bin_height);
1410 LOGF_ERROR(
"%dx%d binning is not supported.", hor, ver);
1416 Streamer->setSize(bin_width, bin_height);
1425 LOGF_ERROR(
"%dx%d binning is not supported.", hor, ver);
1439 auto start = std::chrono::high_resolution_clock::now();
1443 pthread_mutex_lock(&condMutex);
1447 pthread_cond_wait(&cv, &condMutex);
1455 pthread_mutex_unlock(&condMutex);
1463 auto finish = std::chrono::high_resolution_clock::now();
1464 std::chrono::duration<double> elapsed = finish - start;
1472 start = std::chrono::high_resolution_clock::now();
1475 pthread_mutex_unlock(&condMutex);
1483 fitsKeyword.push_back({
"GAIN",
GainN[0].value, 3,
"Gain"});
1492 char comment[512] = {0}, bayer_pattern[16] = {0};
1493 int status = 0, anynull = 0;
1494 double pixel_size = 5.2;
1495 int ndim {2}, bitpix {8};
1497 fitsfile *fptr =
nullptr;
1499 if (fits_open_diskfile(&fptr, filename.c_str(), READONLY, &status))
1501 char error_status[512] = {0};
1502 fits_get_errstatus(status, error_status);
1503 LOGF_WARN(
"Error opening file %s due to error %s", filename.c_str(), error_status);
1507 fits_get_img_param(fptr, 3, &bitpix, &ndim, naxes, &status);
1513 int samples_per_channel = naxes[0] * naxes[1];
1514 int channels = naxes[2];
1515 int elements = samples_per_channel * channels;
1516 int size = elements * bitpix / 8;
1519 if (fits_read_img(fptr, bitpix == 8 ? TBYTE : TUSHORT, 1, elements, 0,
PrimaryCCD.
getFrameBuffer(), &anynull, &status))
1521 char error_status[512] = {0};
1522 fits_get_errstatus(status, error_status);
1523 LOGF_WARN(
"Error reading file %s due to error %s", filename.c_str(), error_status);
1527 if (fits_read_key_dbl(fptr,
"PIXSIZE1", &pixel_size, comment, &status))
1529 char error_status[512] = {0};
1530 fits_get_errstatus(status, error_status);
1531 LOGF_WARN(
"Error reading file %s due to error %s", filename.c_str(), error_status);
1535 if (fits_read_key_str(fptr,
"BAYERPAT", bayer_pattern, comment, &status))
1537 char error_status[512] = {0};
1538 fits_get_errstatus(status, error_status);
1539 LOGF_DEBUG(
"No BAYERPAT keyword found in %s (%s)", filename.c_str(), error_status);
1541 SetCCDParams(naxes[0], naxes[1], bitpix, pixel_size, pixel_size);
1544 if (channels == 1 && strlen(bayer_pattern) == 4)
1556 fits_close_file(fptr, &status);
The CCDSim class provides an advanced simulator for a CCD that includes a dedicated on-board guide ch...
virtual bool UpdateCCDFrame(int x, int y, int w, int h) override
CCD calls this function when CCD Frame dimension needs to be updated in the hardware....
ISwitchVectorProperty CoolerSP
bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
void setBayerEnabled(bool onOff)
bool StartExposure(float duration) override
Start exposing primary CCD chip.
virtual IPState GuideSouth(uint32_t) override
Guide southward for ms milliseconds.
INumberVectorProperty OffsetNP
float GuideRate
Guide rate is 7 arcseconds per second.
bool Disconnect() override
Disconnect from device.
void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
bool StartGuideExposure(float) override
Start exposing guide CCD chip.
virtual bool SetCaptureFormat(uint8_t index) override
SetCaptureFormat Set Active Capture format.
INumber FocusSimulationN[3]
int AddToPixel(INDI::CCDChip *targetChip, int, int, int)
int DrawImageStar(INDI::CCDChip *targetChip, float, float, float, float ExposureTime)
void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual int SetTemperature(double temperature) override
Set CCD temperature.
const char * getDefaultName() override
std::deque< std::string > m_AllFiles
virtual bool StartStreaming() override
StartStreaming Start live video streaming.
static void * streamVideoHelper(void *context)
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 IPState GuideEast(uint32_t) override
Guide easward for ms milliseconds.
ISwitchVectorProperty CrashSP
INumberVectorProperty FocusSimulationNP
double flux(double magnitude) const
virtual IPState GuideWest(uint32_t) override
Guide westward for ms milliseconds.
ISwitchVectorProperty SimulateBayerSP
int QueryFilter() override
Return current filter position.
INumberVectorProperty SimulatorSettingsNP
virtual bool StopStreaming() override
StopStreaming Stop live video streaming.
float m_PEPeriod
PEPeriod in minutes.
bool SelectFilter(int) override
Select a new filter position.
bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
virtual bool UpdateCCDBin(int hor, int ver) override
CCD calls this function when CCD Binning needs to be updated in the hardware. Derived classes should ...
ITextVectorProperty DirectoryTP
INumberVectorProperty FWHMNP
virtual IPState GuideNorth(uint32_t) override
Guide northward for ms milliseconds.
float CalcTimeLeft(timeval, float)
bool AbortExposure() override
Abort ongoing exposure.
ISwitch SimulateBayerS[2]
INumber SimulatorSettingsN[SIM_N]
ISwitchVectorProperty DirectorySP
double TemperatureRequest
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual void activeDevicesUpdated() override
activeDevicesUpdated Inform children that ActiveDevices property was updated so they can snoop on the...
std::deque< std::string > m_RemainingFiles
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
INumberVectorProperty GainNP
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save configuration items in XML file.
virtual bool UpdateGuiderBin(int hor, int ver) override
CCD calls this function when Guide head binning is updated by the client. Derived classes should impl...
static constexpr const char * SIMULATOR_TAB
INumberVectorProperty EqPENP
float GuideExposureRequest
virtual void addFITSKeywords(INDI::CCDChip *targetChip, std::vector< INDI::FITSRecord > &fitsKeyword) override
Generate FITS keywords that will be added to FIST/XISF file.
bool AbortGuideExposure() override
Abort ongoing exposure.
int DrawCcdFrame(INDI::CCDChip *targetChip)
Provides interface to implement Filter Wheel functionality.
const char * getDeviceName() const
The CCDChip class provides functionality of a CCD Chip within a CCD.
uint8_t * getFrameBuffer()
getFrameBuffer Get raw frame buffer of the CCD chip.
int getSubX() const
getSubX Get the starting left coordinates (X) of the frame.
int getSubY() const
getSubY Get the starting top coordinates (Y) of the frame.
float getPixelSizeY() const
getPixelSizeY Get vertical pixel size in microns.
void setExposureDuration(double duration)
setExposureDuration Set desired CCD frame exposure duration for next exposure. You must call this fun...
int getSubH() const
getSubH Get the height of the frame
int getBPP() const
getBPP Get CCD Chip depth (bits per pixel).
CCD_FRAME getFrameType() const
isInterlaced
int getBinY() const
getBinY Get vertical binning of the CCD chip.
float getPixelSizeX() const
getPixelSizeX Get horizontal pixel size in microns.
int getXRes() const
getXRes Get the horizontal resolution in pixels of the CCD Chip.
int getBinX() const
getBinX Get horizontal binning of the CCD chip.
void setExposureLeft(double duration)
setExposureLeft Update exposure time left. Inform the client of the new exposure time left value.
int getSubW() const
getSubW Get the width of the frame
void setFrameBufferSize(uint32_t nbuf, bool allocMem=true)
setFrameBufferSize Set desired frame buffer size. The function will allocate memory accordingly....
int getFrameBufferSize() const
getFrameBufferSize Get allocated frame buffer size to hold the CCD image frame.
int getYRes() const
Get the vertical resolution in pixels of the CCD Chip.
void binFrame()
binFrame Perform software binning on the CCD frame. Only use this function if hardware binning is not...
void setNAxis(int value)
setNAxis Set FITS number of axis
uint32_t GetCCDCapability() const
GetCCDCapability returns the CCD capabilities.
std::unique_ptr< StreamManager > Streamer
INDI::Timer m_TemperatureCheckTimer
virtual bool UpdateCCDFrame(int x, int y, int w, int h)
CCD calls this function when CCD Frame dimension needs to be updated in the hardware....
virtual void addFITSKeywords(CCDChip *targetChip, std::vector< FITSRecord > &fitsKeywords)
Generate FITS keywords that will be added to FIST/XISF file.
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual bool ExposureComplete(CCDChip *targetChip)
Uploads target Chip exposed buffer as FITS to the client. Dervied classes should class this function ...
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...
INDI::PropertyNumber ScopeInfoNP
virtual bool UpdateCCDBin(int hor, int ver)
CCD calls this function when CCD Binning needs to be updated in the hardware. Derived classes should ...
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual void addCaptureFormat(const CaptureFormat &format)
addCaptureFormat Add a supported camera native capture format (e.g. Mono, Bayer8.....
virtual void SetGuiderParams(int x, int y, int bpp, float xf, float yf)
Setup CCD paramters for guide head CCD. Child classes call this function to update CCD parameters.
INDI::ElapsedTimer m_TemperatureElapsedTimer
virtual bool UpdateGuiderBin(int hor, int ver)
CCD calls this function when Guide head binning is updated by the client. Derived classes should impl...
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save configuration items in XML file.
virtual bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
void SetCCDCapability(uint32_t cap)
SetCCDCapability Set the CCD capabilities. Al fields must be initialized.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
INumberVectorProperty TemperatureNP
TemperatureNP Camera Temperature in Celcius.
virtual void SetCCDParams(int x, int y, int bpp, float xf, float yf)
Setup CCD paramters for primary CCD. Child classes call this function to update CCD parameters.
double snoopedFocalLength
double m_TargetTemperature
virtual bool saveConfig(bool silent=false, const char *property=nullptr)
Save the current properties in a configuration file.
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.
void setDriverInterface(uint16_t value)
setInterface Set driver interface. By default the driver interface is set to GENERAL_DEVICE....
int SetTimer(uint32_t ms)
Set a timer to call the function TimerHit after ms milliseconds.
uint16_t getDriverInterface() const
void addDebugControl()
Add Debug control to the driver.
void start()
Starts this timer. Once started, a timer value can be checked with elapsed().
bool processText(const char *dev, const char *name, char *texts[], char *names[], int n)
Process text properties.
ITextVectorProperty * FilterNameTP
INumberVectorProperty FilterSlotNP
bool updateProperties()
updateProperties Defines or Delete proprties based on default device connection status
bool processNumber(const char *dev, const char *name, double values[], char *names[], int n)
Process number properties.
void SelectFilterDone(int newpos)
The child class calls this function when the hardware successfully finished selecting a new filter wh...
void initProperties(const char *groupName)
Initilize filter wheel properties. It is recommended to call this function within initProperties() of...
bool saveConfigItems(FILE *fp)
saveConfigItems save Filter Names in config file
void start()
Starts or restarts the timer with the timeout specified in interval.
const char * FILTER_TAB
FILTER_TAB Where all the properties for filter wheels are located.
const char * MAIN_CONTROL_TAB
MAIN_CONTROL_TAB Where all the primary controls for the device are located.
const char * OPTIONS_TAB
OPTIONS_TAB Where all the driver's options are located. Those may include auxiliary controls,...
int f_scansexa(const char *str0, double *dp)
convert sexagesimal string str AxBxC to double. x can be anything non-numeric. Any missing A,...
double range360(double r)
range360 Limits an angle to be between 0-360 degrees.
double rangeDec(double decdegrees)
rangeDec Limits declination value to be in -90 to 90 range.
Implementations for common driver routines.
void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp)
Add a switch vector property value to the configuration file.
void IUFillNumberVector(INumberVectorProperty *nvp, INumber *np, int nnp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s)
Assign attributes for a number vector property. The vector's auxiliary elements will be set to NULL.
int IUFindOnSwitchIndex(const ISwitchVectorProperty *svp)
Returns the index of first ON switch it finds in the vector switch property.
void IUResetSwitch(ISwitchVectorProperty *svp)
Reset all switches in a switch vector property to OFF.
void IUFillTextVector(ITextVectorProperty *tvp, IText *tp, int ntp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s)
Assign attributes for a text vector property. The vector's auxiliary elements will be set to NULL.
void IUSaveText(IText *tp, const char *newtext)
Function to reliably save new text in a IText.
void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp)
Add a number vector property value to the configuration file.
int IUSnoopNumber(XMLEle *root, INumberVectorProperty *nvp)
Update a snooped number vector property from the given XML root element.
void IUFillSwitch(ISwitch *sp, const char *name, const char *label, ISState s)
Assign attributes for a switch property. The switch's auxiliary elements will be set to NULL.
void IUFillText(IText *tp, const char *name, const char *label, const char *initialText)
Assign attributes for a text property. The text's auxiliary elements will be set to NULL.
void IUFillNumber(INumber *np, const char *name, const char *label, const char *format, double min, double max, double step, double value)
Assign attributes for a number property. The number's auxiliary elements will be set to NULL.
void IUSaveConfigText(FILE *fp, const ITextVectorProperty *tvp)
Add a text vector property value to the configuration file.
void IUFillSwitchVector(ISwitchVectorProperty *svp, ISwitch *sp, int nsp, const char *dev, const char *name, const char *label, const char *group, IPerm p, ISRule r, double timeout, IPState s)
Assign attributes for a switch vector property. The vector's auxiliary elements will be set to NULL.
int IUUpdateSwitch(ISwitchVectorProperty *svp, ISState *states, char *names[], int n)
Update all switches in a switch vector property.
void IDSetNumber(const INumberVectorProperty *nvp, const char *fmt,...)
void IDSetSwitch(const ISwitchVectorProperty *svp, const char *fmt,...)
int IUUpdateText(ITextVectorProperty *tvp, char *texts[], char *names[], int n)
Update all text members in a text vector property.
void IDSnoopDevice(const char *snooped_device, const char *snooped_property)
Function a Driver calls to snoop on another Device. Snooped messages will then arrive via ISSnoopDevi...
int IUUpdateNumber(INumberVectorProperty *nvp, double values[], char *names[], int n)
Update all numbers in a number vector property.
void IDSetText(const ITextVectorProperty *tvp, const char *fmt,...)
#define LOGF_INFO(fmt,...)
#define LOGF_WARN(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,...)
#define DEBUGF(priority, msg,...)
const char * findXMLAttValu(XMLEle *ep, const char *name)
Find an XML element's attribute value.
char * pcdataXMLEle(XMLEle *ep)
Return the pcdata of an XML element.
XMLEle * nextXMLEle(XMLEle *ep, int init)
Iterate an XML element for a list of nesetd XML elements.
Namespace to encapsulate INDI client, drivers, and mediator classes.
void ObservedToJ2000(IEquatorialCoordinates *observed, double jd, IEquatorialCoordinates *J2000pos)
ObservedToJ2000 converts an observed position to a J2000 catalogue position removes aberration,...
char device[MAXINDIDEVICE]