-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from hpuhr/devel
Devel
- Loading branch information
Showing
30 changed files
with
1,111 additions
and
136 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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name":"cat062_spf_artas", | ||
"type":"SimpleSpecialPurposeField", | ||
"items":[ | ||
{ | ||
"name":"Target Report Identifiers", | ||
"type":"repetitive", | ||
"repetition_item":{ | ||
"name":"REP", | ||
"type":"fixed_bytes", | ||
"length":1, | ||
"data_type":"uint" | ||
}, | ||
"items":[ | ||
{ | ||
"name":"TRI", | ||
"comment":"", | ||
"type":"fixed_bytes", | ||
"length":4, | ||
"data_type":"bin" | ||
} | ||
] | ||
} | ||
] | ||
} |
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
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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef SPECIALPURPOSEFIELD_H | ||
#define SPECIALPURPOSEFIELD_H | ||
|
||
#include <jasterix/itemparserbase.h> | ||
|
||
#include <vector> | ||
#include <memory> | ||
|
||
namespace jASTERIX | ||
{ | ||
// decodes a field specification/availablity field (ending with extend bit), and list of items | ||
class SpecialPurposeField : public ItemParserBase | ||
{ | ||
public: | ||
SpecialPurposeField (const nlohmann::json& item_definition); | ||
virtual ~SpecialPurposeField() override; | ||
|
||
virtual size_t parseItem (const char* data, size_t index, size_t size, size_t current_parsed_bytes, | ||
nlohmann::json& target, bool debug) override; | ||
protected: | ||
std::unique_ptr<ItemParserBase> complex_field_specification_; | ||
std::vector<std::string> complex_items_names_; | ||
std::map<std::string, std::unique_ptr<ItemParserBase>> complex_items_; | ||
|
||
std::vector<std::unique_ptr<ItemParserBase>> simple_items_; | ||
|
||
size_t parseSimpleItem (const char* data, size_t index, size_t size, size_t current_parsed_bytes, | ||
nlohmann::json& target, bool debug); | ||
|
||
size_t parseComplexItem (const char* data, size_t index, size_t size, size_t current_parsed_bytes, | ||
nlohmann::json& target, bool debug); | ||
|
||
}; | ||
|
||
} | ||
|
||
#endif // SPECIALPURPOSEFIELD_H |
Oops, something went wrong.