-
-
30 Oct 2012 16:00:20 UTC
- Distribution: RadioMobile
- Module version: 0.11
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (1)
- Testers (705 / 1 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: open_source
- Activity
24 month- Tools
- Download (148.32KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Array::AsObject
- Class::Container
- Class::MethodMaker
- File::Binary
- IO::Scalar
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
RadioMobile - A Perl interface to Radio Mobile .net file
SYNOPSIS
use RadioMobile; my $rm = new RadioMobile(); $rm->file('path_to_radiomobile_file.net'); $rm->parse; my $header = $rm->header; my $units = $rm->units; foreach my $idxUnit (0..$header->unitCount-1) { my $unit = $units->at($idxUnit); printf("%s at lon %s and lat %s\n", $unit->name, $unit->lon, $unit->lat); }
DESCRIPTION
This module is a Perl interface to .net file of Radio Mobile, a software to predict the performance of a radio system.
Currently this module only parse .net file to extract all information available inside it such as units, radio systems, networks, some configuration of program behaviour, the header with version file, number of units, systems and networks. It also extract the relation between units, systems and networks to show the units associated to a network, their systems and so on.
As soon as possible it will be possible to create a .net from scratch with information available, as an example, from a database.
This module supports only .net file with 4000 as version number (I don't know exactly from which it has been adopted this but I'm sure that all Radio Mobile file starting from version 9.x.x used this).
BE CAREFUL
This is a beta test release. Interfaces can change in future. Report me any bug you will find.
METHODS
new()
Call
new()
to create a new RadioMobile objectmy $rm = new RadioMobile();
You can call
new()
to force parsing to dump all structures found using the debug parametermy $rm = new RadioMobile(debug => 1);
file()
Use this method to set a scalar with Radio Mobile .net raw data
$rm->file('net1.net');
filepath()
Use this method to set the path, relative or absolute, to a .net file created by Radio Mobile software.
open(NET,$filepath); binmode(NET); my $dotnet = ''; while (read(NET,my $buff,8*2**10)) { $dotnet .= $buff } close(NET); $rm->file($dotnet);
parse()
Execute this method for parsing the .net file set with
file()
orfilepath()
method and fullfillheader()
,config()
,units()
,systems()
,nets()
andnetsunits()
elements.You can pass a callback function to get progress status while parsing is running. Currently the system suppors these status
10000 START - Open file for parsing 10010 END - Open file for parsing 10100 START - Header Parsing 10110 END - Header Parsing 10200 START - Read Units 10210 END - Read Units 10300 START - Read Systems 10310 END - Read Systems 10400 START - Init Nets 10410 END - Init Nets 10500 START - Setting Nets <-> Units and Roles 10510 END - Setting Nets <-> Units and Roles 10600 START - Read Systems for Units 10610 END - Read Systems for Units 10700 START - Read Nets information 10710 END - Read Nets information 10800 START - Parsing Coverage 10810 END - Parsing Coverage 10900 START - Read Map File path 10910 END - Read Map File path 11000 START - Read Pictures path 11010 END - Read Pictures path 11100 START - Parsing Antenna Height for Units 11110 END - Parsing Antenna Height for Units 11200 START - Setting Units Icon 11210 END - Setting Units Icon 11300 START - Setting Additional System Cable Loss 11310 END - Setting Additional System Cable Loss 11400 START - Parsing Style Network Properties 11410 END - Parsing Style Network Properties 11500 START - Parsing Unknown Network structure 11510 END - Parsing Unknown Network structure 11600 START - Reading Antenna for Systems 11610 END - Reading Antenna for Systems 11700 START - Reading Azimut/Direction for Units 11710 END - Reading Azimut/Direction for Units 11800 START - Parsing Unknown Unit structure 11810 END - Parsing Unknown Unit structure 11900 START - Reading Elevation for Units 11910 END - Reading Elevation for Units 12000 START - Reading LandHeight path 12010 END - Reading LandHeight path
The prototype for callback function is
sub callback { my $data = shift; print $data->{status}, " ", $data->{descr}; }
header()
Returns a RadioMobile::Header object with information about .net version file, number of units, systems and networks
config()
Returns a RadioMobile::Config object with Style Network Properties window setting, list of pictures to be open, the mapfile and landheight path.
units()
Returns a RadioMobile::Units object with a list of all units.
systems()
Returns a RadioMobile::Systems object with a list of all systems.
nets()
Returns a RadioMobile::Nets object with a list of all networks.
cov()
Returns a RadioMobile::Cov object with parameters about coverage window.
netsunits
Returns a RadioMobile::NetsUnits object which is a matrix
$header->networkCount * $header->unitCount
with all relation between units, networks and systems.OBJECT MODEL
In docs/ distribution directory you can find a PDF with a summarize of RadioMobile object model.
AUTHOR
Emiliano Bruni, <lt>info@ebruni.it<gt>
COPYRIGHT AND LICENSE
This module is a copyright by Emiliano Bruni
Radio Mobile software is a copyright by Roger Coude' VE2DBE.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
Module Install Instructions
To install RadioMobile, copy and paste the appropriate command in to your terminal.
cpanm RadioMobile
perl -MCPAN -e shell install RadioMobile
For more information on module installation, please visit the detailed CPAN module installation guide.