NAME
Net::Fritz::Action - represents a TR064 action
VERSION
version v0.0.9
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 Net::Fritz::Service::call.
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 Net::Fritz::Service::call.
args_in
An arrayref containing the names of all input parameters for this action. These parameters must be present in a Net::Fritz::Service::call.
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 Net::Fritz::Service::call.
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.
SEE ALSO
See Net::Fritz for general information about this package, especially "INTERFACE" in Net::Fritz for links to the other classes.
AUTHOR
Christian Garbs <mitch@cgarbs.de>
COPYRIGHT AND LICENSE
Copyright (C) 2017 Christian Garbs
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.