![Texas Instruments CC3220 Скачать руководство пользователя страница 187](http://html.mh-extra.com/html/texas-instruments/cc3220/cc3220_programmers-manual_1094609187.webp)
Filter Creation
187
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
Rx Filters
11.4.5.3 Filter During Transceiver Mode
In case of transceiver mode filtering, the transceiver socket receive function must be invoked for receiving
frames; the function triggers the device to start the receiving of Rx frames. Once the device receives
frames, the frames are processed by the Rx filter marcher. The socket receive opens a datagram in raw
socket. In transceiver mode, TCP and UDP frames are carried over fragmented IPv4 or IPv6 datagrams,
and therefore are not filtered on L4 ports or on payload.
11.4.6 Rx Filter Action
The actions execute if the filter trigger and the filter rule are matched. Each filter can be defined with
several actions.
The following actions are supported:
•
SL_WLAN_RX_FILTER_ACTION_NULL, no action
•
SL_WLAN_RX_FILTER_ACTION_DROP, drop the packet
•
SL_WLAN_RX_FILTER_ACTION_EVENT_TO_HOST, send event
The following actions are relevant to the counters feature:
•
SL_WLAN_RX_FILTER_ACTION_ON_REG_INCREASE
•
SL_WLAN_RX_FILTER_ACTION_ON_REG_DECREASE
•
SL_WLAN_RX_FILTER_ACTION_ON_REG_RESET
The following subsection describes the event actions.
11.4.6.1 Send Events Action
A typical usage for the send event capability is to perform wake on WLAN (that is, to wake the host on a
specific packet matching a filter).
Events can be sent from the SimpleLink Wi-Fi device to the host as a result of a matched Rx filter.
The event action arguments (Action.UserId) define the bit number set in the triggered event.
The supported ID range is from 0 to SL_RX_FILTER_MAX_USER_EVENT_ID (=63).
A single host event aggregates all the events actions which have been triggered for a single frame. The
aggregation is based on the filter groups, as described in rule types. Examples follow.
11.4.6.2 Multiple Bits Set on the Same Event
Consider the following case:
•
Source IP has event action with argument ID X.
•
Destination IP has event action with argument ID Y.
•
Both header rule fields are from the same group C.
•
A received frame passes both filters.
This results in a single host event with bit X and bit Y set.
11.4.6.3 Multiple Events From the Same Rx Frame
Consider the following case:
•
Src MAC (group A) has event action with arg ID X.
•
Dest IP Y (group C) has event action with arg ID.
•
A received frame passes both filters.
This results in two host events: event with bit X set and event with bit Y set.