Global

Methods

(static) answer(noerror, message, …parameters)

Description:
  • Returns a response to the web service.

Parameters:
Name Type Attributes Description
noerror bool

If true, uses the HTTP 200 code (no error), else the HTTP 400 code (bad request).

message string

The message, a string format à-la printf with more parameters if used.

parameters anything <repeatable>

Any message parameters.

(static) gpio_digital_timing_start(index, mode)

Description:
  • Starts the digital timing observation.

Parameters:
Name Type Description
index uint

The given pin index.

mode uint

The transition CHANGE|FALLING|RISING mode.

(static) gpio_digital_timing_stop(index)

Description:
  • Stops the digital timing observation.

Parameters:
Name Type Description
index uint

The given pin index.

(static) gpio_digital_timing_get(index)

Description:
  • Gets the last digital timing observation.

Parameters:
Name Type Description
index uint

The given pin index.

Returns:

The last observation time in millisconds from the chip boot.

(static) setInterval(handler, delay, count)

Description:
  • Calls a handler at specified intervals (in milliseconds).

    • Functionnalities:
      • Periodic samplig: This corresponds to the setInterval(handler, delay) javascript mechanism.
      • Sampling stopping: The setInterval(handler, 0) is equivalent to cleaInterval(handler) javascript mechanism.
      • Timeout handler call: The setInterval(handler, delay, 1) is equivalent to setTimeout(handler) javascript mechanism.
    • Requirement: In order the mechanism to be used the setInterval_manage() function has to be added to the processor loop, as examplified here.
    • Precision:
      • The present loop()
        • is called about every 1 millisecond (without any action to performed), while performing a Serial.println requires about 2 to 3 milliseconds.
        • when implementing this setInterval management and the webservice client handler
        • while it is delayed by the web service handle routine.
      • The millis() returns the time passed since the board began running the current program.
Parameters:
Name Type Description
handler callback

The void handler() routine to be called.

delay unit

The intervals (in milliseconds) on how often to execute the code, 0 to stop the sampling.

  • This is performs in "best effort" mode, i.e., as soon as possible.
  • The 1st call is performed after the given delay.
count uint

The maximal number of calls, -1 for endless calls.