pdulib
Classes | Macros | Enumerations | Variables
pdulib.h File Reference

Encode/Decode PDU data. More...

Go to the source code of this file.

Classes

class  PDU
 PDU class, provides methods to decode a PDU message or encode a new one. More...
 

Macros

#define BITMASK_7BITS   0x7F
 
#define DCS_COMPRESSED   (5<<1)
 
#define DCS_CLASS_MEANING   (4<<1)
 
#define DCS_ALPHABET_MASK   (3<<2)
 
#define DCS_ALPHABET_OFFSET   2
 
#define DCS_7BIT_ALPHABET_MASK   0B0000
 
#define DCS_8BIT_ALPHABET_MASK   0B0100
 
#define DCS_16BIT_ALPHABET_MASK   0B1000
 
#define DCS_CLASS_MASK   3
 
#define DCS_IMMEDIATE_DISPLAY   3
 
#define DCS_ME_SPECIFIC_MASK   1
 
#define DCS_SIM_SPECIFIC_MASK   2
 
#define DCS_TE_SPECIFIC_MASK   3
 
#define PDU_VALIDITY_MASK_OFFSET   3
 
#define PDU_VALIDITY_NOT_PRESENT   0
 
#define PDU_VALIDITY_PRESENT_RELATIVE   2
 
#define PDU_VALIDITY_PRESENT_ENHANCED   1
 
#define PDU_VALIDITY_PRESENT_ABSOLUTE   3
 
#define PSU_SMS_DELIVER   0
 
#define PSU_SMS_SUBMIT   1
 
#define INTERNATIONAL_NUMBER   0x91
 
#define NATIONAL_NUMBER   0xA1
 
#define EXT_MASK   0x80
 
#define TON_MASK   0x70
 
#define TON_OFFSET   4
 
#define NPI_MASK   0x0f
 
#define MAX_SMS_LENGTH_7BIT   160
 
#define MAX_NUMBER_LENGTH   20
 
#define PDU_BINARY_MAX_LENGTH   170
 
#define NPC7   63
 
#define NPC8   '?'
 

Enumerations

enum  eDCS { ALPHABET_7BIT, ALPHABET_8BIT, ALPHABET_16BIT }
 
enum  eAddressType { INTERNATIONAL_NUMERIC, NATIONAL_NUMERIC, ALPHABETIC }
 
enum  eLengthType { OCTETS, NIBBLES }
 

Variables

const int16_t lookup_ascii8to7 []
 
const uint8_t lookup_ascii7to8 []
 

Detailed Description

Encode/Decode PDU data.

Author
David Henry (mgadr.nosp@m.iver.nosp@m.@gmai.nosp@m.l.co.nosp@m.m)
Version
0.1
Date
2021-09-23