Hi Yulong, Good question. That has been on my list of things to document for a while. Does https://gerrit.fd.io/r/#/c/19389/
answer your question? Please suggest improvements and improve the text as you notice gaps. Best regards, Ole > On 7 May 2019, at 07:49, Pei, Yulong <yulong....@intel.com> wrote: > > Hello vpp-dev & csit-dev, > > I have a question about how to know data type mapping between *.api.json > with PYTHON API ? > > Let me use “./src/vnet/ip/ip.api” as example, as I know, vppapigen will > autogenerate “ip.api.json” from “ip.api” > > And then vpp_papi can autogenerate its python api from “ip.api.json”, is > there any way to know data type mapping between *.api.json with PYTHON API ? > > For example: > > In “./src/vnet/ip/ip.api”, > > define ip6_fib_details > { > u32 context; > u32 table_id; > u8 table_name[64]; > u8 address_length; > u8 address[16]; > u32 count; > u32 stats_index; > vl_api_fib_path_t path[count]; > }; > > Then in “ip.api.json”, I got, > > [ > "ip6_fib_details", > [ > "u16", > "_vl_msg_id" > ], > [ > "u32", > "context" > ], > [ > "u32", > "table_id" > ], > [ > "u8", > "table_name", > 64 > ], > [ > "u8", > "address_length" > ], > [ > "u8", > "address", > 16 > ], > [ > "u32", > "count" > ], > [ > "u32", > "stats_index" > ], > [ > "vl_api_fib_path_t", > "path", > 0, > "count" > ], > { > "crc": "0xef11e94d" > } > ], > > My question is that which kind of python data type can be used to map below > json types ? > [ > "u8", > "table_name", > 64 > ], > > [ > "u8", > "address", > 16 > ], > > [ > "vl_api_fib_path_t", > "path", > 0, > "count" > ], > > Best Regards > Yulong Pei > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > > View/Reply Online (#3484): https://lists.fd.io/g/csit-dev/message/3484 > Mute This Topic: https://lists.fd.io/mt/31529209/675193 > Group Owner: csit-dev+ow...@lists.fd.io > Unsubscribe: https://lists.fd.io/g/csit-dev/unsub [otr...@employees.org] > -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12944): https://lists.fd.io/g/vpp-dev/message/12944 Mute This Topic: https://lists.fd.io/mt/31529576/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-