NAME

Net::Fritz::Action - represents a TR064 action

SYNOPSIS

my $fritz    = Net::Fritz::Box->new();
my $device   = $fritz->discover();
my $service  = $device->get_service('DeviceInfo:1');
my $action   = $device->action_hash('GetSecurityPort');

# show all data
$action->dump();

DESCRIPTION

This class represents a TR064 action belonging to a Net::Fritz::Service. An action is a rather boring object containing the input/output parameter names as well as the action name. To call (execute) an action, use "call" in Net::Fritz::Service.

ATTRIBUTES (read-only)

xmltree

A complex hashref containing most information about this Net::Fritz::Action. This is the parsed form of the part from the "scpd" in Net::Fritz::Service XML that describes this action.

name

The name of this action as a string. This is used to identify the action in a "call" in Net::Fritz::Service.

args_in

An arrayref containing the names of all input parameters for this action. These parameters must be present in a "call" in Net::Fritz::Service.

args_out

An arrayref containing the names of all output parameters of this action. These parameters will be present in the "data" in Net::Fritz::Data response to a "call" in Net::Fritz::Service.

error

See "error" in Net::Fritz::IsNoError.

METHODS

new

Creates a new Net::Fritz::Action object. You propably don't have to call this method, it's mostly used internally. Expects parameters in key => value form with the following keys:

xmltree

action information in parsed XML format

With only one parameter (in fact: any odd value of parameters), the first parameter is automatically mapped to xmltree.

dump(indent)

Returns some preformatted multiline information about the object. Useful for debugging purposes, printing or logging. The optional parameter indent is used for indentation of the output by prepending it to every line.

errorcheck

See "errorcheck" in Net::Fritz::IsNoError.

COPYRIGHT

Copyright (C) 2015 by Christian Garbs <mitch@cgarbs.de>

LICENSE

Licensed under GNU GPL v2 or later, see <http://www.gnu.org/licenses/gpl-2.0-standalone.html>

AUTHOR

Christian Garbs <mitch@cgarbs.de>

SEE ALSO

See Net::Fritz for general information about this package, especially "INTERFACE" in Net::Fritz for links to the other classes.