X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Flfta%2Fgencsvinclude.pl;h=f9c39dafc2d7e332ff85b153f0be381e90536fc4;hb=refs%2Fheads%2Fmaster;hp=a0629a3f830bf77d0eccbfb1b0c6e3ae5f7ca191;hpb=07495effe193ca3f73c3bf0ce417068f9ac9dcdd;p=com%2Fgs-lite.git diff --git a/include/lfta/gencsvinclude.pl b/include/lfta/gencsvinclude.pl index a0629a3..f9c39da 100644 --- a/include/lfta/gencsvinclude.pl +++ b/include/lfta/gencsvinclude.pl @@ -1,35 +1,36 @@ -#! /usr/bin/perl - -# ------------------------------------------------ -# Copyright 2014 AT&T Intellectual Property -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ------------------------------------------- - -open(I,"cat ../packet.h | grep '#define CSVELEMENTS' | cut -f 3 -d ' ' |"); -$num=; -close(I); -chomp $num; -printf("#ifndef CSV_MACRO_H\n#define CSV_MACRO_H\n"); -for($x=1;$x<=$num;$x++) { - printf "#define get_csv_uint_pos$x(X,Y) get_csv_uint((X),(Y),$x)\n"; - printf "#define get_csv_ullong_pos$x(X,Y) get_csv_ullong((X),(Y),$x)\n"; - printf "#define get_csv_ip_pos$x(X,Y) get_csv_ip((X),(Y),$x)\n"; - printf "#define get_csv_ipv6_pos$x(X,Y) get_csv_ipv6((X),(Y),$x)\n"; - printf "#define get_csv_string_pos$x(X,Y) get_csv_string((X),(Y),$x)\n"; - printf "#define get_csv_v_str_pos$x(X,Y) get_csv_string((X),(Y),$x)\n"; - printf "#define get_csv_bool_pos$x(X,Y) get_csv_bool((X),(Y),$x)\n"; - printf "#define get_csv_int_pos$x(X,Y) get_csv_int((X),(Y),$x)\n"; - printf "#define get_csv_llong_pos$x(X,Y) get_csv_llong((X),(Y),$x)\n"; - printf "#define get_csv_float_pos$x(X,Y) get_csv_float((X),(Y),$x)\n"; -} -print("#endif\n"); +#! /usr/bin/perl + +# ------------------------------------------------ +# Copyright 2014 AT&T Intellectual Property +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ------------------------------------------- + +open(I,"cat ../packet.h | grep '#define CSVELEMENTS' | cut -f 3 -d ' ' |"); +$num=; +close(I); +chomp $num; +printf("#ifndef CSV_MACRO_H\n#define CSV_MACRO_H\n"); +for($x=1;$x<=$num;$x++) { + printf "#define get_csv_float_to_timestamp_pos$x(X,Y) get_csv_float_to_timestamp((X),(Y),$x)\n"; + printf "#define get_csv_uint_pos$x(X,Y) get_csv_uint((X),(Y),$x)\n"; + printf "#define get_csv_ullong_pos$x(X,Y) get_csv_ullong((X),(Y),$x)\n"; + printf "#define get_csv_ip_pos$x(X,Y) get_csv_ip((X),(Y),$x)\n"; + printf "#define get_csv_ipv6_pos$x(X,Y) get_csv_ipv6((X),(Y),$x)\n"; + printf "#define get_csv_string_pos$x(X,Y) get_csv_string((X),(Y),$x)\n"; + printf "#define get_csv_v_str_pos$x(X,Y) get_csv_string((X),(Y),$x)\n"; + printf "#define get_csv_bool_pos$x(X,Y) get_csv_bool((X),(Y),$x)\n"; + printf "#define get_csv_int_pos$x(X,Y) get_csv_int((X),(Y),$x)\n"; + printf "#define get_csv_llong_pos$x(X,Y) get_csv_llong((X),(Y),$x)\n"; + printf "#define get_csv_float_pos$x(X,Y) get_csv_float((X),(Y),$x)\n"; +} +print("#endif\n");