Subversion Repositories HomeAutomation

Rev

Rev 746 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 746 Rev 747
Line 84... Line 84...
84
                       ['rembridge', self.remBridgeCmd, '<id>', 'remove bridge\n'],
84
                       ['rembridge', self.remBridgeCmd, '<id>', 'remove bridge\n'],
85
                       ['tcpd', self.tcpdCmd, '<cmd>', 'tcpd server control: \"help tcpd\"'],
85
                       ['tcpd', self.tcpdCmd, '<cmd>', 'tcpd server control: \"help tcpd\"'],
86
                       ['tlsd', self.tlsdCmd, '<cmd>', 'tlsd server control: \"help tlsd\"'],
86
                       ['tlsd', self.tlsdCmd, '<cmd>', 'tlsd server control: \"help tlsd\"'],
87
                       ['canctld', self.canCtldCmd, '<cmd>', 'canctld server control: \"help canctld\"\n'],
87
                       ['canctld', self.canCtldCmd, '<cmd>', 'canctld server control: \"help canctld\"\n'],
88
                       ['status', self.statusCmd, '', 'show daemon status'],
88
                       ['status', self.statusCmd, '', 'show daemon status'],
89
                       ['stats', self.statsCmd, '', 'show statistics\n'],
89
                       ['stats', self.statsCmd, '', 'show statistics'],
90
                       ['nodelist', self.nodesCmd, '', 'list can nodes'],
90
                       ['nodelist', self.nodesCmd, '', 'list can nodes\n'],
91
                       ['filterlist', self.filterlistCmd, '', 'list active filters\n'],
-
 
92
                       ['sim', self.simCmd, '<cmd>', 'simulator commands: \"help sim\"']]
91
                       ['sim', self.simCmd, '<cmd>', 'simulator commands: \"help sim\"']]
93
       
92
       
94
        index = 0
93
        index = 0
95
        for cmd in self.command_list:
94
        for cmd in self.command_list:
96
            self.command_map[cmd[0]] = index
95
            self.command_map[cmd[0]] = index
Line 228... Line 227...
228
   
227
   
229
    def statsCmd(self, *args):
228
    def statsCmd(self, *args):
230
        raise 'not implemented'
229
        raise 'not implemented'
231
   
230
   
232
    def nodesCmd(self, *args):
231
    def nodesCmd(self, *args):
233
        raise 'not implemented'
-
 
234
   
-
 
235
    def filterlistCmd(self, *args):
-
 
236
        raise 'not implemented'
232
        raise 'not implemented'
237
   
233
   
238
    def simCmd(self, *args):
234
    def simCmd(self, *args):
239
        raise 'not implemented'
235
        raise 'not implemented'
240
   
236
   
Line 321... Line 317...
321
# #       ifConfig = NodeIfSerial.DEFAULT_CONFIG
317
# #       ifConfig = NodeIfSerial.DEFAULT_CONFIG
322
        ifConfig = NodeIfTCP.DEFAULT_CONFIG
318
        ifConfig = NodeIfTCP.DEFAULT_CONFIG
323
#    
319
#    
324
        atexit.register(self.exitHelper)
320
        atexit.register(self.exitHelper)
325
        sys.excepthook = self.exceptHelper
321
        sys.excepthook = self.exceptHelper
326
        self.nodeIf = NodeIfTCP(pktHandler, self.ifNotifier ,None)
322
        self.nodeIf = NodeIfTCP(pktHandler, self.ifNotifier, None)
327
#       self.nodeIf = NodeIfSerial(pktHandler, ifConfig)
323
#       self.nodeIf = NodeIfSerial(pktHandler, ifConfig)
328
#        
324
#        
329
        if not self.nodeIf.start():
325
        if not self.nodeIf.start():
330
            print 'FATAL: Failed to initialize node interface.'
326
            print 'FATAL: Failed to initialize node interface.'
331
            print 'This may indicate that the interface is unavailable, ' \
327
            print 'This may indicate that the interface is unavailable, ' \