-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging v2.0.0. from dev. * ready to make xenon namespace * broken * prog with new ns * xenon converted to xenon namespace complete * oops, not quite * Continue port to xenon namespace Renamed include/ict to include/xenon. Copied a couple ict files over to ict repo. Still have to purge ict files from xenon and their unit tests. * prog * prog with exceptions * prog * ict::exception removed * prog with xml_error * ready to add ict submodule * added ict submodule * prog * minor * updated copy
- Loading branch information
Showing
290 changed files
with
1,190 additions
and
6,480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "include/ict"] | ||
path = include/ict | ||
url = https://github.com/intrig/ict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,48 @@ | ||
#include <iostream> | ||
#include <ict/xenon.h> | ||
#include <ict/command.h> | ||
|
||
using std::cout; | ||
using std::cerr; | ||
|
||
int main(int argc, char ** argv) { | ||
try { | ||
ict::spec_server ss; | ||
|
||
ict::command line("sibs", | ||
"Example to parse a sib message containing another.", | ||
"sibs [options]"); | ||
line.add(ict::option("xddl_path", 'X', "XDDL path", "", [&](const std::string & v){ | ||
ss.xddl_path.push_back(v); | ||
})); | ||
|
||
line.parse(argc, argv); | ||
|
||
auto start = ict::get_record(ss, "icd.xddl"); | ||
auto msg = ict::parse(start, "220008342E1F7F61BA04C697D176821A7A9F4EA20663F3"); | ||
|
||
// display sib message | ||
cout << ict::to_text(msg) << '\n'; | ||
|
||
// grab the inner sib. The '//' means it doesn't have to be a direct child of msg.root() | ||
auto c = ict::find(msg.root(), "//SIB-Data-variable"); | ||
if (c==msg.end()) IT_THROW("can't find SIB-Data-variable"); | ||
|
||
// display the bits of the inner sib | ||
cout << c->name() << " " << c->bits << "\n"; | ||
|
||
// now parse the inner sib as a SysInfoType19 | ||
// We first get the record we are interested from the spec, and then use it to parse. | ||
start = ict::get_record(ss, "3GPP/TS-25.331.xddl#SysInfoType19"); | ||
auto inner = ict::parse(start, c->bits); | ||
|
||
// display inner sib | ||
cout << ict::to_text(inner, "nlvsFL"); | ||
} | ||
|
||
catch (std::exception & e) { | ||
cerr << e.what() << "\n"; | ||
} | ||
} | ||
//-- Copyright 2016 Intrig | ||
//-- See https://github.com/intrig/xenon for license. | ||
#include <iostream> | ||
#include <ict/command.h> | ||
#include <xenon/xenon.h> | ||
|
||
using std::cout; | ||
using std::cerr; | ||
|
||
int main(int argc, char ** argv) { | ||
try { | ||
xenon::spec_server ss; | ||
|
||
ict::command line("sibs", | ||
"Example to parse a sib message containing another.", | ||
"sibs [options]"); | ||
line.add(ict::option("xddl_path", 'X', "XDDL path", "", [&](const std::string & v){ | ||
ss.xddl_path.push_back(v); | ||
})); | ||
|
||
line.parse(argc, argv); | ||
|
||
auto start = xenon::get_record(ss, "icd.xddl"); | ||
auto msg = xenon::parse(start, "220008342E1F7F61BA04C697D176821A7A9F4EA20663F3"); | ||
|
||
// display sib message | ||
cout << xenon::to_text(msg) << '\n'; | ||
|
||
// grab the inner sib. The '//' means it doesn't have to be a direct child of msg.root() | ||
auto c = xenon::find(msg.root(), "//SIB-Data-variable"); | ||
if (c==msg.end()) IT_PANIC("can't find SIB-Data-variable"); | ||
|
||
// display the bits of the inner sib | ||
cout << c->name() << " " << c->bits << "\n"; | ||
|
||
// now parse the inner sib as a SysInfoType19 | ||
// We first get the record we are interested from the spec, and then use it to parse. | ||
start = xenon::get_record(ss, "3GPP/TS-25.331.xddl#SysInfoType19"); | ||
auto inner = xenon::parse(start, c->bits); | ||
|
||
// display inner sib | ||
cout << xenon::to_text(inner, "nlvsFL"); | ||
} | ||
|
||
catch (std::exception & e) { | ||
cerr << e.what() << "\n"; | ||
} | ||
} |
Oops, something went wrong.