CIGIPP/ShortArticulatedPartControl.pm

filter: Statementstmt 68.4% 76 / 111 Branchbran 36.8% 14 / 38 Conditioncond 33.3% 15 / 45 MC/DCmcdc 0.0% 0 / 20 Subroutinesub 89.4% 17 / 19 Podpod 100% 15 / 15 totaltotal 55.2% 137 / 248 CC 36 SCAR 23.9
CC
36
Cov
54%
dof_select2
20.2
dof_select1
20.2
new
19.6
CRAP 10.9
« CIGIPP/ComponentControl.pm ↑ Summary CIGIPP/SymbolLineDefinition.pm »
1 #
2 # Rinchi Common Image Generator Interface for Perl
3 # Class Identifier: f78ac504-200e-11de-bda7-001c25551abc
4 # Author: Brian M. Ames
5 #
6  
7 package Rinchi::CIGIPP::ShortArticulatedPartControl;
8  
9 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 2 require Exporter;
15  
16 2 our @ISA = qw(Exporter);
17  
18 # Items to export into callers namespace by default. Note: do not export
19 # names by default without a very good reason. Use EXPORT_OK instead.
20 # Do not simply export all your public functions/methods/constants.
21  
22 # This allows declaration use Rinchi::CIGI::AtmosphereControl ':all';
23 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
24 # will save memory.
25 2 our %EXPORT_TAGS = ( 'all' => [ qw(
26
27 ) ] );
28  
29 2 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
30  
31 2 our @EXPORT = qw(
32
33 );
34  
35 2 our $VERSION = '0.01';
36  
37 # Preloaded methods go here.
38  
39 =head1 NAME
40  
41 Rinchi::CIGIPP::ShortArticulatedPartControl - Perl extension for the Common
42 Image Generator Interface - Short Articulated Part Control data packet.
43 data packet.
44 =head1 SYNOPSIS
45  
46 use Rinchi::CIGIPP::ShortArticulatedPartControl;
47 my $sap_ctl = Rinchi::CIGIPP::ShortArticulatedPartControl->new();
48  
49 $packet_type = $sap_ctl->packet_type();
50 $packet_size = $sap_ctl->packet_size();
51 $entity_ident = $sap_ctl->entity_ident(15419);
52 $articulated_part_ident1 = $sap_ctl->articulated_part_ident1(124);
53 $articulated_part_ident2 = $sap_ctl->articulated_part_ident2(21);
54 $articulated_part_enable2 = $sap_ctl->articulated_part_enable2(Rinchi::CIGIPP->Enable);
55 $articulated_part_enable1 = $sap_ctl->articulated_part_enable1(Rinchi::CIGIPP->Disable);
56 $dof_select2 = $sap_ctl->dof_select2(Rinchi::CIGIPP->NotUsed);
57 $dof_select1 = $sap_ctl->dof_select1(Rinchi::CIGIPP->XOffset);
58 $degree_of_freedom1 = $sap_ctl->degree_of_freedom1(2.007);
59 $degree_of_freedom2 = $sap_ctl->degree_of_freedom2(49.352);
60  
61 =head1 DESCRIPTION
62  
63 The Short Articulated Part Control packet is provided as a lower-bandwidth
64 alternative to the Articulated Part Control packet. It can be used when
65 manipulation of only one or two degrees of freedom of a submodel is necessary.
66  
67 This packet allows for up to two articulations. The articulations may be
68 applied to a single articulated part or two separate ones belonging to the same
69 entity. The articulated part or parts are specified by the Articulated Part ID
70 1 and Articulated Part ID 2 attributes. Two floating-point degree-of-freedom
71 attributes, DOF 1 and DOF 2, specify offsets or angular positions for the
72 specified articulated parts. The DOF Select 1 and DOF Select 2 attributes
73 specify which degree of freedom each of these floating-point attributes
74 represents.
75 Note: If DOF Select 1 and DOF Select 2 refer to the same degree of freedom for
76 the same articulated part, then DOF 2 (i.e., the "last-in" value) takes
77 priority over DOF 1.
78  
79 =head2 EXPORT
80  
81 None by default.
82  
83 #==============================================================================
84  
85 =item new $sap_ctl = Rinchi::CIGIPP::ShortArticulatedPartControl->new()
86  
87 Constructor for Rinchi::ShortArticulatedPartControl.
88  
89 =cut
90  
91 2 ▶sub new {
Subroutine new: called CC=7 SCAR=29.8
Pod documented
92 2 my $class = shift;
93 2 ▶ $class = ref($class) || $class;
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
020
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
94  
95 2 my $self = {
96 '_Buffer' => '',
97 '_ClassIdent' => 'f78ac504-200e-11de-bda7-001c25551abc',
98 '_Pack' => 'CCSCCCCff',
99 '_Swap1' => 'CCvCCCCVV',
100 '_Swap2' => 'CCnCCCCNN',
101 'packetType' => 7,
102 'packetSize' => 16,
103 'entityIdent' => 0,
104 'articulatedPartIdent1' => 0,
105 'articulatedPartIdent2' => 0,
106 '_bitfields1' => 0, # Includes bitfields articulatedPartEnable2, articulatedPartEnable1, dofSelect2, and dofSelect1.
107 'articulatedPartEnable2' => 0,
108 'articulatedPartEnable1' => 0,
109 'dofSelect2' => 0,
110 'dofSelect1' => 0,
111 '_unused9' => 0,
112 'degreeOfFreedom1' => 0,
113 'degreeOfFreedom2' => 0,
114 };
115  
116 2 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 2 2
117 0 ▶ if (ref($_[0]) eq 'ARRAY') {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $_[0] eq 'ARRAY') { } 0 0 0
elsif (ref $_[0] eq 'HASH') { } 0 0 0
118 0 $self->{'_Buffer'} = $_[0][0];
119 } elsif (ref($_[0]) eq 'HASH') {
120 0 foreach my $attr (keys %{$_[0]}) {
121 0 ▶ $self->{"_$attr"} = $_[0]->{$attr} unless ($attr =~ /^_/);
Branch: 1 branch
BranchTrueFalseTotal
unless $attr =~ /^_/ 0 0 0
122 }
123 }
124 }
125  
126 2 bless($self,$class);
127 2 return $self;
128 }
129  
130 #==============================================================================
131  
132 =item sub packet_type()
133  
134 $value = $sap_ctl->packet_type();
135  
136 Data Packet Identifier.
137  
138 This attribute identifies this data packet as the Short Articulated Part
139 Control packet. The value of this attribute must be 7.
140  
141 =cut
142  
143 2 ▶sub packet_type() {
Subroutine packet_type: called CC=1 SCAR=0.0
Pod documented
144 2 my ($self) = @_;
145 2 return $self->{'packetType'};
146 }
147  
148 #==============================================================================
149  
150 =item sub packet_size()
151  
152 $value = $sap_ctl->packet_size();
153  
154 Data Packet Size.
155  
156 This attribute indicates the number of bytes in this data packet. The value of
157 this attribute must be 16.
158  
159 =cut
160  
161 2 ▶sub packet_size() {
Subroutine packet_size: called CC=1 SCAR=0.0
Pod documented
162 2 my ($self) = @_;
163 2 return $self->{'packetSize'};
164 }
165  
166 #==============================================================================
167  
168 =item sub entity_ident([$newValue])
169  
170 $value = $sap_ctl->entity_ident($newValue);
171  
172 Entity ID.
173  
174 This attribute specifies the entity to which the articulated part(s) belongs.
175  
176 =cut
177  
178 2 ▶sub entity_ident() {
Subroutine entity_ident: called CC=2 SCAR=7.0
Pod documented
179 2 my ($self,$nv) = @_;
180 2 ▶ if (defined($nv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nv) 2 0 2
181 2 $self->{'entityIdent'} = $nv;
182 }
183 2 return $self->{'entityIdent'};
184 }
185  
186 #==============================================================================
187  
188 =item sub articulated_part_ident1([$newValue])
189  
190 $value = $sap_ctl->articulated_part_ident1($newValue);
191  
192 Articulated Part ID 1.
193  
194 This attribute specifies one of up to two articulated parts to which the data
195 in this packet should be applied. When used with the Entity ID attribute, this
196 attribute uniquely identifies a particular articulated part within the scene
197 graph.
198 The value of this attribute may be equal to that of Articulated Part ID 2.
199  
200 =cut
201  
202 2 ▶sub articulated_part_ident1() {
Subroutine articulated_part_ident1: called CC=2 SCAR=7.0
Pod documented
203 2 my ($self,$nv) = @_;
204 2 ▶ if (defined($nv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nv) 2 0 2
205 2 $self->{'articulatedPartIdent1'} = $nv;
206 }
207 2 return $self->{'articulatedPartIdent1'};
208 }
209  
210 #==============================================================================
211  
212 =item sub articulated_part_ident2([$newValue])
213  
214 $value = $sap_ctl->articulated_part_ident2($newValue);
215  
216 Articulated Part ID 2.
217  
218 This attribute specifies one of up to two articulated parts to which the data
219 in this packet should be applied. When used with the Entity ID attribute, this
220 attribute uniquely identifies a particular articulated part within the scene
221 graph.
222 The value of this attribute may be equal to that of Articulated Part ID 1.
223  
224 =cut
225  
226 2 ▶sub articulated_part_ident2() {
Subroutine articulated_part_ident2: called CC=2 SCAR=7.0
Pod documented
227 2 my ($self,$nv) = @_;
228 2 ▶ if (defined($nv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nv) 2 0 2
229 2 $self->{'articulatedPartIdent2'} = $nv;
230 }
231 2 return $self->{'articulatedPartIdent2'};
232 }
233  
234 #==============================================================================
235  
236 =item sub articulated_part_enable2([$newValue])
237  
238 $value = $sap_ctl->articulated_part_enable2($newValue);
239  
240 Articulated Part Enable 2.
241  
242 This attribute determines whether the articulated part submodel specified by
243 Articulated Part ID 2 should be enabled or disabled within the scene graph. If
244 this attribute is set to Disable (0), the part is removed from the scene; if
245 the attribute is set to Enable (1), the part is included in the scene.
246  
247 Disable 0
248 Enable 1
249  
250 =cut
251  
252 2 ▶sub articulated_part_enable2() {
Subroutine articulated_part_enable2: called CC=4 SCAR=15.5
Pod documented
253 2 my ($self,$nv) = @_;
254 2 ▶ if (defined($nv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nv) 2 0 2
255 2 ▶ if (($nv==0) or ($nv==1)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($nv == 0 or $nv == 1) { } 2 0 2
Condition33%1/3
$nv == 0 or $nv == 1
l!l&&r!l&&!r
020
MC/DC0%0/2
$nv == 0 or $nv == 1
$nv == 0 $nv == 1
Truth table33%1/3
A or B
A= $nv == 0B= $nv == 1
ABresult
1X1
011
000
256 2 $self->{'articulatedPartEnable2'} = $nv;
257 2 $self->{'_bitfields1'} |= ($nv << 7) &0x80;
258 } else {
259 0 carp "articulated_part_enable2 must be 0 (Disable), or 1 (Enable).";
260 }
261 }
262 2 return (($self->{'_bitfields1'} & 0x80) >> 7);
263 }
264  
265 #==============================================================================
266  
267 =item sub articulated_part_enable1([$newValue])
268  
269 $value = $sap_ctl->articulated_part_enable1($newValue);
270  
271 Articulated Part Enable 1.
272  
273 This attribute determines whether the articulated part submodel specified by
274 Articulated Part ID 1 should be enabled or disabled within the scene graph. If
275 this attribute is set to Disable (0), the part is removed from the scene; if
276 the attribute is set to Enable (1), the part is included in the scene.
277  
278 Disable 0
279 Enable 1
280  
281 =cut
282  
283 2 ▶sub articulated_part_enable1() {
Subroutine articulated_part_enable1: called CC=4 SCAR=15.5
Pod documented
284 2 my ($self,$nv) = @_;
285 2 ▶ if (defined($nv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nv) 2 0 2
286 2 ▶ if (($nv==0) or ($nv==1)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($nv == 0 or $nv == 1) { } 2 0 2
Condition33%1/3
$nv == 0 or $nv == 1
l!l&&r!l&&!r
200
MC/DC0%0/2
$nv == 0 or $nv == 1
$nv == 0 $nv == 1
Truth table33%1/3
A or B
A= $nv == 0B= $nv == 1
ABresult
1X1
011
000
287 2 $self->{'articulatedPartEnable1'} = $nv;
288 2 $self->{'_bitfields1'} |= ($nv << 6) &0x40;
289 } else {
290 0 carp "articulated_part_enable1 must be 0 (Disable), or 1 (Enable).";
291 }
292 }
293 2 return (($self->{'_bitfields1'} & 0x40) >> 6);
294 }
295  
296 #==============================================================================
297  
298 =item sub dof_select2([$newValue])
299  
300 $value = $sap_ctl->dof_select2($newValue);
301  
302 DOF Select 2.
303  
304 This attribute specifies the degree of freedom to which the value of DOF 2 is
305 applied.
306 If this attribute is set to Not Used (0), both DOF 2 and Articulated Part
307 Enable 2 are ignored.
308  
309 NotUsed 0
310 XOffset 1
311 YOffset 2
312 ZOffset 3
313 Yaw 4
314 Pitch 5
315 Roll 6
316  
317 =cut
318  
319 2 ▶sub dof_select2() {
Subroutine dof_select2: called CC=9 SCAR=30.1
Pod documented
320 2 my ($self,$nv) = @_;
321 2 ▶ if (defined($nv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nv) 2 0 2
322 2 ▶ if (($nv==0) or ($nv==1) or ($nv==2) or ($nv==3) or ($nv==4) or ($nv==5) or ($nv==6)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4 or $nv == 5 or $nv == 6) { } 2 0 2
Condition33%6/18
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4 or $nv == 5 or $nv == 6
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4 or $nv == 5
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1 or $nv == 2
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1
l!l&&r!l&&!r
200
MC/DC0%0/7
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4 or $nv == 5 or $nv == 6
$nv == 0 $nv == 1 $nv == 2 $nv == 3 $nv == 4 $nv == 5 $nv == 6
Truth table12%1/8
A or B or C or D or E or F or G
A= $nv == 0B= $nv == 1C= $nv == 2D= $nv == 3E= $nv == 4F= $nv == 5G= $nv == 6
ABCDEFGresult
1XXXXXX1
01XXXXX1
001XXXX1
0001XXX1
00001XX1
000001X1
00000011
00000000
323 2 $self->{'dofSelect2'} = $nv;
324 2 $self->{'_bitfields1'} |= ($nv << 3) &0x38;
325 } else {
326 0 carp "dof_select2 must be 0 (NotUsed), 1 (XOffset), 2 (YOffset), 3 (ZOffset), 4 (Yaw), 5 (Pitch), or 6 (Roll).";
327 }
328 }
329 2 return (($self->{'_bitfields1'} & 0x38) >> 3);
330 }
331  
332 #==============================================================================
333  
334 =item sub dof_select1([$newValue])
335  
336 $value = $sap_ctl->dof_select1($newValue);
337  
338 DOF Select 1.
339  
340 This attribute specifies the degree of freedom to which the value of DOF 1 is
341 applied.
342 If this attribute is set to Not Used (0), both DOF 1 and Articulated Part
343 Enable 1 are ignored.
344  
345 NotUsed 0
346 XOffset 1
347 YOffset 2
348 ZOffset 3
349 Yaw 4
350 Pitch 5
351 Roll 6
352  
353 =cut
354  
355 2 ▶sub dof_select1() {
Subroutine dof_select1: called CC=9 SCAR=30.1
Pod documented
356 2 my ($self,$nv) = @_;
357 2 ▶ if (defined($nv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nv) 2 0 2
358 2 ▶ if (($nv==0) or ($nv==1) or ($nv==2) or ($nv==3) or ($nv==4) or ($nv==5) or ($nv==6)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4 or $nv == 5 or $nv == 6) { } 2 0 2
Condition33%6/18
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4 or $nv == 5 or $nv == 6
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4 or $nv == 5
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1 or $nv == 2
l!l&&r!l&&!r
200
$nv == 0 or $nv == 1
l!l&&r!l&&!r
020
MC/DC0%0/7
$nv == 0 or $nv == 1 or $nv == 2 or $nv == 3 or $nv == 4 or $nv == 5 or $nv == 6
$nv == 0 $nv == 1 $nv == 2 $nv == 3 $nv == 4 $nv == 5 $nv == 6
Truth table12%1/8
A or B or C or D or E or F or G
A= $nv == 0B= $nv == 1C= $nv == 2D= $nv == 3E= $nv == 4F= $nv == 5G= $nv == 6
ABCDEFGresult
1XXXXXX1
01XXXXX1
001XXXX1
0001XXX1
00001XX1
000001X1
00000011
00000000
359 2 $self->{'dofSelect1'} = $nv;
360 2 $self->{'_bitfields1'} |= $nv &0x07;
361 } else {
362 0 carp "dof_select1 must be 0 (NotUsed), 1 (XOffset), 2 (YOffset), 3 (ZOffset), 4 (Yaw), 5 (Pitch), or 6 (Roll).";
363 }
364 }
365 2 return ($self->{'_bitfields1'} & 0x07);
366 }
367  
368 #==============================================================================
369  
370 =item sub degree_of_freedom1([$newValue])
371  
372 $value = $sap_ctl->degree_of_freedom1($newValue);
373  
374 DOF 1.
375  
376 This attribute specifies either an offset or an angular position for the part
377 identified by Articulated Part ID 1.
378  
379 The application of this value is determined by the DOF Select 1 attribute. If
380 the attribute is set to X Offset (1), Y Offset (2), or Z Offset (3), then DOF 1
381 specifies an offset in meters. If DOF Select 1 is set to Yaw (4), Pitch (5), or
382 Roll (6), then DOF 1 specifies an angular position in degrees.
383  
384 =cut
385  
386 2 ▶sub degree_of_freedom1() {
Subroutine degree_of_freedom1: called CC=2 SCAR=7.0
Pod documented
387 2 my ($self,$nv) = @_;
388 2 ▶ if (defined($nv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nv) 2 0 2
389 2 $self->{'degreeOfFreedom1'} = $nv;
390 }
391 2 return $self->{'degreeOfFreedom1'};
392 }
393  
394 #==============================================================================
395  
396 =item sub degree_of_freedom2([$newValue])
397  
398 $value = $sap_ctl->degree_of_freedom2($newValue);
399  
400 DOF 2.
401  
402 This attribute specifies either an offset or an angular position for the part
403 identified by Articulated Part ID 2.
404  
405 The application of this value is determined by the DOF Select 2 attribute. If
406 the attribute is set to X Offset (1), Y Offset (2), or Z Offset (3), then DOF 2
407 specifies an offset in meters. If DOF Select 2 is set to Yaw (4), Pitch (5), or
408 Roll (6), then DOF 2 specifies an angular position in degrees.
409  
410 =cut
411  
412 2 ▶sub degree_of_freedom2() {
Subroutine degree_of_freedom2: called CC=2 SCAR=7.0
Pod documented
413 2 my ($self,$nv) = @_;
414 2 ▶ if (defined($nv)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $nv) 2 0 2
415 2 $self->{'degreeOfFreedom2'} = $nv;
416 }
417 2 return $self->{'degreeOfFreedom2'};
418 }
419  
420 #==========================================================================
421  
422 =item sub pack()
423  
424 $value = $sap_ctl->pack();
425  
426 Returns the packed data packet.
427  
428 =cut
429  
430 2 ▶sub pack($) {
Subroutine pack: called CC=1 SCAR=0.0
Pod documented
431 2 my $self = shift ;
432
433 $self->{'_Buffer'} = CORE::pack($self->{'_Pack'},
434 $self->{'packetType'},
435 $self->{'packetSize'},
436 $self->{'entityIdent'},
437 $self->{'articulatedPartIdent1'},
438 $self->{'articulatedPartIdent2'},
439 $self->{'_bitfields1'}, # Includes bitfields articulatedPartEnable2, articulatedPartEnable1, dofSelect2, and dofSelect1.
440 $self->{'_unused9'},
441 $self->{'degreeOfFreedom1'},
442 2 $self->{'degreeOfFreedom2'},
443 );
444  
445 2 return $self->{'_Buffer'};
446 }
447  
448 #==========================================================================
449  
450 =item sub unpack()
451  
452 $value = $sap_ctl->unpack();
453  
454 Unpacks the packed data packet.
455  
456 =cut
457  
458 0 ▶sub unpack($) {
Subroutine unpack: not called CC=2 SCAR=17.9
Pod documented
459 0 my $self = shift @_;
460
461 0 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 0 0 0
462 0 $self->{'_Buffer'} = shift @_;
463 }
464 0 my ($a,$b,$c,$d,$e,$f,$g,$h,$i) = CORE::unpack($self->{'_Pack'},$self->{'_Buffer'});
465 0 $self->{'packetType'} = $a;
466 0 $self->{'packetSize'} = $b;
467 0 $self->{'entityIdent'} = $c;
468 0 $self->{'articulatedPartIdent1'} = $d;
469 0 $self->{'articulatedPartIdent2'} = $e;
470 0 $self->{'_bitfields1'} = $f; # Includes bitfields articulatedPartEnable2, articulatedPartEnable1, dofSelect2, and dofSelect1.
471 0 $self->{'_unused9'} = $g;
472 0 $self->{'degreeOfFreedom1'} = $h;
473 0 $self->{'degreeOfFreedom2'} = $i;
474  
475 0 $self->{'articulatedPartEnable2'} = $self->articulated_part_enable2();
476 0 $self->{'articulatedPartEnable1'} = $self->articulated_part_enable1();
477 0 $self->{'dofSelect2'} = $self->dof_select2();
478 0 $self->{'dofSelect1'} = $self->dof_select1();
479  
480 0 return $self->{'_Buffer'};
481 }
482  
483 #==========================================================================
484  
485 =item sub byte_swap()
486  
487 $obj_name->byte_swap();
488  
489 Byte swaps the packed data packet.
490  
491 =cut
492  
493 0 ▶sub byte_swap($) {
Subroutine byte_swap: not called CC=2 SCAR=17.9
Pod documented
494 0 my $self = shift @_;
495
496 0 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 0 0 0
497 0 $self->{'_Buffer'} = shift @_;
498 } else {
499 0 $self->pack();
500 }
501 0 my ($a,$b,$c,$d,$e,$f,$g,$h,$i) = CORE::unpack($self->{'_Swap1'},$self->{'_Buffer'});
502  
503 0 $self->{'_Buffer'} = CORE::pack($self->{'_Swap2'},$a,$b,$c,$d,$e,$f,$g,$h,$i);
504 0 $self->unpack();
505  
506 0 return $self->{'_Buffer'};
507 }
508  
509 2 1;
510 __END__
« CIGIPP/ComponentControl.pm ↑ Summary CIGIPP/SymbolLineDefinition.pm »