def deserialize(project, msg): t = msg.smd4 cmp = SMD4Component(None, None, None, project, t.side1Pins, t.side2Pins, t.side3Pins, t.side4Pins, t.dim1Body, t.dim1PinEdge, t.dim2Body, t.dim2PinEdge, t.pinContactLength, t.pinContactWidth, t.pinSpacing) Component.deserializeTo(project, msg.common, cmp) return cmp
def deserialize(project: 'Project', msg: ser.Component.Reader) -> Component: t = msg.smd4 cmp = SMD4Component( project, Vec2(0,0), 0, SIDE.Top, # Placeholder values project, t.side1Pins, t.side2Pins, t.side3Pins, t.side4Pins, t.dim1Body, t.dim1PinEdge, t.dim2Body, t.dim2PinEdge, t.pinContactLength, t.pinContactWidth, t.pinSpacing) Component.deserializeTo(project, msg.common, cmp) return cmp
def deserialize(project, dip_msg): m = dip_msg.dip cmp = DIPComponent.__new__(DIPComponent) Component.deserializeTo(project, dip_msg.common, cmp) cmp.__my_init(m.pinCount, m.pinSpace, m.pinWidth, m.padSize, project) return cmp
def deserialize(project: 'Project', sip_msg: 'ser.Component.Reader') -> Component: m = sip_msg.sip cmp : SIPComponent = SIPComponent.__new__(SIPComponent) Component.deserializeTo(project, sip_msg.common, cmp) cmp.__my_init(m.pinCount, m.pinSpace, m.padSize) return cmp
def deserialize(project: 'Project', dip_msg: 'ser.Component.Reader') -> Component: m = dip_msg.dip cmp : DIPComponent = DIPComponent.__new__(DIPComponent) Component.deserializeTo(project, dip_msg.common, cmp) cmp.__my_init(m.pinCount, m.pinSpace, m.pinWidth, m.padSize, project) return cmp