| 1 | #################################################################### | ||||||||||||||||||||||||||||
| 2 | # | ||||||||||||||||||||||||||||
| 3 | # This file was generated using XDR::Parse version v1.0.1, | ||||||||||||||||||||||||||||
| 4 | # XDR::Gen version 1.1.2 and LibVirt version v12.9.0 | ||||||||||||||||||||||||||||
| 5 | # | ||||||||||||||||||||||||||||
| 6 | # Don't edit this file, use the source template instead | ||||||||||||||||||||||||||||
| 7 | # | ||||||||||||||||||||||||||||
| 8 | # ANY CHANGES HERE WILL BE LOST ! | ||||||||||||||||||||||||||||
| 9 | # | ||||||||||||||||||||||||||||
| 10 | #################################################################### | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | package Protocol::Sys::Virt::Transport::XDR v12.9.0; | ||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 1 | ▶ | use v5.14; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | 1 | ▶ | use warnings FATAL => 'uninitialized'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | 1 | ▶ | use Config; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | 1 | ▶ | use Carp qw(croak); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 18 | 1 | ▶ | use constant INITIAL => 65536; # 65536 | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 19 | 1 | ▶ | use constant LEGACY_PAYLOAD_MAX => 262120; # 262120 | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 20 | 1 | ▶ | use constant MAX => 33554432; # 33554432 | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 21 | 1 | ▶ | use constant HEADER_MAX => 24; # 24 | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 22 | 1 | ▶ | use constant PAYLOAD_MAX => 33554408; # 33554408 | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 23 | 1 | ▶ | use constant LEN_MAX => 4; # 4 | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 24 | 1 | ▶ | use constant STRING_MAX => 4194304; # 4194304 | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 25 | 1 | ▶ | use constant NUM_FDS_MAX => 32; # 32 | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 26 | # Define elements from enum 'Type' | ||||||||||||||||||||||||||||
| 27 | 1 | ▶ | use constant { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 28 | 1 | CALL => 0, | |||||||||||||||||||||||||||
| 29 | REPLY => 1, | ||||||||||||||||||||||||||||
| 30 | MESSAGE => 2, | ||||||||||||||||||||||||||||
| 31 | STREAM => 3, | ||||||||||||||||||||||||||||
| 32 | CALL_WITH_FDS => 4, | ||||||||||||||||||||||||||||
| 33 | REPLY_WITH_FDS => 5, | ||||||||||||||||||||||||||||
| 34 | STREAM_HOLE => 6, | ||||||||||||||||||||||||||||
| 35 | 1 | }; | |||||||||||||||||||||||||||
| 36 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 37 | 0 | ▶ | sub deserialize_Type { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_Type: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 38 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 39 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 40 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 41 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 42 | 0 | $_[1] = unpack("l>", substr( $_[3], $_[2] ) ); | |||||||||||||||||||||||||||
| 43 | 0 | ▶ | die "Out of range enum value supplied: $_[1]" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 44 | unless vec(state $m = pack('H*', '7f'), | ||||||||||||||||||||||||||||
| 45 | $_[1], 1); | ||||||||||||||||||||||||||||
| 46 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||
| 48 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 49 | 0 | ▶ | sub serialize_Type { | ||||||||||||||||||||||||||
|
Subroutine
serialize_Type: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 50 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 51 | 0 | ▶ | croak "Missing required input 'enum' value" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 52 | unless defined $_[1]; | ||||||||||||||||||||||||||||
| 53 | 0 | ▶ | die "Out of range enum value: $_[1]" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 54 | unless vec(state $m = pack('H*', '7f'), | ||||||||||||||||||||||||||||
| 55 | $_[1], 1); | ||||||||||||||||||||||||||||
| 56 | 0 | substr( $_[3], $_[2] ) = pack("l>", $_[1]); | |||||||||||||||||||||||||||
| 57 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||
| 59 | # Define elements from enum 'Status' | ||||||||||||||||||||||||||||
| 60 | 1 | ▶ | use constant { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 61 | 1 | OK => 0, | |||||||||||||||||||||||||||
| 62 | ERROR => 1, | ||||||||||||||||||||||||||||
| 63 | CONTINUE => 2, | ||||||||||||||||||||||||||||
| 64 | 1 | }; | |||||||||||||||||||||||||||
| 65 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 66 | 0 | ▶ | sub deserialize_Status { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_Status: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 67 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 68 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 69 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 70 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 71 | 0 | $_[1] = unpack("l>", substr( $_[3], $_[2] ) ); | |||||||||||||||||||||||||||
| 72 | 0 | ▶ | die "Out of range enum value supplied: $_[1]" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 73 | unless vec(state $m = pack('H*', '07'), | ||||||||||||||||||||||||||||
| 74 | $_[1], 1); | ||||||||||||||||||||||||||||
| 75 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||
| 77 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 78 | 0 | ▶ | sub serialize_Status { | ||||||||||||||||||||||||||
|
Subroutine
serialize_Status: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 79 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 80 | 0 | ▶ | croak "Missing required input 'enum' value" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 81 | unless defined $_[1]; | ||||||||||||||||||||||||||||
| 82 | 0 | ▶ | die "Out of range enum value: $_[1]" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 83 | unless vec(state $m = pack('H*', '07'), | ||||||||||||||||||||||||||||
| 84 | $_[1], 1); | ||||||||||||||||||||||||||||
| 85 | 0 | substr( $_[3], $_[2] ) = pack("l>", $_[1]); | |||||||||||||||||||||||||||
| 86 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||
| 88 | 1 | ▶ | use constant HEADER_XDR_LEN => 4; # 4 | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 89 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 90 | 0 | ▶ | sub deserialize_Header { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_Header: not called CC=13 SCAR=52.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 91 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 92 | 0 | $_[1] = {}; | |||||||||||||||||||||||||||
| 93 | # Deserializing field: 'prog' | ||||||||||||||||||||||||||||
| 94 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 95 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 96 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 97 | 0 | $_[1]->{prog} = unpack("L>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 98 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 99 | die "Out of bounds 'unsigned int': $_[1]->{prog}" | ||||||||||||||||||||||||||||
| 100 | 0 | ▶ | unless (0 <= $_[1]->{prog} and $_[1]->{prog} <= 4294967295); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $_[1]{"prog"} and $_[1]{"prog"} <= 4294967295
MC/DC0%0/2
0 <= $_[1]{"prog"} and $_[1]{"prog"} <= 4294967295
0 <= $_[1]{"prog"}
$_[1]{"prog"} <= 4294967295
Truth table0%0/3
A and B
A= 0 <= $_[1]{"prog"}B= $_[1]{"prog"} <= 4294967295
| |||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | # Deserializing field: 'vers' | ||||||||||||||||||||||||||||
| 103 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 104 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 105 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 106 | 0 | $_[1]->{vers} = unpack("L>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 107 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 108 | die "Out of bounds 'unsigned int': $_[1]->{vers}" | ||||||||||||||||||||||||||||
| 109 | 0 | ▶ | unless (0 <= $_[1]->{vers} and $_[1]->{vers} <= 4294967295); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $_[1]{"vers"} and $_[1]{"vers"} <= 4294967295
MC/DC0%0/2
0 <= $_[1]{"vers"} and $_[1]{"vers"} <= 4294967295
0 <= $_[1]{"vers"}
$_[1]{"vers"} <= 4294967295
Truth table0%0/3
A and B
A= 0 <= $_[1]{"vers"}B= $_[1]{"vers"} <= 4294967295
| |||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||
| 111 | # Deserializing field: 'proc' | ||||||||||||||||||||||||||||
| 112 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 113 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 114 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 115 | 0 | $_[1]->{proc} = unpack("l>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 116 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 117 | die "Out of bounds 'int': $_[1]->{proc}" | ||||||||||||||||||||||||||||
| 118 | 0 | ▶ | unless (-2147483648 <= $_[1]->{proc} and $_[1]->{proc} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"proc"} and $_[1]{"proc"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"proc"} and $_[1]{"proc"} < 2147483648
'-2147483648' <= $_[1]{"proc"}
$_[1]{"proc"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"proc"}B= $_[1]{"proc"} < 2147483648
| |||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||
| 120 | # Deserializing field: 'type' | ||||||||||||||||||||||||||||
| 121 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 122 | 0 | $_[0]->deserialize_Type( $_[1]->{type}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||
| 124 | # Deserializing field: 'serial' | ||||||||||||||||||||||||||||
| 125 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 126 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 127 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 128 | 0 | $_[1]->{serial} = unpack("L>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 129 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 130 | die "Out of bounds 'unsigned int': $_[1]->{serial}" | ||||||||||||||||||||||||||||
| 131 | 0 | ▶ | unless (0 <= $_[1]->{serial} and $_[1]->{serial} <= 4294967295); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $_[1]{"serial"} and $_[1]{"serial"} <= 4294967295
MC/DC0%0/2
0 <= $_[1]{"serial"} and $_[1]{"serial"} <= 4294967295
0 <= $_[1]{"serial"}
$_[1]{"serial"} <= 4294967295
Truth table0%0/3
A and B
A= 0 <= $_[1]{"serial"}B= $_[1]{"serial"} <= 4294967295
| |||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||
| 133 | # Deserializing field: 'status' | ||||||||||||||||||||||||||||
| 134 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 135 | 0 | $_[0]->deserialize_Status( $_[1]->{status}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 136 | } | ||||||||||||||||||||||||||||
| 137 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 138 | 0 | ▶ | sub serialize_Header { | ||||||||||||||||||||||||||
|
Subroutine
serialize_Header: not called CC=24 SCAR=64.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 139 | 0 | ▶ | croak "Missing required input 'struct' value" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 140 | unless defined $_[1]; | ||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||
| 142 | # Serializing field: 'prog' | ||||||||||||||||||||||||||||
| 143 | croak "Missing required input value 'prog'" | ||||||||||||||||||||||||||||
| 144 | 0 | ▶ | unless exists $_[1]->{prog}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 145 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 146 | croak "Missing required input 'unsigned int' value" | ||||||||||||||||||||||||||||
| 147 | 0 | ▶ | unless defined $_[1]->{prog}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 148 | die "Out of bounds 'unsigned int': $_[1]->{prog}" | ||||||||||||||||||||||||||||
| 149 | 0 | ▶ | unless (0 <= $_[1]->{prog} and $_[1]->{prog} <= 4294967295); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $_[1]{"prog"} and $_[1]{"prog"} <= 4294967295
MC/DC0%0/2
0 <= $_[1]{"prog"} and $_[1]{"prog"} <= 4294967295
0 <= $_[1]{"prog"}
$_[1]{"prog"} <= 4294967295
Truth table0%0/3
A and B
A= 0 <= $_[1]{"prog"}B= $_[1]{"prog"} <= 4294967295
| |||||||||||||||||||||||||||||
| 150 | die "Non-integer 'int' value given: $_[1]->{prog}" | ||||||||||||||||||||||||||||
| 151 | 0 | ▶ | unless int($_[1]->{prog}) == $_[1]->{prog}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 152 | 0 | substr( $_[3], $_[2] ) = pack("L>", $_[1]->{prog}); | |||||||||||||||||||||||||||
| 153 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||
| 155 | # Serializing field: 'vers' | ||||||||||||||||||||||||||||
| 156 | croak "Missing required input value 'vers'" | ||||||||||||||||||||||||||||
| 157 | 0 | ▶ | unless exists $_[1]->{vers}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 158 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 159 | croak "Missing required input 'unsigned int' value" | ||||||||||||||||||||||||||||
| 160 | 0 | ▶ | unless defined $_[1]->{vers}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 161 | die "Out of bounds 'unsigned int': $_[1]->{vers}" | ||||||||||||||||||||||||||||
| 162 | 0 | ▶ | unless (0 <= $_[1]->{vers} and $_[1]->{vers} <= 4294967295); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $_[1]{"vers"} and $_[1]{"vers"} <= 4294967295
MC/DC0%0/2
0 <= $_[1]{"vers"} and $_[1]{"vers"} <= 4294967295
0 <= $_[1]{"vers"}
$_[1]{"vers"} <= 4294967295
Truth table0%0/3
A and B
A= 0 <= $_[1]{"vers"}B= $_[1]{"vers"} <= 4294967295
| |||||||||||||||||||||||||||||
| 163 | die "Non-integer 'int' value given: $_[1]->{vers}" | ||||||||||||||||||||||||||||
| 164 | 0 | ▶ | unless int($_[1]->{vers}) == $_[1]->{vers}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 165 | 0 | substr( $_[3], $_[2] ) = pack("L>", $_[1]->{vers}); | |||||||||||||||||||||||||||
| 166 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||
| 168 | # Serializing field: 'proc' | ||||||||||||||||||||||||||||
| 169 | croak "Missing required input value 'proc'" | ||||||||||||||||||||||||||||
| 170 | 0 | ▶ | unless exists $_[1]->{proc}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 171 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 172 | croak "Missing required input 'int' value" | ||||||||||||||||||||||||||||
| 173 | 0 | ▶ | unless defined $_[1]->{proc}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 174 | die "Out of bounds 'int': $_[1]->{proc}" | ||||||||||||||||||||||||||||
| 175 | 0 | ▶ | unless (-2147483648 <= $_[1]->{proc} and $_[1]->{proc} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"proc"} and $_[1]{"proc"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"proc"} and $_[1]{"proc"} < 2147483648
'-2147483648' <= $_[1]{"proc"}
$_[1]{"proc"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"proc"}B= $_[1]{"proc"} < 2147483648
| |||||||||||||||||||||||||||||
| 176 | die "Non-integer 'int' value given: $_[1]->{proc}" | ||||||||||||||||||||||||||||
| 177 | 0 | ▶ | unless int($_[1]->{proc}) == $_[1]->{proc}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 178 | 0 | substr( $_[3], $_[2] ) = pack("l>", $_[1]->{proc}); | |||||||||||||||||||||||||||
| 179 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||
| 181 | # Serializing field: 'type' | ||||||||||||||||||||||||||||
| 182 | croak "Missing required input value 'type'" | ||||||||||||||||||||||||||||
| 183 | 0 | ▶ | unless exists $_[1]->{type}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 184 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 185 | 0 | $_[0]->serialize_Type( $_[1]->{type}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||
| 187 | # Serializing field: 'serial' | ||||||||||||||||||||||||||||
| 188 | croak "Missing required input value 'serial'" | ||||||||||||||||||||||||||||
| 189 | 0 | ▶ | unless exists $_[1]->{serial}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 190 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 191 | croak "Missing required input 'unsigned int' value" | ||||||||||||||||||||||||||||
| 192 | 0 | ▶ | unless defined $_[1]->{serial}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 193 | die "Out of bounds 'unsigned int': $_[1]->{serial}" | ||||||||||||||||||||||||||||
| 194 | 0 | ▶ | unless (0 <= $_[1]->{serial} and $_[1]->{serial} <= 4294967295); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $_[1]{"serial"} and $_[1]{"serial"} <= 4294967295
MC/DC0%0/2
0 <= $_[1]{"serial"} and $_[1]{"serial"} <= 4294967295
0 <= $_[1]{"serial"}
$_[1]{"serial"} <= 4294967295
Truth table0%0/3
A and B
A= 0 <= $_[1]{"serial"}B= $_[1]{"serial"} <= 4294967295
| |||||||||||||||||||||||||||||
| 195 | die "Non-integer 'int' value given: $_[1]->{serial}" | ||||||||||||||||||||||||||||
| 196 | 0 | ▶ | unless int($_[1]->{serial}) == $_[1]->{serial}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 197 | 0 | substr( $_[3], $_[2] ) = pack("L>", $_[1]->{serial}); | |||||||||||||||||||||||||||
| 198 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||
| 200 | # Serializing field: 'status' | ||||||||||||||||||||||||||||
| 201 | croak "Missing required input value 'status'" | ||||||||||||||||||||||||||||
| 202 | 0 | ▶ | unless exists $_[1]->{status}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 203 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 204 | 0 | $_[0]->serialize_Status( $_[1]->{status}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 205 | } | ||||||||||||||||||||||||||||
| 206 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 207 | 0 | ▶ | sub deserialize_UUID { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_UUID: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 208 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 209 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 210 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 211 | if ($input_length - $_[2]) < 16; | ||||||||||||||||||||||||||||
| 212 | 0 | $_[1] = substr( $_[3], $_[2], 16 ); | |||||||||||||||||||||||||||
| 213 | 0 | $_[2] += 16; | |||||||||||||||||||||||||||
| 214 | } | ||||||||||||||||||||||||||||
| 215 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 216 | 0 | ▶ | sub serialize_UUID { | ||||||||||||||||||||||||||
|
Subroutine
serialize_UUID: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 217 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 218 | 0 | ▶ | croak "Missing required input 'opaque data' value" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 219 | unless defined $_[1]; | ||||||||||||||||||||||||||||
| 220 | 0 | do { | |||||||||||||||||||||||||||
| 221 | 0 | my $len = length $_[1]; | |||||||||||||||||||||||||||
| 222 | 0 | ▶ | die "Opaque data length mismatch (defined: 16): $len" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 223 | if not $len == 16; | ||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||
| 225 | 0 | substr( $_[3], $_[2] ) = $_[1]; | |||||||||||||||||||||||||||
| 226 | 0 | $_[2] += $len; | |||||||||||||||||||||||||||
| 227 | }; | ||||||||||||||||||||||||||||
| 228 | } | ||||||||||||||||||||||||||||
| 229 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 230 | 0 | ▶ | sub deserialize_NonnullString { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_NonnullString: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 231 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 232 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 233 | 0 | do { | |||||||||||||||||||||||||||
| 234 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 235 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 236 | 0 | my $len = unpack("L>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 237 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 238 | 0 | ▶ | die "String too long (max: 4194304): $len" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 239 | unless ($len <= 4194304); | ||||||||||||||||||||||||||||
| 240 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 241 | if ($input_length - $_[2]) < $len; | ||||||||||||||||||||||||||||
| 242 | 0 | $_[1] = substr( $_[3], $_[2], $len ); | |||||||||||||||||||||||||||
| 243 | 0 | $_[2] += $len + ((4 - ($len % 4)) % 4); # skip padding too | |||||||||||||||||||||||||||
| 244 | }; | ||||||||||||||||||||||||||||
| 245 | } | ||||||||||||||||||||||||||||
| 246 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 247 | 0 | ▶ | sub serialize_NonnullString { | ||||||||||||||||||||||||||
|
Subroutine
serialize_NonnullString: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 248 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 249 | 0 | do { | |||||||||||||||||||||||||||
| 250 | 0 | my $len = length $_[1]; | |||||||||||||||||||||||||||
| 251 | 0 | ▶ | croak "Missing required input 'string' value" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 252 | unless defined $_[1]; | ||||||||||||||||||||||||||||
| 253 | 0 | ▶ | die "String too long (max: 4194304): $len" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 254 | unless ($len <= 4194304); | ||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||
| 256 | 0 | substr( $_[3], $_[2] ) = pack("L>", $len); | |||||||||||||||||||||||||||
| 257 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 258 | 0 | substr( $_[3], $_[2] ) = $_[1]; | |||||||||||||||||||||||||||
| 259 | 0 | $_[2] += $len; | |||||||||||||||||||||||||||
| 260 | 0 | ▶ | if (my $pad = ((4 - ($len % 4)) % 4)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 261 | 0 | substr( $_[3], $_[2] ) = ("\0" x $pad); | |||||||||||||||||||||||||||
| 262 | 0 | $_[2] += $pad; | |||||||||||||||||||||||||||
| 263 | } | ||||||||||||||||||||||||||||
| 264 | }; | ||||||||||||||||||||||||||||
| 265 | } | ||||||||||||||||||||||||||||
| 266 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 267 | 0 | ▶ | sub deserialize_String { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_String: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 268 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 269 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 270 | 0 | do { | |||||||||||||||||||||||||||
| 271 | 0 | my $b; | |||||||||||||||||||||||||||
| 272 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 273 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 274 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 275 | 0 | $b = unpack("L>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 276 | 0 | ▶ | die "Incorrect bool value $b (must be 0 or 1)" | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$b == 0 or $b == 1
MC/DC0%0/2
$b == 0 or $b == 1
$b == 0
$b == 1
Truth table0%0/3
A or B
A= $b == 0B= $b == 1
| |||||||||||||||||||||||||||||
| 277 | unless $b == 0 or $b == 1; | ||||||||||||||||||||||||||||
| 278 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 279 | 0 | ▶ | if ($b) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 280 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 281 | 0 | $_[0]->deserialize_NonnullString( $_[1], $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 282 | } | ||||||||||||||||||||||||||||
| 283 | else { | ||||||||||||||||||||||||||||
| 284 | 0 | $_[1] = undef; | |||||||||||||||||||||||||||
| 285 | } | ||||||||||||||||||||||||||||
| 286 | }; | ||||||||||||||||||||||||||||
| 287 | } | ||||||||||||||||||||||||||||
| 288 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 289 | 0 | ▶ | sub serialize_String { | ||||||||||||||||||||||||||
|
Subroutine
serialize_String: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 290 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 291 | 0 | ▶ | if (defined $_[1]) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 292 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 293 | # Allow <undef> to model a <false> value | ||||||||||||||||||||||||||||
| 294 | 0 | substr( $_[3], $_[2] ) = pack("L>", 1); | |||||||||||||||||||||||||||
| 295 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 296 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 297 | 0 | $_[0]->serialize_NonnullString( $_[1], $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 298 | } | ||||||||||||||||||||||||||||
| 299 | else { | ||||||||||||||||||||||||||||
| 300 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 301 | # Allow <undef> to model a <false> value | ||||||||||||||||||||||||||||
| 302 | 0 | substr( $_[3], $_[2] ) = pack("L>", 0); | |||||||||||||||||||||||||||
| 303 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 304 | } | ||||||||||||||||||||||||||||
| 305 | } | ||||||||||||||||||||||||||||
| 306 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 307 | 0 | ▶ | sub deserialize_NonnullDomain { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_NonnullDomain: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 308 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 309 | 0 | $_[1] = {}; | |||||||||||||||||||||||||||
| 310 | # Deserializing field: 'name' | ||||||||||||||||||||||||||||
| 311 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 312 | 0 | $_[0]->deserialize_NonnullString( $_[1]->{name}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||
| 314 | # Deserializing field: 'uuid' | ||||||||||||||||||||||||||||
| 315 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 316 | 0 | $_[0]->deserialize_UUID( $_[1]->{uuid}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||
| 318 | # Deserializing field: 'id' | ||||||||||||||||||||||||||||
| 319 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 320 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 321 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 322 | 0 | $_[1]->{id} = unpack("l>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 323 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 324 | die "Out of bounds 'int': $_[1]->{id}" | ||||||||||||||||||||||||||||
| 325 | 0 | ▶ | unless (-2147483648 <= $_[1]->{id} and $_[1]->{id} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"id"} and $_[1]{"id"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"id"} and $_[1]{"id"} < 2147483648
'-2147483648' <= $_[1]{"id"}
$_[1]{"id"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"id"}B= $_[1]{"id"} < 2147483648
| |||||||||||||||||||||||||||||
| 326 | } | ||||||||||||||||||||||||||||
| 327 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 328 | 0 | ▶ | sub serialize_NonnullDomain { | ||||||||||||||||||||||||||
|
Subroutine
serialize_NonnullDomain: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 329 | 0 | ▶ | croak "Missing required input 'struct' value" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 330 | unless defined $_[1]; | ||||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||
| 332 | # Serializing field: 'name' | ||||||||||||||||||||||||||||
| 333 | croak "Missing required input value 'name'" | ||||||||||||||||||||||||||||
| 334 | 0 | ▶ | unless exists $_[1]->{name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 335 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 336 | 0 | $_[0]->serialize_NonnullString( $_[1]->{name}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||
| 338 | # Serializing field: 'uuid' | ||||||||||||||||||||||||||||
| 339 | croak "Missing required input value 'uuid'" | ||||||||||||||||||||||||||||
| 340 | 0 | ▶ | unless exists $_[1]->{uuid}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 341 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 342 | 0 | $_[0]->serialize_UUID( $_[1]->{uuid}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 343 | |||||||||||||||||||||||||||||
| 344 | # Serializing field: 'id' | ||||||||||||||||||||||||||||
| 345 | croak "Missing required input value 'id'" | ||||||||||||||||||||||||||||
| 346 | 0 | ▶ | unless exists $_[1]->{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 347 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 348 | croak "Missing required input 'int' value" | ||||||||||||||||||||||||||||
| 349 | 0 | ▶ | unless defined $_[1]->{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 350 | die "Out of bounds 'int': $_[1]->{id}" | ||||||||||||||||||||||||||||
| 351 | 0 | ▶ | unless (-2147483648 <= $_[1]->{id} and $_[1]->{id} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"id"} and $_[1]{"id"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"id"} and $_[1]{"id"} < 2147483648
'-2147483648' <= $_[1]{"id"}
$_[1]{"id"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"id"}B= $_[1]{"id"} < 2147483648
| |||||||||||||||||||||||||||||
| 352 | die "Non-integer 'int' value given: $_[1]->{id}" | ||||||||||||||||||||||||||||
| 353 | 0 | ▶ | unless int($_[1]->{id}) == $_[1]->{id}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 354 | 0 | substr( $_[3], $_[2] ) = pack("l>", $_[1]->{id}); | |||||||||||||||||||||||||||
| 355 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 356 | } | ||||||||||||||||||||||||||||
| 357 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 358 | 0 | ▶ | sub deserialize_NonnullNetwork { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_NonnullNetwork: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 359 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 360 | 0 | $_[1] = {}; | |||||||||||||||||||||||||||
| 361 | # Deserializing field: 'name' | ||||||||||||||||||||||||||||
| 362 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 363 | 0 | $_[0]->deserialize_NonnullString( $_[1]->{name}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||
| 365 | # Deserializing field: 'uuid' | ||||||||||||||||||||||||||||
| 366 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 367 | 0 | $_[0]->deserialize_UUID( $_[1]->{uuid}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 368 | } | ||||||||||||||||||||||||||||
| 369 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 370 | 0 | ▶ | sub serialize_NonnullNetwork { | ||||||||||||||||||||||||||
|
Subroutine
serialize_NonnullNetwork: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 371 | 0 | ▶ | croak "Missing required input 'struct' value" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 372 | unless defined $_[1]; | ||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||
| 374 | # Serializing field: 'name' | ||||||||||||||||||||||||||||
| 375 | croak "Missing required input value 'name'" | ||||||||||||||||||||||||||||
| 376 | 0 | ▶ | unless exists $_[1]->{name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 377 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 378 | 0 | $_[0]->serialize_NonnullString( $_[1]->{name}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||
| 380 | # Serializing field: 'uuid' | ||||||||||||||||||||||||||||
| 381 | croak "Missing required input value 'uuid'" | ||||||||||||||||||||||||||||
| 382 | 0 | ▶ | unless exists $_[1]->{uuid}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 383 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 384 | 0 | $_[0]->serialize_UUID( $_[1]->{uuid}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 385 | } | ||||||||||||||||||||||||||||
| 386 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 387 | 0 | ▶ | sub deserialize_Domain { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_Domain: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 388 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 389 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 390 | 0 | do { | |||||||||||||||||||||||||||
| 391 | 0 | my $b; | |||||||||||||||||||||||||||
| 392 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 393 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 394 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 395 | 0 | $b = unpack("L>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 396 | 0 | ▶ | die "Incorrect bool value $b (must be 0 or 1)" | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$b == 0 or $b == 1
MC/DC0%0/2
$b == 0 or $b == 1
$b == 0
$b == 1
Truth table0%0/3
A or B
A= $b == 0B= $b == 1
| |||||||||||||||||||||||||||||
| 397 | unless $b == 0 or $b == 1; | ||||||||||||||||||||||||||||
| 398 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 399 | 0 | ▶ | if ($b) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 400 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 401 | 0 | $_[0]->deserialize_NonnullDomain( $_[1], $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 402 | } | ||||||||||||||||||||||||||||
| 403 | else { | ||||||||||||||||||||||||||||
| 404 | 0 | $_[1] = undef; | |||||||||||||||||||||||||||
| 405 | } | ||||||||||||||||||||||||||||
| 406 | }; | ||||||||||||||||||||||||||||
| 407 | } | ||||||||||||||||||||||||||||
| 408 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 409 | 0 | ▶ | sub serialize_Domain { | ||||||||||||||||||||||||||
|
Subroutine
serialize_Domain: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 410 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 411 | 0 | ▶ | if (defined $_[1]) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 412 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 413 | # Allow <undef> to model a <false> value | ||||||||||||||||||||||||||||
| 414 | 0 | substr( $_[3], $_[2] ) = pack("L>", 1); | |||||||||||||||||||||||||||
| 415 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 416 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 417 | 0 | $_[0]->serialize_NonnullDomain( $_[1], $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 418 | } | ||||||||||||||||||||||||||||
| 419 | else { | ||||||||||||||||||||||||||||
| 420 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 421 | # Allow <undef> to model a <false> value | ||||||||||||||||||||||||||||
| 422 | 0 | substr( $_[3], $_[2] ) = pack("L>", 0); | |||||||||||||||||||||||||||
| 423 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 424 | } | ||||||||||||||||||||||||||||
| 425 | } | ||||||||||||||||||||||||||||
| 426 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 427 | 0 | ▶ | sub deserialize_Network { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_Network: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 428 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 429 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 430 | 0 | do { | |||||||||||||||||||||||||||
| 431 | 0 | my $b; | |||||||||||||||||||||||||||
| 432 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 433 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 434 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 435 | 0 | $b = unpack("L>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 436 | 0 | ▶ | die "Incorrect bool value $b (must be 0 or 1)" | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$b == 0 or $b == 1
MC/DC0%0/2
$b == 0 or $b == 1
$b == 0
$b == 1
Truth table0%0/3
A or B
A= $b == 0B= $b == 1
| |||||||||||||||||||||||||||||
| 437 | unless $b == 0 or $b == 1; | ||||||||||||||||||||||||||||
| 438 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 439 | 0 | ▶ | if ($b) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 440 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 441 | 0 | $_[0]->deserialize_NonnullNetwork( $_[1], $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 442 | } | ||||||||||||||||||||||||||||
| 443 | else { | ||||||||||||||||||||||||||||
| 444 | 0 | $_[1] = undef; | |||||||||||||||||||||||||||
| 445 | } | ||||||||||||||||||||||||||||
| 446 | }; | ||||||||||||||||||||||||||||
| 447 | } | ||||||||||||||||||||||||||||
| 448 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 449 | 0 | ▶ | sub serialize_Network { | ||||||||||||||||||||||||||
|
Subroutine
serialize_Network: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 450 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 451 | 0 | ▶ | if (defined $_[1]) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 452 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 453 | # Allow <undef> to model a <false> value | ||||||||||||||||||||||||||||
| 454 | 0 | substr( $_[3], $_[2] ) = pack("L>", 1); | |||||||||||||||||||||||||||
| 455 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 456 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 457 | 0 | $_[0]->serialize_NonnullNetwork( $_[1], $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 458 | } | ||||||||||||||||||||||||||||
| 459 | else { | ||||||||||||||||||||||||||||
| 460 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 461 | # Allow <undef> to model a <false> value | ||||||||||||||||||||||||||||
| 462 | 0 | substr( $_[3], $_[2] ) = pack("L>", 0); | |||||||||||||||||||||||||||
| 463 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 464 | } | ||||||||||||||||||||||||||||
| 465 | } | ||||||||||||||||||||||||||||
| 466 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 467 | 0 | ▶ | sub deserialize_Error { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_Error: not called CC=16 SCAR=56.1
Pod
undocumented
| |||||||||||||||||||||||||||||
| 468 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 469 | 0 | $_[1] = {}; | |||||||||||||||||||||||||||
| 470 | # Deserializing field: 'code' | ||||||||||||||||||||||||||||
| 471 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 472 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 473 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 474 | 0 | $_[1]->{code} = unpack("l>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 475 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 476 | die "Out of bounds 'int': $_[1]->{code}" | ||||||||||||||||||||||||||||
| 477 | 0 | ▶ | unless (-2147483648 <= $_[1]->{code} and $_[1]->{code} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"code"} and $_[1]{"code"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"code"} and $_[1]{"code"} < 2147483648
'-2147483648' <= $_[1]{"code"}
$_[1]{"code"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"code"}B= $_[1]{"code"} < 2147483648
| |||||||||||||||||||||||||||||
| 478 | |||||||||||||||||||||||||||||
| 479 | # Deserializing field: 'domain' | ||||||||||||||||||||||||||||
| 480 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 481 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 482 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 483 | 0 | $_[1]->{domain} = unpack("l>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 484 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 485 | die "Out of bounds 'int': $_[1]->{domain}" | ||||||||||||||||||||||||||||
| 486 | 0 | ▶ | unless (-2147483648 <= $_[1]->{domain} and $_[1]->{domain} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"domain"} and $_[1]{"domain"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"domain"} and $_[1]{"domain"} < 2147483648
'-2147483648' <= $_[1]{"domain"}
$_[1]{"domain"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"domain"}B= $_[1]{"domain"} < 2147483648
| |||||||||||||||||||||||||||||
| 487 | |||||||||||||||||||||||||||||
| 488 | # Deserializing field: 'message' | ||||||||||||||||||||||||||||
| 489 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 490 | 0 | $_[0]->deserialize_String( $_[1]->{message}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 491 | |||||||||||||||||||||||||||||
| 492 | # Deserializing field: 'level' | ||||||||||||||||||||||||||||
| 493 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 494 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 495 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 496 | 0 | $_[1]->{level} = unpack("l>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 497 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 498 | die "Out of bounds 'int': $_[1]->{level}" | ||||||||||||||||||||||||||||
| 499 | 0 | ▶ | unless (-2147483648 <= $_[1]->{level} and $_[1]->{level} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"level"} and $_[1]{"level"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"level"} and $_[1]{"level"} < 2147483648
'-2147483648' <= $_[1]{"level"}
$_[1]{"level"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"level"}B= $_[1]{"level"} < 2147483648
| |||||||||||||||||||||||||||||
| 500 | |||||||||||||||||||||||||||||
| 501 | # Deserializing field: 'dom' | ||||||||||||||||||||||||||||
| 502 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 503 | 0 | $_[0]->deserialize_Domain( $_[1]->{dom}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 504 | |||||||||||||||||||||||||||||
| 505 | # Deserializing field: 'str1' | ||||||||||||||||||||||||||||
| 506 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 507 | 0 | $_[0]->deserialize_String( $_[1]->{str1}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 508 | |||||||||||||||||||||||||||||
| 509 | # Deserializing field: 'str2' | ||||||||||||||||||||||||||||
| 510 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 511 | 0 | $_[0]->deserialize_String( $_[1]->{str2}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 512 | |||||||||||||||||||||||||||||
| 513 | # Deserializing field: 'str3' | ||||||||||||||||||||||||||||
| 514 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 515 | 0 | $_[0]->deserialize_String( $_[1]->{str3}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 516 | |||||||||||||||||||||||||||||
| 517 | # Deserializing field: 'int1' | ||||||||||||||||||||||||||||
| 518 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 519 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 520 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 521 | 0 | $_[1]->{int1} = unpack("l>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 522 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 523 | die "Out of bounds 'int': $_[1]->{int1}" | ||||||||||||||||||||||||||||
| 524 | 0 | ▶ | unless (-2147483648 <= $_[1]->{int1} and $_[1]->{int1} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"int1"} and $_[1]{"int1"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"int1"} and $_[1]{"int1"} < 2147483648
'-2147483648' <= $_[1]{"int1"}
$_[1]{"int1"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"int1"}B= $_[1]{"int1"} < 2147483648
| |||||||||||||||||||||||||||||
| 525 | |||||||||||||||||||||||||||||
| 526 | # Deserializing field: 'int2' | ||||||||||||||||||||||||||||
| 527 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 528 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 529 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 530 | 0 | $_[1]->{int2} = unpack("l>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 531 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 532 | die "Out of bounds 'int': $_[1]->{int2}" | ||||||||||||||||||||||||||||
| 533 | 0 | ▶ | unless (-2147483648 <= $_[1]->{int2} and $_[1]->{int2} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"int2"} and $_[1]{"int2"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"int2"} and $_[1]{"int2"} < 2147483648
'-2147483648' <= $_[1]{"int2"}
$_[1]{"int2"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"int2"}B= $_[1]{"int2"} < 2147483648
| |||||||||||||||||||||||||||||
| 534 | |||||||||||||||||||||||||||||
| 535 | # Deserializing field: 'net' | ||||||||||||||||||||||||||||
| 536 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 537 | 0 | $_[0]->deserialize_Network( $_[1]->{net}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 538 | } | ||||||||||||||||||||||||||||
| 539 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 540 | 0 | ▶ | sub serialize_Error { | ||||||||||||||||||||||||||
|
Subroutine
serialize_Error: not called CC=33 SCAR=70.2
Pod
undocumented
| |||||||||||||||||||||||||||||
| 541 | 0 | ▶ | croak "Missing required input 'struct' value" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 542 | unless defined $_[1]; | ||||||||||||||||||||||||||||
| 543 | |||||||||||||||||||||||||||||
| 544 | # Serializing field: 'code' | ||||||||||||||||||||||||||||
| 545 | croak "Missing required input value 'code'" | ||||||||||||||||||||||||||||
| 546 | 0 | ▶ | unless exists $_[1]->{code}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 547 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 548 | croak "Missing required input 'int' value" | ||||||||||||||||||||||||||||
| 549 | 0 | ▶ | unless defined $_[1]->{code}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 550 | die "Out of bounds 'int': $_[1]->{code}" | ||||||||||||||||||||||||||||
| 551 | 0 | ▶ | unless (-2147483648 <= $_[1]->{code} and $_[1]->{code} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"code"} and $_[1]{"code"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"code"} and $_[1]{"code"} < 2147483648
'-2147483648' <= $_[1]{"code"}
$_[1]{"code"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"code"}B= $_[1]{"code"} < 2147483648
| |||||||||||||||||||||||||||||
| 552 | die "Non-integer 'int' value given: $_[1]->{code}" | ||||||||||||||||||||||||||||
| 553 | 0 | ▶ | unless int($_[1]->{code}) == $_[1]->{code}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 554 | 0 | substr( $_[3], $_[2] ) = pack("l>", $_[1]->{code}); | |||||||||||||||||||||||||||
| 555 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 556 | |||||||||||||||||||||||||||||
| 557 | # Serializing field: 'domain' | ||||||||||||||||||||||||||||
| 558 | croak "Missing required input value 'domain'" | ||||||||||||||||||||||||||||
| 559 | 0 | ▶ | unless exists $_[1]->{domain}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 560 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 561 | croak "Missing required input 'int' value" | ||||||||||||||||||||||||||||
| 562 | 0 | ▶ | unless defined $_[1]->{domain}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 563 | die "Out of bounds 'int': $_[1]->{domain}" | ||||||||||||||||||||||||||||
| 564 | 0 | ▶ | unless (-2147483648 <= $_[1]->{domain} and $_[1]->{domain} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"domain"} and $_[1]{"domain"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"domain"} and $_[1]{"domain"} < 2147483648
'-2147483648' <= $_[1]{"domain"}
$_[1]{"domain"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"domain"}B= $_[1]{"domain"} < 2147483648
| |||||||||||||||||||||||||||||
| 565 | die "Non-integer 'int' value given: $_[1]->{domain}" | ||||||||||||||||||||||||||||
| 566 | 0 | ▶ | unless int($_[1]->{domain}) == $_[1]->{domain}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 567 | 0 | substr( $_[3], $_[2] ) = pack("l>", $_[1]->{domain}); | |||||||||||||||||||||||||||
| 568 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 569 | |||||||||||||||||||||||||||||
| 570 | # Serializing field: 'message' | ||||||||||||||||||||||||||||
| 571 | croak "Missing required input value 'message'" | ||||||||||||||||||||||||||||
| 572 | 0 | ▶ | unless exists $_[1]->{message}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 573 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 574 | 0 | $_[0]->serialize_String( $_[1]->{message}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 575 | |||||||||||||||||||||||||||||
| 576 | # Serializing field: 'level' | ||||||||||||||||||||||||||||
| 577 | croak "Missing required input value 'level'" | ||||||||||||||||||||||||||||
| 578 | 0 | ▶ | unless exists $_[1]->{level}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 579 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 580 | croak "Missing required input 'int' value" | ||||||||||||||||||||||||||||
| 581 | 0 | ▶ | unless defined $_[1]->{level}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 582 | die "Out of bounds 'int': $_[1]->{level}" | ||||||||||||||||||||||||||||
| 583 | 0 | ▶ | unless (-2147483648 <= $_[1]->{level} and $_[1]->{level} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"level"} and $_[1]{"level"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"level"} and $_[1]{"level"} < 2147483648
'-2147483648' <= $_[1]{"level"}
$_[1]{"level"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"level"}B= $_[1]{"level"} < 2147483648
| |||||||||||||||||||||||||||||
| 584 | die "Non-integer 'int' value given: $_[1]->{level}" | ||||||||||||||||||||||||||||
| 585 | 0 | ▶ | unless int($_[1]->{level}) == $_[1]->{level}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 586 | 0 | substr( $_[3], $_[2] ) = pack("l>", $_[1]->{level}); | |||||||||||||||||||||||||||
| 587 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 588 | |||||||||||||||||||||||||||||
| 589 | # Serializing field: 'dom' | ||||||||||||||||||||||||||||
| 590 | croak "Missing required input value 'dom'" | ||||||||||||||||||||||||||||
| 591 | 0 | ▶ | unless exists $_[1]->{dom}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 592 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 593 | 0 | $_[0]->serialize_Domain( $_[1]->{dom}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 594 | |||||||||||||||||||||||||||||
| 595 | # Serializing field: 'str1' | ||||||||||||||||||||||||||||
| 596 | croak "Missing required input value 'str1'" | ||||||||||||||||||||||||||||
| 597 | 0 | ▶ | unless exists $_[1]->{str1}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 598 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 599 | 0 | $_[0]->serialize_String( $_[1]->{str1}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 600 | |||||||||||||||||||||||||||||
| 601 | # Serializing field: 'str2' | ||||||||||||||||||||||||||||
| 602 | croak "Missing required input value 'str2'" | ||||||||||||||||||||||||||||
| 603 | 0 | ▶ | unless exists $_[1]->{str2}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 604 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 605 | 0 | $_[0]->serialize_String( $_[1]->{str2}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 606 | |||||||||||||||||||||||||||||
| 607 | # Serializing field: 'str3' | ||||||||||||||||||||||||||||
| 608 | croak "Missing required input value 'str3'" | ||||||||||||||||||||||||||||
| 609 | 0 | ▶ | unless exists $_[1]->{str3}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 610 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 611 | 0 | $_[0]->serialize_String( $_[1]->{str3}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 612 | |||||||||||||||||||||||||||||
| 613 | # Serializing field: 'int1' | ||||||||||||||||||||||||||||
| 614 | croak "Missing required input value 'int1'" | ||||||||||||||||||||||||||||
| 615 | 0 | ▶ | unless exists $_[1]->{int1}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 616 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 617 | croak "Missing required input 'int' value" | ||||||||||||||||||||||||||||
| 618 | 0 | ▶ | unless defined $_[1]->{int1}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 619 | die "Out of bounds 'int': $_[1]->{int1}" | ||||||||||||||||||||||||||||
| 620 | 0 | ▶ | unless (-2147483648 <= $_[1]->{int1} and $_[1]->{int1} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"int1"} and $_[1]{"int1"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"int1"} and $_[1]{"int1"} < 2147483648
'-2147483648' <= $_[1]{"int1"}
$_[1]{"int1"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"int1"}B= $_[1]{"int1"} < 2147483648
| |||||||||||||||||||||||||||||
| 621 | die "Non-integer 'int' value given: $_[1]->{int1}" | ||||||||||||||||||||||||||||
| 622 | 0 | ▶ | unless int($_[1]->{int1}) == $_[1]->{int1}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 623 | 0 | substr( $_[3], $_[2] ) = pack("l>", $_[1]->{int1}); | |||||||||||||||||||||||||||
| 624 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 625 | |||||||||||||||||||||||||||||
| 626 | # Serializing field: 'int2' | ||||||||||||||||||||||||||||
| 627 | croak "Missing required input value 'int2'" | ||||||||||||||||||||||||||||
| 628 | 0 | ▶ | unless exists $_[1]->{int2}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 629 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 630 | croak "Missing required input 'int' value" | ||||||||||||||||||||||||||||
| 631 | 0 | ▶ | unless defined $_[1]->{int2}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 632 | die "Out of bounds 'int': $_[1]->{int2}" | ||||||||||||||||||||||||||||
| 633 | 0 | ▶ | unless (-2147483648 <= $_[1]->{int2} and $_[1]->{int2} < 2147483648); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-2147483648' <= $_[1]{"int2"} and $_[1]{"int2"} < 2147483648
MC/DC0%0/2
'-2147483648' <= $_[1]{"int2"} and $_[1]{"int2"} < 2147483648
'-2147483648' <= $_[1]{"int2"}
$_[1]{"int2"} < 2147483648
Truth table0%0/3
A and B
A= '-2147483648' <= $_[1]{"int2"}B= $_[1]{"int2"} < 2147483648
| |||||||||||||||||||||||||||||
| 634 | die "Non-integer 'int' value given: $_[1]->{int2}" | ||||||||||||||||||||||||||||
| 635 | 0 | ▶ | unless int($_[1]->{int2}) == $_[1]->{int2}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 636 | 0 | substr( $_[3], $_[2] ) = pack("l>", $_[1]->{int2}); | |||||||||||||||||||||||||||
| 637 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 638 | |||||||||||||||||||||||||||||
| 639 | # Serializing field: 'net' | ||||||||||||||||||||||||||||
| 640 | croak "Missing required input value 'net'" | ||||||||||||||||||||||||||||
| 641 | 0 | ▶ | unless exists $_[1]->{net}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 642 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 643 | 0 | $_[0]->serialize_Network( $_[1]->{net}, $_[2], $_[3] ); | |||||||||||||||||||||||||||
| 644 | } | ||||||||||||||||||||||||||||
| 645 | # @_: ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 646 | 0 | ▶ | sub deserialize_StreamHole { | ||||||||||||||||||||||||||
|
Subroutine
deserialize_StreamHole: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||
| 647 | 0 | my $input_length = length $_[3]; | |||||||||||||||||||||||||||
| 648 | 0 | $_[1] = {}; | |||||||||||||||||||||||||||
| 649 | # Deserializing field: 'length' | ||||||||||||||||||||||||||||
| 650 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 651 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 652 | if ($input_length - $_[2]) < 8; | ||||||||||||||||||||||||||||
| 653 | 0 | $_[1]->{length} = unpack("q>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 654 | 0 | $_[2] += 8; | |||||||||||||||||||||||||||
| 655 | die "Out of bounds 'hyper': $_[1]->{length}" | ||||||||||||||||||||||||||||
| 656 | unless (-9223372036854775808 <= $_[1]->{length} | ||||||||||||||||||||||||||||
| 657 | 0 | ▶ | and $_[1]->{length} < 9223372036854775808); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-9223372036854775808' <= $_[1]{"length"} and $_[1]{"length"} < '9223372036854775808'
MC/DC0%0/2
'-9223372036854775808' <= $_[1]{"length"} and $_[1]{"length"} < '9223372036854775808'
'-9223372036854775808' <= $_[1]{"length"}
$_[1]{"length"} < '9223372036854775808'
Truth table0%0/3
A and B
A= '-9223372036854775808' <= $_[1]{"length"}B= $_[1]{"length"} < '9223372036854775808'
| |||||||||||||||||||||||||||||
| 658 | |||||||||||||||||||||||||||||
| 659 | # Deserializing field: 'flags' | ||||||||||||||||||||||||||||
| 660 | # my ($class, $value, $index, $input) = @_; | ||||||||||||||||||||||||||||
| 661 | 0 | ▶ | die "Input buffer too short" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 662 | if ($input_length - $_[2]) < 4; | ||||||||||||||||||||||||||||
| 663 | 0 | $_[1]->{flags} = unpack("L>", substr( $_[3], $_[2] )); | |||||||||||||||||||||||||||
| 664 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 665 | die "Out of bounds 'unsigned int': $_[1]->{flags}" | ||||||||||||||||||||||||||||
| 666 | 0 | ▶ | unless (0 <= $_[1]->{flags} and $_[1]->{flags} <= 4294967295); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $_[1]{"flags"} and $_[1]{"flags"} <= 4294967295
MC/DC0%0/2
0 <= $_[1]{"flags"} and $_[1]{"flags"} <= 4294967295
0 <= $_[1]{"flags"}
$_[1]{"flags"} <= 4294967295
Truth table0%0/3
A and B
A= 0 <= $_[1]{"flags"}B= $_[1]{"flags"} <= 4294967295
| |||||||||||||||||||||||||||||
| 667 | } | ||||||||||||||||||||||||||||
| 668 | # @_: ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 669 | 0 | ▶ | sub serialize_StreamHole { | ||||||||||||||||||||||||||
|
Subroutine
serialize_StreamHole: not called CC=12 SCAR=50.5
Pod
undocumented
| |||||||||||||||||||||||||||||
| 670 | 0 | ▶ | croak "Missing required input 'struct' value" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 671 | unless defined $_[1]; | ||||||||||||||||||||||||||||
| 672 | |||||||||||||||||||||||||||||
| 673 | # Serializing field: 'length' | ||||||||||||||||||||||||||||
| 674 | croak "Missing required input value 'length'" | ||||||||||||||||||||||||||||
| 675 | 0 | ▶ | unless exists $_[1]->{length}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 676 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 677 | croak "Missing required input 'long' value" | ||||||||||||||||||||||||||||
| 678 | 0 | ▶ | unless defined $_[1]->{length}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 679 | die "Out of bounds 'hyper': $_[1]->{length}" | ||||||||||||||||||||||||||||
| 680 | unless (-9223372036854775808 <= $_[1]->{length} | ||||||||||||||||||||||||||||
| 681 | 0 | ▶ | and $_[1]->{length} < 9223372036854775808); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
'-9223372036854775808' <= $_[1]{"length"} and $_[1]{"length"} < '9223372036854775808'
MC/DC0%0/2
'-9223372036854775808' <= $_[1]{"length"} and $_[1]{"length"} < '9223372036854775808'
'-9223372036854775808' <= $_[1]{"length"}
$_[1]{"length"} < '9223372036854775808'
Truth table0%0/3
A and B
A= '-9223372036854775808' <= $_[1]{"length"}B= $_[1]{"length"} < '9223372036854775808'
| |||||||||||||||||||||||||||||
| 682 | die "Non-integer 'long' value given: $_[1]->{length}" | ||||||||||||||||||||||||||||
| 683 | 0 | ▶ | unless int($_[1]->{length}) == $_[1]->{length}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 684 | 0 | substr( $_[3], $_[2] ) = pack("q>", $_[1]->{length}); | |||||||||||||||||||||||||||
| 685 | 0 | $_[2] += 8; | |||||||||||||||||||||||||||
| 686 | |||||||||||||||||||||||||||||
| 687 | # Serializing field: 'flags' | ||||||||||||||||||||||||||||
| 688 | croak "Missing required input value 'flags'" | ||||||||||||||||||||||||||||
| 689 | 0 | ▶ | unless exists $_[1]->{flags}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 690 | # my ($class, $value, $index, $output) = @_; | ||||||||||||||||||||||||||||
| 691 | croak "Missing required input 'unsigned int' value" | ||||||||||||||||||||||||||||
| 692 | 0 | ▶ | unless defined $_[1]->{flags}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 693 | die "Out of bounds 'unsigned int': $_[1]->{flags}" | ||||||||||||||||||||||||||||
| 694 | 0 | ▶ | unless (0 <= $_[1]->{flags} and $_[1]->{flags} <= 4294967295); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
0 <= $_[1]{"flags"} and $_[1]{"flags"} <= 4294967295
MC/DC0%0/2
0 <= $_[1]{"flags"} and $_[1]{"flags"} <= 4294967295
0 <= $_[1]{"flags"}
$_[1]{"flags"} <= 4294967295
Truth table0%0/3
A and B
A= 0 <= $_[1]{"flags"}B= $_[1]{"flags"} <= 4294967295
| |||||||||||||||||||||||||||||
| 695 | die "Non-integer 'int' value given: $_[1]->{flags}" | ||||||||||||||||||||||||||||
| 696 | 0 | ▶ | unless int($_[1]->{flags}) == $_[1]->{flags}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 697 | 0 | substr( $_[3], $_[2] ) = pack("L>", $_[1]->{flags}); | |||||||||||||||||||||||||||
| 698 | 0 | $_[2] += 4; | |||||||||||||||||||||||||||
| 699 | } | ||||||||||||||||||||||||||||
| 700 | |||||||||||||||||||||||||||||
| 701 | |||||||||||||||||||||||||||||
| 702 | 1 | 1; | |||||||||||||||||||||||||||
| 703 | |||||||||||||||||||||||||||||
| 704 | __END__ | ||||||||||||||||||||||||||||