Brian M. Ames
and 1 contributors

NAME

Rinchi::CIGIPP::ShortComponentControl - Perl extension for the Common Image Generator Interface - Short Component Control data packet. data packet. =head1 SYNOPSIS

  use Rinchi::CIGIPP::ShortComponentControl;
  my $scmp_ctl = Rinchi::CIGIPP::ShortComponentControl->new();

  $packet_type = $scmp_ctl->packet_type();
  $packet_size = $scmp_ctl->packet_size();
  $component_ident = $scmp_ctl->component_ident(8600);
  $instance_ident = $scmp_ctl->instance_ident(3133);
  $component_class = $scmp_ctl->component_class(Rinchi::CIGIPP->ViewCC);
  $component_state = $scmp_ctl->component_state(67);
  $data1 = $scmp_ctl->data1(43182);
  $data2 = $scmp_ctl->data2(31535);

DESCRIPTION

The Short Component Control packet, like the Component Control packet, is a generic packet used to control a variety of objects or functions on the IG. This packet is provided as a lower-bandwidth alternative to the Component Control packet for components that do not require more than two words of component data.

This packet uses the same Component ID and Instance ID mappings as the Component Control packet. If the additional data fields offered by the Component Control packet are not necessary for a component, then the two packet types should be interchangeable. In other words, all components that can be controlled with the Short Component Control packet can also be controlled with the Component Control packet.

When receiving a Short Component Control packet, the IG may copy the contents of the packet into a Component Control structure, padding the remainder of the packet with zeros (0). The two packet types can then be processed by the same packet-handling routine.

The Component Data 1 and Component Data 2 fields will be byte-swapped, if necessary, as 32-bit data types. Data should be packed into 32-bit units as described for the Component Control packet.

EXPORT

None by default.

#==============================================================================

new $scmp_ctl = Rinchi::CIGIPP::ShortComponentControl->new()

Constructor for Rinchi::ShortComponentControl.

sub packet_type()
 $value = $scmp_ctl->packet_type();

Data Packet Identifier.

This attribute identifies this data packet as the Short Component Control packet. The value of this attribute must be 5.

sub packet_size()
 $value = $scmp_ctl->packet_size();

Data Packet Size.

This attribute indicates the number of bytes in this data packet. The value of this attribute must be 16.

sub component_ident([$newValue])
 $value = $scmp_ctl->component_ident($newValue);

Component Identifier.

This attribute uniquely identifies the component to which the data in this packet should be applied.

If Component Class is set to Regional Layered Weather (6), the weather layer ID is specified by the most significant byte of Component ID.

sub instance_ident([$newValue])
 $value = $scmp_ctl->instance_ident($newValue);

Instance Identifier.

This attribute uniquely identifies the object to which the component belongs. This value corresponds to an entity ID, a view or view group ID, a sensor ID, environmental region ID, global weather layer ID, or event ID depending upon the value of the Component Class attribute.

sub component_class([$newValue])
 $value = $scmp_ctl->component_class($newValue);

Component Class.

This attribute identifies the type of object to which the Instance ID attribute refers. Both of these attributes are used in conjunction with Component ID to uniquely identify a component in the simulation.

    EntityCC                   0
    ViewCC                     1
    ViewGroupCC                2
    SensorCC                   3
    RegionalSeaSurfaceCC       4
    RegionalTerrainSurfaceCC   5
    RegionalLayeredWeatherCC   6
    GlobalSeaSurfaceCC         7
    GlobalTerrainSurfaceCC     8
    GlobalLayeredWeatherCC     9
    AtmosphereCC               10
    CelestialSphereCC          11
    EventCC                    12
    SystemCC                   13
    SymbolSurfaceCC            14
    SymbolCC                   15
sub component_state([$newValue])
 $value = $scmp_ctl->component_state($newValue);

Component State.

This attribute specifies a discrete state for the component. If a discrete state is not applicable to the component, this attribute is ignored.

sub data1([$newValue])
 $value = $scmp_ctl->data1($newValue);

Component Data 1.

This attribute represents one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data1_float([$newValue])
 $value = $scmp_ctl->data1_float($newValue);

Component Data 1.

This attribute represents as a float one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data1_short1([$newValue])
 $value = $scmp_ctl->data1_short1($newValue);

Component Data 1.

This attribute represents as a short the two most significant bytes of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data1_short2([$newValue])
 $value = $scmp_ctl->data1_short2($newValue);

Component Data 1.

This attribute represents as a short the two least significant bytes of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data1_byte1([$newValue])
 $value = $scmp_ctl->data1_byte1($newValue);

Component Data 1.

This attribute represents the most significant byte of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data1_byte2([$newValue])
 $value = $scmp_ctl->data1_byte2($newValue);

Component Data 1.

This attribute represents the second most significant byte of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data1_byte3([$newValue])
 $value = $scmp_ctl->data1_byte3($newValue);

Component Data 1.

This attribute represents the second least significant byte of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data1_byte4([$newValue])
 $value = $scmp_ctl->data1_byte4($newValue);

Component Data 1.

This attribute represents the least significant byte of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data1_and_2_double([$newValue])
 $value = $scmp_ctl->data1_and_2_double($newValue);

Component Data 1.

This attribute represents as a double both 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data2([$newValue])
 $value = $scmp_ctl->data2($newValue);

Component Data 2.

This attribute represents one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data2_float([$newValue])
 $value = $scmp_ctl->data1_float($newValue);

Component Data 2.

This attribute represents as a float one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored. Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data2_short1([$newValue])
 $value = $scmp_ctl->data2_short1($newValue);

Component Data 2.

This attribute represents as a short the two most significant bytes of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data2_short2([$newValue])
 $value = $scmp_ctl->data2_short2($newValue);

Component Data 2.

This attribute represents as a short the two least significant bytes of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data2_byte1([$newValue])
 $value = $scmp_ctl->data2_byte1($newValue);

Component Data 2.

This attribute represents the most significant byte of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data2_byte2([$newValue])
 $value = $scmp_ctl->data2_byte2($newValue);

Component Data 2.

This attribute represents the second most significant byte of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data2_byte3([$newValue])
 $value = $scmp_ctl->data2_byte3($newValue);

Component Data 2.

This attribute represents the second least significant byte of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub data2_byte4([$newValue])
 $value = $scmp_ctl->data2_byte4($newValue);

Component Data 2.

This attribute represents the least significant byte of one of two 32-bit words used for user-defined component data. If this attribute is not needed by the component, this value is ignored.

Note: This attribute will be byte-swapped as a 32-bit value if the receiver and sender use different byte ordering schemes. If the attribute is used to store multiple 8- or 16-bit values, the data should be packed so that byte swapping will be performed correctly.

sub pack()
 $value = $scmp_ctl->pack();

Returns the packed data packet.

sub unpack()
 $value = $scmp_ctl->unpack();

Unpacks the packed data packet.

sub byte_swap()
 $obj_name->byte_swap();

Byte swaps the packed data packet.

SEE ALSO

Refer the the Common Image Generator Interface ICD which may be had at this URL: http://cigi.sourceforge.net/specification.php

AUTHOR

Brian M. Ames, <bmames@apk.net>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Brian M. Ames

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6 or, at your option, any later version of Perl 5 you may have available.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 88:

'=item' outside of any '=over'

Around line 864:

You forgot a '=back' before '=head1'