[AutoSar]状态管理(四)单核BswM(二)流程、配置、 代码

2023-12-14 23:01

本文主要是介绍[AutoSar]状态管理(四)单核BswM(二)流程、配置、 代码,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

目录

  • 关键词
  • 平台说明
  • 一、BswM的模式处理流程图
  • 二、stand state handling
  • 三、配置、代码、状态转移
    • 3.1 initial -> wakeup   
    • 3.2 WakeUp -> Run
    • 3.3 Run -> PostRun (first step)
    • 3.4 Run -> PostRun (second step)
    • 3.5 PostRun -> PreShutdown(first step)
    • 3.6 PostRun -> PreShutdown(second step)
    • 3.7 PostRun -> PreShutdown(third step)
    • 3.8 PREP_SHUTDOWN-> WAIT_FOR_NVM
    • 3.9 WAIT_FOR_NVM -> SHUTDOWN
    • 3.10 WakeUp -> Run
    • 3.11 WakeUp -> preshutdown

  

关键词

嵌入式、C语言、autosar、BswM

平台说明

项目Value
OSautosar OS
autosar厂商vector
芯片厂商TI
编程语言C,C++
编译器HighTec (GCC)

在这里插入图片描述

一、BswM的模式处理流程图

  蓝色箭头为SWC的上层交互,红色箭头为Bsw内部模块间的交互。

在这里插入图片描述

二、stand state handling

在这里插入图片描述

在这里插入图片描述

三、配置、代码、状态转移

3.1 initial -> wakeup   

EcuM 初始化完毕后开始BswM初始化并调度mainfunction执行状态机。
rules:ESH_InitToWakeup
Expression:ESH_LE_InitToWakeup
在这里插入图片描述

Code:1.判定当前模式处于Init

  if(BswM_GetGenericState(3, 0u) == BSWM_GENERICVALUE_ESH_State_ESH_INIT){/* Return conditional action list BswM_ActionList_ESH_AL_InitToWakeup. */retVal = BSWM_ID_AL_ESH_AL_InitToWakeup;}

Action list:
ESH_AL_InitToWakeup
{
ESH_Action_OnEnterWakeup
ESH_Action_SwitchWakeup
ESH_Action_ESH_Wakeup
}
Code: 1.请求模式切换到Wakeup。

BSWM_LOCAL FUNC(Std_ReturnType, BSWM_CODE) BswM_ActionList_ESH_AL_InitToWakeup(BswM_PCPartitionConfigIdxOfPartitionIdentifiersType partitionIdx)
{BswM_ESH_OnEnterWakeup();BswM_Switch_ESH_ModeSwitch_BswM_MDGP_ESH_Mode = RTE_MODE_ESH_Mode_WAKEUP;BswM_RequestMode(BSWM_GENERIC_ESH_State, BSWM_GENERICVALUE_ESH_State_ESH_WAKEUP);BSWM_DUMMY_STATEMENT(partitionIdx); /* PRQA S 1338, 2983, 3112 */ /* MD_MSR_DummyStmt */return E_OK;
}/* PRQA S 6010, 6030, 6050 */ /* MD_MSR_STPTH, MD_MSR_STCYC, MD_MSR_STCAL */

3.2 WakeUp -> Run

rules:ESH_WakeupToRun
Expression:ESH_LE_WakeupToRun
在这里插入图片描述

Code
1.判定当前状态是否为wakeup;
2.判定是否有唤醒事件;
3.判定ComM request 是否为pending且上一次目标模式通知是否为wakeup。

  if((BswM_GetGenericState(3, 0u) == BSWM_GENERICVALUE_ESH_State_ESH_WAKEUP) && ((EcuM_GetValidatedWakeupEvents() != 0u) || (BswM_GetGenericState(0, 0u) == BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_PENDING_REQUEST)) && ((BswM_GetNvMJobState(0, 0u) != NVM_REQ_PENDING) || (BswM_GetTimerState(0, 0u) != BSWM_TIMER_STARTED)) && (BswM_Mode_Notification_ESH_ModeNotification_BswM_MDGP_ESH_Mode == RTE_MODE_ESH_Mode_WAKEUP)){/* Return conditional action list BswM_ActionList_ESH_AL_WakeupToRun. */retVal = BSWM_ID_AL_ESH_AL_WakeupToRun;}

Action list:
1.在 ComM request pending 状态下允许通信;
2.更新BswM 计时器;
3.request 到 RUN 状态;
ESH_AL_WakeupToRun
{
ESH_Action_ComMAllow_CN_xxxxx
ESH_Action_SelfRunRequestTimer_Start
ESH_Action_OnEnterRun
ESH_Action_SwitchRun
ESH_Action_ESH_Run
}

Code:1.用户自定义实现代码

  ComM_CommunicationAllowed(ComMConf_ComMChannel_CN_, TRUE);BswM_UpdateTimer(partitionIdx, BSWM_TMR_ESH_SelfRunRequestTimer, 10u);BswM_ESH_OnEnterRun();BswM_Switch_ESH_ModeSwitch_BswM_MDGP_ESH_Mode = RTE_MODE_ESH_Mode_RUN;BswM_RequestMode(BSWM_GENERIC_ESH_State, BSWM_GENERICVALUE_ESH_State_ESH_RUN);

3.3 Run -> PostRun (first step)

rules:ESH_RunToPostRun
Expression:ESH_LE_RunToPostRunTransition
在这里插入图片描述

Code:1.判定当前模式是否在RUN且上一次 request 为run;
2.判定ComM是否为NO_COMMUNICATION;
3.SWC没有模式请求;
4.判定BswM转换计时器超时(在mainfunction中调用BswM_DecreaseTimer(partitionIdx)–和转状态转换时update;);

 if(((BswM_GetGenericState(1, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == BSWM_GENERICVALUE_ESH_State_ESH_RUN) && (BswM_Mode_Notification_ESH_ModeNotification_BswM_MDGP_ESH_Mode == RTE_MODE_ESH_Mode_RUN)) && (((BswM_GetComMChannelState(0, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == COMM_NO_COMMUNICATION) && (BswM_GetComMChannelState(4, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == COMM_NO_COMMUNICATION) && (BswM_GetComMChannelState(1, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == COMM_NO_COMMUNICATION) && (BswM_GetComMChannelState(3, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == COMM_NO_COMMUNICATION) && (BswM_GetComMChannelState(2, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == COMM_NO_COMMUNICATION)) && ((Request_ESH_RunRequest_0_requestedMode == RELEASED) && (Request_ESH_RunRequest_1_requestedMode == RELEASED)) && (BswM_GetTimerState(0, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == BSWM_TIMER_EXPIRED))){/* Return conditional action list BswM_ActionList_ESH_AL_ExitRun. */retVal = BSWM_ID_AL_ESH_AL_ExitRun;}

**Action list:**1.进入ESH_RunToPostRunNested rules;
ESH_AL_ExitRun
{
ESH_Action_EnterExclusiveArea
ESH_RunToPostRunNested
ESH_Action_ComMCheckPendingRequests
ESH_Action_ExitExclusiveArea

}

Code

  SchM_Enter_BswM_BSWM_EXCLUSIVE_AREA_0();/*lint -restore */ESH_ComM_CheckPendingRequests();(void)BswM_Action_RuleHandler(BSWM_ID_RULE_ESH_RunToPostRunNested, partitionIdx);/*lint -save -e534 *//* PRQA S 3109, 3200 1 */ /* MD_MSR_14.3, MD_BSWM_3200 */SchM_Exit_BswM_BSWM_EXCLUSIVE_AREA_0();/*lint -restore */BSWM_DUMMY_STATEMENT(partitionIdx); /* PRQA S 1338, 2983, 3112 */ /* MD_MSR_DummyStmt */

3.4 Run -> PostRun (second step)

rules:ESH_RunToPostRunNested
Expression:ESH_LE_ComMNoPendingRequests
在这里插入图片描述
Code:1.判定当前ComM pending是否有请求。

  if(BswM_GetGenericState(0, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_NO_REQUEST){/* Return conditional action list BswM_ActionList_ESH_AL_RunToPostRun. */retVal = BSWM_ID_AL_ESH_AL_RunToPostRun;}

Action list:
ESH_AL_RunToPostRun
{
ESH_Action_ComMDisallow_CN_XXX
ESH_Action_EcuMClearValidatedWakeupEvents
ESH_Action_OnEnterPostRun
ESH_Action_SwitchPostRun
ESH_Action_ESH_PostRun
}

Code
1.禁止ComM通信;
2.清除唤醒事件;
3.请求模式转换到POSTRUN;

  ComM_CommunicationAllowed(ComMConf_ComMChannel_CN_, FALSE);/*lint -save -e534 *//* PRQA S 3109, 3200 1 */ /* MD_MSR_14.3, MD_BSWM_3200 */EcuM_ClearValidatedWakeupEvent(ECUM_WKSOURCE_ALL_SOURCES);/*lint -restore */BswM_ESH_OnEnterPostRun();BswM_Switch_ESH_ModeSwitch_BswM_MDGP_ESH_Mode = RTE_MODE_ESH_Mode_POSTRUN;BswM_RequestMode(BSWM_GENERIC_ESH_State, BSWM_GENERICVALUE_ESH_State_ESH_POST_RUN);

3.5 PostRun -> PreShutdown(first step)

rules:ESH_PostRun
Expression:ESH_LE_PostRun
在这里插入图片描述
Code:1.判定当前模式是否为POSTRUN且上一次请求通知为POSTRUN;

  if((Request_ESH_PostRunRequest_0_requestedMode == RELEASED) && (Request_ESH_PostRunRequest_1_requestedMode == RELEASED)){/* Return conditional action list BswM_ActionList_ESH_AL_PostRunToPrepShutdown. */retVal = BSWM_ID_AL_ESH_AL_PostRunToPrepShutdown;}

Action list:
ESH_AL_ExitPostRun
{
ESH_Action_EnterExclusiveArea
ESH_Action_ComMCheckPendingRequests
ESH_PostRunNested
ESH_Action_ExitExclusiveArea
}

Code:1.根据ComM状态是否为COMM_NO_COM_NO_PENDING_REQUEST 设置BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_PENDING_REQUEST还是BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_NO_REQUEST;
2.进入ruler ESH_PostRunNested;

  SchM_Enter_BswM_BSWM_EXCLUSIVE_AREA_0();/*lint -restore */ESH_ComM_CheckPendingRequests();(void)BswM_Action_RuleHandler(BSWM_ID_RULE_ESH_PostRunNested, partitionIdx);/*lint -save -e534 *//* PRQA S 3109, 3200 1 */ /* MD_MSR_14.3, MD_BSWM_3200 */SchM_Exit_BswM_BSWM_EXCLUSIVE_AREA_0();

3.6 PostRun -> PreShutdown(second step)

这里为中间态,判定是回到RUN还是到preShutdown。
rules:ESH_PostRunNested
Expression:ESH_LE_PostRunToRun
在这里插入图片描述
Code
1.判定SWC是否有模式请求;
2.判定是否有唤醒事件;
3.判定ComM 请求是否为 pengding;

  /* Evaluate logical expression ESH_LE_PostRunToRun. */if(((Request_ESH_RunRequest_0_requestedMode == REQUESTED) || (Request_ESH_RunRequest_1_requestedMode == REQUESTED)) || ((EcuM_GetValidatedWakeupEvents() != 0u) || (BswM_GetGenericState(0, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_PENDING_REQUEST))){/* Return conditional action list BswM_ActionList_ESH_AL_PostRunToRun. */retVal = BSWM_ID_AL_ESH_AL_PostRunToRun;}else{/* Return conditional action list BswM_ActionList_ESH_AL_ESH_PostRunToPrepCheck. */retVal = BSWM_ID_AL_ESH_AL_ESH_PostRunToPrepCheck;}

Action list:
如果仲裁为TRUE;执行actionlist:ESH_AL_PostRunToRun;
如果仲裁为FALSE;执行rules:ESH_AL_ESH_PostRunToPrepCheck;
ESH_AL_PostRunToRun
{
ESH_Action_ComMAllow_CN_XXXXX
ESH_Action_SelfRunRequestTimer_Start
ESH_Action_OnEnterRun
ESH_Action_SwitchRun
}

Code
1.允许Com通信;
2.更新BswM状态转换计时器;
3.请求转换到RUN ;

  ComM_CommunicationAllowed(ComMConf_ComMChannel_CN_xxx, TRUE);BswM_UpdateTimer(partitionIdx, BSWM_TMR_ESH_SelfRunRequestTimer, 10u);BswM_ESH_OnEnterRun();BswM_Switch_ESH_ModeSwitch_BswM_MDGP_ESH_Mode = RTE_MODE_ESH_Mode_RUN;BswM_RequestMode(BSWM_GENERIC_ESH_State, BSWM_GENERICVALUE_ESH_State_ESH_RUN);

3.7 PostRun -> PreShutdown(third step)

rules:ESH_PostRunToPrepNested
Expression:ESH_LE_Dem_PostRunRequested
在这里插入图片描述
Code:1.判定当前是否有SWC模式请求;

 /* Evaluate logical expression ESH_LE_Dem_PostRunRequested. */if((Request_ESH_PostRunRequest_0_requestedMode == RELEASED) && (Request_ESH_PostRunRequest_1_requestedMode == RELEASED)){/* Return conditional action list BswM_ActionList_ESH_AL_PostRunToPrepShutdown. */retVal = BSWM_ID_AL_ESH_AL_PostRunToPrepShutdown;}

Action list:
ESH_AL_PostRunToPrepShutdown
{
ESH_Action_OnEnterPrepShutdown
ESH_Action_SwitchShutdown
ESH_Action_ESH_PrepShutdown
}

Code
1.请求进入preShutDown

  BswM_ESH_OnEnterPrepShutdown();BswM_Switch_ESH_ModeSwitch_BswM_MDGP_ESH_Mode = RTE_MODE_ESH_Mode_SHUTDOWN;BswM_RequestMode(BSWM_GENERIC_ESH_State, BSWM_GENERICVALUE_ESH_State_ESH_PREP_SHUTDOWN);

3.8 PREP_SHUTDOWN-> WAIT_FOR_NVM

rules:ESH_PrepToWait
Expression:ESH_LE_PrepShutdownToWaitForNvM
在这里插入图片描述
Code:1.判定当前模式处于PRE_SHUTDOWN且上一次请求通知为SHUTDOWN;

  if((BswM_GetGenericState(1, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == BSWM_GENERICVALUE_ESH_State_ESH_PREP_SHUTDOWN) && (BswM_Mode_Notification_ESH_ModeNotification_BswM_MDGP_ESH_Mode == RTE_MODE_ESH_Mode_SHUTDOWN)){/* Return conditional action list BswM_ActionList_ESH_AL_PrepShutdownToWaitForNvM. */retVal = BSWM_ID_AL_ESH_AL_PrepShutdownToWaitForNvM;}

Action list:
ESH_AL_PrepShutdownToWaitForNvM
{
ESH_Action_WriteAllTimer_Start
ESH_Action_NvMWriteAll
ESH_Action_ComMCheckPendingRequests
ESH_Action_OnEnterWaitForNvm
ESH_Action_ESH_WaitForNvm
}

Code
1.设定NVM写超时计时器;
2.writeall;
3.根据ComM状态是否为COMM_NO_COM_NO_PENDING_REQUEST 设置BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_PENDING_REQUEST还是BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_NO_REQUEST;
4.NVM实现;
5.请求切换到ESH_WAIT_FOR_NVM

  BswM_UpdateTimer(partitionIdx, BSWM_TMR_ESH_NvM_WriteAllTimer, 6000u);/*lint -save -e534 *//* PRQA S 3109, 3200 1 */ /* MD_MSR_14.3, MD_BSWM_3200 */NvM_WriteAll();/*lint -restore */ESH_ComM_CheckPendingRequests();BswM_ESH_OnEnterWaitForNvm();BswM_RequestMode(BSWM_GENERIC_ESH_State, BSWM_GENERICVALUE_ESH_State_ESH_WAIT_FOR_NVM);

3.9 WAIT_FOR_NVM -> SHUTDOWN

rules:ESH_WaitToShutdown
Expression:ESH_LE_WaitForNvMToShutdown
在这里插入图片描述
Code:1.判定当前状态是否为WAIT_FOR_NVM;
2.判定是否完成NVMwriteall;
3.判定是否有唤醒事件;
4.ComM是否有request;

  /* Evaluate logical expression ESH_LE_WaitForNvMToShutdown. */ /* PRQA S 3415 1 */ /* MD_BSWM_3415 */if((BswM_GetGenericState(3, 0u) == BSWM_GENERICVALUE_ESH_State_ESH_WAIT_FOR_NVM) && ((BswM_GetNvMJobState(0, 0u) != NVM_REQ_PENDING) || (BswM_GetTimerState(1, 0u) != BSWM_TIMER_STARTED)) && ((EcuM_GetValidatedWakeupEvents() == 0u) && (BswM_GetGenericState(0, 0u) == BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_NO_REQUEST))){/* Return conditional action list BswM_ActionList_ESH_AL_WaitForNvMToShutdown. */retVal = BSWM_ID_AL_ESH_AL_WaitForNvMToShutdown;}

Action list:
ESH_AL_WaitForNvMToShutdown
{
ESH_Action_WriteAllTimer_Stop
ESH_Action_OnEnterShutdown
ESH_Action_EcuMGoToSelectedShutdownTarget
}
Code
1.关闭NVM计时器;
2.请求到Shutdown状态;
3.用户自定义代码实现;

  BswM_ESH_OnEnterShutdown();/*lint -save -e534 *//* PRQA S 3109, 3200 1 */ /* MD_MSR_14.3, MD_BSWM_3200 */(void)EcuM_GoToSelectedShutdownTarget();

3.10 WakeUp -> Run

rules:ESH_WaitToWakeup
Expression:ESH_LE_WaitForNvMToWakeup
在这里插入图片描述
Code
1.判定当前模式是否在WAIT_FOR_NVM
2.是否有唤醒事件;
3.ComM是否为PENDING;

  if((BswM_GetGenericState(1, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == BSWM_GENERICVALUE_ESH_State_ESH_WAIT_FOR_NVM) && ((EcuM_GetValidatedWakeupEvents() != 0u) || (BswM_GetGenericState(0, BswM_GetInternalPartitionIdx(SystemApplication_OsCore3)) == BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_PENDING_REQUEST))){/* Return conditional action list BswM_ActionList_ESH_AL_WaitForNvMWakeup. */retVal = BSWM_ID_AL_ESH_AL_WaitForNvMWakeup;}

Action list:
ESH_AL_WaitForNvMWakeup
{
ESH_Action_WriteAllTimer_Stop
ESH_Action_CancelWriteAllTimer_Start
ESH_Action_CancelNvMWriteAll
ESH_Action_OnEnterWakeup
ESH_Action_SwitchWakeup
ESH_Action_ESH_Wakeup.
}

Code
1.更新NVM计时器防止超时;
2.取消writeall;
3.请求跳转到wakeup;

  BswM_UpdateTimer(partitionIdx, BSWM_TMR_ESH_NvM_WriteAllTimer, 0u);BswM_UpdateTimer(partitionIdx, BSWM_TMR_ESH_NvM_CancelWriteAllTimer, 6000u);/*lint -save -e534 *//* PRQA S 3109, 3200 1 */ /* MD_MSR_14.3, MD_BSWM_3200 */NvM_CancelWriteAll();/*lint -restore */BswM_ESH_OnEnterWakeup();BswM_Switch_ESH_ModeSwitch_BswM_MDGP_ESH_Mode = RTE_MODE_ESH_Mode_WAKEUP;BswM_RequestMode(BSWM_GENERIC_ESH_State, BSWM_GENERICVALUE_ESH_State_ESH_WAKEUP);

3.11 WakeUp -> preshutdown

rules:ESH_WakeupToPrep
Expression:ESH_LE_WakeupToPrepShutdown
在这里插入图片描述
Code
1.判定当前是否处于wankeup;
2.判定是否在执行writeAll;
3.判定cancel wariteAll是否超时;
4.是否有唤醒事件;
5.ComM是否为NO_REQUEST;
6.上一次模式请求为wankeup?

  if((BswM_GetGenericState(3, 0u) == BSWM_GENERICVALUE_ESH_State_ESH_WAKEUP) && ((BswM_GetNvMJobState(0, 0u) != NVM_REQ_PENDING) || (BswM_GetTimerState(0, 0u) != BSWM_TIMER_STARTED)) && (EcuM_GetPendingWakeupEvents() == 0u) && ((EcuM_GetValidatedWakeupEvents() == 0u) && (BswM_GetGenericState(0, 0u) == BSWM_GENERICVALUE_ESH_ComMPendingRequests_ESH_COMM_NO_REQUEST)) && (BswM_Mode_Notification_ESH_ModeNotification_BswM_MDGP_ESH_Mode == RTE_MODE_ESH_Mode_WAKEUP)){/* Return conditional action list BswM_ActionList_ESH_AL_WakeupToPrep. */retVal = BSWM_ID_AL_ESH_AL_WakeupToPrep;}

Action list:
ESH_AL_WakeupToPrep
{
ESH_Action_OnEnterPrepShutdown
ESH_Action_SwitchShutdown
ESH_Action_ESH_PrepShutdown

}

Code
1.切换模式到shutdown
用户代码自定义实现下电的相关操作。

  BswM_ESH_OnEnterPrepShutdown();BswM_Switch_ESH_ModeSwitch_BswM_MDGP_ESH_Mode = RTE_MODE_ESH_Mode_SHUTDOWN;BswM_RequestMode(BSWM_GENERIC_ESH_State, BSWM_GENERICVALUE_ESH_State_ESH_PREP_SHUTDOWN);

这篇关于[AutoSar]状态管理(四)单核BswM(二)流程、配置、 代码的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/494208

相关文章

Security OAuth2 单点登录流程

单点登录(英语:Single sign-on,缩写为 SSO),又译为单一签入,一种对于许多相互关连,但是又是各自独立的软件系统,提供访问控制的属性。当拥有这项属性时,当用户登录时,就可以获取所有系统的访问权限,不用对每个单一系统都逐一登录。这项功能通常是以轻型目录访问协议(LDAP)来实现,在服务器上会将用户信息存储到LDAP数据库中。相同的,单一注销(single sign-off)就是指

Spring Security基于数据库验证流程详解

Spring Security 校验流程图 相关解释说明(认真看哦) AbstractAuthenticationProcessingFilter 抽象类 /*** 调用 #requiresAuthentication(HttpServletRequest, HttpServletResponse) 决定是否需要进行验证操作。* 如果需要验证,则会调用 #attemptAuthentica

Zookeeper安装和配置说明

一、Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式。 ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境; ■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例; ■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个“集合体”(ensemble) Zookeeper通过复制来实现

CentOS7安装配置mysql5.7 tar免安装版

一、CentOS7.4系统自带mariadb # 查看系统自带的Mariadb[root@localhost~]# rpm -qa|grep mariadbmariadb-libs-5.5.44-2.el7.centos.x86_64# 卸载系统自带的Mariadb[root@localhost ~]# rpm -e --nodeps mariadb-libs-5.5.44-2.el7

hadoop开启回收站配置

开启回收站功能,可以将删除的文件在不超时的情况下,恢复原数据,起到防止误删除、备份等作用。 开启回收站功能参数说明 (1)默认值fs.trash.interval = 0,0表示禁用回收站;其他值表示设置文件的存活时间。 (2)默认值fs.trash.checkpoint.interval = 0,检查回收站的间隔时间。如果该值为0,则该值设置和fs.trash.interval的参数值相等。

NameNode内存生产配置

Hadoop2.x 系列,配置 NameNode 内存 NameNode 内存默认 2000m ,如果服务器内存 4G , NameNode 内存可以配置 3g 。在 hadoop-env.sh 文件中配置如下。 HADOOP_NAMENODE_OPTS=-Xmx3072m Hadoop3.x 系列,配置 Nam

hdu1043(八数码问题,广搜 + hash(实现状态压缩) )

利用康拓展开将一个排列映射成一个自然数,然后就变成了普通的广搜题。 #include<iostream>#include<algorithm>#include<string>#include<stack>#include<queue>#include<map>#include<stdio.h>#include<stdlib.h>#include<ctype.h>#inclu

hdu1565(状态压缩)

本人第一道ac的状态压缩dp,这题的数据非常水,很容易过 题意:在n*n的矩阵中选数字使得不存在任意两个数字相邻,求最大值 解题思路: 一、因为在1<<20中有很多状态是无效的,所以第一步是选择有效状态,存到cnt[]数组中 二、dp[i][j]表示到第i行的状态cnt[j]所能得到的最大值,状态转移方程dp[i][j] = max(dp[i][j],dp[i-1][k]) ,其中k满足c

wolfSSL参数设置或配置项解释

1. wolfCrypt Only 解释:wolfCrypt是一个开源的、轻量级的、可移植的加密库,支持多种加密算法和协议。选择“wolfCrypt Only”意味着系统或应用将仅使用wolfCrypt库进行加密操作,而不依赖其他加密库。 2. DTLS Support 解释:DTLS(Datagram Transport Layer Security)是一种基于UDP的安全协议,提供类似于

综合安防管理平台LntonAIServer视频监控汇聚抖动检测算法优势

LntonAIServer视频质量诊断功能中的抖动检测是一个专门针对视频稳定性进行分析的功能。抖动通常是指视频帧之间的不必要运动,这种运动可能是由于摄像机的移动、传输中的错误或编解码问题导致的。抖动检测对于确保视频内容的平滑性和观看体验至关重要。 优势 1. 提高图像质量 - 清晰度提升:减少抖动,提高图像的清晰度和细节表现力,使得监控画面更加真实可信。 - 细节增强:在低光条件下,抖