-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move command parsing outside of the DEV_MGR class
* move command parsing outside of the DEV_MGR class * replace IBootFileCallback class with a callback function * move string representation of response message out of the DEV_MGR * add parameter to ForteBootFileLoader * remove include not needed anymore * remove unused variables * move parser into its own class to avoid passing the command around * implement feedback from PR * fix logging string * make the command parser a member of DEV_MGR
- Loading branch information
Showing
23 changed files
with
885 additions
and
775 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
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,44 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Jose Cabral | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Jose Cabral: | ||
* - initial implementation and rework communication infrastructure | ||
*******************************************************************************/ | ||
|
||
#include "mgmcmd.h" | ||
|
||
#include <type_traits> | ||
|
||
namespace forte::mgm_cmd { | ||
|
||
/*!\brief Type for the response of MGM command messages | ||
* | ||
* TODO fully define all responses as defined in IEC 61499 inc. numbers. | ||
*/ | ||
const std::string scmMGMResponseTexts[] = { | ||
"RDY", | ||
"BAD_PARAMS", | ||
"LOCAL_TERMINATION", | ||
"SYSTEM_TERMINATION", | ||
"NOT_READY", | ||
"UNSUPPORTED_CMD", | ||
"UNSUPPORTED_TYPE", | ||
"NO_SUCH_OBJECT", | ||
"INVALID_OBJECT", | ||
"INVALID_OPERATION", | ||
"INVALID_STATE", | ||
"OVERFLOW", | ||
"INVALID_DST" | ||
}; | ||
|
||
const std::string& getResponseText(EMGMResponse paResp) { | ||
return scmMGMResponseTexts[static_cast<std::underlying_type_t<EMGMResponse>>(paResp)]; | ||
} | ||
|
||
} // namespace forte::mgm_cmd |
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
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
Oops, something went wrong.