|
| Name |
PicoIP |
| Examples |
None available |
| Description |
A simple object to easily communicate with PicoIP card
(http://www.pictec.org/). |
| Constructors |
PicoIP(parent, address);
PicoIP(parent, address, pin_count);
PicoIP(parent, address, pin_count, port);
|
| Parameters |
| parent |
|
the object owner |
| address |
|
the PicoIP card address |
| pin_count |
|
the number of PIcoIP inputs/outputs |
| address |
|
the card address |
| port |
|
the listening port to bind on |
|
| Fields |
|
| Methods |
| ask ( ) |
|
Ask for the given pin's value. To get the result (or perform actions on
this event), you must implement in your code this method :
void receive(int pin, int value) {
// do something here...
}
Return true on success, false otherwise.
notes : this method will be automatically called when the socket receive
incoming data.
|
| close ( ) |
|
Close the current connection.
|
| log ( ) |
|
Enable or disable UDP connexion log
|
| port ( ) |
|
Return the actual listening port or -1 if the connexion is not set.
|
| receive ( ) |
|
PicoIP receive handler. This method is called automatically,
you do not need to call it.
|
| reset ( ) |
|
Turn off all pins
|
| set ( ) |
|
Change the given pin's value.
Return true on success, false otherwise.
|
| timeout ( ) |
|
Set the timeout value for the response time.
This value must be greater or equal to 0, otherwise the timeout is set to
his default value.
If the passed number equal to 0, the listening method is set in an
infinity loop until a response is received.
|
|
| Usage |
Web & Application |
| Related |
|