Merge branch 'master-develop' of gitee.com:shenzhen-jiuyilian/ipc into master-develop
This commit is contained in:
commit
f48be0f224
|
@ -9,21 +9,20 @@ include_directories(
|
||||||
./include
|
./include
|
||||||
${UTILS_SOURCE_PATH}/StatusCode/include
|
${UTILS_SOURCE_PATH}/StatusCode/include
|
||||||
${UTILS_SOURCE_PATH}/Log/include
|
${UTILS_SOURCE_PATH}/Log/include
|
||||||
|
${UTILS_SOURCE_PATH}/LinuxApi/include
|
||||||
)
|
)
|
||||||
#do not rely on any other library
|
#do not rely on any other library
|
||||||
# link_directories(
|
# link_directories(
|
||||||
# ${EXTERNAL_SOURCE_PATH}/curl/curl-8.1.2/build/lib
|
# ${EXTERNAL_SOURCE_PATH}/curl/curl-8.1.2/build/lib
|
||||||
# )
|
# )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
aux_source_directory(./abstract ABSTRACT_SRC_FILES)
|
aux_source_directory(./abstract ABSTRACT_SRC_FILES)
|
||||||
aux_source_directory(./src IMPL_SRC_FILES)
|
aux_source_directory(./src IMPL_SRC_FILES)
|
||||||
|
|
||||||
set(ABSTRACT_TARGET HalAbstract)
|
set(ABSTRACT_TARGET HalAbstract)
|
||||||
set(IMPL_TARGET Hal)
|
set(IMPL_TARGET Hal)
|
||||||
add_library(${ABSTRACT_TARGET} STATIC ${ABSTRACT_SRC_FILES})
|
add_library(${ABSTRACT_TARGET} STATIC ${ABSTRACT_SRC_FILES})
|
||||||
target_link_libraries(${ABSTRACT_TARGET} StatusCode Log)
|
target_link_libraries(${ABSTRACT_TARGET} LinuxApi StatusCode Log)
|
||||||
add_library(${IMPL_TARGET} STATIC ${IMPL_SRC_FILES})
|
add_library(${IMPL_TARGET} STATIC ${IMPL_SRC_FILES})
|
||||||
target_link_libraries(${IMPL_TARGET} ${ABSTRACT_TARGET})
|
target_link_libraries(${IMPL_TARGET} ${ABSTRACT_TARGET})
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
#include "HalCpp.h"
|
#include "HalCpp.h"
|
||||||
|
#include "HalMakePtr.h"
|
||||||
#include "ILog.h"
|
#include "ILog.h"
|
||||||
StatusCode HalCpp::Init(void)
|
StatusCode HalCpp::Init(void)
|
||||||
{
|
{
|
||||||
|
@ -24,4 +25,8 @@ StatusCode HalCpp::UnInit(void)
|
||||||
LogInfo("HalCpp::UnInit\n");
|
LogInfo("HalCpp::UnInit\n");
|
||||||
return CreateStatusCode(STATUS_CODE_OK);
|
return CreateStatusCode(STATUS_CODE_OK);
|
||||||
}
|
}
|
||||||
StatusCode HalCpp::GetWifiHal(std::shared_ptr<VWifiHal> &wifi) { return CreateStatusCode(STATUS_CODE_OK); }
|
StatusCode HalCpp::GetWifiHal(std::shared_ptr<VWifiHal> &wifi)
|
||||||
|
{
|
||||||
|
HalMakePtr::GetInstance()->CreateWifiHal(wifi);
|
||||||
|
return CreateStatusCode(STATUS_CODE_OK);
|
||||||
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "Hal.h"
|
#include "Hal.h"
|
||||||
#include "HalCpp.h"
|
#include "HalCpp.h"
|
||||||
#include "ILog.h"
|
#include "ILog.h"
|
||||||
|
#include "WifiHal.h"
|
||||||
StatusCode CreateHalModule(void)
|
StatusCode CreateHalModule(void)
|
||||||
{
|
{
|
||||||
IHal *hal = NULL;
|
IHal *hal = NULL;
|
||||||
|
@ -73,4 +74,10 @@ StatusCode HalMakePtr::CreateHalSharePtr(std::shared_ptr<IHalCpp> &impl)
|
||||||
LogWarning("IHalCpp is default.\n");
|
LogWarning("IHalCpp is default.\n");
|
||||||
impl = std::make_shared<HalCpp>();
|
impl = std::make_shared<HalCpp>();
|
||||||
return CreateStatusCode(STATUS_CODE_OK);
|
return CreateStatusCode(STATUS_CODE_OK);
|
||||||
|
}
|
||||||
|
StatusCode HalMakePtr::CreateWifiHal(std::shared_ptr<VWifiHal> &impl)
|
||||||
|
{
|
||||||
|
LogWarning("CreateWifiHal.\n");
|
||||||
|
impl = std::make_shared<WifiHal>();
|
||||||
|
return CreateStatusCode(STATUS_CODE_OK);
|
||||||
}
|
}
|
|
@ -28,5 +28,6 @@ public:
|
||||||
virtual StatusCode UnInit() { return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); }
|
virtual StatusCode UnInit() { return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); }
|
||||||
virtual StatusCode CreateHalPtr(IHal **hal);
|
virtual StatusCode CreateHalPtr(IHal **hal);
|
||||||
virtual StatusCode CreateHalSharePtr(std::shared_ptr<IHalCpp> &impl);
|
virtual StatusCode CreateHalSharePtr(std::shared_ptr<IHalCpp> &impl);
|
||||||
|
virtual StatusCode CreateWifiHal(std::shared_ptr<VWifiHal> &impl);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
|
@ -11,4 +11,14 @@
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
#include "WifiHal.h"
|
||||||
|
#include "LinuxApi.h"
|
||||||
|
StatusCode WifiHal::OpenApMode(void)
|
||||||
|
{
|
||||||
|
fx_system("ifconfig wlan0 192.168.175.1 netmask 255.255.255.0");
|
||||||
|
fx_system("hostapd -d /etc/hostapd.conf &");
|
||||||
|
fx_system("touch /var/lib/misc/udhcpd.leases");
|
||||||
|
fx_system("udhcpd -f /etc/udhcpd.conf &");
|
||||||
|
return CreateStatusCode(STATUS_CODE_OK);
|
||||||
|
}
|
|
@ -20,5 +20,6 @@ class WifiHal : public VWifiHal
|
||||||
public:
|
public:
|
||||||
WifiHal() = default;
|
WifiHal() = default;
|
||||||
virtual ~WifiHal() = default;
|
virtual ~WifiHal() = default;
|
||||||
|
StatusCode OpenApMode(void) override;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
7
tools/clang-tidy/README.md
Normal file
7
tools/clang-tidy/README.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# 1. llvm系列工具
|
||||||
|
|
||||||
|
   git clone时可能会非常慢,且频繁失败(网速快时可正常),失败后请多次重试。最好在保证网速的情况下进行下载源码。
|
||||||
|
|
||||||
|
## 1.1. 使用说明
|
||||||
|
|
||||||
|
1. 在工程根目录执行make compile_llvm;会下载源码,编译,并把llvm源码包(含生成的工具文件)拷贝到用户根目录,以方便不同目录的源码工程可以复用llvm工具;
|
Loading…
Reference in New Issue
Block a user