6 Copyright (C) 2009-2014 8 RT-Synthesis Research Group 9 Intelligent Systems Research Institute, 10 National Institute of Advanced Industrial Science and Technology (AIST), 13 Licensed under the Eclipse Public License -v 1.0 (EPL) 14 http://www.opensource.org/licenses/eclipse-1.0.txt 32 if kind ==
'COMPONENT_PROFILE':
33 self._tgt._profile_update([x.strip()
for x
in hint.split(
',')])
34 elif kind ==
'RTC_STATUS':
35 status, ec_handle = hint.split(
':')
36 if status ==
'INACTIVE':
37 status = self._tgt.INACTIVE
38 elif status ==
'ACTIVE':
39 status = self._tgt.ACTIVE
40 elif status ==
'ERROR':
41 status = self._tgt.ERROR
42 self._tgt._set_state_in_ec(int(ec_handle), status)
43 elif kind ==
'EC_STATUS':
44 event, ec_handle = hint.split(
':')
45 if event ==
'ATTACHED':
46 event = self._tgt.EC_ATTACHED
47 elif event ==
'DETACHED':
48 event = self._tgt.EC_DETACHED
49 elif event ==
'RATE_CHANGED':
50 event = self._tgt.EC_RATE_CHANGED
51 elif event ==
'STARTUP':
52 event = self._tgt.EC_STARTUP
53 elif event ==
'SHUTDOWN':
54 event = self._tgt.EC_SHUTDOWN
55 self._tgt._ec_event(int(ec_handle), event)
56 elif kind ==
'PORT_PROFILE':
57 event, port_name = hint.split(
':')
59 event = self._tgt.PORT_ADD
60 elif event ==
'REMOVE':
61 event = self._tgt.PORT_REMOVE
62 elif event ==
'CONNECT':
63 event = self._tgt.PORT_CONNECT
64 elif event ==
'DISCONNECT':
65 event = self._tgt.PORT_DISCONNECT
66 self._tgt._port_event(port_name, event)
67 elif kind ==
'CONFIGURATION':
68 event, arg = hint.split(
':')
69 if event ==
'UPDATE_CONFIGSET':
70 event = self._tgt.CFG_UPDATE_SET
71 elif event ==
'UPDATE_PARAMETER':
72 event = self._tgt.CFG_UPDATE_PARAM
73 elif event ==
'SET_CONFIG_SET':
74 event = self._tgt.CFG_SET_SET
75 elif event ==
'ADD_CONFIG_SET':
76 event = self._tgt.CFG_ADD_SET
77 elif event ==
'REMOVE_CONFIG_SET':
78 event = self._tgt.CFG_REMOVE_SET
79 elif event ==
'ACTIVATE_CONFIG_SET':
80 event = self._tgt.CFG_ACTIVATE_SET
81 self._tgt._config_event(arg, event)
82 elif kind ==
'HEARTBEAT':
83 self._tgt._heartbeat()
92 ts = record.time.sec + record.time.nsec / 1e9
93 self.
_cb(self._tgt.name, ts, loggername, level, message)
def update_status(self, kind, hint)
def __init__(self, target, callback)
def __init__(self, target)
def publish(self, record)