Lines Matching refs:message

23 def PyValue2PbEnum(message, pb_spec, py_value):  argument
37 message.name = pb_spec.name
38 message.type = CompSpecMsg.TYPE_ENUM
43 setattr(message.scalar_value, scalar_type, py_value)
47 setattr(message.scalar_value, "int32_t", py_value)
50 def PyValue2PbScalar(message, pb_spec, py_value): argument
64 message.name = pb_spec.name
65 message.type = CompSpecMsg.TYPE_SCALAR
66 message.scalar_type = pb_spec.scalar_type
67 setattr(message.scalar_value, pb_spec.scalar_type, py_value)
70 def PyString2PbString(message, pb_spec, py_value): argument
84 message.name = pb_spec.name
85 message.type = CompSpecMsg.TYPE_STRING
86 message.string_value.message = py_value
87 message.string_value.length = len(py_value)
90 def PyList2PbVector(message, pb_spec, py_value): argument
104 message.name = pb_spec.name
105 message.type = CompSpecMsg.TYPE_VECTOR
107 return message
111 new_vector_message = message.vector_value.add()
113 message.vector_size = len(py_value)
114 return message
151 def PyDict2PbStruct(message, pb_spec, py_value): argument
163 message.name = pb_spec.name
164 message.type = CompSpecMsg.TYPE_STRUCT
170 attr_msg = message.struct_value.add()
207 return message
210 def PyDict2PbUnion(message, pb_spec, py_value): argument
228 message.name = pb_spec.name
229 message.type = CompSpecMsg.TYPE_UNION
237 attr_msg = message.union_value.add()
269 message.union_value.add()
275 return message
293 message = CompSpecMsg.VariableSpecificationMessage()
294 message.name = pb_spec.name
297 message.CopyFrom(py_value)
299 PyDict2PbStruct(message, pb_spec, py_value)
301 PyDict2PbUnion(message, pb_spec, py_value)
303 PyValue2PbEnum(message, pb_spec, py_value)
305 PyValue2PbScalar(message, pb_spec, py_value)
307 PyString2PbString(message, pb_spec, py_value)
309 PyList2PbVector(message, pb_spec, py_value)
315 return message