nuova logica per compilare i comandi
parent
4c361f2cc3
commit
e9f7e6e3b5
|
|
@ -44,15 +44,15 @@ MKPcommands = {
|
||||||
'defPrefix': False,
|
'defPrefix': False,
|
||||||
'begin': '\x02', #STX
|
'begin': '\x02', #STX
|
||||||
'end': '\x03', #ETX
|
'end': '\x03', #ETX
|
||||||
'command': 'TZ',
|
'command': 'TZ{imagename};{printMode};{queueNo};{delay}\r{fieldContent}{counterStart}',
|
||||||
'success': '\x06\x02([0-9])OK\x03',
|
'success': '\x06\x02([0-9])OK\x03',
|
||||||
'error': '([0-9])E([0-9])',
|
'error': '([0-9])E([0-9])',
|
||||||
'args': ['imageName', 'printMode', 'fieldContent']
|
'args': ['imageName', 'printMode', 'fieldContent'],
|
||||||
|
'optArgs': ['queueNo', 'delay', 'counterStart']
|
||||||
},
|
},
|
||||||
'sendImage': {
|
'sendImage': {
|
||||||
'defPrefix': True,
|
'defPrefix': True,
|
||||||
'command': 'EW----;',
|
'command': 'EW----;{imageName}',
|
||||||
'success': None,
|
'success': None,
|
||||||
'error': None,
|
'error': None,
|
||||||
'args': ['imageName']
|
'args': ['imageName']
|
||||||
|
|
@ -77,14 +77,14 @@ MKPcommands = {
|
||||||
},
|
},
|
||||||
'deleteImage': {
|
'deleteImage': {
|
||||||
'defPrefix': True,
|
'defPrefix': True,
|
||||||
'command': 'EQ----;',
|
'command': 'EQ----;{imageName}',
|
||||||
'success': 'OK\r',
|
'success': 'OK\r',
|
||||||
'error': 'Err\r',
|
'error': 'Err\r',
|
||||||
'args': ['imageName']
|
'args': ['imageName']
|
||||||
},
|
},
|
||||||
'sendDate': {
|
'sendDate': {
|
||||||
'defPrefix': True,
|
'defPrefix': True,
|
||||||
'command': '*STD',
|
'command': '*STD{dateTime};{offset}',
|
||||||
'success': 'Ok\r',
|
'success': 'Ok\r',
|
||||||
'error': 'Err\r',
|
'error': 'Err\r',
|
||||||
'args': ['dateTime','offset']
|
'args': ['dateTime','offset']
|
||||||
|
|
@ -94,7 +94,6 @@ MKPcommands = {
|
||||||
'command': '*GSTD',
|
'command': '*GSTD',
|
||||||
'success': True,
|
'success': True,
|
||||||
'error': None,
|
'error': None,
|
||||||
'args': ['dateTime']
|
|
||||||
},
|
},
|
||||||
'status': {
|
'status': {
|
||||||
'defPrefix': True,
|
'defPrefix': True,
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,9 @@
|
||||||
09-27 15:54:43|WARNING|<module> |36 : MarcaturaDime Started!
|
09-27 15:54:43|WARNING|<module> |36 : MarcaturaDime Started!
|
||||||
09-27 15:55:11|WARNING|<module> |36 : MarcaturaDime Started!
|
09-27 15:55:11|WARNING|<module> |36 : MarcaturaDime Started!
|
||||||
|
09-27 16:42:33|WARNING|<module> |49 : MarcaturaDime Started!
|
||||||
|
09-27 16:42:46|WARNING|<module> |50 : MarcaturaDime Started!
|
||||||
|
09-27 16:42:57|WARNING|<module> |50 : MarcaturaDime Started!
|
||||||
|
09-27 16:43:07|WARNING|<module> |50 : MarcaturaDime Started!
|
||||||
|
09-27 16:44:46|WARNING|<module> |50 : MarcaturaDime Started!
|
||||||
|
09-27 16:48:41|WARNING|<module> |50 : MarcaturaDime Started!
|
||||||
|
09-27 17:24:19|WARNING|<module> |50 : MarcaturaDime Started!
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ def main():
|
||||||
lastTimestamp = int(time.time()*100)
|
lastTimestamp = int(time.time()*100)
|
||||||
commandString = test.cmdString('callPrintImage', {'imageName': 'TM2.00I',
|
commandString = test.cmdString('callPrintImage', {'imageName': 'TM2.00I',
|
||||||
'printMode': '10',
|
'printMode': '10',
|
||||||
'fieldContent': '\r{0}\r{0}\r'.format(lastTimestamp)
|
'fieldContent': '{0}\r{0}\r'.format(lastTimestamp)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
LOGGER.debug(commandString)
|
LOGGER.debug(commandString)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue