<s> from ztag . annotation import * <EOL> class RockwellAutomationAnnotation ( Annotation ) : <EOL> protocol = protocols . MODBUS <EOL> subprotocol = protocols . MODBUS . DEVICE_ID <EOL> port = None <EOL> def process ( self , obj , meta ) : <EOL> vendor = obj [ "<STR_LIT>" ] [ "<STR_LIT>" ] [ "<STR_LIT>" ] . lower ( ) <EOL> if "<STR_LIT>" in vendor or "<STR_LIT>" in vendor : <EOL> meta . global_metadata . manufacturer = Manufacturer . ROCKWELL <EOL> return meta <EOL> class RockwellAutomation141 ( Annotation ) : <EOL> protocol = protocols . MODBUS <EOL> subprotocol = protocols . MODBUS . DEVICE_ID <EOL> port = None <EOL> MODELS = { <EOL> "<STR_LIT>" <EOL> } <EOL> tests = { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : Manufacturer . ROCKWELL , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> } <EOL> } <EOL> } <EOL> def process ( self , obj , meta ) : <EOL> mei_objs = obj [ "<STR_LIT>" ] [ "<STR_LIT>" ] <EOL> vendor = mei_objs [ "<STR_LIT>" ] <EOL> product_code = mei_objs [ "<STR_LIT>" ] <EOL> if "<STR_LIT>" not in vendor . lower ( ) : <EOL> return <EOL> if "<STR_LIT>" not in product_code . lower ( ) : <EOL> return <EOL> meta . global_metadata . manufacturer = Manufacturer . ROCKWELL <EOL> meta . global_metadata . product = product_code . strip ( ) <EOL> revision = mei_objs . get ( "<STR_LIT>" , "<STR_LIT>" ) . strip ( ) <EOL> if revision : <EOL> meta . global_metadata . revision = revision <EOL> return meta </s>
