Device::ISDN::OCLM 0.40 review
DownloadDevice::ISDN::OCLM is a perl module to control the 3com OfficeConnect LanModem. SYNOPSIS $sp = 1; $pw = 'secret; $lanmodem
|
|
Device::ISDN::OCLM is a perl module to control the 3com OfficeConnect LanModem.
SYNOPSIS
$sp = 1;
$pw = 'secret;
$lanmodem = Device::ISDN::OCLM->new ();
$lanmodem->password ($pw);
$command = 'manualConnect';
$status = $lanmodem->$command ($sp);
while (($status eq 'CLOCK') || ($status eq 'PASSWORD') ||
($status eq 'CONNECTING') || ($status eq 'LOGGING IN')) {
if ($status eq 'CLOCK') {
sleep (1);
$status = $lanmodem->setClock ();
} elsif ($status eq 'PASSWORD') {
sleep (1);
$status = $lanmodem->enterPasword ();
} elsif (($status eq 'CONNECTING') || ($status eq 'LOGGING IN')) {
$command = 'connectStatus';
$status = 'OK';
}
if ($status eq 'OK') {
sleep (1);
$status = $lanmodem->$command ($sp);
}
}
print "$statusn";
This module can be used to control the 3com OfficeConnect LanModem, an ISDN TA/router. Device statistics can be queried and manual connections can be brought up and taken down. Support is provided for setting the clock if the device is power-cycled, and for automatically entering the password if the device is password-protected.
All operations that access the device return a status code indicating whether the operation was successful or not; and, if not, why. For example, if you attempt to query device statistics and the device is locked then the status code will indicate this fact, allowing you to enter the password and retry the operation. Hence the loop in the above synopsis.
This module does not perform these loops internally in an effort to allow it to be embedded within a controlling application such as the oclm Perl command-line application, and a GNOME/GTK graphical user interface that is available separately.
This module has a few warts; some are mandated by the device itself and some are the fault of the author.
Requirements:
Perl
Device::ISDN::OCLM 0.40 keywords