AnyEvent::OWNet::Response - Module for responses from 1-wire File System server
version 1.163170
# normally instantiated by AnyEvent::OWNet command methods
Module to represent responses from owfs 1-wire server daemon.
new()
Constructs a new AnyEvent::OWNet::Response object. It is called by AnyEvent::OWNet in response to messages received from the owserver daemon.
owserver
is_success()
Returns true if the response object represents a successful request.
return_code()
Returns the return code of the response from the owserver daemon.
version()
Returns the protocol version number of the response from the owserver daemon.
flags()
Returns the flags field of the response from the owserver daemon. The AnyEvent::OWNet::Constants::ownet_temperature_units(), AnyEvent::OWNet::Constants::ownet_pressure_units(), and AnyEvent::OWNet::Constants::ownet_display_format() functions can be used to extract some elements from this value.
payload_length()
Returns the payload length field of the response from the owserver daemon.
size()
Returns the size of the data element of the response from the owserver daemon.
offset()
Returns the offset field of the response from the owserver daemon.
data_list()
Returns the data from the response as a list. This is a intend for use when the response corresponds to a directory listing request.
data()
Returns the data from the response as a scalar. This is a intend for use when the response corresponds to a file read. However, it returns the raw data for any request so while for a read it may be a simple scalar value, it may also be a comma separated list (e.g. for a dirall request) or an array reference (e.g. for a dir request).
read
dirall
dir
Mark Hindess <soft-cpan@temporalanomaly.com>
This software is copyright (c) 2014 by Mark Hindess.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install AnyEvent::OWNet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::OWNet
CPAN shell
perl -MCPAN -e shell install AnyEvent::OWNet
For more information on module installation, please visit the detailed CPAN module installation guide.