12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import message_pb2 as message
- import google.protobuf.text_format as tf
- if __name__=="__main__":
- statu=message.table_statu()
- statu.execute_statu=message.eError
- statu.statu_description="正常"
- measure_info=message.measure_info()
- measure_info.cx=0.1
- measure_info.cy=0.2
- measure_info.theta=3.0
- measure_info.length=4.5
- measure_info.width=1.8
- measure_info.height=1.4
- measure_info.wheelbase=2.77
- measure_info.border_stuta=0
- parkcmd=message.park_table()
- parkcmd.statu.CopyFrom(statu)
- parkcmd.car_number="鄂A6X3B0"
- parkcmd.unit_id=1
- parkcmd.terminal_id=0
- parkcmd.entrance_measure_info.CopyFrom(measure_info)
- print(tf.MessageToString(parkcmd,as_utf8=True))
- pickcmd=message.pick_table()
- pickcmd.statu.CopyFrom(statu)
- pickcmd.primary_key="1234-abcd"
- pickcmd.terminal_id=0
- print(tf.MessageToString(pickcmd,as_utf8=True))
- '''
-
- statu {
- execute_statu: eNormal
- statu_description: "正常"
- }
- car_number: "鄂A6X3B0"
- unit_id: 1
- terminal_id:0
- entrance_measure_info {
- cx: 0.1
- cy: 0.2
- theta: 3.0
- length: 4.5
- width: 1.8
- height: 1.4
- wheelbase: 2.77
- }
-
- statu {
- }
- unit_id: 1
- terminal_id: 2
- primary_key: "4fa9d036-3b1c-11ed-a9a2-4db9316878b6"
- actually_space_info {
- id: 1
- unit_id: 1
- floor: 5
- room_id: 1
- }
- actually_measure_info {
- cx: 0.1
- cy: 0.2
- theta: 3.0
- length: 4.5
- width: 1.8
- height: 1.5
- wheelbase: 2.77
- }
- '''
|