tc_handler.h
63 lines
| 1.9 KiB
| text/x-c
|
CLexer
/ header / tc_handler.h
paul@pc-solar1.lab-lpp.local
|
r5 | #ifndef TC_HANDLER_H_INCLUDED | ||
#define TC_HANDLER_H_INCLUDED | ||||
paul@pc-solar1.lab-lpp.local
|
r18 | |||
paul
|
r45 | #include <rtems.h> | ||
#include <leon.h> | ||||
paul
|
r40 | #include "tc_load_dump_parameters.h" | ||
paul
|
r45 | #include "tc_acceptance.h" | ||
paul
|
r40 | #include "tm_lfr_tc_exe.h" | ||
paul
|
r45 | #include "wf_handler.h" | ||
paul@pc-solar1.lab-lpp.local
|
r18 | |||
// MODE PARAMETERS | ||||
extern struct param_sbm1_str param_sbm1; | ||||
extern struct param_sbm2_str param_sbm2; | ||||
extern time_management_regs_t *time_management_regs; | ||||
extern waveform_picker_regs_t *waveform_picker_regs; | ||||
extern gptimer_regs_t *gptimer_regs; | ||||
paul
|
r45 | extern rtems_name misc_name[5]; | ||
extern rtems_id Task_id[20]; /* array of task ids */ | ||||
extern unsigned char lfrCurrentMode; | ||||
extern unsigned int maxCount; | ||||
paul@pc-solar1.lab-lpp.local
|
r18 | |||
//**** | ||||
paul@pc-solar1.lab-lpp.local
|
r12 | // ISR | ||
paul@pc-solar1.lab-lpp.local
|
r18 | rtems_isr commutation_isr1( rtems_vector_number vector ); | ||
rtems_isr commutation_isr2( rtems_vector_number vector ); | ||||
//*********** | ||||
// RTEMS TASK | ||||
rtems_task actn_task( rtems_task_argument unused ); | ||||
//*********** | ||||
// TC ACTIONS | ||||
paul
|
r35 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | ||
int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | ||||
int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | ||||
int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | ||||
int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | ||||
paul
|
r33 | int action_update_time(ccsdsTelecommandPacket_t *TC); | ||
paul@pc-solar1.lab-lpp.local
|
r23 | // mode transition | ||
int transition_validation(unsigned char requestedMode); | ||||
paul@pc-solar1.lab-lpp.local
|
r20 | int stop_current_mode(); | ||
paul@pc-solar1.lab-lpp.local
|
r23 | int enter_mode(unsigned char mode, ccsdsTelecommandPacket_t *TC); | ||
paul
|
r33 | int enter_standby_mode(); | ||
int enter_normal_mode(); | ||||
int enter_burst_mode(); | ||||
int enter_sbm1_mode(); | ||||
int enter_sbm2_mode(); | ||||
paul
|
r32 | int restart_science_tasks(); | ||
int suspend_science_tasks(); | ||||
paul
|
r33 | |||
paul@pc-solar1.lab-lpp.local
|
r23 | // other functions | ||
paul
|
r45 | void updateLFRCurrentMode(); | ||
paul@pc-solar1.lab-lpp.local
|
r21 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC); | ||
void update_last_TC_rej(ccsdsTelecommandPacket_t *TC); | ||||
paul
|
r35 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id); | ||
paul@pc-solar1.lab-lpp.local
|
r5 | |||
#endif // TC_HANDLER_H_INCLUDED | ||||
paul@pc-solar1.lab-lpp.local
|
r18 | |||