
MC1322x SMAC Software Architecture
MC1322x SMAC Reference Manual, Rev. 1.7
Freescale Semiconductor
2-7
The Radio Management module can catch and hold as many messages as the queue can hold at any given
time. The queue size is defined by the MAX_NUM_MSG declared in the
RadioManagement.c
file.
The process_radio_msg function must be called in order to process the messages. If this function is not
properly called, message processing will not work as expected. The application must periodically call
process_radio_msg at least until the message queue is empty.
2.5
MC1322x SMAC Data Types
The following list shows the fundamental data types and the naming convention used in MC1322x SMAC:
uint8_t
Unsigned 8 bit definition
uint16_t
Unsigned 16 bit definition
uint32_t
Unsigned 32 bit definition
int8_t
Signed 8 bit definition
int16_t
Signed 16 bit definition
int32_t
Signed 32 bit definition
Usage
These data types are used in the MC1322x SMAC project as well as in the applications projects. They are
defined in the
typedef.h
file.
2.5.1
message_t
This type defines a structure to store the messages information. It is located in the
RadioManagement.h
file
and is defined as follows:
typedef struct message_tag {
msg_status_t u8Status;
smac_pdu_t *pu8Buffer;
uint8_t u8BufSize;
callback_t cbDataIndication;
}message_t;
Members
u8Status
The status of the message, it is formed by three bits for the message type and 5 bits
for the message state, this is defined with the
msg_status_t
type. There are four
types of messages: TX, RX, Time Out and Energy Detect. The application must
not write to this member, it is initialized when the message is passed to
MCPSDataRequest, MLMERXEnableRequest or MLMEEnergyDetect function
and updated by the process_radio_msg function.
* pu8Buffer
A pointer to the data buffer to transmit or receive.