File Coverage

blib/lib/BACnet/ServiceRequestSequences/COVUnconfirmedNotification.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 20 21 95.2


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3             package BACnet::ServiceRequestSequences::COVUnconfirmedNotification;
4              
5 27     27   172 use warnings;
  27         102  
  27         1552  
6 27     27   184 use strict;
  27         52  
  27         744  
7              
8 27     27   11868 use BACnet::ServiceRequestSequences::Utils;
  27         85  
  27         1002  
9 27     27   148 use BACnet::DataTypes::Enums::PropertyIdentifier;
  27         51  
  27         7743  
10              
11             sub request {
12 4     4 0 72 my %args = (
13             subscriber_process_identifier => undef,
14             initiating_device_identifier_type => undef,
15             initiating_device_identifier_instance => undef,
16             monitored_object_identifier_type => undef,
17             monitored_object_identifier_instance => undef,
18             time_remaining => undef,
19             list_of_values => undef,
20             @_,
21             );
22              
23             my $sequence_elements = [
24             [
25             'subscriber_process_identifier',
26             BACnet::DataTypes::UnsignedInt->construct(
27             $args{subscriber_process_identifier}, 0x00
28             )
29             ],
30             [
31             'initiating_device_identifier',
32             BACnet::DataTypes::ObjectIdentifier->construct(
33             $args{initiating_device_identifier_type},
34             $args{initiating_device_identifier_instance},
35             0x01
36             )
37             ],
38             [
39             'monitored_object_identifier',
40             BACnet::DataTypes::ObjectIdentifier->construct(
41             $args{monitored_object_identifier_type},
42             $args{monitored_object_identifier_instance},
43             0x02
44             )
45             ],
46             [
47             'time_remaining',
48             BACnet::DataTypes::UnsignedInt->construct(
49             $args{time_remaining}, 0x03
50             )
51             ],
52 4         19 [ 'list_of_values', $args{list_of_values} ]
53             ];
54              
55 4         27 return BACnet::DataTypes::SequenceValue->construct($sequence_elements);
56             }
57              
58             our $request_skeleton = [
59             BACnet::DataTypes::Bone->construct(
60             tag => 0,
61             name => 'subscriber_process_identifier',
62             dt => 'BACnet::DataTypes::UnsignedInt'
63             ),
64             BACnet::DataTypes::Bone->construct(
65             tag => 1,
66             name => 'initiating_device_identifier',
67             dt => 'BACnet::DataTypes::ObjectIdentifier'
68             ),
69             BACnet::DataTypes::Bone->construct(
70             tag => 2,
71             name => 'monitored_object_identifier',
72             dt => 'BACnet::DataTypes::ObjectIdentifier'
73             ),
74             BACnet::DataTypes::Bone->construct(
75             tag => 3,
76             name => 'time_remaining',
77             dt => 'BACnet::DataTypes::UnsignedInt'
78             ),
79             BACnet::DataTypes::Bone->construct(
80             tag => 4,
81             name => 'list_of_values',
82             dt => 'BACnet::DataTypes::SequenceOfValues',
83             skeleton =>
84             $BACnet::DataTypes::Enums::PropertyIdentifier::list_of_property_value_skeleton,
85             ),
86             ];
87              
88             1;