Beispiel #1
0
	def OnLogButtonClicked(self,evnt):
		band=""
		for i in range( 0, len( self.bands ) ):
			if( self.bandswitches[i].GetValue() ):
				band = self.bands[i]

		mode=""
		for i in range( 0, len( self.modes ) ):
			if( self.modeswitches[i].GetValue() ):
				band = self.modes[i]

		from localtimeutil import local8601
		self.db.insert_local_contact( self.uuid, local8601(), self.tc1.GetValue(), self.tc2.GetValue(), band, mode )
		self.tc2.ChangeValue( "" )
		pass
Beispiel #2
0
	def OnLogButtonClicked(self,evnt):
		if( self.tcTheirCall.GetValue() == "" ):
			return
		band=""
		for i in range( 0, len( self.bands ) ):
			if( self.bandswitches[i].GetValue() ):
				band = self.bands[i]

		mode=""
		for i in range( 0, len( self.modes ) ):
			if( self.modeswitches[i].GetValue() ):
				mode = self.modes[i]

		from localtimeutil import local8601
		self.db.insert_local_contact( self.uuid, local8601(), self.tcMyCall.GetValue(), self.tcTheirCall.GetValue(), band, mode, self.tcTheirClass.GetValue(), self.tcTheirSection.GetValue() )
		self.OnClearButtonClicked(self)
Beispiel #3
0
#!/usr/bin/python
# -*- coding: utf-8 -*-

from db_manager import db_manager
from settings_manager import settings_manager
from dbframe import framer
from localtimeutil import local8601

db = db_manager()
s = settings_manager()
uuid = s.get("uuid")
db.insert_local_contact(uuid, local8601(), "KD0LIX", "KC5YTI", "80m", "testmode", "1A", "KS")
Beispiel #4
0
from dbframe import framer
from localtimeutil import local8601

def countContacts(db):
	count = 0
	for r in db.search(db_manager.filter()):
		count = count + 1
	return count

db = db_manager()
s = settings_manager()

f = {}
f['uuid'] = s.get( 'uuid' )
f['type'] = framer.typeDbUpsert
f['dt'] = local8601()
f['rec'] = 1
f['seq'] = 1
f['band'] = "20m"
f['mode'] = "phone"
f['mycall'] = "KD0LIX"
f['theircall'] = "KD0IXY"
f['class'] = "1A"
f['section'] = "KS"

#test insert
db.insert_frames( [ f ] )
db.process_new_frames()
if( countContacts( db ) == 1 ):
	print "success"
else: