def initialize(probePaths = ["../plugins/probes"], codecPaths = ["../plugins/codecs"]):
	# CodecManager logging diversion
	CodecManager.instance().setLogCallback(logging.getLogger("Agent.Codec").debug)
	# ProbeImplementationManager logging diversion
	ProbeImplementationManager.setLogger(logging.getLogger("Agent.Probe"))
	# Loading plugins: probes & codecs
	localPath = os.path.normpath(os.path.realpath(os.path.dirname(sys.modules[globals()['__name__']].__file__)))
	scanPlugins([ ((os.path.isabs(x) and x) or os.path.normpath(os.path.realpath('%s/%s' % (os.getcwd(), x)))) for x in codecPaths], label = "codec")
	scanPlugins([ ((os.path.isabs(x) and x) or os.path.normpath(os.path.realpath('%s/%s' % (os.getcwd(), x)))) for x in probePaths], label = "probe")
Beispiel #2
0
def instance():
    return CodecManager.instance()
Beispiel #3
0
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
##

##
# Codec manager - view from the TE
##

import CodecManager
import TestermanTCI

from CodecManager import CodecNotFoundException

CodecManager.instance().setLogCallback(
    lambda x: TestermanTCI.logInternal("CD: %s" % x))


def instance():
    return CodecManager.instance()


def alias(name, codec, **kwargs):
    return instance().alias(name, codec, **kwargs)


def registerCodecClass(name, class_):
    return instance().registerCodecClass(name, class_)


def encode(name, template):
Beispiel #4
0
def instance():
	return CodecManager.instance()
Beispiel #5
0
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
##

##
# Codec manager - view from the TE
##

import CodecManager
import TestermanTCI

from CodecManager import CodecNotFoundException


CodecManager.instance().setLogCallback(lambda x: TestermanTCI.logInternal("CD: %s" % x))

def instance():
	return CodecManager.instance()

def alias(name, codec, **kwargs):
	return instance().alias(name, codec, **kwargs)

def registerCodecClass(name, class_):
	return instance().registerCodecClass(name, class_)

def encode(name, template):
	return instance().encode(name, template)

def decode(name, data):
	return instance().decode(name, data)