X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=schemaparser%2FREADME.txt;fp=schemaparser%2FREADME.txt;h=4a4df570357f8d36b5fc2e59bb09564c0451e853;hb=783f6bfa93c3eed4787bded3c35016952b74b2e3;hp=0000000000000000000000000000000000000000;hpb=5b238b84dd6a6fb77a68f9b37906b465ab08a7fd;p=ric-app%2Fmc.git diff --git a/schemaparser/README.txt b/schemaparser/README.txt new file mode 100644 index 0000000..4a4df57 --- /dev/null +++ b/schemaparser/README.txt @@ -0,0 +1,59 @@ +MC-NIB Schema Parser library + +Use this library to parse records fetched from the MC-NIB + +The schema parser library consists of 7 files + block_allocator.cc + block_allocator.h + json.cc + json.h + schemaparser.h + schemaparser_impl.h + schemaparser.cc + +If you enter + make +you will build mc_schema.a. + +To use the MC-NIB schema parser, include + schemaparser.h +and link against + mc_schema.a + +This directory also contains some examples and utilities. +However to build them you need to have lsdl installed. + +To build the examples and utilities, enter + make utils + +mc_extract + This utility accepts table name and an optional key prefix. + The utility will fetch all records in the MC-NIB from that table + whose key matches the prefix and print formatted output. + This utility also serves as an example of schema parser library usage. + - mc_extract will attempt to fetch the schema from ther MC-NIB. + If the schema isn't in the MC-NIB (see below), an optional parameter + is the name of the schema file. Use the provided file nib.json + +sample2 + This example illustrates various ways of extracting fields using + the schema parser. + +mc_store_schema + mc_extract will attempt to store a schema in the MC-NIB. + Use this utility to store nib.json as the schema in the MC-NIB. + +load_mcnib1 + This utility loads several records into the MC-NIB for mc_extract + to fetch, using the table definition throughput_ue + +mc_keys + This utility will fetch all keys from MC-NIB which match an optional prefix + +mc_extract_string + This utility will fetch and print all strings in the MC-NIB which match + an optional prefix. No interpretation is done, so this utility is + mostly useful for extracting the schema, under key _schema + + +