NAME

AnyEvent::OWNet::Response - Module for responses from 1-wire File System server

VERSION

version 1.163170

SYNOPSIS

  # normally instantiated by AnyEvent::OWNet command methods

DESCRIPTION

Module to represent responses from owfs 1-wire server daemon.

METHODS

new()

Constructs a new AnyEvent::OWNet::Response object. It is called by AnyEvent::OWNet in response to messages received from the owserver daemon.

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).

AUTHOR

Mark Hindess <soft-cpan@temporalanomaly.com>

COPYRIGHT AND LICENSE

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.