1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-22 21:23:07 +03:00

7 Commits

Author SHA1 Message Date
david gauchard
9a2ed274f3 polledTimeout: add option to use CPU count instead of millis() (#5870)
* polledTimeout: add option to use CPU count instead of millis()

* use more "using" alias

* more c++/clear code, using typename (thanks @devyte)

* rename class name to include unit, introduce timeMax() and check it with assert()

* remove useless defines

* improve api readability, add micro-second unit

* update example

* mock: emulate getCycleCount, add/fix polledTimeout CI test

* + nano-seconds, assert -> message, comments, host test

* allow 0 for timeout (enables immediate timeout, fix division by 0)

* typo, set member instead of local variable

* unify error message

* slight change on checkExpired() allows "never expired"
also removed printed message, add YieldAndDelay, simplify calculations

* remove traces of debug.h/cpp in this PR

* include missing <limits> header

* back to original expired test, introduce boolean _neverExpires, fix reset(), getTimeout() is invalid

* fix expiredOneShot with _timeout==0 check

* reenable getTimeout()

* expose checkExpired with unit conversion

* fix timing comments, move critical code to iram

* add member ::neverExpires and use it where relevant

* improve clarity

* remove exposed checkExpired(), adapt LEAmDNS with equivalent

* add API ::resetToNeverExpires(), use it in LEAmDNS

* remove offending constness from ::flagged() LEAmDNS (due do API fix in PolledTimeout)

* simplify "Fast" base classes

* minor variable rename

* Fix examples

* compliance with good c++ manners

* minor changes for consistency

* add missing const

* expired() and bool() moved to iram

* constexpr compensation computing

* add/update comments

* move neverExpires and alwaysExpired
2019-04-05 10:50:53 -03:00
hreintke
82789d201c Functional update, host and service probes (#5653)
* Functional update, host and service probes

* Fix ServiceMonitor.ino warnings

* Adding MDNSServiceQueryCallback functional
ServiceMonitor.ino needs some updates for web page but works on Serial output.

* DynamicServices Functional

* Fix ServiceMonitor to match latest MDNSServiceInfo

* Fix unused variable in LEAdns.h

* mDNS_Clock.ino fix

* example restyle

* Add keyValues and answerInfo

* Waring and formattin fix

* Change     struct MDNSServiceInfo   {  MDNSServiceInfo(MDNSResponder ...
to     struct MDNSServiceInfo { MDNSServiceInfo(MDNSResponder&

* Make AnswerType user friendly

* Update ServiceInfo example

* Code cleanup

* AnswerType update, Astyle update servicemonitor

* Update clock example to webserver

* Second typedef for probe callbacks
Change String -> const char* at multiple locations

* Optimizations

* Update callbacks to void

* esp32 compatibility

* std::map to const char*

* Fix emplace_back call

* Change Dynamic callback to void(...)

* Add WiFi events reset() in close()
2019-02-05 00:40:45 -03:00
hreintke
e9a6fd2f82 Update mDNS examples to use HTTP Server instead of TCP Server (#5589) 2019-01-22 10:04:56 +01:00
LaborEtArs
570b9a6b6a LEAmDNS Fixes 1.1 (#5619)
* Fixes 1.1

- Better separation of ESP wifi thread code from user thread code
- Added a flag for 'update()'-less use (disabled by default)
- The too fast updates for service queries are fixed
- Switched fully to PolledTimeout; LEATimeFlag not needed anymore (BTW: a const 'expired()' method would be helpful)
- The device should stay visible now even after the first TTL timeout
- Improved service querying (queries five times now)

* Update mDNS_Clock.ino

Removed references to LEATimeFlag.h

* Update mDNS_Clock.ino

Styling
2019-01-18 15:59:26 -03:00
hreintke
62b8ac6be7 Fix LeamDNS examples (#5563)
* Fix LeamDNS examples

* Fix Style check error

* Another style fix
2018-12-29 00:00:16 -03:00
Develo
4d15590096
formalization of LEA's mdns rewrite (#5450)
* formalization of LEA's mdns rewrite (code), minor changes to polledTimeout

* fix typo

* Fix mdns examples
2018-12-08 19:36:20 -03:00
LaborEtArs
58a044b254 LEAmDNS - Multicast DNS Responder (#5442)
* LEAmDNS Responder (II)

Created a new branch to solve commit conflicts with recent changes to ESP8266mDNSResponder.cpp by d-a-v.

* Removed millis() roll-over issues

* fix LEA-mDNS

* astyle on lea-mdns examples

* add compatibility with lwIP-v1

* ditto

* use strncasecmp instead of lwip's strnicmp from lwIP-v2 (thanks @devyte)

* ditto

* fixes

* Update mDNS_Clock.ino

unindent

* Update mDNS_ServiceMonitor.ino

unindent

* Update LEAmDNS.h

Add setInstanceName() forwarder for compat

* Disable DEBUG_ESP_MDNS_RESPONDER by default

* [Fixed] Debug output line

DEBUG_OUTPUT needs to go inside DEBUG_EX_ function otherwise throw error if DEBUG_ESP_MDNS_RESPONDER is not defined
2018-12-05 16:51:01 -03:00