#include <pdu.h>
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 |
|
|
Definition at line 471 of file pdu.h. References tp_dcs_alpha. |
|
|
|
|
|
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: ![]() |
|
|
Definition at line 648 of file pdu.cpp. References intToHexString(), stringToSemiOctet(), and userTextTo7(). Referenced by main(). Here is the call graph for this function: ![]() |
|
|
Definition at line 548 of file pdu.cpp. References tp_dcs. Referenced by userData(). |
|
|
Definition at line 580 of file pdu.cpp. References sender_number. |
|
|
Definition at line 576 of file pdu.cpp. References userData(). Referenced by main(). Here is the call graph for this function: ![]() |
|
|
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 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 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(). |
|
|
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 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 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 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 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(). |
|
|
Definition at line 596 of file pdu.cpp. References sender_length, sender_number, and sender_type_of_address. Referenced by main(). |
|
|
Definition at line 588 of file pdu.cpp. References tp_text. Referenced by main(). |
|
|
|
|
|
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: ![]() |
|
|
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 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 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 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: ![]() |
|
|
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: ![]() |
|
|
|
|
|
Definition at line 438 of file pdu.h. Referenced by parsePDU_receive(), parsePDU_send(), and setSender(). |
|
|
Definition at line 440 of file pdu.h. Referenced by getSender(), parsePDU_receive(), parsePDU_send(), and setSender(). |
|
|
Definition at line 439 of file pdu.h. Referenced by parsePDU_receive(), parsePDU_send(), and setSender(). |
|
|
Definition at line 437 of file pdu.h. Referenced by parsePDU(). |
|
|
Definition at line 434 of file pdu.h. Referenced by parsePDU(). |
|
|
Definition at line 436 of file pdu.h. Referenced by parsePDU(). |
|
|
Definition at line 435 of file pdu.h. Referenced by parsePDU(). |
|
|
Definition at line 447 of file pdu.h. Referenced by parsePDU_receive(), parsePDU_send(), userData16_to_8(), userData7_to_8(), and userData8_to_8(). |
|
|
Definition at line 443 of file pdu.h. Referenced by getDCSAlphabet(), parsePDU_receive(), and parsePDU_send(). |
|
|
Definition at line 450 of file pdu.h. Referenced by pdu(). |
|
|
Definition at line 446 of file pdu.h. Referenced by parsePDU_receive(), and parsePDU_send(). |
|
|
Definition at line 442 of file pdu.h. Referenced by parsePDU_send(). |
|
|
Definition at line 441 of file pdu.h. Referenced by parsePDU_receive(), and parsePDU_send(). |
|
|
Definition at line 444 of file pdu.h. Referenced by parsePDU_receive(). |
|
|
Definition at line 449 of file pdu.h. Referenced by setText(), and userTextTo7(). |
|
|
Definition at line 445 of file pdu.h. Referenced by parsePDU_send(). |
1.4.2