ESP8266
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ArduinoOTAClass Class Reference

Public Member Functions

 ArduinoOTAClass ()
 
 ~ArduinoOTAClass ()
 
void setPort (uint16_t port)
 
void setHostname (const char *hostname)
 
void setPassword (const char *password)
 
void onStart (void(*fn)())
 
void onEnd (void(*fn)())
 
void onProgress (void(*fn)(unsigned int, unsigned int))
 
void onError (void(*fn)(ota_error_t))
 
void begin ()
 
void handle ()
 

Private Member Functions

void _runUpdate (void)
 
void _onRx (void)
 
int parseInt (void)
 
String readStringUntil (char end)
 

Private Attributes

int _port
 
String _password
 
String _hostname
 
String _nonce
 
UdpContext_udp_ota
 
bool _initialized
 
ota_state_t _state
 
int _size
 
int _cmd
 
int _ota_port
 
IPAddress _ota_ip
 
String _md5
 
void(* _start_callback )()
 
void(* _end_callback )()
 
void(* _error_callback )(ota_error_t)
 
void(* _progress_callback )(unsigned int, unsigned int)
 

Constructor & Destructor Documentation

ArduinoOTAClass::ArduinoOTAClass ( )
ArduinoOTAClass::~ArduinoOTAClass ( )

Member Function Documentation

void ArduinoOTAClass::_onRx ( void  )
private
void ArduinoOTAClass::_runUpdate ( void  )
private
void ArduinoOTAClass::begin ( )
void ArduinoOTAClass::handle ( )
void ArduinoOTAClass::onEnd ( void(*)()  fn)
void ArduinoOTAClass::onError ( void(*)(ota_error_t)  fn)
void ArduinoOTAClass::onProgress ( void(*)(unsigned int, unsigned int)  fn)
void ArduinoOTAClass::onStart ( void(*)()  fn)
int ArduinoOTAClass::parseInt ( void  )
private
String ArduinoOTAClass::readStringUntil ( char  end)
private
void ArduinoOTAClass::setHostname ( const char *  hostname)
void ArduinoOTAClass::setPassword ( const char *  password)
void ArduinoOTAClass::setPort ( uint16_t  port)

Member Data Documentation

int ArduinoOTAClass::_cmd
private
void(* ArduinoOTAClass::_end_callback) ()
private
void(* ArduinoOTAClass::_error_callback) (ota_error_t)
private
String ArduinoOTAClass::_hostname
private
bool ArduinoOTAClass::_initialized
private
String ArduinoOTAClass::_md5
private
String ArduinoOTAClass::_nonce
private
IPAddress ArduinoOTAClass::_ota_ip
private
int ArduinoOTAClass::_ota_port
private
String ArduinoOTAClass::_password
private
int ArduinoOTAClass::_port
private
void(* ArduinoOTAClass::_progress_callback) (unsigned int, unsigned int)
private
int ArduinoOTAClass::_size
private
void(* ArduinoOTAClass::_start_callback) ()
private
ota_state_t ArduinoOTAClass::_state
private
UdpContext* ArduinoOTAClass::_udp_ota
private