Device::Firmata::IO::NetIO - TCP/IP server interface to Firmata device
Start a TCP server bound to given local address and port for the Firmata device to connect to. Returns a Device::Firmata::IO::NetIO object. Typically called by method listen of Device::Firmata. An implementation example can be found in file examples/example-tcpserver.pl.
Device::Firmata::IO::NetIO
listen
Wait until timeout seconds for an Firmata device to connect. Returns a Device::Firmata::Platform object on success or undef. An implementation example can be found in file examples/example-tcpserver.pl.
undef
Closes the TCP server socket and disconnects all Firmata devices. An implementation example can be found in file examples/example-tcpserver.pl.
Assign a connected IO::Socket::INET as IO port and return a Device::Firmata::Platform object. Typically used internally by the accept() method.
accept()
Wait for timeout seconds for data from Firmata devices. If data is received the method poll of Device::Firmata::Platform will be called for processing. An implementation example can be found in file examples/example-tcpserver.pl.
poll
Implements the low level TCP/IP client socket IO.
Assign a connected IO::Socket::INET as IO port and return a Device::Firmata::IO::NetIO::Client object. Typically used internally by the attach() method of Device::Firmata::IO::NetIO.
Device::Firmata::IO::NetIO::Client
attach()
Send a bunch of data to the Firmata device. Typically used internally by Device::Firmata::Platform.
Fetch up to given number of bytes from the client socket. This function is non-blocking. Returns the received data. Typically used internally by Device::Firmata::Platform.
Close the TCP client socket to the Firmata device. The listening socket will not be affected. Typically used internally by Device::Firmata::Platform and Device::Firmata::IO::NetIO.
"Device::Firmata::listen ( host, port, [opts] )" and "Device::Firmata::Platform::attach ( ioPort )"
To install Device::Firmata, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Firmata
CPAN shell
perl -MCPAN -e shell install Device::Firmata
For more information on module installation, please visit the detailed CPAN module installation guide.