AUTOSAR COM学习(一)

AUTOSAR的COM模块从本质上来讲就是处理信号的接收和发送事宜,简化后就像下图这个样子,一进一出,有来有回:

  • 信号滤波

COM支持的信号级滤波算法见下表:

Name

Algorithm

Description

ALWAYS

True

No filtering is  performed so that the message always passes.

NEVER

False

The filter  removes all messages.

MASKED_NEW_EQUALS_X

(new_value&mask)  == x

Pass messages  whose masked value is equal to a specific value.

MASKED_NEW_DIFFERS_X

(new_value&mask)  != x

Pass messages  whose masked value is not equal to a specific value.

MASKED_NEW_DIFFERS_MASKED_OLD

(new_value&mask)  != (old_value&mask)

Pass messages  where the masked value has changed.

NEW_IS_WITHIN

min <= new_value  <= max

Pass a message if  its value is within a predefined boundary.

NEW_IS_OUTSIDE

(min >  new_value) || (new_value > max)

Pass a message if  its value is outside a predefined boundary.

ONE_EVERY_N

Occurrence%period  == offset

Pass a message  once every N message occurrences.

Start:  occurrence=0.

Each time the  message is received or transmitted, occurrence is incremented by 1 after  filtering.

Length of  occurrence is 8 bit(minimum).

表中前7种算法结合描述比较容易理解,最后一种ONE_EVERY_N是指在period次filter中只有第offset次才能通过,打个比方有8个跑马灯编号0-7,循环点亮,指定编号2的灯亮时滤波通过。

  • 信号组

COM模块提供将多个信号打包成组看作一个整体来处理的功能:

  • 11
    点赞
  • 46
    收藏
    觉得还不错? 一键收藏
  • 8
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值