ifw-daq
3.0.0-pre2
IFW Data Acquisition modules
|
Classes | |
struct | KeywordFilter |
struct | KeywordTransform |
struct | FitsKeywordsSource |
struct | FitsFileSource |
struct | DpSpecError |
struct | DpSpec |
Close representation of the JSON structure but with stronger types. More... | |
struct | Location |
Describes parsed location string into its components "host" and "path". More... | |
struct | SchemaError |
JSON Schema error. More... | |
struct | StartDaqV2SpecError |
struct | StartDaqV2Spec |
Structure with a close mapping from JSON representation in the StartDaqV2 MAL request. More... | |
class | TestParseLocation |
class | TestParseDpSpec |
class | TestParseStartDaqV2Spec |
Typedefs | |
using | KeywordRuleTypes = std::variant< KeywordFilter, KeywordTransform > |
using | KeywordRules = std::vector< KeywordRuleTypes > |
using | ErrorType = StartDaqV2SpecError |
Enumerations | |
enum class | InitialKeywords { All , User , None } |
Functions | |
bool | operator== (KeywordFilter const &lhs, KeywordFilter const &rhs) noexcept |
bool | operator== (KeywordTransform const &lhs, KeywordTransform const &rhs) noexcept |
bool | operator== (FitsKeywordsSource const &lhs, FitsKeywordsSource const &rhs) noexcept |
bool | operator== (FitsFileSource const &lhs, FitsFileSource const &rhs) noexcept |
FitsKeywordsSource | ParseFitsKeywordsSource (Json const &json, JsonPointer const &breadcrumb) |
FitsFileSource | ParseFitsFileSource (Json const &json, JsonPointer const &breadcrumb) |
KeywordFilter | ParseKeywordFilter (Json const &json, JsonPointer const &breadcrumb) |
KeywordTransform | ParseKeywordTransform (Json const &json, JsonPointer const &breadcrumb) |
InitialKeywords | ParseInitialKeywords (nlohmann::json const &json, nlohmann::json_pointer< nlohmann::json > const &breadcrumb) |
KeywordRules | ParseKeywordRules (Json const &json, JsonPointer const &breadcrumb) |
void | to_json (nlohmann::json &out, KeywordFilter const &s) |
void | to_json (nlohmann::json &out, KeywordTransform const &s) |
void | to_json (nlohmann::json &out, KeywordRuleTypes const &s) |
void | to_json (nlohmann::json &out, FitsKeywordsSource const &s) |
void | to_json (nlohmann::json &out, FitsFileSource const &s) |
DpSpec::Target | ParseTarget (Json const &json, JsonPointer const &breadcrumb) |
DpSpec::SourceTypes | ParseSource (Json const &json, JsonPointer const &breadcrumb) |
DpSpec | ParseDpSpec (nlohmann::json const &spec) |
Parse JSON to construct the DpSpec structure. More... | |
Location | ParseSourceLocation (std::string const &location) |
Parse location string from DpSpec into component parts. More... | |
void | to_json (nlohmann::json &j, DpSpec const &s) |
void | to_json (nlohmann::json &j, DpSpec::Target const &s) |
void | to_json (nlohmann::json &j, DpSpec::SourceTypes const &s) |
KeywordFilter | ParseKeywordFilter (nlohmann::json const &json, nlohmann::json_pointer< nlohmann::json > const &breadcrumb) |
KeywordTransform | ParseKeywordTransform (nlohmann::json const &json, nlohmann::json_pointer< nlohmann::json > const &breadcrumb) |
KeywordRules | ParseKeywordRules (nlohmann::json const &json, nlohmann::json_pointer< nlohmann::json > const &breadcrumb) |
FitsKeywordsSource | ParseFitsKeywordsSource (nlohmann::json const &json, nlohmann::json_pointer< nlohmann::json > const &breadcrumb) |
FitsFileSource | ParseFitsFileSource (nlohmann::json const &json, nlohmann::json_pointer< nlohmann::json > const &breadcrumb) |
bool | operator== (StartDaqV2Spec::PrimaryDataSource const &lhs, StartDaqV2Spec::PrimaryDataSource const &rhs) noexcept |
bool | operator== (StartDaqV2Spec::MetadataSource const &lhs, StartDaqV2Spec::MetadataSource const &rhs) noexcept |
bool | operator== (StartDaqV2Spec::MergeTarget const &lhs, StartDaqV2Spec::MergeTarget const &rhs) noexcept |
bool | operator== (StartDaqV2Spec const &lhs, StartDaqV2Spec const &rhs) noexcept |
StartDaqV2Spec | ParseStartDaqV2Spec (nlohmann::json const &json) |
Parse StartDaqSpec. More... | |
void | to_json (nlohmann::json &json, StartDaqV2Spec const &spec) |
Serialize to JSON. More... | |
void | ParseDataSource (StartDaqV2Spec::DataSource &out, Json const &json, JsonPointer const &breadcrumb) |
Parse the common parts of PrimaryDataSource and MetadataSource. More... | |
void | to_json (nlohmann::json &out, StartDaqV2Spec::DataSource const &s) |
void | to_json (nlohmann::json &out, StartDaqV2Spec::PrimaryDataSource const &s) |
void | to_json (nlohmann::json &out, StartDaqV2Spec::MetadataSource const &s) |
void | to_json (nlohmann::json &out, StartDaqV2Spec::DataSourceTypes const &s) |
void | to_json (nlohmann::json &out, StartDaqV2Spec::MergeTarget const &t) |
TEST_F (TestParseLocation, ParseSucceeds) | |
TEST_F (TestParseLocation, ParseFails) | |
TEST_F (TestParseDpSpec, ParseSucceeds) | |
TEST_F (TestParseDpSpec, ParseSucceedsWithOptionalTarget) | |
TEST_F (TestParseDpSpec, ParseSucceedsWithOptionalSources) | |
TEST_F (TestParseDpSpec, ParseSucceedsWithOptionalSourcesEmpty) | |
TEST_F (TestParseDpSpec, ParseFailsWithMissingId) | |
TEST_F (TestParseDpSpec, ParseFailsWithMissingFileId) | |
TEST_F (TestParseDpSpec, ParseFailsWithFileIdWrongType) | |
TEST_F (TestParseDpSpec, ParseFailsWithKeywordsBadType) | |
TEST_F (TestParseDpSpec, ParseFailsWithKeywordsNotDefined) | |
TEST_F (TestParseDpSpec, ParseSucceedsWithKeywordRulesNotDefined) | |
TEST_F (TestParseDpSpec, ParseFailsWithMissingSources) | |
TEST_F (TestParseDpSpec, ParseFailsWithUnknownSourceType) | |
TEST_F (TestParseDpSpec, ParseFailsWithUnknownSourceTypeNotObject) | |
TEST_F (TestParseDpSpec, ParseFailsWithUnknownSourcesWrongType) | |
TEST_F (TestParseStartDaqV2Spec, RoundTripParsing) | |
TEST_F (TestParseStartDaqV2Spec, SuccessfulTemplate) | |
Variables | |
daq::json::TestParseStartDaqV2Spec | _json |
nlohmann::json | m_spec |
struct daq::json::KeywordFilter |
Definition at line 38 of file commonSpecTypes.hpp.
Class Members | ||
---|---|---|
vector< string > | selection_patterns |
struct daq::json::KeywordTransform |
Definition at line 42 of file commonSpecTypes.hpp.
Class Members | ||
---|---|---|
string | format | |
string | regex | |
vector< string > | selection_patterns |
struct daq::json::FitsKeywordsSource |
Definition at line 54 of file commonSpecTypes.hpp.
Class Members | ||
---|---|---|
optional< InitialKeywords > | initial_keywords | |
KeywordRules | keyword_rules | |
KeywordVector | keywords | |
string | source_name |
struct daq::json::FitsFileSource |
Definition at line 62 of file commonSpecTypes.hpp.
Class Members | ||
---|---|---|
optional< InitialKeywords > | initial_keywords | |
KeywordRules | keyword_rules | |
string | location | |
string | source_name |
struct daq::json::DpSpec |
Close representation of the JSON structure but with stronger types.
Definition at line 30 of file dpSpec.hpp.
Class Members | ||
---|---|---|
typedef variant< FitsKeywordsSource, FitsFileSource > | SourceTypes |
Class Members | ||
---|---|---|
string | id | |
vector< SourceTypes > | sources | |
Target | target |
struct daq::json::StartDaqV2Spec |
Structure with a close mapping from JSON representation in the StartDaqV2 MAL request.
Parts of this will end up being used in CreateDataProductSpecification()
, like the keyword rules.
Definition at line 33 of file startDaqV2.hpp.
Class Members | ||
---|---|---|
typedef variant< PrimaryDataSource, MetadataSource, FitsKeywordsSource, FitsFileSource > | DataSourceTypes |
Class Members | ||
---|---|---|
optional< milliseconds > | await_completion_interval | |
string | file_prefix | |
string | id | |
optional< MergeTarget > | merge_target | |
vector< DataSourceTypes > | sources |
using daq::json::ErrorType = typedef StartDaqV2SpecError |
Definition at line 20 of file startDaqV2.cpp.
using daq::json::KeywordRules = typedef std::vector<KeywordRuleTypes> |
Definition at line 52 of file commonSpecTypes.hpp.
using daq::json::KeywordRuleTypes = typedef std::variant<KeywordFilter, KeywordTransform> |
Definition at line 51 of file commonSpecTypes.hpp.
|
strong |
Enumerator | |
---|---|
All | Keep all keywords (useful for in-place merge) |
User | Keep only user-keywords. |
None | Keeps nothing (useful for disabling keyword copying) |
Definition at line 21 of file commonSpecTypes.hpp.
|
noexcept |
Definition at line 34 of file commonSpecTypes.cpp.
|
noexcept |
Definition at line 29 of file commonSpecTypes.cpp.
|
noexcept |
Definition at line 20 of file commonSpecTypes.cpp.
|
noexcept |
Definition at line 24 of file commonSpecTypes.cpp.
|
noexcept |
Definition at line 134 of file startDaqV2.cpp.
|
noexcept |
Definition at line 129 of file startDaqV2.cpp.
|
noexcept |
Definition at line 123 of file startDaqV2.cpp.
|
noexcept |
Definition at line 117 of file startDaqV2.cpp.
void daq::json::ParseDataSource | ( | StartDaqV2Spec::DataSource & | out, |
Json const & | json, | ||
JsonPointer const & | breadcrumb | ||
) |
Parse the common parts of PrimaryDataSource and MetadataSource.
{ "sourceName": <str>, "rrUri": <str>, "keywordRules": [<keywordrules] }
Definition at line 31 of file startDaqV2.cpp.
DpSpec daq::json::ParseDpSpec | ( | nlohmann::json const & | spec | ) |
Parse JSON to construct the DpSpec structure.
spec | Data Product Specification to parse. |
DpSpecError | if JSON structure is invalid. Exception may be nested. |
Definition at line 47 of file dpSpec.cpp.
FitsFileSource daq::json::ParseFitsFileSource | ( | Json const & | json, |
JsonPointer const & | breadcrumb | ||
) |
Definition at line 60 of file commonSpecTypes.cpp.
FitsFileSource daq::json::ParseFitsFileSource | ( | nlohmann::json const & | json, |
nlohmann::json_pointer< nlohmann::json > const & | breadcrumb | ||
) |
FitsKeywordsSource daq::json::ParseFitsKeywordsSource | ( | Json const & | json, |
JsonPointer const & | breadcrumb | ||
) |
Definition at line 39 of file commonSpecTypes.cpp.
FitsKeywordsSource daq::json::ParseFitsKeywordsSource | ( | nlohmann::json const & | json, |
nlohmann::json_pointer< nlohmann::json > const & | breadcrumb | ||
) |
InitialKeywords daq::json::ParseInitialKeywords | ( | nlohmann::json const & | json, |
nlohmann::json_pointer< nlohmann::json > const & | breadcrumb | ||
) |
Definition at line 96 of file commonSpecTypes.cpp.
KeywordFilter daq::json::ParseKeywordFilter | ( | Json const & | json, |
JsonPointer const & | breadcrumb | ||
) |
Definition at line 72 of file commonSpecTypes.cpp.
KeywordFilter daq::json::ParseKeywordFilter | ( | nlohmann::json const & | json, |
nlohmann::json_pointer< nlohmann::json > const & | breadcrumb | ||
) |
KeywordRules daq::json::ParseKeywordRules | ( | Json const & | json, |
JsonPointer const & | breadcrumb | ||
) |
Definition at line 114 of file commonSpecTypes.cpp.
KeywordRules daq::json::ParseKeywordRules | ( | nlohmann::json const & | json, |
nlohmann::json_pointer< nlohmann::json > const & | breadcrumb | ||
) |
KeywordTransform daq::json::ParseKeywordTransform | ( | Json const & | json, |
JsonPointer const & | breadcrumb | ||
) |
Definition at line 83 of file commonSpecTypes.cpp.
KeywordTransform daq::json::ParseKeywordTransform | ( | nlohmann::json const & | json, |
nlohmann::json_pointer< nlohmann::json > const & | breadcrumb | ||
) |
DpSpec::SourceTypes daq::json::ParseSource | ( | Json const & | json, |
JsonPointer const & | breadcrumb | ||
) |
Definition at line 34 of file dpSpec.cpp.
Location daq::json::ParseSourceLocation | ( | std::string const & | location | ) |
Parse location string from DpSpec into component parts.
Location string use the format host:path
, e.g. 10.0.0.1:/path/to/file
with host being optional.
Definition at line 90 of file dpSpec.cpp.
StartDaqV2Spec daq::json::ParseStartDaqV2Spec | ( | nlohmann::json const & | json | ) |
Parse StartDaqSpec.
StartDaqV2SpecError | on invalid schema. |
Definition at line 46 of file startDaqV2.cpp.
DpSpec::Target daq::json::ParseTarget | ( | Json const & | json, |
JsonPointer const & | breadcrumb | ||
) |
Definition at line 20 of file dpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseFailsWithFileIdWrongType | |||
) |
Definition at line 241 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseFailsWithKeywordsBadType | |||
) |
Definition at line 248 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseFailsWithKeywordsNotDefined | |||
) |
Definition at line 255 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseFailsWithMissingFileId | |||
) |
Definition at line 235 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseFailsWithMissingId | |||
) |
Definition at line 229 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseFailsWithMissingSources | |||
) |
Definition at line 265 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseFailsWithUnknownSourcesWrongType | |||
) |
Definition at line 287 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseFailsWithUnknownSourceType | |||
) |
Definition at line 273 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseFailsWithUnknownSourceTypeNotObject | |||
) |
Definition at line 280 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseSucceeds | |||
) |
Definition at line 175 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseSucceedsWithKeywordRulesNotDefined | |||
) |
Definition at line 260 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseSucceedsWithOptionalSources | |||
) |
Definition at line 219 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseSucceedsWithOptionalSourcesEmpty | |||
) |
Definition at line 224 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseDpSpec | , |
ParseSucceedsWithOptionalTarget | |||
) |
Definition at line 214 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseLocation | , |
ParseFails | |||
) |
Definition at line 48 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseLocation | , |
ParseSucceeds | |||
) |
Definition at line 20 of file testDpSpec.cpp.
daq::json::TEST_F | ( | TestParseStartDaqV2Spec | , |
RoundTripParsing | |||
) |
Definition at line 103 of file testStartDaqV2.cpp.
daq::json::TEST_F | ( | TestParseStartDaqV2Spec | , |
SuccessfulTemplate | |||
) |
Definition at line 112 of file testStartDaqV2.cpp.
void daq::json::to_json | ( | nlohmann::json & | j, |
DpSpec const & | s | ||
) |
Definition at line 129 of file dpSpec.cpp.
void daq::json::to_json | ( | nlohmann::json & | j, |
DpSpec::SourceTypes const & | s | ||
) |
Definition at line 142 of file dpSpec.cpp.
void daq::json::to_json | ( | nlohmann::json & | j, |
DpSpec::Target const & | s | ||
) |
Definition at line 134 of file dpSpec.cpp.
void daq::json::to_json | ( | nlohmann::json & | json, |
StartDaqV2Spec const & | spec | ||
) |
Serialize to JSON.
json | |
spec | Specification to serialize |
Definition at line 174 of file startDaqV2.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
FitsFileSource const & | s | ||
) |
Definition at line 165 of file commonSpecTypes.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
FitsKeywordsSource const & | s | ||
) |
Definition at line 153 of file commonSpecTypes.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
KeywordFilter const & | s | ||
) |
Definition at line 135 of file commonSpecTypes.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
KeywordRuleTypes const & | s | ||
) |
Definition at line 148 of file commonSpecTypes.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
KeywordTransform const & | s | ||
) |
Definition at line 140 of file commonSpecTypes.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
StartDaqV2Spec::DataSource const & | s | ||
) |
Definition at line 141 of file startDaqV2.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
StartDaqV2Spec::DataSourceTypes const & | s | ||
) |
Definition at line 164 of file startDaqV2.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
StartDaqV2Spec::MergeTarget const & | t | ||
) |
Definition at line 169 of file startDaqV2.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
StartDaqV2Spec::MetadataSource const & | s | ||
) |
Definition at line 158 of file startDaqV2.cpp.
void daq::json::to_json | ( | nlohmann::json & | out, |
StartDaqV2Spec::PrimaryDataSource const & | s | ||
) |
Definition at line 152 of file startDaqV2.cpp.
daq::json::TestParseStartDaqV2Spec daq::json::_json |
nlohmann::json daq::json::m_spec |
Definition at line 100 of file testStartDaqV2.cpp.