NAME

Parse::SpectrumDirect::RadioFrequency - Parse Industry Canada "Spectrum Direct" radio frequency search output

VERSION

version 0.101

SYNOPSIS

my $parser = Parse::SpectrumDirect::RadioFrequency->new();

$parser->parse( $prefetched_output );

my $legend_hash = $parser->get_legend();

my $stations = $parser->get_stations();

DESCRIPTION

This module provides a parser for the "Radio Frequency Search" text-format output from Industry Canada's Spectrum Direct service. This service provides information on the location of RF spectrum licensing, transmitter locations, etc.

The service is available at http://www.ic.gc.ca/eic/site/sd-sd.nsf/eng/home

The text export is a series of fixed-width fields, with field locations and descriptions present in a legend at the end of the data file.

METHODS

new ( )

Creates a new parser.

parse ( $raw )

Parses the raw data provided. Returns a true value if successful, a false if not.

Parsed data can be obtained with get_legend() and get_stations() (see below).

get_legend ()

Returns the description of fields as parsed from the input data.

Return value is an array reference containing one hash reference per field.

Each hashref contains:

name

As in source legend, stripped of trailing spaces

units

Units for data value, if determinable from legend.

key

Key used in station hashes. Generated from name stripped of unit information, and whitespaces converted to _.

start

Column index to start extracting data value

len

Column width, used for data extraction.

get_stations ()

Returns station information as parsed from the input data.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Parse::SpectrumDirect::RadioFrequency

You can also look for information at:

AUTHOR

Dave O'Neill <dmo@dmo.ca>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Dave O'Neill.

This is free software; you can redistribute it and/or modify it under the same terms as perl itself.