Lolitech@545: #!/usr/bin/env python Lolitech@545: # -*- coding: utf-8 -*- Lolitech@545: Lolitech@545: #This file is part of Beremiz, a Integrated Development Environment for Lolitech@545: #programming IEC 61131-3 automates supporting plcopen standard and CanFestival. Lolitech@545: # Lolitech@545: #Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD Lolitech@545: # Lolitech@545: #See COPYING file for copyrights details. Lolitech@545: # Lolitech@545: #This library is free software; you can redistribute it and/or Lolitech@545: #modify it under the terms of the GNU General Public Lolitech@545: #License as published by the Free Software Foundation; either Lolitech@545: #version 2.1 of the License, or (at your option) any later version. Lolitech@545: # Lolitech@545: #This library is distributed in the hope that it will be useful, Lolitech@545: #but WITHOUT ANY WARRANTY; without even the implied warranty of Lolitech@545: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lolitech@545: #General Public License for more details. Lolitech@545: # Lolitech@545: #You should have received a copy of the GNU General Public Lolitech@545: #License along with this library; if not, write to the Free Software Lolitech@545: #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Lolitech@545: Lolitech@545: from LPCBootProto import * Lolitech@545: from LPCObject import * Lolitech@545: Lolitech@545: class LPCBootObject(LPCObject): Lolitech@545: def __init__(self, pluginsroot, comportstr): Lolitech@545: LPCObject.__init__(self, pluginsroot, comportstr) Lolitech@545: self.successfully_transfered = False Lolitech@545: Lolitech@545: def connect(self,comport): Lolitech@545: self.SerialConnection = LPCBootProto(comport,#number Lolitech@545: 115200, #speed Lolitech@545: 120) #timeout Lolitech@545: self.PLCStatus = "Stopped" Lolitech@545: Lolitech@545: def NewPLC(self, md5sum, data, extrafiles): Lolitech@545: self.successfully_transfered = self.HandleSerialTransaction(LOADTransaction(data)) Lolitech@548: return self.successfully_transfered Lolitech@545: Lolitech@545: def MatchMD5(self, MD5): Lolitech@545: return self.successfully_transfered Lolitech@545: Lolitech@545: Lolitech@545: def SetTraceVariablesList(self, idxs): Lolitech@545: pass Lolitech@545: Lolitech@545: def GetTraceVariables(self): Lolitech@545: return self.PLCStatus, None, None Lolitech@545: