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 |
(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 tocleaInterval(handler)
javascript mechanism. - Timeout handler call: The
setInterval(handler, delay, 1)
is equivalent tosetTimeout(handler)
javascript mechanism.
- Periodic samplig: This corresponds to the
- 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 aSerial.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.
- is called about every
- The
millis()
returns the time passed since the board began running the current program.
- The present
- Functionnalities:
Parameters:
Name | Type | Description |
---|---|---|
handler |
callback | The |
delay |
unit | The intervals (in milliseconds) on how often to execute the code,
|
count |
uint | The maximal number of calls, |