Rinchi::CIGIPP::EventNotification - Perl extension for the Common Image Generator Interface - Event Notification data packet. data packet. =head1 SYNOPSIS
use Rinchi::CIGIPP::EventNotification; my $evt_ntc = Rinchi::CIGIPP::EventNotification->new(); $packet_type = $evt_ntc->packet_type(); $packet_size = $evt_ntc->packet_size(); $event_ident = $evt_ntc->event_ident(37952); $event_data1 = $evt_ntc->event_data1(285); $event_data2 = $evt_ntc->event_data2(36545); $event_data3 = $evt_ntc->event_data3(12715);
The Event Notification packet is used to pass event data to the Host. The Host may enable and disable individual events using either the Component Control or Short Component Control packet.
This packet contains three user-defined 32-bit word values that may contain data describing the attributes of the event (e.g., time of occurrence, position). These data may be formatted as needed; however, they must be byte-swapped as 32-bit fields when byte swapping is necessary. Refer to the description of the Component Control packet for more information.
None by default.
#==============================================================================
Constructor for Rinchi::EventNotification.
$value = $evt_ntc->packet_type();
Data Packet Identifier.
This attribute identifies this data packet as the Event Notification packet. The value of this attribute must be 116.
$value = $evt_ntc->packet_size();
Data Packet Size.
This attribute indicates the number of bytes in this data packet. The value of this attribute must be 16.
$value = $evt_ntc->event_ident($newValue);
Event ID.
This attribute indicates which event has occurred. Event ID assignments are IG-specific.
$value = $evt_ntc->event_data1($newValue);
Event Data 1.
This attribute is one of three 32-bit words used for user-defined event data. If this attribute is not needed to describe the event, 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. Use event_data1_short1 and event_data1_short2 for 16-bit values, or event_data1_byte1, event_data1_byte2, event_data1_byte3, and event_data1_byte4 for 8-bit values.
$value = $evt_ntc->event_data1_float($newValue);
This attribute represents as a float one of three 32-bit words used for user-defined event data. If this attribute is not needed by the event, 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.
$value = $evt_ntc->event_data1_short1($newValue);
This attribute represents as a short the two most significant bytes of one of three 32-bit words used for user-defined event data. If this attribute is not needed by the event, this value is ignored.
$value = $evt_ntc->event_data1_short2($newValue);
This attribute represents as a short the two least significant bytes of one of three 32-bit words used for user-defined event data. If this attribute is not needed by the event, this value is ignored.
$value = $evt_ntc->event_data1_byte1($newValue);
This attribute represents the most significant byte of one of three 32-bit words used for user-defined event data. If this attribute is not needed by the event, this value is ignored.
$value = $evt_ntc->event_data1_byte2($newValue);
This attribute represents the second most significant byte of one of three 32-bit words used for user-defined event data. If this attribute is not needed by the event, this value is ignored.
$value = $evt_ntc->event_data1_byte3($newValue);
This attribute represents the second least significant byte of one of three 32-bit words used for user-defined event data. If this attribute is not needed by the event, this value is ignored.
$value = $evt_ntc->event_data1_byte4($newValue);
This attribute represents the least significant byte of one of three 32-bit words used for user-defined event data. If this attribute is not needed by the event, this value is ignored.
$value = $evt_ntc->event_data1_and_2_double($newValue);
This attribute represents as a double two of three 32-bit words used for user-defined event data. If this attribute is not needed by the event, this value is ignored.
$value = $evt_ntc->event_data2($newValue);
Event Data 2.
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. Use event_data2_short1 and event_data2_short2 for 16-bit values, or event_data2_byte1, event_data2_byte2, event_data2_byte3, and event_data2_byte4 for 8-bit values.
$value = $evt_ntc->event_data2_float($newValue);
$value = $evt_ntc->event_data2_short1($newValue);
$value = $evt_ntc->event_data2_short2($newValue);
$value = $evt_ntc->event_data2_byte1($newValue);
$value = $evt_ntc->event_data2_byte2($newValue);
$value = $evt_ntc->event_data2_byte3($newValue);
$value = $evt_ntc->event_data2_byte4($newValue);
$value = $evt_ntc->event_data3($newValue);
Event Data 3.
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. Use event_data3_short1 and event_data3_short2 for 16-bit values, or event_data3_byte1, event_data3_byte2, event_data3_byte3, and event_data3_byte4 for 8-bit values.
$value = $evt_ntc->pack();
Returns the packed data packet.
$value = $evt_ntc->unpack();
Unpacks the packed data packet.
$obj_name->byte_swap();
Byte swaps the packed data packet.
$value = $evt_ntc->event_data3_float($newValue);
$value = $evt_ntc->event_data3_short1($newValue);
$value = $evt_ntc->event_data3_short2($newValue);
$value = $evt_ntc->event_data3_byte1($newValue);
$value = $evt_ntc->event_data3_byte2($newValue);
$value = $evt_ntc->event_data3_byte3($newValue);
$value = $evt_ntc->event_data3_byte4($newValue);
Refer the the Common Image Generator Interface ICD which may be had at this URL: http://cigi.sourceforge.net/specification.php
Brian M. Ames, <bmames@apk.net>
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:
'=item' outside of any '=over'
You forgot a '=back' before '=head1'
To install Rinchi::CIGIPP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rinchi::CIGIPP
CPAN shell
perl -MCPAN -e shell install Rinchi::CIGIPP
For more information on module installation, please visit the detailed CPAN module installation guide.