Device::TNC 0.03
Sponsored Links
Device::TNC 0.03 Ranking & Summary
File size:
0.016 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
926
Date added:
2007-04-17
Publisher:
R Bernard Davison
Device::TNC 0.03 description
Device::TNC is a Perl module that acts like a generic interface to a TNC.
This module implements a generic interface to a Terminal Node Controller (TNC).
It loads sub classes that provide the low level interface for the appropriate TNC to be used and provides higher level methods to return frames of data to the user is human readable form.
SYNOPSIS
use Device::TNC;
my $tnc_type = KISS;
my %tnc_config = (
port => ($Config{osname} eq "MSWin32") ? "COM3" : "/dev/TNC-X",
baudrate => 9600,
warn_malformed_kiss => 1,
raw_log => "raw_packet.log",
);
my $tnc = new Device::TNC($tnc_type, %tnc_config);
die "Error: Something went wrong connecting to the TNC.n" unless $tnc;
while (1)
{
my $data = $tnc->read_frame();
my $repeaters = join ", ", @{$data->{ADDRESS}->{REPEATERS}};
my $info = join "", @{$data->{INFO}};
print "From: $data->{ADDRESS}->{SOURCE} ";
print "To: $data->{ADDRESS}->{DESTINATION} ";
print "via $repeatersn";
print "Data: $infon";
}
new()
my $type = "KISS";
my %tnc_data = { option => value };
my $tnc = new Device::TNC($type, %tnc_data);
The new method creates and returns a new Device::TNC object that can be used to communicate with a Terminal Node Controller (TNC) of the type passed.
The method requires that the first passed argument be the type of TNC to connect to. This will try and load the appropriate module for the TNC type.
The subsequent options are passed to the module that is loaded to connect to the desired TNC.
For more details on these options see the module documentation for the TNC type.
read_frame()
my $frame_data = $tnc->read_frame();
my %frame_data = $tnc->read_frame();
This method reads a HDLC frame from the TNC and returns a structure as either a hash or a hash reference that contains the fields of the frame.
The structure of the returned data is like the following.
{
INFO => [
/, 0, 6, 4, 6, 5, 8, h, 3, 3, 5, 0, ., 0, 0,
S, \, 1, 5, 1, 1, 2, ., 0, 0, E, O, 2, 2, 6,
/, 0, 0, 0, /, A, =, 0, 0, 0, 1, 1, 1
],
PID => F0,
CONTROL => {
POLL_FINAL => 0,
FIELD_TYPE => UI,
FRAME_TYPE => U
},
ADDRESS => {
DESTINATION => APT311,
REPEATERS => [
WIDE1-1,
WIDE2-2
],
SOURCE => VK2KFJ-7
}
}
While developing this module I only received U (UI) type frames and so development of the code to work with I and S frames didnt really progress. If anyone wants to read I or S frames please let me know and Ill have a look at implementing them. Please create a KISS log of the data and email it to me.
This module implements a generic interface to a Terminal Node Controller (TNC).
It loads sub classes that provide the low level interface for the appropriate TNC to be used and provides higher level methods to return frames of data to the user is human readable form.
SYNOPSIS
use Device::TNC;
my $tnc_type = KISS;
my %tnc_config = (
port => ($Config{osname} eq "MSWin32") ? "COM3" : "/dev/TNC-X",
baudrate => 9600,
warn_malformed_kiss => 1,
raw_log => "raw_packet.log",
);
my $tnc = new Device::TNC($tnc_type, %tnc_config);
die "Error: Something went wrong connecting to the TNC.n" unless $tnc;
while (1)
{
my $data = $tnc->read_frame();
my $repeaters = join ", ", @{$data->{ADDRESS}->{REPEATERS}};
my $info = join "", @{$data->{INFO}};
print "From: $data->{ADDRESS}->{SOURCE} ";
print "To: $data->{ADDRESS}->{DESTINATION} ";
print "via $repeatersn";
print "Data: $infon";
}
new()
my $type = "KISS";
my %tnc_data = { option => value };
my $tnc = new Device::TNC($type, %tnc_data);
The new method creates and returns a new Device::TNC object that can be used to communicate with a Terminal Node Controller (TNC) of the type passed.
The method requires that the first passed argument be the type of TNC to connect to. This will try and load the appropriate module for the TNC type.
The subsequent options are passed to the module that is loaded to connect to the desired TNC.
For more details on these options see the module documentation for the TNC type.
read_frame()
my $frame_data = $tnc->read_frame();
my %frame_data = $tnc->read_frame();
This method reads a HDLC frame from the TNC and returns a structure as either a hash or a hash reference that contains the fields of the frame.
The structure of the returned data is like the following.
{
INFO => [
/, 0, 6, 4, 6, 5, 8, h, 3, 3, 5, 0, ., 0, 0,
S, \, 1, 5, 1, 1, 2, ., 0, 0, E, O, 2, 2, 6,
/, 0, 0, 0, /, A, =, 0, 0, 0, 1, 1, 1
],
PID => F0,
CONTROL => {
POLL_FINAL => 0,
FIELD_TYPE => UI,
FRAME_TYPE => U
},
ADDRESS => {
DESTINATION => APT311,
REPEATERS => [
WIDE1-1,
WIDE2-2
],
SOURCE => VK2KFJ-7
}
}
While developing this module I only received U (UI) type frames and so development of the code to work with I and S frames didnt really progress. If anyone wants to read I or S frames please let me know and Ill have a look at implementing them. Please create a KISS log of the data and email it to me.
Device::TNC 0.03 Screenshot
Device::TNC 0.03 Keywords
TNC
ADDRESS
TNC 0.03
KISS
interface to
Perl module
Acts Like
0
type
frame
module
data
1
Device::TNC
DeviceTNC
Device::TNC 0.03
Bookmark Device::TNC 0.03
Device::TNC 0.03 Copyright
WareSeeker periodically updates pricing and software information of Device::TNC 0.03 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Device::TNC 0.03 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
perlrpcgen is a Perl module that can generate Perl interfaces from ONC RPC interface definitions. Free Download
Data::Encrypted is a Perl module to transparently store encrypted data via RSA. Free Download
Data::Secs2 is a Perl module to pack, unpack, format, transform from Perl data SEMI E5-94 nested data. Free Download
Devel::Peek is a Perl module that acts as a data debugging tool for the XS programmer. Free Download
Data::Page::Viewport is a Perl module to scroll thru data a page, or just an item, at a time. Free Download
DWH_File module contains data and object persistence in deep and wide hashes. Free Download
FLV::VideoTag is a flash video file data structure Perl module. Free Download
BBDB::Export is a Perl module to export data from The Insidious Big Brother Database. Free Download
Latest Software
Popular Software
Favourite Software