58 lines
2.1 KiB
C++
58 lines
2.1 KiB
C++
/*
|
|
* Copyright (c) 2023 Fancy Code.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
#include "HalCppMock.h"
|
|
#include "ILog.h"
|
|
StatusCode HalCppTest::GetAllLeds(std::map<std::string, std::shared_ptr<VLedHal>> &allLeds)
|
|
{
|
|
LogInfo("HalCppTest::GetAllLeds\n");
|
|
StatusCode code = GetAllLedsTrace(allLeds);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return HalCpp::GetAllLeds(allLeds);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode HalCppTest::GetAllLedsTrace(std::map<std::string, std::shared_ptr<VLedHal>> &allLeds)
|
|
{
|
|
LogInfo("HalCppTest::GetAllLedsTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
}
|
|
StatusCode HalCppTest::GetAllKeys(std::map<std::string, std::shared_ptr<VKeyHal>> &allKeys)
|
|
{
|
|
LogInfo("HalCppTest::GetAllKeys\n");
|
|
StatusCode code = GetAllKeysTrace(allKeys);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return HalCpp::GetAllKeys(allKeys);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode HalCppTest::GetAllKeysTrace(std::map<std::string, std::shared_ptr<VKeyHal>> &allKeys)
|
|
{
|
|
LogInfo("HalCppTest::GetAllKeysTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
}
|
|
StatusCode HalCppTest::GetWifiHal(std::shared_ptr<VWifiHal> &wifi)
|
|
{
|
|
LogInfo("HalCppTest::GetAllKeys\n");
|
|
StatusCode code = GetWifiHalTrace(wifi);
|
|
if (StatusCodeEqual(code, "STATUS_CODE_VIRTUAL_FUNCTION")) {
|
|
return HalCpp::GetWifiHal(wifi);
|
|
}
|
|
return code;
|
|
}
|
|
StatusCode HalCppTest::GetWifiHalTrace(std::shared_ptr<VWifiHal> &wifi)
|
|
{
|
|
LogInfo("HalCppTest::GetWifiHalTrace\n");
|
|
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
|
|
} |