Lines Matching refs:field

118   """Represents a field in TPM structure or union.
132 from zero to MAX_SIZE. The field 'size' denotes the actual number of
144 the field named 'rsa' will have its 'selector_value' set to 'TPM_ALG_RSA'.
147 field_type: a string, the type of field.
148 field_name: a string, the name of the field.
178 field_type: Initial value for the field type attribute.
179 field_name: Initial value for the field name attribute.
189 # (processing of TPM_ALG_NULL in this example). Setting field name to ''
191 # entry for this field, setting type of such field to some value
204 """Write a call to marshal the field this instance represents.
223 """Write a call to unmarshal the field this instance represents.
288 # of type 'type' into a field 'name' within a structure. This is used in
339 def OutputMarshalCall(self, out_file, field):
343 field |field_name| in structure 'source'.
347 field: A Field object describing this type.
349 out_file.write(self._MARSHAL_CALL % {'type': field.field_type,
350 'name': field.field_name})
352 def OutputUnmarshalCall(self, out_file, field):
355 Assigns result of unmarshaling field |field_name| in structure 'source'
360 field: A Field object describing this type.
362 obj_type = field.field_type
366 'name': field.field_name})
833 self, out_file, field):
842 field: A Field object representing an element of this interface.
846 self._CONDITIONAL_UNMARSHAL_CALL % {'type': field.field_type,
847 'name': field.field_name,
848 'flag': field.conditional_value})
850 out_file.write(self._UNMARSHAL_CALL % {'type': field.field_type,
851 'name': field.field_name})
863 valid_tag_values: A list of values field tag is allowed to take.
924 def AddField(self, field):
925 """Adds a field to fields attribute in Structure.
928 field: Instance of Field
930 self.fields.append(field)
933 """Adds an upper bound for a field.
936 field_name: Name of field with bound.
944 """Adds a lower bound for a field.
947 field_name: Name of field with bound.
955 """Adds a valid value for tag field.
958 value: Valid value for tag field.
963 """Creates a set which holds all current field types.
966 A set of field types.
968 return set([field.field_type for field in self.fields])
990 # If any field is an array, create local variable INT32 i.
991 for field in self.fields:
992 if field.array_size:
995 for field in self.fields:
1002 field.field_name = 't.' + field.field_name
1003 if field.run_time_size:
1004 field.run_time_size = 't.' + field.run_time_size
1005 field.OutputMarshal(out_file, typemap)
1013 # If any field is an array, create local variable INT32 i.
1014 for field in self.fields:
1015 if field.array_size:
1018 for field in self.fields:
1019 field.OutputUnmarshal(out_file, typemap)
1021 if field.field_name == 't.size' and self.size_check:
1023 if field.field_name == 't.size' and not self.size_check:
1026 if field.field_name in self.upper_bounds:
1027 if (field.field_name == 'count' or
1028 field.field_name == 't.size' or
1029 field.field_name == 'size'):
1032 {'name': field.field_name,
1034 'bound_value': self.upper_bounds[field.field_name],
1036 if field.field_name in self.lower_bounds:
1037 if (field.field_name == 'count' or
1038 field.field_name == 't.size' or
1039 field.field_name == 'size'):
1042 {'name': field.field_name,
1044 'bound_value': self.lower_bounds[field.field_name],
1046 if field.field_name == 'tag' and self.valid_tag_values:
1177 def AddField(self, field):
1178 """Adds a field to fields attribute in Union.
1181 field: instance of Field
1184 if field.field_name == 'xor':
1185 field.field_name = 'xor_'
1186 self.fields.append(field)
1190 """Write a call to marshal a field in this union.
1194 field_type: The type of field.
1195 field_name: The name of the field.
1196 array_length: Variable indicating length of array, None if field is not
1209 """Write a call to unmarshal a field in this union.
1213 field_type: The type of field.
1214 field_name: The name of the field.
1215 array_length: Variable indicating length of array, None if field is not
1268 for field in self.fields:
1269 selector = field.selector_value
1272 field_name = field.field_name
1292 for field in self.fields:
1293 selector = field.selector_value
1296 field_name = field.field_name
1325 def OutputMarshalCall(self, out_file, field):
1332 field: A Field object representing a member of this union
1335 {'type': field.field_type,
1336 'name': field.field_name,
1337 'selector': field.selector_value})
1339 def OutputUnmarshalCall(self, out_file, field):
1346 field: A Field object representing a member of this union
1349 {'type': field.field_type,
1350 'name': field.field_name,
1351 'selector': field.selector_value})