34 lines
787 B
C#
34 lines
787 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Text;
|
|||
|
|
|||
|
namespace SafeMobileLib
|
|||
|
{
|
|||
|
class Tools
|
|||
|
{
|
|||
|
static uint DateTo70Format(DateTime param)
|
|||
|
{
|
|||
|
long nOfSeconds;
|
|||
|
Console.WriteLine("DateTo70Format param=" + param);
|
|||
|
System.DateTime dt70 = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
|
|||
|
TimeSpan span = param - dt70;
|
|||
|
nOfSeconds = (long)span.TotalSeconds;
|
|||
|
return ((uint)nOfSeconds);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public class posMessage()
|
|||
|
{
|
|||
|
string p_imei;
|
|||
|
double p_lat;
|
|||
|
double p_lng;
|
|||
|
ushort p_speed;
|
|||
|
ushort p_heading;
|
|||
|
byte p_di;
|
|||
|
byte p_do;
|
|||
|
uint p_time; //unix time
|
|||
|
uint p_evntID;
|
|||
|
string p_rfid;
|
|||
|
}
|
|||
|
}
|