- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
def ex(self,e,txt):
s=self
s.log.debug(txt)
s.log.error('{} {}'.format(e.__class__.__name__,e.message))
s.err=+1
def doIt(self, files):
s=self
if not s._iec:
try:
IOStream = serial.Serial(s._port_name,
baudrate=19200,
bytesize=8,
parity='N',
stopbits=1,
timeout=5)
except serial.SerialException as e:
s.ex(e,sys._getframe(0).f_code.co_name)
return
else:
iec_opening = s.IECOpening(s._port_name, s._iec_parameters)
IOStream = iec_opening.IOStream
s._hdlc = HDLCProtocol(self._hdlcParamaters, IOStream=IOStream)
s.show_info()
try:
s._hdlc.connect()
except icube.ezhdlc.ezhdlcexception.EzHdlcException as e:
s.ex(e,sys._getframe(0).f_code.co_name)
return
guest 01.09.2015 10:31 # 0
def justDoIt: