2015-05-27 11:55:04 +02:00
|
|
|
Handover to Plugin:
|
2015-06-29 23:24:48 +02:00
|
|
|
-------------------
|
2015-05-27 11:55:04 +02:00
|
|
|
typ = [FMS|ZVEI|POC]
|
|
|
|
|
freq = [Freq in Hz]
|
|
|
|
|
data = {"KEY1":"VALUE1","KEY2":"VALUE2"}
|
2015-05-18 14:49:10 +02:00
|
|
|
|
2015-05-27 11:55:04 +02:00
|
|
|
The following informations are included in the var "data".
|
|
|
|
|
They can be used by their Index Names: data['OPTION']
|
2015-05-18 14:49:10 +02:00
|
|
|
|
2015-05-18 12:03:42 +02:00
|
|
|
ZVEI:
|
2015-05-18 15:29:41 +02:00
|
|
|
- zvei
|
2015-06-05 21:49:51 +02:00
|
|
|
- description
|
2015-05-18 12:03:42 +02:00
|
|
|
|
|
|
|
|
FMS:
|
2015-05-18 15:29:41 +02:00
|
|
|
- fms
|
|
|
|
|
- status
|
|
|
|
|
- direction
|
2015-06-04 20:13:37 +02:00
|
|
|
- directionText
|
2015-05-20 21:03:58 +02:00
|
|
|
- tsi
|
2015-06-05 21:49:51 +02:00
|
|
|
- description
|
2015-05-18 12:03:42 +02:00
|
|
|
|
2015-05-18 14:49:10 +02:00
|
|
|
POCSAG:
|
2015-05-18 15:29:41 +02:00
|
|
|
- ric
|
2015-05-18 21:04:10 +02:00
|
|
|
- function
|
2015-06-05 11:26:01 +02:00
|
|
|
- functionChar
|
2015-05-18 21:04:10 +02:00
|
|
|
- msg
|
2015-05-22 08:27:50 +02:00
|
|
|
- bitrate
|
2015-06-05 21:49:51 +02:00
|
|
|
- description
|
2015-05-18 21:04:10 +02:00
|
|
|
|
2015-05-20 11:13:53 +02:00
|
|
|
|
2015-05-27 11:55:04 +02:00
|
|
|
Global Objects:
|
2015-06-29 23:24:48 +02:00
|
|
|
---------------
|
2015-05-20 11:13:53 +02:00
|
|
|
|
2015-05-27 11:55:04 +02:00
|
|
|
1.)
|
|
|
|
|
import logging # Global logger
|
|
|
|
|
Message into Log: logging.LOGLEVEL("MESSAGE")
|
|
|
|
|
Loglevel: debug|info|warning|error|exception|critical
|
2015-05-18 21:04:10 +02:00
|
|
|
|
2015-05-27 11:55:04 +02:00
|
|
|
2.)
|
|
|
|
|
import globals # Global variables
|
|
|
|
|
reads Data from the config.ini
|
2015-06-29 23:24:48 +02:00
|
|
|
VALUE = globals.config.get("SECTION", "OPTION")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
General for plugins:
|
|
|
|
|
--------------------
|
|
|
|
|
All Plugins have to implement the following functions (see template.py):
|
|
|
|
|
|
|
|
|
|
def onLoad():
|
|
|
|
|
"""
|
|
|
|
|
While loading the plugins by pluginLoader.loadPlugins()
|
|
|
|
|
this onLoad() routine is called one time for initialize the plugin
|
|
|
|
|
|
|
|
|
|
@requires: nothing
|
|
|
|
|
|
|
|
|
|
@return: nothing
|
|
|
|
|
@exception: Exception if init has an fatal error so that the plugin couldn't work
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
def run(typ,freq,data):
|
|
|
|
|
"""
|
|
|
|
|
This function is the implementation of the Plugin.
|
|
|
|
|
|
|
|
|
|
If necessary the configuration hast to be set in the config.ini.
|
|
|
|
|
|
|
|
|
|
@type typ: string (FMS|ZVEI|POC)
|
|
|
|
|
@param typ: Typ of the dataset
|
|
|
|
|
@type data: map of data (structure see interface.txt)
|
|
|
|
|
@param data: Contains the parameter for dispatch
|
|
|
|
|
@type freq: string
|
|
|
|
|
@keyword freq: frequency of the SDR Stick
|
|
|
|
|
|
|
|
|
|
@requires: If necessary the configuration hast to be set in the config.ini.
|
|
|
|
|
|
|
|
|
|
@return: nothing
|
|
|
|
|
@exception: nothing, make sure this function will never thrown an exception
|
|
|
|
|
"""
|