Wireless sensor network is an energy-constrained system. Energy efficiency and data latency are two important performance measures needed to be considered when designing a wireless sensor network. Based on the power management mode in IEEE 802.15.4, taking into account the switching procedure from the sleep mode to the active mode, a discrete-time queueing model with a setup is built, and the analysis of the queueing model in steady state is given. Moreover, we present the performance measures in terms of the handover ratio, the average response time of data frames and the average energy consumption, and we also discuss the relationships between the system performance measures and the constellation size. Finally, we construct a cost function and obtain the optimal constellation size.