| 1 | package SIAM::ServiceComponent; | ||||||||||
| 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 | =head1 NAME | ||||||||||
| 9 | |||||||||||
| 10 | SIAM::ServiceComponent - Service Component object class | ||||||||||
| 11 | |||||||||||
| 12 | =head1 SYNOPSIS | ||||||||||
| 13 | |||||||||||
| 14 | =head1 METHODS | ||||||||||
| 15 | |||||||||||
| 16 | =head2 get_device_component | ||||||||||
| 17 | |||||||||||
| 18 | $devc = $svcc->get_device_component(); | ||||||||||
| 19 | |||||||||||
| 20 | The method returns a SIAM::DeviceComponent object instantiated from | ||||||||||
| 21 | C<siam.svcc.devc_id> parameter. | ||||||||||
| 22 | |||||||||||
| 23 | =cut | ||||||||||
| 24 | |||||||||||
| 25 | sub get_device_component | ||||||||||
| 26 | 0 | ▶ | { | ||||||||
|
Subroutine
get_device_component: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 27 | 0 | my $self = shift; | |||||||||
| 28 | |||||||||||
| 29 | 0 | ▶ | if( $self->attr('siam.svcc.devc_id') eq 'NIL' ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | return undef; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 0 | return $self->instantiate_object | |||||||||
| 34 | ('SIAM::DeviceComponent', $self->attr('siam.svcc.devc_id')); | ||||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | |||||||||||
| 38 | # mandatory attributes | ||||||||||
| 39 | |||||||||||
| 40 | 3 | my $mandatory_attributes = | |||||||||
| 41 | [ 'siam.svcc.name', | ||||||||||
| 42 | 'siam.svcc.type', | ||||||||||
| 43 | 'siam.svcc.inventory_id', | ||||||||||
| 44 | 'siam.svcc.devc_id' ]; | ||||||||||
| 45 | |||||||||||
| 46 | sub _mandatory_attributes | ||||||||||
| 47 | 8 | ▶ | { | ||||||||
|
Subroutine
_mandatory_attributes: called CC=1 SCAR=0.0
| |||||||||||
| 48 | 8 | return $mandatory_attributes; | |||||||||
| 49 | } | ||||||||||
| 50 | |||||||||||
| 51 | |||||||||||
| 52 | sub _manifest_attributes | ||||||||||
| 53 | 1 | ▶ | { | ||||||||
|
Subroutine
_manifest_attributes: called CC=1 SCAR=0.0
| |||||||||||
| 54 | 1 | return $mandatory_attributes; | |||||||||
| 55 | } | ||||||||||
| 56 | |||||||||||
| 57 | |||||||||||
| 58 | 3 | 1; | |||||||||
| 59 | |||||||||||
| 60 | # Local Variables: | ||||||||||
| 61 | # mode: cperl | ||||||||||
| 62 | # indent-tabs-mode: nil | ||||||||||
| 63 | # cperl-indent-level: 4 | ||||||||||
| 64 | # cperl-continued-statement-offset: 4 | ||||||||||
| 65 | # cperl-continued-brace-offset: -4 | ||||||||||
| 66 | # cperl-brace-offset: 0 | ||||||||||
| 67 | # cperl-label-offset: -2 | ||||||||||
| 68 | # End: | ||||||||||