View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Johan Van den Brande > GSM-SMS > GSM::SMS::Transport



Annotate this POD


New  4
Open  0
View/Report Bugs
Module Version: 0.161   Source  


GSM::SMS::Transport - Act as a single point of access to the transports


This class implements an object factory for the transports found in the GSM::SMS::Transport:: namespace. Given a transport config file, it will dynamically loads the transports and initialize them. It will keep a reference to all instantiated transports.


new - Constructor

Create a new transport layer with the settings as in the config file. Please look in the example config file for the transport specific configuration settings.

send - Send a PDU message.

Send a PDU message to the the msisdn. The transport layer will choose a transport according to the regular expression defined in the config file. This regexp matches against the msisdn.

        $transport->send( $msisdn, $pdu );
receive - Receive a PDU message

Receive a pdu message from the transport layer. Undef when no new message available.

        $pdu = $transport->receive();
get_transports - Return an array containg the transports
        @transports = $transport->get_transports();
        foreach my $i (@transports) {
                print $i->ping();
add_transport - Push a transport on the transport stack
get_transport_by_name - Return a specific transport by name
  my $serial_transport = $transport->get_transport_by_name('serial01');
  $serial_transport->at("ATDT 555");

This method allows to get a reference to a specific transport object. It can be usefull if you want to do other things with the transport. It is especially intented for use with the serial transport, so you can do other things with your GSM modem without the need to close the transports.


Shut down transport layer, calls the transport specific close method.


Johan Van den Brande <>

syntax highlighting: