Presentation is loading. Please wait.

Presentation is loading. Please wait.

“COMMAND PARSE” - A STATUS REPORT - Matt Smith Pallavi Khandelwal

Similar presentations


Presentation on theme: "“COMMAND PARSE” - A STATUS REPORT - Matt Smith Pallavi Khandelwal"— Presentation transcript:

1 “COMMAND PARSE” - A STATUS REPORT - Matt Smith Pallavi Khandelwal
Vaibhav Badjatya

2 INTRODUCTION Command Executor
A task that Extracts command id from the received packet and runs a switch on “command id” call functions that handle the commands. Command Scheduler A task that Schedules the different incoming commands , that is decides the order in which they will be executed

3 GOALS FOR THE SEMSESTER
DEVELOP COMMAND EXECUTOR FOR THE COMPLETE COMMAND SET. DEVELOP FUNCTIONS RELATED TO REAL TIME CLOCK. DEVELOP THE COMMAND SCHEDULER . PRODUCE A COMPLETE DOCUMENT OF THE COMMANDS TO BE IMPLEMENTED.

4

5 SOFTWARE FLOW switch(command.ID) // Notify of unhandled command
Receives Command GET_CMD_RX( (ubyte*)&(command.ID), (ubyte*)&(command.Payload), (ubyte*)&(command.NumBytes) Gives error if invalid command ID. // Notify of unhandled command void errorNotify(unsigned char cmndID) { kysat_printf("COMMAND EXECUTOR Command not implemented: %c \n", cmndID) } If valid command sends acknowledgement. // sends ack. of command back to radio void sendAcknowledge(CommandItem* command) command->ID = command->ID + 32; send_tx_raw( command->ID, command->Payload, command->NumBytes); Runs the switch on command ID ,and calls relevant functions. switch(command.ID) case BEACON: :

6

7 OTHER FUNTIONS IMPLEMENTED
REAL TIME CLOCK //BASIC STRUCTURE USED typedef struct { uint16 year; ubyte month; ubyte day; ubyte hour; ubyte minute; ubyte second; } RTCTime; // TO SET CURRENT TIME FOR RTC ubyte RTCSetTime(uint16 year, ubyte month, ubyte day, ubyte hour, ubyte minute, ubyte second ); //SETS TIME FROM AN ARRAY OF UBYTES ubyte RTCSetTimeRaw(ubyte* data); // RETURN CURRETN TIME RTCTime RTCGetTime( void ); COMNNAD SCHEDULER // TO SCHEDULE A COMMAND ubyte CmdSchSchedule( ubyte* id, ubyte* payload, ubyte* numbytes); The input is the command to schedule a command Function checks the ID to make sure it is the correct command type, else it returns an error Then checks to make sure the queue is not full, or it will return an error Then finds the spot in the queue the command belongs. The queue is sorted based on when the command needs executed Finally it inserts the command in the queue and moves other commands if necessary // THE TASK FOR THE COMMAND SCHEDULER void CmdSchTask( void ); Wakes up to check if a command needs executed (currently periodically) If a command needs executed then the command is placed in the CMD_RX queue

8 Sends back Packet received with ID changed to ‘a’. Beacon
coded ID 2 De Coded NAME ARGUMENTS ACTIONS ACK OR RETURN PACKET INCHARGE MODULE      A BEACONS Time period(). changes the period of the following periodic beacon packet to the Time period in the argument Sends back Packet received with ID changed to ‘a’. Beacon B 1 TELEMETRY_REQUEST Telemetry information required. Supplies the telemetry packet containing the required telemetry information No ack, but just the requested packets.      C 2 TELEMETRY_WINDOW ID (telemetry point ), Rate() , Length () Samples the Telemetry Point specified by ID at the specified rate for the specified length of time. Writes results to file. Sends back Packet received with ID changed to ‘c’.      D 3 DIGITAL_UPLINK_ CONTROL Follow Beacon, Timeout (1 BYTE) (OS TICKS) Cancel Beacons, Timeout (1 BYTE) (OS TICKS) Change which Beacon (0 DB, 1 CW) the Receiver Listens After and for How Long Afterwards (units);. Sets the length of time (units) that the Beacons are halted for and the receiver is on after a digital packet is received. Sends back Packet received with ID changed to ‘d’      E 4 SEND_FILE File ID, Extension, Folder ID, Packet Number, Data Returns the specified portion of the requested file Sends back Packet received with ID changed to ‘e’ and arguments removed. File System

9 Start Packet Number, Number of Packets Stores data locally.
ID1 En coded ID 2 De Coded NAME ARGUMENTS ACTIONS ACK OR RETURN PACKET INCHARGE MODULE      F 5 REQUEST_FILE File ID, Extension, Folder ID, Start Packet Number, Number of Packets Stores data locally. No ack, but just the requested packets. File System G 6 S-BAND_CONTROL power, ON/OFF 0 0 (I BYTE) /0 auto-off, timeout 0 1 (I BYTE) , (os ticks) register control, control data , ???? Turns the S-band Radio on/off. Specifies how long the radio should remain on after it is activated Used to directly manipulate the s-band configuration Sends back Packet received with ID changed to ‘g’ H 7 PLAY_AUDIO DTMF Wait, Loop Timer, Audio Telemetry Bitfield Plays the specified audio file after receiving the appropriate DTMF tone (if DTMF wait is set to true) loops if loop timer is non-zero, and inserts the audio telemetry points specified in the bitfield after each loop. None. Audio playback is sufficient. Audio Processing      I 8 PHOTOGRAPH Number in Sequence (max. limit), Pause (units…) Takes specified number of pictures with specified pause between them. Automatically sends the first packet of each picture when complete. Sends back Packet received with ID changed to ‘i’ .

10 ID1 En coded ID 2 De Coded NAME ARGUMENTS ACTIONS ACK OR RETURN PACKET INCHARGE MODULE     J 9 REAL_TIME Set Time, Real Time Send Time Set the Real-Time Clock.(is the time sent back to user??) No Action Command executor     K 10 ACKNOWLEDGEMENT_CONTROL ON / OFF Allows/Disables the Auto-Reply Function of Most Commands. Sends back Packet received with ID changed to ‘k’ .     L 11 STOP_ACTION None Stops all activities onboard. An escape key on the spacecraft Sends back Packet received with ID changed to ‘l’ .     M 12 SYSTEM_RESET Soft(0), Key String Hard(1), Key String Soft reset of the CPU. Hard reset of the system. Sends back Packet received with ID changed to ‘m’ .     N 13 POWER_MODE Mode, Key String Force into low-power state (limit radio usage and camera usage, shorten the CW beacon, fewer digibeacons, no audio playback, no s-band radio, no pictures). Sends back Packet received with ID changed to ‘n’ .      O 14 AUTO POWER_DOWN Voltage Sets the battery voltage used to determine when to automatically go into the low power mode.

11 COMMANDS TESTED COMMAND ID COMMAND NAME ARGUMENTS FUNTIONS
BEACON Time period changes the period of periodic beacon packet to the period given in the argument B , 1 TELEMETRY_REQUEST Telemetry Supplies the telemetry packet containing the required telemetry information H , 7 PLAY_AUDIO Signal to the audio The audio file is played K, ACKNOWLEDGEMENT_CONTROL_ On / off Turns on or off the acknowledgment reception J , 11 REAL TIME Can set the real time clock, get the current time. Dummy values for command ID before the switch statement. Dummy packets from packet Rx. Dummy function calls e.g.. PLAY_AUDIO . Real Time Clock starting the RTC task and initializing the time and then printing out debug statements each time the clock updated .

12 GOALS FOR THE SEMSESTER
vs. current status DEVELOP COMMAND EXECUTOR FOR THE COMPLETE COMMAND SET. --- is completed with the switch for whole set of commands (in all 15 ) , and tested for some. DEVELOP FUNCTIONS RELATED TO REAL TIME CLOCK. --- completed and tested, but for the ubyteRTCSetTimeRaw(ubyte* data); DEVELOP THE COMMAND SCHEDULER . --- partially complete, will be completed by the end of the semester PRODUCE A COMPLETE DOCUMENT OF THE COMMANDS TO BE IMPLEMENTED --- mostly finished but for some changes.

13 FUTURE GOALS IMPLEMENT SOME MORE FUNTIONS IN THE COMMAND EXECUTOR. WRITE A FUNCTION TO HANDLE THE COMMAND FOR THE REAL TIME CLOCK. DEVELOP THE COMMAND SCHEDULER FOR COMPLETE FUNCTIONALITY BY THE END OF SEMESTER INCLUDE THE LENGTH AND DATA TYPE OF THE ARGUMENTS IN THE COMMAND LIST AND INCLUDE THE COMMANDS FOR SCHEDULER.


Download ppt "“COMMAND PARSE” - A STATUS REPORT - Matt Smith Pallavi Khandelwal"

Similar presentations


Ads by Google