Brian M. Ames
and 1 contributors

NAME

Rinchi::CIGIPP::IGControl - Perl extension for the Common Image Generator Interface - IGControl data packet. data packet. =head1 SYNOPSIS

  use Rinchi::CIGIPP::IGControl;
  my $ig_ctl = Rinchi::CIGIPP::IGControl->new();

  $packet_type = $ig_ctl->packet_type();
  $packet_size = $ig_ctl->packet_size();
  $major_version = $ig_ctl->major_version();
  $database_number = $ig_ctl->database_number(65);
  $minor_version = $ig_ctl->minor_version();
  $extrapolation_enable = $ig_ctl->extrapolation_enable(Rinchi::CIGIPP->Disable);
  $timestamp_valid = $ig_ctl->timestamp_valid(Rinchi::CIGIPP->Invalid);
  $ig_mode = $ig_ctl->ig_mode(Rinchi::CIGIPP->Standby);
  $magic_number = $ig_ctl->magic_number();
  $host_frame_number = $ig_ctl->host_frame_number(38591);
  $timestamp = $ig_ctl->timestamp(52141);
  $last_igframe_number = $ig_ctl->last_igframe_number(47470);

DESCRIPTION

The IG Control packet is used to control the IG's operational mode, database loading, and timing correction. This must be the first packet in each Host-to-IG message, and every Host-to-IG message must contain exactly one IG Control packet. If more than one is encountered during a given frame, the resulting IG behavior is undefined. The IG Control packet allows the Host to control the loading of terrain. Each database is associated with a number from 1 to 127. The Host will set the Database Number attribute to the appropriate value to direct the IG to begin reading the corresponding database into memory.

The IG will indicate that the database is being loaded by negating the value and placing it in the Database Number attribute of the Start of Frame packet. The Host will then acknowledge this change by setting the Database Number attribute of the IG Control packet to zero (0). Because the IG's resources may be devoted to disk I/O and other functions, the Host should ideally send only IG Control packets at this time.

After the IG receives the acknowledgement, it will signal the completion of the database load by setting the Database Number attribute of the Start of Frame packet to the positive database number. The IG is now considered mission-ready and can receive mission data from the Host.

Note that the IG will ignore the Database Number attribute while in Reset/Standby mode.

When using a global database, the IG will set the Database Number of the Start of Frame packet to zero (0). When the Host detects a zero in this attribute, it should in turn set the Database Number attribute of the IG Control packet to zero (0).

EXPORT

None by default.

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

new $ig_ctl = Rinchi::CIGIPP::IGControl->new()

Constructor for Rinchi::IGControl.

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

Data Packet Identifier.

This attribute identifies this data packet as the IG Control packet. The value of this attribute must be 1.

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

Data Packet Size.

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

sub major_version()
 $value = $ig_ctl->major_version();

Major Version.

This attribute indicates the major version of the CIGI interface that is currently being used by the Host. The IG can use this number to determine concurrency. The Host must set the value of this attribute to 3.

sub database_number([$newValue])
 $value = $ig_ctl->database_number($newValue);

Database Number.

This attribute is used to initiate a database load on the IG. Setting this attribute to a non-zero value will cause the IG to begin loading the database that corresponds to that value. If the number corresponds to the current database, the database will be reloaded. The IG will indicate that the database is being loaded by negating the value and placing it in the Database Number attribute of the Start of Frame packet. When the Host receives this notification, it should set the Database Number attribute of the IG Control packet to zero (0) to prevent continuous reloading of the database on the IG. The IG will ignore this attribute while in Reset/Standby mode.

sub minor_version()
 $value = $ig_ctl->minor_version();

Minor Version.

This attribute indicates the minor version of the CIGI interface that is currently being used by the Host. The IG can use this number to determine concurrency.

sub extrapolation_enable([$newValue])
 $value = $ig_ctl->extrapolation_enable($newValue);

Extrapolation/Interpolation Enable.

This attribute specifies whether any "dead reckoning" or other entity extrapolation or interpolation algorithms are enabled.

If this attribute is set to Disable (0), then extrapolation or interpolation is disabled for all entities.

If this attribute is set to Enable (1), then extrapolation or interpolation is determined on a per-entity basis by the Linear Extrapolation/Interpolation Enable flag in the Entity Control packet.

    Disable   0
    Enable    1
sub timestamp_valid([$newValue])
 $value = $ig_ctl->timestamp_valid($newValue);

Timestamp Valid.

This attribute indicates whether the Timestamp attribute contains a valid value. Because the Timestamp attribute is required for asynchronous operation, Timestamp Valid must be set to Valid (1) in this mode.

    Invalid   0
    Valid     1
sub ig_mode([$newValue])
 $value = $ig_ctl->ig_mode($newValue);

IG Mode.

This attribute dictates the IG's operational mode. The Host can initiate a mode change by setting this attribute to the desired mode. When the IG completes the mode change, it will set the IG Mode attribute in the Start of Frame packet accordingly.

    Reset                0
    Standby              1
    Operate              1
    Debug                2
sub magic_number()
 $value = $ig_ctl->magic_number();

Byte Swap Magic Number.

This attribute is used by the IG to determine whether it needs to byte-swap incoming data. The Host must set this value to 8000h, or 32768.

sub host_frame_number([$newValue])
 $value = $ig_ctl->host_frame_number($newValue);

Host Frame Number.

This attribute uniquely identifies a data frame on the Host. The Host should increment this value by one (1) for each successive message.

sub timestamp([$newValue])
 $value = $ig_ctl->timestamp($newValue);

Timestamp.

This attribute indicates the number of 10μs "ticks" since some initial reference time. This will enable the IG to correct for latencies. The 10μs unit allows the simulation to run for approximately 12 hours before a timestamp rollover occurs. The IG software should contain logic to detect and correct for rollover. The use of this attribute is required for asynchronous operation. The use of this attribute is optional for synchronous operation. If this attribute does not contain a valid timestamp, the Timestamp Valid attribute should be set to zero (0).

sub last_igframe_number([$newValue])
 $value = $ig_ctl->last_igframe_number($newValue);

Last IG Frame Number.

This attribute contains the value of the IG Frame Number attribute in the last Start of Frame packet received from the IG. This attribute serves as an acknowledgement that the Host received the last message.

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

Returns the packed data packet.

sub unpack()
 $value = $ig_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.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 99:

'=item' outside of any '=over'

Around line 392:

Non-ASCII character seen before =encoding in '10μs'. Assuming UTF-8

Around line 529:

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