/*@!Encoding:936*/
includes
{
}
variables
{
}
void maintest()
{
OBC_ModeState();
}
testcase OBC_ModeState(){
@sysvar::XCP::obc2p_sup::CalOBC_ModeStateEna= 1;
testWaitForTimeout(500);
testStep("Step1","Set CalOBC_ModeStateEna = %d",@sysvar::XCP::obc2p_sup::CalOBC_ModeStateEna);
// Check theOBC_ModeState is 0
@sysvar::XCP::obc2p_sup::CalOBC_ModeStateDb=0;
testWaitForTimeout(500);
testStep("Step2","Set CalOBC_ModeStateDb = %d", @sysvar::XCP::obc2p_sup::CalOBC_ModeStateDb);
testStep("Read","@sysvar::MeaOBC_PLD_OBC_ModeState = %d", @sysvar::XCP::obc2p_sup::MeaOBC_PLD_OBC_ModeState);
if(@sysvar::XCP::obc2p_sup::MeaOBC_PLD_OBC_ModeState == @sysvar::XCP::obc2p_sup::CalOBC_ModeStateDb)
testStepPass("Check MeaOBC_PLD_OBC_ModeState == 0");
else
{testStepFail("Check MeaOBC_PLD_OBC_ModeState != 0");}
// Check theOBC_ModeState is 1
@sysvar::XCP::obc2p_sup::CalOBC_ModeStateDb=1;
testWaitForTimeout(500);
testStep("Step2","Set CalOBC_ModeStateDb = %d", @sysvar::XCP::obc2p_sup::CalOBC_ModeStateDb);
testStep("Read","@sysvar::MeaOBC_PLD_OBC_ModeState = %d", @sysvar::XCP::obc2p_sup::MeaOBC_PLD_OBC_ModeState);
if(@sysvar::XCP::obc2p_sup::MeaOBC_PLD_OBC_ModeState == @sysvar::XCP::obc2p_sup::CalOBC_ModeStateDb)
testStepPass("Check MeaOBC_PLD_OBC_ModeState == 1");
else
{testStepFail("Check MeaOBC_PLD_OBC_ModeState != 1");}
// Check theOBC_ModeState is 2
@sysvar::XCP::obc2p_sup::CalOBC_ModeStateDb=2;
testWaitForTimeout(500);
testStep("Step2","Set CalOBC_ModeStateDb = %d", @sysvar::XCP::obc2p_sup::CalOBC_ModeStateDb);
testStep("Read","@sysvar::MeaOBC_PLD_OBC_ModeState = %d", @sysvar::XCP::obc2p_sup::MeaOBC_PLD_OBC_ModeState);
if(@sysvar::XCP::obc2p_sup::MeaOBC_PLD_OBC_ModeState == @sysvar::XCP::obc2p_sup::CalOBC_ModeStateDb)
testStepPass("Check MeaOBC_PLD_OBC_ModeState == 2");
else
{testStepFail("Check MeaOBC_PLD_OBC_ModeState != 2");}
}
capl 脚本 xcp测试
最新推荐文章于 2024-07-03 15:39:41 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)