tc_handler.h
80 lines
| 3.0 KiB
| text/x-c
|
CLexer
/ header / tc_handler.h
|
r5 | #ifndef TC_HANDLER_H_INCLUDED | ||
#define TC_HANDLER_H_INCLUDED | ||||
|
r18 | |||
|
r45 | #include <rtems.h> | ||
#include <leon.h> | ||||
|
r40 | #include "tc_load_dump_parameters.h" | ||
|
r45 | #include "tc_acceptance.h" | ||
|
r40 | #include "tm_lfr_tc_exe.h" | ||
|
r45 | #include "wf_handler.h" | ||
|
r95 | #include "fsw_processing.h" | ||
|
r18 | |||
|
r134 | #include "lfr_cpu_usage_report.h" | ||
|
r240 | extern unsigned int lastValidTransitionDate; | ||
|
r18 | //**** | ||
|
r12 | // ISR | ||
|
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 | ||||
|
r109 | int action_reset( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ); | ||
|
r111 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); | ||
|
r109 | int action_update_info( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | ||
int action_enable_calibration( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ); | ||||
int action_disable_calibration( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ); | ||||
int action_update_time( ccsdsTelecommandPacket_t *TC); | ||||
|
r33 | |||
|
r23 | // mode transition | ||
|
r109 | int check_mode_value( unsigned char requestedMode ); | ||
int check_mode_transition( unsigned char requestedMode ); | ||||
|
r240 | void update_last_valid_transition_date( unsigned int transitionCoarseTime ); | ||
|
r111 | int check_transition_date( unsigned int transitionCoarseTime ); | ||
|
r238 | int stop_spectral_matrices( void ); | ||
|
r98 | int stop_current_mode( void ); | ||
|
r237 | int enter_mode_standby( void ); | ||
int enter_mode_normal( unsigned int transitionCoarseTime ); | ||||
int enter_mode_burst( unsigned int transitionCoarseTime ); | ||||
int enter_mode_sbm1( unsigned int transitionCoarseTime ); | ||||
int enter_mode_sbm2( unsigned int transitionCoarseTime ); | ||||
|
r171 | int restart_science_tasks( unsigned char lfrRequestedMode ); | ||
|
r238 | int restart_asm_tasks(unsigned char lfrRequestedMode ); | ||
int suspend_science_tasks(void); | ||||
int suspend_asm_tasks( void ); | ||||
|
r171 | void launch_waveform_picker( unsigned char mode , unsigned int transitionCoarseTime ); | ||
|
r118 | void launch_spectral_matrix( void ); | ||
|
r171 | void set_sm_irq_onNewMatrix( unsigned char value ); | ||
void set_sm_irq_onError( unsigned char value ); | ||||
|
r33 | |||
|
r23 | // other functions | ||
|
r45 | void updateLFRCurrentMode(); | ||
|
r171 | void set_lfr_soft_reset( unsigned char value ); | ||
void reset_lfr( void ); | ||||
|
r187 | // CALIBRATION | ||
void setCalibrationPrescaler( unsigned int prescaler ); | ||||
void setCalibrationDivisor( unsigned int divisionFactor ); | ||||
void setCalibrationData( void ); | ||||
void setCalibrationReload( bool state); | ||||
void setCalibrationEnable( bool state ); | ||||
void setCalibrationInterleaved( bool state ); | ||||
|
r206 | void setCalibration( bool state ); | ||
|
r187 | void configureCalibration( bool interleaved ); | ||
// | ||||
|
r107 | void update_last_TC_exe( ccsdsTelecommandPacket_t *TC , unsigned char *time ); | ||
void update_last_TC_rej(ccsdsTelecommandPacket_t *TC , unsigned char *time ); | ||||
void close_action( ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id ); | ||||
|
r5 | |||
|
r82 | extern rtems_status_code get_message_queue_id_send( rtems_id *queue_id ); | ||
extern rtems_status_code get_message_queue_id_recv( rtems_id *queue_id ); | ||||
|
r5 | #endif // TC_HANDLER_H_INCLUDED | ||
|
r18 | |||