
MC1322x SMAC Software Architecture
MC1322x SMAC Reference Manual, Rev. 1.7
2-4
Freescale Semiconductor
Messages are processed by the Radio Management module. The Radio Management module
has a circular
queue with the messages that need to be processed as a FIFO structure. The messages are attended in the
same order as they arrive.
Messages are added to the message queue using the following functions:
•
MCPSDataRequest (for TX messages)
•
MLMERXEnableRequest (for RX messages)
•
MLMEEnergyDetect (for ED messages)
These functions call the Radio Management handle_new_message function.
Because the messages are processed by their states, the process_radio_msg function must also be called
periodically to run the message state machine.
2.4.1
Message Types
The MC1322x SMAC defines four types of messages:
•
Reception (RX)
•
Transmission (TX)
•
Energy Detect (ED)
•
Time out (TO)
These types of messages are directly related with radio operation. Messages types are defined at the
enumeration msg_type_t declared in the
RadioManagement.h
file. Each type of message has its own life
cycle. This cycle is defined by the different states that a message can take. The following code declared at
the
RadioManagement.h
file describes each message state: