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