pdu Class Reference

#include <pdu.h>

List of all members.

Public Member Functions

 pdu ()
 ~pdu ()
void parsePDU (string pdustring)
string getText (void)
string getSender (void)
int setText (string)
int setSender (string)
string encodePDU (void)

Private Member Functions

string semiOctetToString (string)
string stringToSemiOctet (string)
int hexStringToInt (string)
string intToHexString (int)
int binStringToInt (string)
string intToBinString (int)
int pow (int, int)
int stoi (string)
int getDCSAlphabet (void)
void parsePDU_send (string pdustring)
void parsePDU_receive (string pdustring)
string userData (void)
string userData7_to_8 (void)
string userData8_to_8 (void)
string userData16_to_8 (void)
string userTextTo7 (void)

Private Attributes

int smsc_length
int smsc_type_of_address
string smsc_number
int sms_deliver
int sender_length
int sender_type_of_address
string sender_number
int tp_pid
int tp_msgref
int tp_dcs
string tp_scts
int tp_validity
int tp_length
string tp_data
string PDU_ERROR
string tp_text
int tp_dcs_alpha


Constructor & Destructor Documentation

pdu::pdu (   )  [inline]
 

Definition at line 471 of file pdu.h.

References tp_dcs_alpha.

pdu::~pdu (   )  [inline]
 

Definition at line 472 of file pdu.h.


Member Function Documentation

int pdu::binStringToInt (  string  binString  )  [private]
 

int binStringToInt ( string ) --------------------------------------------------------------- Converts a string representing a binary value to a an integer

Example: string BinString = "01111"; int MyInt = binStringToInt(BinString); cout << MyInt << endl;

( will result in 15 , being printed )

Definition at line 156 of file pdu.cpp.

References pow().

Referenced by userData7_to_8(), and userTextTo7().

Here is the call graph for this function:

string pdu::encodePDU (  void   ) 
 

Definition at line 648 of file pdu.cpp.

References intToHexString(), stringToSemiOctet(), and userTextTo7().

Referenced by main().

Here is the call graph for this function:

int pdu::getDCSAlphabet (  void   )  [private]
 

Definition at line 548 of file pdu.cpp.

References tp_dcs.

Referenced by userData().

string pdu::getSender (  void   ) 
 

Definition at line 580 of file pdu.cpp.

References sender_number.

string pdu::getText (  void   ) 
 

Definition at line 576 of file pdu.cpp.

References userData().

Referenced by main().

Here is the call graph for this function:

int pdu::hexStringToInt (  string  hexString  )  [private]
 

int hexStringToInt ( string ) --------------------------------------------------------------- Converts a string representing a hexadecimal value to a an integer

Example: string HexString = "0A"; int MyInt = hexStringToInt(HexString); cout << MyInt << endl;

( will result in 10 , being printed )

Definition at line 78 of file pdu.cpp.

References pow().

Referenced by parsePDU(), parsePDU_receive(), parsePDU_send(), userData16_to_8(), userData7_to_8(), and userData8_to_8().

Here is the call graph for this function:

string pdu::intToBinString (  int  integer  )  [private]
 

string intToBinString ( int ) --------------------------------------------------------------- Converts an integer to a string representing the binary value of the integer. padded to make the string a multiple of 8 characters long

Example: int MyInt = 16; string MyBin = intToBinString(MyInt); cout << MyBin << endl;

( will result in "00010000" , being printed )

Definition at line 186 of file pdu.cpp.

Referenced by userData7_to_8(), and userTextTo7().

string pdu::intToHexString (  int  integer  )  [private]
 

string intToHexString ( int ) --------------------------------------------------------------- Converts an integer to a string representing the hexadecimal value of the integer. The result will be have a 0 prepended to make the string length even.

Example: int MyInt = 10; string MyHex = intToHexString(MyInt); cout << MyHex << endl;

( will result in "0A" , being printed )

Definition at line 115 of file pdu.cpp.

Referenced by encodePDU(), and userTextTo7().

void pdu::parsePDU (  string  pduString  ) 
 

int parsePDU ( string ) --------------------------------------------------------------- Parses a string representing a SMS in PDU mode

Example: pdu MyPDU; int MyResult = MyPDU.parsePDU("ADGHJ....5F"); cout << MyResult << endl;

( will result in 1 , being printed if ok, -1 on failure )

Definition at line 255 of file pdu.cpp.

References hexStringToInt(), parsePDU_receive(), parsePDU_send(), semiOctetToString(), sms_deliver, smsc_length, smsc_number, and smsc_type_of_address.

Referenced by main().

Here is the call graph for this function:

void pdu::parsePDU_receive (  string  pduString  )  [private]
 

void parsePDU_receive ( string ) --------------------------------------------------------------- Parses a string representing a SMS in PDU mode

Example: pdu MyPDU; int MyResult = MyPDU.parsePDU("ADGHJ....5F"); cout << MyResult << endl;

( will result in 1 , being printed if ok, -1 on failure )

Definition at line 307 of file pdu.cpp.

References hexStringToInt(), semiOctetToString(), sender_length, sender_number, sender_type_of_address, tp_data, tp_dcs, tp_length, tp_pid, and tp_scts.

Referenced by parsePDU().

Here is the call graph for this function:

void pdu::parsePDU_send (  string  pduString  )  [private]
 

void parsePDU_send ( string ) --------------------------------------------------------------- Parses a string representing a SMS in PDU mode

Example: pdu MyPDU; int MyResult = MyPDU.parsePDU("ADGHJ....5F"); cout << MyResult << endl;

( will result in 1 , being printed if ok, -1 on failure )

Definition at line 364 of file pdu.cpp.

References hexStringToInt(), semiOctetToString(), sender_length, sender_number, sender_type_of_address, tp_data, tp_dcs, tp_length, tp_msgref, tp_pid, and tp_validity.

Referenced by parsePDU().

Here is the call graph for this function:

int pdu::pow (  int  n,
int  i
)  [private]
 

int pow ( int, int ) --------------------------------------------------------------- Calculates int 1 to the power of int 2.

Example: int MyInt1 = 10; int MyInt2 = 2; int MyResult = pow(MyInt1, MyInt2); cout << MyResult << endl;

( will result in 100 , being printed )

Definition at line 225 of file pdu.cpp.

Referenced by binStringToInt(), and hexStringToInt().

string pdu::semiOctetToString (  string  semiOctet  )  [private]
 

string semiOctetToString ( string ) --------------------------------------------------------------- Converts a string representing semi-octets to an octet string.

Example: string semiOctetString = "123456789A"; string MyString = semiOctetToString(semiOctetString); cout << MyString << endl;

( will result in 21436587A9 , being printed )

Definition at line 28 of file pdu.cpp.

Referenced by parsePDU(), parsePDU_receive(), parsePDU_send(), and stringToSemiOctet().

int pdu::setSender (  string   ) 
 

Definition at line 596 of file pdu.cpp.

References sender_length, sender_number, and sender_type_of_address.

Referenced by main().

int pdu::setText (  string   ) 
 

Definition at line 588 of file pdu.cpp.

References tp_text.

Referenced by main().

int pdu::stoi (  string   )  [private]
 

string pdu::stringToSemiOctet (  string  StringData  )  [private]
 

string stringToSemiOctet ( string ) --------------------------------------------------------------- Converts a string to a semi-octet string, and if necessary pad the original string with 'F' to make it compatible.

Example: string OctetString = "123456789"; string MyString = stringToSemiOctet(OctetString); cout << MyString << endl;

( will result in 21436587F9 , being printed )

Definition at line 55 of file pdu.cpp.

References semiOctetToString().

Referenced by encodePDU().

Here is the call graph for this function:

string pdu::userData (  void   )  [private]
 

Definition at line 530 of file pdu.cpp.

References getDCSAlphabet(), userData16_to_8(), userData7_to_8(), and userData8_to_8().

Referenced by getText().

Here is the call graph for this function:

string pdu::userData16_to_8 (  void   )  [private]
 

string userData16_to_8 ( void ) --------------------------------------------------------------- Parses the user data in a SMS in PDU mode with 16bit encoding

Example: pdu MyPDU; int MyResult = MyPDU.parsePDU("ADGHJ....5F"); cout << MyPDU.userData() << endl;// always use this method, // it will select the correct // decoding algorithm

returns a human readable string

Definition at line 517 of file pdu.cpp.

References hexStringToInt(), and tp_data.

Referenced by userData().

Here is the call graph for this function:

string pdu::userData7_to_8 (  void   )  [private]
 

string userData7_to_8 ( void ) --------------------------------------------------------------- Parses the user data in a SMS in PDU mode with 7bit encoding

Example: pdu MyPDU; int MyResult = MyPDU.parsePDU("ADGHJ....5F"); cout << MyPDU.userData() << endl;// always use this method, // it will select the correct // decoding algorithm

returns a human readable string

Definition at line 425 of file pdu.cpp.

References binStringToInt(), hexStringToInt(), intToBinString(), lookup_ascii7to8, and tp_data.

Referenced by userData().

Here is the call graph for this function:

string pdu::userData8_to_8 (  void   )  [private]
 

string userData8_to_8 ( void ) --------------------------------------------------------------- Parses the user data in a SMS in PDU mode with 8bit encoding

Example: pdu MyPDU; int MyResult = MyPDU.parsePDU("ADGHJ....5F"); cout << MyPDU.userData() << endl;// always use this method, // it will select the correct // decoding algorithm

returns a human readable string

Definition at line 489 of file pdu.cpp.

References hexStringToInt(), and tp_data.

Referenced by userData().

Here is the call graph for this function:

string pdu::userTextTo7 (  void   )  [private]
 

Definition at line 614 of file pdu.cpp.

References binStringToInt(), intToBinString(), intToHexString(), lookup_ascii8to7, and tp_text.

Referenced by encodePDU().

Here is the call graph for this function:


Member Data Documentation

string pdu::PDU_ERROR [private]
 

Definition at line 448 of file pdu.h.

int pdu::sender_length [private]
 

Definition at line 438 of file pdu.h.

Referenced by parsePDU_receive(), parsePDU_send(), and setSender().

string pdu::sender_number [private]
 

Definition at line 440 of file pdu.h.

Referenced by getSender(), parsePDU_receive(), parsePDU_send(), and setSender().

int pdu::sender_type_of_address [private]
 

Definition at line 439 of file pdu.h.

Referenced by parsePDU_receive(), parsePDU_send(), and setSender().

int pdu::sms_deliver [private]
 

Definition at line 437 of file pdu.h.

Referenced by parsePDU().

int pdu::smsc_length [private]
 

Definition at line 434 of file pdu.h.

Referenced by parsePDU().

string pdu::smsc_number [private]
 

Definition at line 436 of file pdu.h.

Referenced by parsePDU().

int pdu::smsc_type_of_address [private]
 

Definition at line 435 of file pdu.h.

Referenced by parsePDU().

string pdu::tp_data [private]
 

Definition at line 447 of file pdu.h.

Referenced by parsePDU_receive(), parsePDU_send(), userData16_to_8(), userData7_to_8(), and userData8_to_8().

int pdu::tp_dcs [private]
 

Definition at line 443 of file pdu.h.

Referenced by getDCSAlphabet(), parsePDU_receive(), and parsePDU_send().

int pdu::tp_dcs_alpha [private]
 

Definition at line 450 of file pdu.h.

Referenced by pdu().

int pdu::tp_length [private]
 

Definition at line 446 of file pdu.h.

Referenced by parsePDU_receive(), and parsePDU_send().

int pdu::tp_msgref [private]
 

Definition at line 442 of file pdu.h.

Referenced by parsePDU_send().

int pdu::tp_pid [private]
 

Definition at line 441 of file pdu.h.

Referenced by parsePDU_receive(), and parsePDU_send().

string pdu::tp_scts [private]
 

Definition at line 444 of file pdu.h.

Referenced by parsePDU_receive().

string pdu::tp_text [private]
 

Definition at line 449 of file pdu.h.

Referenced by setText(), and userTextTo7().

int pdu::tp_validity [private]
 

Definition at line 445 of file pdu.h.

Referenced by parsePDU_send().


The documentation for this class was generated from the following files:
Generated on Tue May 31 20:21:13 2005 for sendsms by  doxygen 1.4.2