Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'python/src/tcf/services/remote/SysMonitorProxy.py')
-rw-r--r--python/src/tcf/services/remote/SysMonitorProxy.py47
1 files changed, 34 insertions, 13 deletions
diff --git a/python/src/tcf/services/remote/SysMonitorProxy.py b/python/src/tcf/services/remote/SysMonitorProxy.py
index 7d9b2835c..9e2833fd5 100644
--- a/python/src/tcf/services/remote/SysMonitorProxy.py
+++ b/python/src/tcf/services/remote/SysMonitorProxy.py
@@ -1,5 +1,5 @@
-# *******************************************************************************
-# * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others.
+# *****************************************************************************
+# * Copyright (c) 2011, 2013 Wind River Systems, Inc. and others.
# * All rights reserved. self program and the accompanying materials
# * are made available under the terms of the Eclipse Public License v1.0
# * which accompanies self distribution, and is available at
@@ -7,10 +7,11 @@
# *
# * Contributors:
# * Wind River Systems - initial API and implementation
-# *******************************************************************************
+# *****************************************************************************
+
+from .. import sysmonitor
+from ...channel.Command import Command
-from tcf.services import sysmonitor
-from tcf.channel.Command import Command
class SysMonitorProxy(sysmonitor.SysMonitorService):
def __init__(self, channel):
@@ -19,9 +20,14 @@ class SysMonitorProxy(sysmonitor.SysMonitorService):
def getChildren(self, parent_context_id, done):
done = self._makeCallback(done)
service = self
+
class GetChildrenCommand(Command):
def __init__(self):
- super(GetChildrenCommand, self).__init__(service.channel, service, "getChildren", (parent_context_id,))
+ super(GetChildrenCommand, self).__init__(service.channel,
+ service,
+ "getChildren",
+ (parent_context_id,))
+
def done(self, error, args):
contexts = None
if not error:
@@ -31,27 +37,37 @@ class SysMonitorProxy(sysmonitor.SysMonitorService):
done.doneGetChildren(self.token, error, contexts)
return GetChildrenCommand().token
- def getContext(self, id, done):
+ def getContext(self, contextID, done):
done = self._makeCallback(done)
service = self
+
class GetContextCommand(Command):
def __init__(self):
- super(GetContextCommand, self).__init__(service.channel, service, "getContext", (id,))
+ super(GetContextCommand, self).__init__(service.channel,
+ service, "getContext",
+ (contextID,))
+
def done(self, error, args):
ctx = None
if not error:
assert len(args) == 2
error = self.toError(args[0])
- if args[1]: ctx = sysmonitor.SysMonitorContext(args[1])
+ if args[1]:
+ ctx = sysmonitor.SysMonitorContext(args[1])
done.doneGetContext(self.token, error, ctx)
return GetContextCommand().token
- def getCommandLine(self, id, done):
+ def getCommandLine(self, contextID, done):
done = self._makeCallback(done)
service = self
+
class GetCommandLineCommand(Command):
def __init__(self):
- super(GetCommandLineCommand, self).__init__(service.channel, service, "getCommandLine", (id,))
+ super(GetCommandLineCommand, self).__init__(service.channel,
+ service,
+ "getCommandLine",
+ (contextID,))
+
def done(self, error, args):
arr = None
if not error:
@@ -61,12 +77,17 @@ class SysMonitorProxy(sysmonitor.SysMonitorService):
done.doneGetCommandLine(self.token, error, arr)
return GetCommandLineCommand().token
- def getEnvironment(self, id, done):
+ def getEnvironment(self, contextID, done):
done = self._makeCallback(done)
service = self
+
class GetEnvironmentCommand(Command):
def __init__(self):
- super(GetEnvironmentCommand, self).__init__(service.channel, service, "getEnvironment", (id,))
+ super(GetEnvironmentCommand, self).__init__(service.channel,
+ service,
+ "getEnvironment",
+ (contextID,))
+
def done(self, error, args):
arr = None
if not error:

Back to the top