#! /usr/bin/python3

from mods.forwarder.StdoutForwarder import StdoutForwarder
from mods.forwarder.SmsEagleForwarder import SmsEagleForwarder
from mods.receiver.SnmpTrapReceiver import SnmpTrapReceiver
from mods.scheduler.Scheduler import Scheduler
from mods.config.Config import Config

config = Config("./etc/config.ini")
#forwarder = SmsEagleForwarder(config)
forwarder = StdoutForwarder(config)
scheduler = Scheduler(config, forwarder)
receiver = SnmpTrapReceiver(config, scheduler)

scheduler.start()
receiver.start()


@@ -282,16 +282,37 @@
 Config%0A%0A
+%0A# get configuration%0A
 config =
@@ -343,10 +343,18 @@
 i%22)%0A
-#f
+classNameF
 orwa
@@ -364,52 +364,189 @@
 r = 
-SmsEagleForwarder(config)%0Aforwarder = Stdout
+config.getValue('general', 'fowarder', 'StdoutForwarder')%0AclassNameReceiver = config.getValue('general', 'fowarder', 'SnmpTrapReceiver')%0A%0A# create objects%0Aforwarder = eval(className
 Forw
@@ -554,16 +554,20 @@
 rder
+ + %22
 (config)
 %0Asch
@@ -562,16 +562,18 @@
 (config)
+%22)
 %0Aschedul
@@ -617,32 +617,38 @@
 eiver = 
-SnmpTrap
+eval(className
 Receiver
 (config,
@@ -639,16 +639,20 @@
 Receiver
+ + %22
 (config,
@@ -662,17 +662,35 @@
 heduler)
-%0A
+%22)%0A%0A# start threads
 %0Aschedul

make receiver and forwarder classes configurable