@@ -15,8 +15,6 @@ class Event:
1515
1616 #default constructor
1717 def __init__ (self , linkType = None , linkuid = None , linkproduction_time = None , linkrelation = None , linktype = None , linkparent_callsign = None , eventType = 'default' , eventisPing = 0 ,eventtype = "a-f-G-I" , eventhow = 'm-g' ,eventisGeochat = 0 ,eventDATETIME_FMT = "%Y-%m-%dT%H:%M:%SZ" , eventuid = "UIDString" , eventversion = '2.0' , eventconnType = None , pointlat = "00.00000000" , pointlon = '00.00000000' , pointle = "9999999.0" , pointce = "9999999.0" , pointhae = "00.00000000" , chatType = None , chatsenderCallsign = None , chatchatroom = None , chatgroupOwner = None ,chatid = None , chatparent = None ,chatgrpid = None ,chatgrpuid0 = None , chatgrpuid1 = None ):
18-
19-
2018
2119 from Model .detail import Detail
2220 from Model .point import Point
@@ -29,13 +27,7 @@ def __init__(self, linkType=None, linkuid = None, linkproduction_time=None, link
2927
3028 }
3129
32- self .version = eventversion
33-
34- self .uid = eventuid
35-
3630 DATETIME_FMT = eventDATETIME_FMT
37-
38- self .type = eventtype
3931 # flag to determin e if this event is a geo chcat if so, will be added as a
4032 # prefix to the uid
4133
@@ -63,46 +55,49 @@ def __init__(self, linkType=None, linkuid = None, linkproduction_time=None, link
6355 # flag to determine if this event is a Ping, in this case append to the UID
6456
6557
66- self .setuid (isGeochat = eventisGeochat , isPing = eventisPing )
67-
68- self .how = eventhow
58+
6959 #calls detail and point
7060 self .point = Point (lat = pointlat , lon = pointlon , le = pointle , ce = pointce , hae = pointhae )
7161 self .detail = Detail (connType = eventconnType ,linkuid = linkuid ,linkType = linkType , uid = eventuid , linkproduction_time = linkproduction_time , linkrelation = linkrelation , linktype = linktype , linkparent_callsign = linkparent_callsign , chatType = chatType , chatsenderCallsign = chatsenderCallsign , chatchatroom = chatchatroom , chatgroupOwner = chatgroupOwner , chatid = chatid , chatparent = chatparent , chatgrpuid0 = chatgrpuid0 , chatgrpuid1 = chatgrpuid1 )
7262
73- case [eventType ](DATETIME_FMT )
63+ case [eventType ](DATETIME_FMT ,version = eventversion , uid = eventuid , how = eventhow , type = eventtype ,isGeochat = eventisGeochat , isPing = eventisPing )
64+
65+ def defaultFunc (self , DATETIME_FMT , version , uid , type , how , isGeochat , isPing ):
66+ self .how = how
7467
75- def defaultFunc (self , DATETIME_FMT ):
7668 timer = dt .datetime
7769 now = timer .utcnow ()
7870 zulu = now .strftime (DATETIME_FMT )
79-
80- self .settime (zulu )
81- self .setstart (zulu )
8271 stale_part = dt .datetime .strptime (zulu , DATETIME_FMT ) + dt .timedelta (minutes = 1 )
8372 stale_part = stale_part .strftime (DATETIME_FMT )
8473 self .setstale (str (stale_part ))
74+ self .setstart (zulu )
75+ self .settime (zulu )
76+ self .type = type
77+ self .setuid (isGeochat = isGeochat , isPing = isPing )
78+ self .version = version
79+
80+ def timeoutFunc (self , DATETIME_FMT , version , uid , type , how , isGeochat , isPing ):
81+ self .how = how
8582
86- def timeoutFunc (self , DATETIME_FMT ):
8783 timer = dt .datetime
8884 now = timer .utcnow ()
8985 zulu = now .strftime (DATETIME_FMT )
90-
91- self .settime (zulu )
9286 stale_part = dt .datetime .strptime (zulu , DATETIME_FMT ) - dt .timedelta (minutes = 1 )
9387 stale_part = stale_part .strftime (DATETIME_FMT )
94- self .setstart (stale_part )
9588 self .setstale (str (stale_part ))
96- self .how = 'h-g-i-g-o'
97- self .type = 't-x-d-d'
98-
89+ self .setstart (zulu )
90+ self .settime (zulu )
91+ self .type = type
92+ self .setuid (isGeochat = isGeochat , isPing = isPing )
93+ self .version = version
9994 #Start getter
10095 def getstart (self ):
10196 return self .Start
10297
10398 # Start setter
10499 def setstart (self , Start = 0 ):
105- self .Start = Start
100+ self .start = Start
106101
107102 # m_point setter
108103 def setpoint (self , m_point = 0 ):
0 commit comments