Normally the calling
application would load the driver configuration from some data file
(YAML or JSON), and optionally supply its own logger object.
The following entries are supported in the config
=back
Conditions:
=over 4
=item * siam.device.set_components
The value of this condition is a JSON array of hashes, and each has
represents a Device Component object and its attributes. The driver
the driver to reset the contents and add
new items to the report. The value of the condition is a JSON-encoded
array consisted of hashes. Each hash must have a mandatory item with the
key C<siam.repor
d be
documented in the reporting program.
=back
The computable C<siam.report.content> returns a JSON array that is
comprised of the report items as specified in C<siam.report.set_items>
condition.
package SIAM::Report;
use warnings;
use strict;
use base 'SIAM::Object';
use JSON;
=head1 NAME
SIAM::Report - Report object class
=head1 SYNOPSIS
my $sorted_items = $report->get_items();
m
= $self->attr('siam.report.object_class');
my $content_json = $self->computable('siam.report.content');
if( not defined($content_json) )
{
$self->error('Computable siam.report.cont
return $ret;
}
my $content = eval { decode_json($content_json) };
if( $@ )
{
$self->error('Failed to process JSON in ' .
'siam.report.contents comput