line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
1566
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
89
|
|
2
|
3
|
|
|
3
|
|
11
|
use warnings; |
|
3
|
|
|
|
|
2
|
|
|
3
|
|
|
|
|
106
|
|
3
|
|
|
|
|
|
|
package Net::MQTT::Message::ConnAck; |
4
|
|
|
|
|
|
|
$Net::MQTT::Message::ConnAck::VERSION = '1.143250'; |
5
|
|
|
|
|
|
|
# ABSTRACT: Perl module to represent an MQTT ConnAck message |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
10
|
use base 'Net::MQTT::Message'; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
174
|
|
9
|
3
|
|
|
3
|
|
13
|
use Net::MQTT::Constants qw/:all/; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
13
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub message_type { |
12
|
11
|
|
|
11
|
1
|
25
|
2 |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
4
|
100
|
|
4
|
1
|
15
|
sub connack_reserved { shift->{connack_reserved} || 0 } |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
8
|
100
|
|
8
|
1
|
27
|
sub return_code { shift->{return_code} || MQTT_CONNECT_ACCEPTED } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _remaining_string { |
22
|
4
|
|
|
4
|
|
5
|
my ($self, $prefix) = @_; |
23
|
4
|
|
|
|
|
8
|
connect_return_code_string($self->return_code). |
24
|
|
|
|
|
|
|
' '.$self->SUPER::_remaining_string($prefix) |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub _parse_remaining { |
28
|
2
|
|
|
2
|
|
4
|
my $self = shift; |
29
|
2
|
|
|
|
|
2
|
my $offset = 0; |
30
|
2
|
|
|
|
|
11
|
$self->{connack_reserved} = decode_byte($self->{remaining}, \$offset); |
31
|
2
|
|
|
|
|
5
|
$self->{return_code} = decode_byte($self->{remaining}, \$offset); |
32
|
2
|
|
|
|
|
7
|
substr $self->{remaining}, 0, $offset, ''; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub _remaining_bytes { |
36
|
4
|
|
|
4
|
|
5
|
my $self = shift; |
37
|
4
|
|
|
|
|
9
|
my $o = encode_byte($self->connack_reserved); |
38
|
4
|
|
|
|
|
6
|
$o .= encode_byte($self->return_code); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |