line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
3
|
|
|
3
|
|
1578
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
93
|
|
2
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
112
|
|
3
|
|
|
|
|
|
|
package Net::MQTT::Message::ConnAck; |
4
|
|
|
|
|
|
|
$Net::MQTT::Message::ConnAck::VERSION = '1.143260'; |
5
|
|
|
|
|
|
|
# ABSTRACT: Perl module to represent an MQTT ConnAck message |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
3
|
|
|
3
|
|
10
|
use base 'Net::MQTT::Message'; |
|
3
|
|
|
|
|
2
|
|
|
3
|
|
|
|
|
183
|
|
9
|
3
|
|
|
3
|
|
12
|
use Net::MQTT::Constants qw/:all/; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
11
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub message_type { |
12
|
11
|
|
|
11
|
1
|
28
|
2 |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
4
|
100
|
|
4
|
1
|
16
|
sub connack_reserved { shift->{connack_reserved} || 0 } |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
8
|
100
|
|
8
|
1
|
32
|
sub return_code { shift->{return_code} || MQTT_CONNECT_ACCEPTED } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _remaining_string { |
22
|
4
|
|
|
4
|
|
6
|
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
|
|
3
|
my $self = shift; |
29
|
2
|
|
|
|
|
3
|
my $offset = 0; |
30
|
2
|
|
|
|
|
12
|
$self->{connack_reserved} = decode_byte($self->{remaining}, \$offset); |
31
|
2
|
|
|
|
|
6
|
$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
|
|
|
|
|
10
|
my $o = encode_byte($self->connack_reserved); |
38
|
4
|
|
|
|
|
8
|
$o .= encode_byte($self->return_code); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |