Skip to content

Commit

Permalink
- changed configuration values of trgops to be identical to SCL value
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Zillgith <[email protected]>
  • Loading branch information
mzillgith committed Feb 12, 2024
1 parent 810b6d1 commit 0019471
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
11 changes: 5 additions & 6 deletions src/iec61850_client_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@
using namespace rapidjson;

static const std::unordered_map<std::string, int> trgOptions
= { { "data_changed", TRG_OPT_DATA_CHANGED },
{ "quality_changed", TRG_OPT_QUALITY_CHANGED },
{ "data_update", TRG_OPT_DATA_UPDATE },
{ "integrity", TRG_OPT_INTEGRITY },
{ "gi", TRG_OPT_GI },
{ "transient", TRG_OPT_TRANSIENT } };
= { { "dchg", TRG_OPT_DATA_CHANGED },
{ "qchg", TRG_OPT_QUALITY_CHANGED },
{ "dupd", TRG_OPT_DATA_UPDATE },
{ "period", TRG_OPT_INTEGRITY },
{ "gi", TRG_OPT_GI } };

static const std::unordered_map<std::string, CDCTYPE> cdcMap
= { { "SpsTyp", SPS }, { "DpsTyp", DPS }, { "BscTyp", BSC },
Expand Down
20 changes: 10 additions & 10 deletions tests/test_iec61850_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ static string wrong_protocol_config_13 = QUOTE({
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsIndexed",
"dataset_ref" : "simpleIOGenericIO/LLN0.Events2",
"trgops" : [
"data_changed",
"quality_changed",
"dchg",
"qchg",
"gi"
],
"gi" : false
Expand Down Expand Up @@ -325,8 +325,8 @@ static string wrong_protocol_config_14 = QUOTE({
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsIndexed",
"dataset_ref" : "simpleIOGenericIO/LLN0.Events2",
"trgops" : [
"data_changed",
"quality_changed",
"dchg",
"qchg",
"gi"
],
"gi" : false
Expand Down Expand Up @@ -356,8 +356,8 @@ static string wrong_protocol_config_15 = QUOTE({
{
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsIndexed",
"trgops" : [
"data_changed",
"quality_changed",
"dchg",
"qchg",
"gi"
],
"gi" : false
Expand Down Expand Up @@ -448,8 +448,8 @@ static string wrong_protocol_config_17 = QUOTE({
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsRCB",
"dataset_ref" : "simpleIOGenericIO/LLN0.Mags",
"trgops" : [
"data_changed",
"quality_changed"
"dchg",
"qchg"
],
"buftm": 1,
"intgpd": 2
Expand All @@ -458,8 +458,8 @@ static string wrong_protocol_config_17 = QUOTE({
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsIndexed",
"dataset_ref" : "simpleIOGenericIO/LLN0.Events2",
"trgops" : [
"data_changed",
"quality_changed"
"dchg",
"qchg"
],
"buftm": 1,
"intgpd": 2
Expand Down
10 changes: 5 additions & 5 deletions tests/test_iec61850_reporting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ static string protocol_config = QUOTE ({
{
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsRCB01",
"dataset_ref" : "simpleIOGenericIO/LLN0.Mags",
"trgops" : [ "data_changed", "quality_changed", "gi" ],
"trgops" : [ "dchg", "qchg", "gi" ],
"gi" : false
},
{
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsIndexed01",
"dataset_ref" : "simpleIOGenericIO/LLN0.Events2",
"trgops" : [ "data_changed", "quality_changed", "gi" ],
"trgops" : [ "dchg", "qchg", "gi" ],
"gi" : false
}
]
Expand Down Expand Up @@ -106,13 +106,13 @@ static string protocol_config_2 = QUOTE ({
{
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsRCB01",
"dataset_ref" : "simpleIOGenericIO/LLN0.Mags",
"trgops" : [ "data_changed", "quality_changed", "gi" ],
"trgops" : [ "dchg", "qchg", "gi" ],
"gi" : true
},
{
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsIndexed01",
"dataset_ref" : "simpleIOGenericIO/LLN0.Events2",
"trgops" : [ "data_changed", "quality_changed", "gi" ],
"trgops" : [ "dchg", "qchg", "gi" ],
"gi" : true
}
]
Expand Down Expand Up @@ -148,7 +148,7 @@ static string protocol_config_3 = QUOTE ({
{
"rcb_ref" : "simpleIOGenericIO/LLN0.RP.EventsRCB01",
"dataset_ref" : "simpleIOGenericIO/LLN0.Mags",
"trgops" : [ "data_changed", "quality_changed", "gi" ],
"trgops" : [ "dchg", "qchg", "gi" ],
"gi" : false
}
]
Expand Down

0 comments on commit 0019471

Please sign in to comment.