Player E128
The PLAYER E128's purpose is to receive and send messages over XBee to the COACH controller, drive the propulsion fans, operate the kicker, and exchange information with the LiFKM PIC over SPI.
The software architecture for the Player utilizes Flat State Machines (FSMs) and the Events and Services Framework. This architecture decomposed the aforementioned functionality of the Player into seperate state machines and services. The PlayerReceiveSM state machine solely handled receiving messages from the XBee, while another state machine, PlayerTransmitSM, dealt with the transmitting data from the E128 over XBee to the COACH. The third state machine, PlayerBrainSM, was responsible for the logic and decision-making the PLAYER made based on different types of data it receieved from either the COACH or the field. PlayeLiFKIM was a service that was responsible for communicating with the LiFKIM over SPI.
The software architecture for the Player utilizes Flat State Machines (FSMs) and the Events and Services Framework. This architecture decomposed the aforementioned functionality of the Player into seperate state machines and services. The PlayerReceiveSM state machine solely handled receiving messages from the XBee, while another state machine, PlayerTransmitSM, dealt with the transmitting data from the E128 over XBee to the COACH. The third state machine, PlayerBrainSM, was responsible for the logic and decision-making the PLAYER made based on different types of data it receieved from either the COACH or the field. PlayeLiFKIM was a service that was responsible for communicating with the LiFKIM over SPI.
State Diagrams
PseudoCode
|
|
|
|
Header Files
|
|
|
|
Source Files
|
|
|
|
Player LiFKM PIC
The PLAYER LiFKM PIC is in charge of relaying information between the LiFKM controller and the PLAYER E128, purely as a middleman. The code is written entirely in assembly, per project requirements. The PIC communicates with the LiFKM over SCI and with the E128 over SSP. The code is entirely interrupt-driven on SCI or SSP message reception.
Code
|
PseudoCode
|