Functions | |
BOOLEAN | adhoc.init (NUMBER mode) |
Initialize Adhoc module. More... | |
BOOLEAN | adhoc.init (NUMBER mode, NUMBER timeout) |
Initialize Adhoc module. More... | |
STRING | adhoc.getmac () |
Obtain physical address (MAC) of our console. More... | |
TABLE | adhoc.scan () |
Obtain a list of available devices consoles to successfully make an adhoc connection. More... | |
NUMBER | adhoc.available () |
Allows to know the number of the remote devices available. More... | |
BOOLEAN | adhoc.sendrequest (STRING addr) |
Request connection to a remote device. More... | |
BOOLEAN | adhoc.getrequest () |
Allows you to know if a device has sent a connection request. More... | |
NUMBER | adhoc.send (STRING data) |
Send data to a Remote device (when accepted or successfully connection). More... | |
NUMBER | adhoc.send (STRING data, NUMBER size) |
Send data to a Remote device (when accepted or successfully connection). More... | |
STRING | adhoc.recv (NUMBER size) |
Allow to receive data from a Remote device (when accepted or successfully connection). More... | |
NIL | adhoc.term () |
Finalizes adhoc module. More... | |
Adhoc functions.
BOOLEAN adhoc.init | ( | NUMBER | mode | ) |
Initialize Adhoc module.
mode | Any of the following values:
|
BOOLEAN adhoc.init | ( | NUMBER | mode, |
NUMBER | timeout | ||
) |
Initialize Adhoc module.
mode | Any of the following values:
|
timeout | It is the 'us' time limit in which the connection request will be open, only necessary for the '__ADHOC_JOIN' mode. |
STRING adhoc.getmac | ( | ) |
Obtain physical address (MAC) of our console.
TABLE adhoc.scan | ( | ) |
Obtain a list of available devices consoles to successfully make an adhoc connection.
NUMBER adhoc.available | ( | ) |
Allows to know the number of the remote devices available.
BOOLEAN adhoc.sendrequest | ( | STRING | addr | ) |
Request connection to a remote device.
addr | It is the physical address (MAC) obtained from the table adhoc.scan(). |
BOOLEAN adhoc.getrequest | ( | ) |
Allows you to know if a device has sent a connection request.
NUMBER adhoc.send | ( | STRING | data | ) |
Send data to a Remote device (when accepted or successfully connection).
data | String with the message or text. |
NUMBER adhoc.send | ( | STRING | data, |
NUMBER | size | ||
) |
Send data to a Remote device (when accepted or successfully connection).
data | String with the message or text. |
size | Size data to be sending. |
STRING adhoc.recv | ( | NUMBER | size | ) |
Allow to receive data from a Remote device (when accepted or successfully connection).
size | Size data to be received for save them in buffer. Default to 1024 if there is no value. |
NIL adhoc.term | ( | ) |
Finalizes adhoc module.