public class Deliver
{
public HEAD Header;
public Report report;
public ulong Msg_Id;
public byte[] Dest_Id=new byte[21];
public byte[] Service_Id=new byte[10];
public byte TP_pid;
public byte TP_udhi;
public byte Msg_Fmt;
public byte[] Src_terminal_Id=new byte[32];
public byte Src_terminal_type;
public byte Registered_Delivery;
public byte Msg_Length;
public byte[] Msg_Content; /* *** */
public byte[] LinkID=new byte[20];
public int getStrlen(byte[] buffer)
{
int i=0;
for(i=0;i<buffer.Length;i++)
{
if(buffer[i]==0)
{
return i;
}
}
return buffer.Length;
}
Buffer.BlockCopy(b_Deliver,i,this.LinkID,0,this.LinkID.Length);
i+=20;
}
public string getMsg_Id()
{
byte[] buffer=BitConverter.GetBytes(this.Msg_Id);
Array.Reverse(buffer);
return bcdtostring(buffer);
}
public string getDest_Id()
{
return Encoding.ASCII.GetString(this.Dest_Id,0,getStrlen(this.Dest_Id));
}
public string getService_Id()
{
return Encoding.ASCII.GetString(this.Service_Id,0,getStrlen(this.Service_Id));
}
public int getTP_pid()
{
return this.TP_udhi;
}
public int getTP_udhi()
{
return this.TP_pid;
}
public int getMsg_Fmt()
{
return this.Msg_Fmt;
}
public string getSrc_terminal_Id()
{
return Encoding.ASCII.GetString(this.Src_terminal_Id,0,getStrlen(this.Src_terminal_Id));
}
public int getSrc_terminal_type()
{
return this.Src_terminal_type;
}
public int getRegistered_Delivery()
{
return this.Registered_Delivery;
}
public int getMsg_Length()
{
return this.Msg_Length;
}
public string getMsg_Content()
{
return Encoding.Default.GetString(this.Msg_Content);
}
public string getLinkID()
{
return Encoding.ASCII.GetString(this.LinkID);
}