def d_product_data (self, sr): p = Obj() p.product_id, p.software_version = sr.read('H h') p.description = sr.read_string() p.extra = sr.read_strings() return p
def d_course (self, sr): datatype = self.datatype_for('course', 1006) result = Obj() result.index = sr.read('H 2x') result.course_name = sr.read_fixed_string(16) return result