27#include <libnova/julian_day.h>
49 m_ClientID = getpid();
50 LOG_DEBUG(
"Initializing from alpacaTelescope device...");
55 return "Alpaca Telescope";
67 DeviceInfoTP[DESCRIPTION].fill(
"DESCRIPTION",
"Description",
"");
68 DeviceInfoTP[DRIVER_INFO].fill(
"DRIVER_INFO",
"Driver Info",
"");
69 DeviceInfoTP[DRIVER_VERSION].fill(
"DRIVER_VERSION",
"Driver Version",
"");
70 DeviceInfoTP[INTERFACE_VERSION].fill(
"INTERFACE_VERSION",
"Interface Version",
"");
121 LOGF_INFO(
"Connecting to alpaca server at %s:%d", host.c_str(), port);
123 httpClient = std::make_unique<httplib::Client>(host.c_str(), port);
124 httpClient->set_connection_timeout(10);
125 httpClient->set_read_timeout(30);
128 if (!sendAlpacaGET(
"/connected", response))
130 LOG_ERROR(
"Failed to connect to alpaca");
135 LOGF_INFO(
"alpaca reachable, connected=%s",
136 response.value(
"Value",
false) ?
"true" :
"false");
139 request[
"Connected"] =
true;
140 if (!sendAlpacaPUT(
"/connected", request, response))
142 LOG_ERROR(
"Failed to set connected state");
155 LOG_INFO(
"Successfully connected to alpaca");
164 request[
"Connected"] =
false;
165 sendAlpacaPUT(
"/connected", request, response);
168 LOG_INFO(
"Disconnected from alpaca");
176 if (sendAlpacaGET(
"/description", response) && response.contains(
"Value"))
177 DeviceInfoTP[DESCRIPTION].setText(response[
"Value"].get<std::string>().c_str());
179 if (sendAlpacaGET(
"/driverinfo", response) && response.contains(
"Value"))
180 DeviceInfoTP[DRIVER_INFO].setText(response[
"Value"].get<std::string>().c_str());
182 if (sendAlpacaGET(
"/driverversion", response) && response.contains(
"Value"))
183 DeviceInfoTP[DRIVER_VERSION].setText(response[
"Value"].get<std::string>().c_str());
185 if (sendAlpacaGET(
"/interfaceversion", response) && response.contains(
"Value"))
186 DeviceInfoTP[INTERFACE_VERSION].setText(std::to_string(response[
"Value"].get<int>()).c_str());
188 DeviceInfoTP.apply();
192 if (sendAlpacaGET(
"/alignmentmode", response) && response.contains(
"Value"))
194 int alignmentMode = response[
"Value"].get<
int>();
195 if (alignmentMode == 1)
197 LOG_INFO(
"Telescope alignment mode: Alt-Az (no meridian flips)");
200 else if (alignmentMode == 0)
202 LOG_INFO(
"Telescope alignment mode: Equatorial (Fork mount - no meridian flips)");
205 else if (alignmentMode == 2)
207 LOG_INFO(
"Telescope alignment mode: German Equatorial");
212 bool canPark =
false;
213 if (sendAlpacaGET(
"/canpark", response) && response.contains(
"Value"))
214 canPark = response[
"Value"].get<
bool>();
227 LOG_INFO(
"Park position initialized to zenith");
231 if (sendAlpacaGET(
"/atpark", response) && response.contains(
"Value"))
233 isParked = response[
"Value"].get<
bool>();
239 double latitude = 0.0, longitude = 0.0;
240 bool locationValid =
false;
242 if (sendAlpacaGET(
"/sitelatitude", response) && response.contains(
"Value"))
244 latitude = response[
"Value"].get<
double>();
245 locationValid =
true;
246 LOGF_INFO(
"Site latitude from device: %.6f°", latitude);
250 LOG_WARN(
"Failed to get site latitude from device");
253 if (sendAlpacaGET(
"/sitelongitude", response) && response.contains(
"Value"))
255 longitude = response[
"Value"].get<
double>();
256 LOGF_INFO(
"Site longitude from device: %.6f°", longitude);
260 LOG_WARN(
"Failed to get site longitude from device");
261 locationValid =
false;
265 double elevation = 0.0;
266 if (sendAlpacaGET(
"/siteelevation", response) && response.contains(
"Value"))
268 elevation = response[
"Value"].get<
double>();
269 LOGF_INFO(
"Site elevation from device: %.1fm", elevation);
273 LOG_WARN(
"Failed to get site elevation from device");
288 double latRad = latitude *
M_PI / 180.0;
289 m_sinLat = sin(latRad);
290 m_cosLat = cos(latRad);
292 LOGF_INFO(
"Site location set: Lat=%.6f° Long=%.6f°", latitude, longitude);
296 if (sendAlpacaGET(
"/utcdate", response) && response.contains(
"Value"))
298 std::string utcDate = response[
"Value"].get<std::string>();
303 LOGF_INFO(
"Device UTC date/time: %s", utcDate.c_str());
307 LOG_WARN(
"Failed to get UTC date/time from device, using system time");
312 if (sendAlpacaGET(
"/cansettracking", response) && response.contains(
"Value"))
314 if (response[
"Value"].get<bool>())
317 LOG_INFO(
"Telescope supports tracking control - TELESCOPE_TRACK_STATE enabled");
321 LOG_INFO(
"Telescope does not support tracking control");
326 LOG_WARN(
"Failed to query tracking capability from device");
331 if (sendAlpacaGET(
"/canslewasync", response) && response.contains(
"Value"))
332 m_CanSlewAsync = response[
"Value"].get<
bool>();
334 m_CanSlewAsync =
false;
335 LOGF_INFO(
"Telescope supports async slew: %s", m_CanSlewAsync ?
"Yes" :
"No");
339 m_TrackModeAlpacaRates.clear();
341 if (sendAlpacaGET(
"/trackingrates", response) && response.contains(
"Value") && response[
"Value"].is_array())
343 static const struct {
int rate;
const char *name;
const char *label; } alpacaRates[] =
345 {0,
"TRACK_SIDEREAL",
"Sidereal"},
346 {1,
"TRACK_LUNAR",
"Lunar"},
347 {2,
"TRACK_SOLAR",
"Solar"},
348 {3,
"TRACK_KING",
"King"},
351 for (
const auto &entry : alpacaRates)
353 for (
const auto &value : response[
"Value"])
355 if (value.get<
int>() == entry.rate)
358 m_TrackModeAlpacaRates.push_back(entry.rate);
365 if (!m_TrackModeAlpacaRates.empty())
368 LOGF_INFO(
"Telescope supports %zu tracking rate(s)", m_TrackModeAlpacaRates.size());
371 if (sendAlpacaGET(
"/trackingrate", response) && response.contains(
"Value"))
373 int currentRate = response[
"Value"].get<
int>();
374 for (
size_t i = 0; i < m_TrackModeAlpacaRates.size(); i++)
376 if (m_TrackModeAlpacaRates[i] == currentRate)
387 LOG_WARN(
"Failed to query supported tracking rates from device");
391 m_CanSetRaRate = sendAlpacaGET(
"/cansetrightascensionrate", response) && response.contains(
"Value")
392 && response[
"Value"].get<
bool>();
393 m_CanSetDecRate = sendAlpacaGET(
"/cansetdeclinationrate", response) && response.contains(
"Value")
394 && response[
"Value"].get<
bool>();
396 if (m_CanSetRaRate && m_CanSetDecRate)
399 LOG_INFO(
"Telescope supports custom tracking rates - TELESCOPE_TRACK_RATE enabled");
403 LOG_INFO(
"Telescope does not support custom tracking rates");
409 LOG_INFO(
"alpaca connected successfully");
418 double newRA = m_currentRA, newDec = m_currentDEC;
421 bool raUpdated =
false, decUpdated =
false;
422 if (sendAlpacaGET(
"/rightascension", response) && response.contains(
"Value"))
424 newRA = response[
"Value"].get<
double>();
429 LOG_WARN(
"Failed to get RA from Alpaca API");
432 if (sendAlpacaGET(
"/declination", response) && response.contains(
"Value"))
434 newDec = response[
"Value"].get<
double>();
439 LOG_WARN(
"Failed to get Dec from Alpaca API");
443 if (raUpdated && decUpdated)
446 m_currentDEC = newDec;
450 NewRaDec(m_currentRA, m_currentDEC);
454 LOG_WARN(
"NewRaDec NOT called - coordinate update failed");
458 if (sendAlpacaGET(
"/slewing", response) && response.contains(
"Value"))
459 isSlewing = response[
"Value"].get<
bool>();
462 if (sendAlpacaGET(
"/tracking", response) && response.contains(
"Value"))
463 isTracking = response[
"Value"].get<
bool>();
466 if (
HasTrackMode() && sendAlpacaGET(
"/trackingrate", response) && response.contains(
"Value"))
468 int currentRate = response[
"Value"].get<
int>();
469 int currentIndex =
TrackModeSP.findOnSwitchIndex();
470 for (
size_t i = 0; i < m_TrackModeAlpacaRates.size(); i++)
472 if (m_TrackModeAlpacaRates[i] == currentRate &&
static_cast<int>(i) != currentIndex)
484 if (sendAlpacaGET(
"/atpark", response) && response.contains(
"Value"))
486 bool parked = response[
"Value"].get<
bool>();
487 if (parked != isParked)
501 LOG_INFO(
"Parking complete - telescope at park position");
522 LOG_ERROR(
"Cannot GoTo while parked. Please unpark the telescope first.");
532 raRequest[
"TargetRightAscension"] =
ra;
533 if (!sendAlpacaPUT(
"/targetrightascension", raRequest, response))
541 decRequest[
"TargetDeclination"] =
dec;
542 if (!sendAlpacaPUT(
"/targetdeclination", decRequest, response))
552 const char *slewEndpoint = m_CanSlewAsync ?
"/slewtotargetasync" :
"/slewtotarget";
553 if (!sendAlpacaPUT(slewEndpoint, emptyRequest, response))
555 LOG_ERROR(
"Failed to send GoTo command");
560 LOGF_INFO(
"GoTo command sent (%s) - slewing to target", m_CanSlewAsync ?
"async" :
"sync");
567 request[
"RightAscension"] =
ra;
568 request[
"Declination"] =
dec;
570 if (!sendAlpacaPUT(
"/synctocoordinates", request, response))
587 LOG_WARN(
"Cannot abort parking operation - park must complete");
591 if (!sendAlpacaPUT(
"/abortslew", request, response))
609 LOG_INFO(
"Aborting slew before park");
611 sendAlpacaPUT(
"/abortslew", abortReq, abortResp);
614 LOG_INFO(
"Sending park command to Alpaca device");
617 if (!sendAlpacaPUT(
"/park", request, response))
619 LOG_ERROR(
"Failed to send park command to Alpaca device");
627 LOG_INFO(
"Park command sent - telescope parked");
636 LOG_INFO(
"Sending unpark command to Alpaca device");
639 if (!sendAlpacaPUT(
"/unpark", request, response))
641 LOG_ERROR(
"Failed to send unpark command to Alpaca device");
650 LOG_INFO(
"Unpark command sent - telescope unparked");
662 double ra = 0,
dec = 0;
664 if (sendAlpacaGET(
"/rightascension", response) && response.contains(
"Value"))
666 ra = response[
"Value"].get<
double>();
670 LOG_ERROR(
"Failed to get current RA for SetCurrentPark");
674 if (sendAlpacaGET(
"/declination", response) && response.contains(
"Value"))
676 dec = response[
"Value"].get<
double>();
680 LOG_ERROR(
"Failed to get current Dec for SetCurrentPark");
688 LOGF_INFO(
"Park position set to current coordinates: RA=%.6f hours, Dec=%.6f degrees",
ra,
dec);
696 request[
"Tracking"] = enabled;
698 if (!sendAlpacaPUT(
"/tracking", request, response))
700 LOGF_ERROR(
"Failed to %s tracking", enabled ?
"enable" :
"disable");
704 isTracking = enabled;
705 LOGF_INFO(
"Tracking %s", enabled ?
"enabled" :
"disabled");
711 if (mode >= m_TrackModeAlpacaRates.size())
718 request[
"TrackingRate"] = m_TrackModeAlpacaRates[mode];
720 if (!sendAlpacaPUT(
"/trackingrate", request, response))
732 if (!m_CanSetRaRate || !m_CanSetDecRate)
734 LOG_WARN(
"Custom tracking rates are not supported by this telescope");
743 request[
"RightAscensionRate"] = raRate / 15.0;
744 if (!sendAlpacaPUT(
"/rightascensionrate", request, response))
746 LOG_ERROR(
"Failed to set RA tracking rate");
751 request[
"DeclinationRate"] = deRate;
752 if (!sendAlpacaPUT(
"/declinationrate", request, response))
754 LOG_ERROR(
"Failed to set DEC tracking rate");
758 LOGF_INFO(
"Custom tracking rate set: RA=%.6f arcsec/s, DEC=%.6f arcsec/s", raRate, deRate);
775 request[
"Rate"] = rate;
780 request[
"Rate"] = 0.0;
784 if (!sendAlpacaPUT(
"/moveaxis", request, response))
791 if (response.contains(
"ErrorNumber"))
793 int errNum = response[
"ErrorNumber"].get<
int>();
796 LOGF_WARN(
"MoveAxis NS returned error %d: %s", errNum,
797 response.value(
"ErrorMessage",
"Unknown error").c_str());
817 request[
"Rate"] = rate;
822 request[
"Rate"] = 0.0;
826 if (!sendAlpacaPUT(
"/moveaxis", request, response))
833 if (response.contains(
"ErrorNumber"))
835 int errNum = response[
"ErrorNumber"].get<
int>();
838 LOGF_WARN(
"MoveAxis WE returned error %d: %s", errNum,
839 response.value(
"ErrorMessage",
"Unknown error").c_str());
858 request[
"SiteLatitude"] = latitude;
859 if (!sendAlpacaPUT(
"/sitelatitude", request, response))
861 LOG_ERROR(
"Failed to set site latitude on device");
867 request[
"SiteLongitude"] = longitude;
868 if (!sendAlpacaPUT(
"/sitelongitude", request, response))
870 LOG_ERROR(
"Failed to set site longitude on device");
876 request[
"SiteElevation"] = elevation;
877 if (!sendAlpacaPUT(
"/siteelevation", request, response))
878 LOG_WARN(
"Failed to set site elevation on device");
881 double latRad = latitude *
M_PI / 180.0;
882 m_sinLat = sin(latRad);
883 m_cosLat = cos(latRad);
885 LOGF_INFO(
"Site location updated: Lat=%.6f° Long=%.6f°", latitude, longitude);
897 snprintf(isoDate,
sizeof(isoDate),
"%04d-%02d-%02dT%02d:%02d:%06.3fZ",
898 utc->years, utc->months, utc->days, utc->hours, utc->minutes, utc->seconds);
901 request[
"UTCDate"] = isoDate;
902 if (!sendAlpacaPUT(
"/utcdate", request, response))
904 LOG_ERROR(
"Failed to set UTC date/time on device");
912std::string alpacaTelescopeDriver::getAlpacaURL(
const std::string& endpoint)
914 return "/api/v1/telescope/" + std::to_string(m_DeviceNumber) + endpoint;
917bool alpacaTelescopeDriver::sendAlpacaGET(
const std::string& endpoint,
nlohmann::json& response)
921 LOG_ERROR(
"HTTP client not initialized");
925 std::string url = getAlpacaURL(endpoint);
926 url +=
"?ClientID=" + std::to_string(m_ClientID) +
927 "&ClientTransactionID=" + std::to_string(getTransactionId());
929 auto result = httpClient->Get(url.c_str());
933 LOGF_ERROR(
"GET %s failed: %s", endpoint.c_str(),
938 if (result->status != 200)
940 LOGF_ERROR(
"GET %s HTTP %d", endpoint.c_str(), result->status);
946 response = nlohmann::json::parse(result->body);
948 if (response.contains(
"ErrorNumber") && response[
"ErrorNumber"].get<
int>() != 0)
950 LOGF_ERROR(
"Alpaca error %s: %d - %s", endpoint.c_str(),
951 response[
"ErrorNumber"].get<
int>(),
952 response.value(
"ErrorMessage",
"").c_str());
960 LOGF_ERROR(
"JSON parse error %s: %s", endpoint.c_str(), e.what());
965bool alpacaTelescopeDriver::sendAlpacaPUT(
const std::string& endpoint,
const nlohmann::json& request,
970 LOG_ERROR(
"HTTP client not initialized");
974 std::string url = getAlpacaURL(endpoint);
979 for (
auto& [key, value] : request.items())
981 if (
value.is_string())
982 params.emplace(key,
value.get<std::string>());
983 else if (
value.is_boolean())
984 params.emplace(key,
value.get<
bool>() ?
"true" :
"false");
985 else if (
value.is_number_integer())
986 params.emplace(key, std::to_string(
value.get<
int>()));
987 else if (
value.is_number())
988 params.emplace(key, std::to_string(
value.get<
double>()));
991 params.emplace(
"ClientID", std::to_string(m_ClientID));
992 params.emplace(
"ClientTransactionID", std::to_string(getTransactionId()));
994 auto result = httpClient->Put(url.c_str(), params);
1000 if (endpoint ==
"/slewtotarget")
1002 LOGF_DEBUG(
"PUT %s: connection closed (expected for some devices)", endpoint.c_str());
1006 LOGF_ERROR(
"PUT %s failed: %s", endpoint.c_str(),
1012 if (result->status != 200)
1014 LOGF_ERROR(
"PUT %s HTTP %d", endpoint.c_str(), result->status);
1020 response = nlohmann::json::parse(result->body);
1022 if (response.contains(
"ErrorNumber") && response[
"ErrorNumber"].get<
int>() != 0)
1024 int errorNum = response[
"ErrorNumber"].get<
int>();
1025 std::string errorMsg = response.value(
"ErrorMessage",
"");
1026 LOGF_ERROR(
"Alpaca error %s: %d - %s", endpoint.c_str(), errorNum, errorMsg.c_str());
1034 LOGF_ERROR(
"JSON parse error %s: %s", endpoint.c_str(), e.what());
1041 alpaca->ISGetProperties(dev);
1046 alpaca->ISNewSwitch(dev, name, states, names,
n);
1049void ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
1051 alpaca->ISNewText(dev, name, texts, names,
n);
1054void ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
1056 alpaca->ISNewNumber(dev, name, values, names,
n);
1059void ISNewBLOB(
const char *dev,
const char *name,
int sizes[],
int blobsizes[],
char *blobs[],
char *formats[],
1060 char *names[],
int n)
1062 alpaca->ISNewBLOB(dev, name, sizes, blobsizes, blobs, formats, names,
n);
1067 alpaca->ISSnoopDevice(root);
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.
static Logger & getInstance()
Method to get a reference to the object (i.e., Singleton) It is a static method.
int addDebugLevel(const char *debugLevelName, const char *LoggingLevelName)
Adds a new debugging level to the driver.
TelescopeStatus TrackState
void SetAxis1Park(double value)
SetRAPark Set current RA/AZ parking position. The data park file (stored in ~/.indi/ParkData....
void SetAxis1ParkDefault(double steps)
SetRAPark Set default RA/AZ parking position.
void SetTelescopeCapability(uint32_t cap, uint8_t slewRateCount)
SetTelescopeCapability sets the Telescope capabilities. All capabilities must be initialized.
virtual bool initProperties() override
Called to initialize basic properties required all the time.
void setTelescopeConnection(const uint8_t &value)
setTelescopeConnection Set telescope connection mode. Child class should call this in the constructor...
virtual int AddTrackMode(const char *name, const char *label, bool isDefault=false)
AddTrackMode.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual void SetParked(bool isparked)
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
Connection::TCP * tcpConnection
virtual bool updateLocation(double latitude, double longitude, double elevation)
Update telescope location settings.
uint32_t GetTelescopeCapability() const
GetTelescopeCapability returns the capability of the Telescope.
void NewRaDec(double ra, double dec)
The child class calls this function when it has updates.
bool InitPark()
InitPark Loads parking data (stored in ~/.indi/ParkData.xml) that contains parking status and parking...
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....
void setMountType(TelescopeMountType type)
setMountType Report the mount type in TELESCOPE_MOUNT_TYPE. Drivers call it when the type is fixed by...
void SetParkDataType(TelescopeParkData type)
setParkDataType Sets the type of parking data stored in the park data file and presented to the user.
@ TELESCOPE_HAS_TRACK_RATE
@ TELESCOPE_HAS_TRACK_MODE
@ TELESCOPE_CAN_CONTROL_TRACK
void SetAxis2ParkDefault(double steps)
SetDEParkDefault Set default DEC/ALT parking position.
virtual bool Goto(double ra, double dec) override
Move the scope to the supplied RA and DEC coordinates.
virtual bool Disconnect() override
Disconnect from device.
virtual bool SetTrackEnabled(bool enabled) override
SetTrackEnabled Engages or disengages mount tracking. If there are no tracking modes available,...
virtual bool ReadScopeStatus() override
Read telescope status.
virtual bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
virtual bool Abort() override
Abort any telescope motion including tracking if possible.
virtual const char * getDefaultName() override
virtual bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
virtual bool UnPark() override
Unpark the telescope if already parked.
virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override
Move the telescope in the direction dir.
virtual bool initProperties() override
Called to initialize basic properties required all the time.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual bool Sync(double ra, double dec) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
virtual bool Handshake() override
perform handshake with device to check communication
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
virtual bool SetTrackMode(uint8_t mode) override
SetTrackMode Set active tracking mode. Do not change track state.
virtual bool updateTime(ln_date *utc, double utc_offset) override
Update telescope time, date, and UTC offset.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) override
Start or Stop the telescope motion in the direction dir.
virtual bool Park() override
Park the telescope to its home position.
virtual bool SetTrackRate(double raRate, double deRate) override
SetTrackRate Set custom tracking rates.
friend class ::nlohmann::detail::exception
const char * OPTIONS_TAB
OPTIONS_TAB Where all the driver's options are located. Those may include auxiliary controls,...
INDI::PropertySwitch TrackModeSP
INDI::PropertyText TimeTP
void sendTimeFromSystem()
INDI::PropertyNumber LocationNP
INDI::PropertyNumber ParkPositionNP
std::unique_ptr< alpacaTelescopeDriver > alpaca(new alpacaTelescopeDriver())
void ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
Update data of an existing blob vector property.
void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Update the value of an existing switch vector property.
void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
Update the value of an existing text vector property.
void ISGetProperties(const char *dev)
Get Device Properties.
void ISSnoopDevice(XMLEle *root)
Function defined by Drivers that is called when another Driver it is snooping (by having previously c...
void ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
Implementations for common driver routines.
*brief user defined string literal for JSON values *sa std::size_t n
#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,...)
std::string to_string(Error error)
std::multimap< std::string, std::string > Params
basic_json<> json
default specialization