|
GCN::Packet::Parse - module which parses valid GCN binary messages |
GCN::Packet::Parse - module which parses valid GCN binary messages
$message = new Astro::GCN::Parse( Packet => $packet );
The module parses incoming GCN binary packet and parses it, it will correct parse TYPE_IM_ALIVE and all (most?) SWIFT related packets.
=cut
# L O A D M O D U L E S --------------------------------------------------
use strict; use vars qw/ $VERSION $SELF /;
use Net::Domain qw(hostname hostdomain); use File::Spec; use Time::localtime; use Data::Dumper; use Carp;
use Astro::GCN::Constants qw(:packet_types); use Astro::GCN::Util; use Astro::GCN::Util::SWIFT;
'$Revision: 1.1.1.1 $ ' =~ /.*:\s(.*)\s\$/ && ($VERSION = $1);
# C O N S T R U C T O R ----------------------------------------------------
$Id: Parse.pm,v 1.1.1.1 2005/05/03 19:23:00 voevent Exp $
$message = new Astro::GCN::Parse( Packet => $packet );
returns a reference to an message object.
$pkt_type = $message->type();
$pkt_sernum = $message->serial_number();
$pkt_hop_cnt = $message->hop_count();
$sod = $message->gcn_sod();
if ( defined $message->is_swift() ) {
.
.
.
}
$trigger_num = $message->trigger_num();
$obs_num = $message->obs_num();
$julian_date = $message->tjd();
For now this method will only return a value for SWIFT packets.
$sod = $message->data_sod();
For now this method will only return a value for SWIFT packets.
$ra = $message->ra();
For now this method will only return a value for SWIFT packets.
$dec = $message->dec();
For now this method will only return a value for SWIFT packets.
$error = $message->burst_error();
For now this method will only return a value for the relevant SWIFT packets, these being types 61, 67, 81 and 84.
$ra = $message->ra_degrees();
For now this method will only return a value for SWIFT packets.
$dec = $message->dec_degrees();
For now this method will only return a value for SWIFT packets.
$error = $message->burst_error_degrees();
For now this method will only return a value for the relevant SWIFT packets, these being types 61, 67, 81 and 84.
$soln_status = $message->solution_status();
This method will only return a value for the relevant SWIFT packets, these being types 61, 62, 82 and 84.
$error = $message->burst_error();
This is valid for SWIFT BAT only (packet types 61 or 82)
$error = $message->uvot_mag();
This is valid for SWIFT UVOT only (packet types 81)
$message->configure( %options );
Does nothing if the hash is not supplied. This is called directly from the constructor during object creation
$message->packet( $binary_packet );
takes the GCN native binary packet and converts to local format, then parses known packet types and makes the information available via the accessor methods.
Copyright (C) 2005 University of Exeter. All Rights Reserved.
This program was written as part of the eSTAR project and is free software; you can redistribute it and/or modify it under the terms of the GNU Public License.
Alasdair Allan <aa@astro.ex.ac.uk>,
|
GCN::Packet::Parse - module which parses valid GCN binary messages |