| 1 | package SIAM::Device; | ||
| 2 | |||
| 3 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 3 | ▶ | use base 'SIAM::Object'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 3 | ▶ | use SIAM::DeviceComponent; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | SIAM::Device - device object class | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | |||
| 17 | =head1 METHODS | ||
| 18 | |||
| 19 | =head2 get_components | ||
| 20 | |||
| 21 | Returns arrayref with SIAM::DeviceComponent objects | ||
| 22 | |||
| 23 | =cut | ||
| 24 | |||
| 25 | sub get_components | ||
| 26 | 1 | ▶ | { |
|
Subroutine
get_components: called CC=1 SCAR=0.0
Pod
documented
| |||
| 27 | 1 | my $self = shift; | |
| 28 | 1 | return $self->get_contained_objects('SIAM::DeviceComponent'); | |
| 29 | } | ||
| 30 | |||
| 31 | |||
| 32 | # mandatory attributes | ||
| 33 | |||
| 34 | 3 | my $mandatory_attributes = | |
| 35 | [ 'siam.device.inventory_id', | ||
| 36 | 'siam.device.name']; | ||
| 37 | |||
| 38 | sub _mandatory_attributes | ||
| 39 | 5 | ▶ | { |
|
Subroutine
_mandatory_attributes: called CC=1 SCAR=0.0
| |||
| 40 | 5 | return $mandatory_attributes; | |
| 41 | } | ||
| 42 | |||
| 43 | sub _manifest_attributes | ||
| 44 | 1 | ▶ | { |
|
Subroutine
_manifest_attributes: called CC=1 SCAR=0.0
| |||
| 45 | 1 | my $ret = []; | |
| 46 | 1 | push(@{$ret}, @{$mandatory_attributes}, | |
| 47 | 1 | @{ SIAM::DeviceComponent->_manifest_attributes() }); | |
| 48 | 1 | return $ret; | |
| 49 | } | ||
| 50 | |||
| 51 | 3 | 1; | |
| 52 | |||
| 53 | # Local Variables: | ||
| 54 | # mode: cperl | ||
| 55 | # indent-tabs-mode: nil | ||
| 56 | # cperl-indent-level: 4 | ||
| 57 | # cperl-continued-statement-offset: 4 | ||
| 58 | # cperl-continued-brace-offset: -4 | ||
| 59 | # cperl-brace-offset: 0 | ||
| 60 | # cperl-label-offset: -2 | ||
| 61 | # End: | ||