##// END OF EJS Templates
Sync...
Sync BP parameters are set in accordance with TC_LFR_LOAD_NORMAL, BURST, SBM1 and SBM2 BP packets related to f0 data are sent in any mode

File last commit:

r117:7ccc2641c507 VHDLib206
r117:7ccc2641c507 VHDLib206
Show More
fsw_processing.h
109 lines | 3.8 KiB | text/x-c | CLexer
paul
Minor changes in .h inclusion
r45 #ifndef FSW_PROCESSING_H_INCLUDED
#define FSW_PROCESSING_H_INCLUDED
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
paul
Minor changes in .h inclusion
r45 #include <rtems.h>
#include <grspw.h>
#include <math.h>
#include <stdlib.h> // abs() is in the stdlib
#include <stdio.h> // printf()
paul
sequence counters management added
r56 #include <math.h>
paul
Minor changes in .h inclusion
r45
#include "fsw_params.h"
paul
sequence counters management added
r56 #include "fsw_spacewire.h"
paul
Minor changes in .h inclusion
r45
paul
Sync...
r116 typedef struct ring_node_sm
{
struct ring_node_sm *previous;
paul
Sync...
r117 struct ring_node_sm *next;
paul
Sync...
r116 int buffer_address;
unsigned int status;
unsigned int coarseTime;
unsigned int fineTime;
} ring_node_sm;
paul
Sync...
r117 typedef struct ring_node_asm
paul
Sync...
r116 {
paul
Sync...
r117 struct ring_node_asm *previous;
struct ring_node_asm *next;
float asm_burst_sbm_f0[ TIME_OFFSET + TOTAL_SIZE_SM ];
paul
Sync...
r116 unsigned int status;
paul
Sync...
r117 } ring_node_asm;
paul
Sync...
r116
paul
Sync...
r117 typedef struct bp_packet
paul
Sync...
r116 {
paul
Sync...
r117 Header_TM_LFR_SCIENCE_BP_t header;
unsigned char data[ 30 * 22 ]; // MAX size is 22 * 30 [TM_LFR_SCIENCE_BURST_BP2_F1]
} bp_packet;
typedef struct bp_packet_with_spare
{
paul
Sync...
r116 Header_TM_LFR_SCIENCE_BP_with_spare_t header;
paul
Sync...
r117 unsigned char data[ 9 * 13 ]; // only for TM_LFR_SCIENCE_NORMAL_BP1_F0 and F1
} bp_packet_with_spare;
extern nb_sm_t nb_sm;
extern nb_sm_before_bp_t nb_sm_before_bp;
paul
Sync...
r116
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 extern volatile int sm_f0[ ];
extern volatile int sm_f1[ ];
extern volatile int sm_f2[ ];
paul
sy_lfr_n_swf_p implemented...
r32
// parameters
extern struct param_local_str param_local;
// registers
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 extern time_management_regs_t *time_management_regs;
extern spectral_matrix_regs_t *spectral_matrix_regs;
paul
Minor changes in .h inclusion
r45 extern rtems_name misc_name[5];
extern rtems_id Task_id[20]; /* array of task ids */
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 // ISR
paul
Sync...
r117 void reset_nb_sm_f0( unsigned char lfrMode );
paul
SID corrected in TM_LFR_TC_EXE packets...
r31 rtems_isr spectral_matrices_isr( rtems_vector_number vector );
paul
Commit before working on the ERR 4 due to message queue...
r34 rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector );
paul
SID corrected in TM_LFR_TC_EXE packets...
r31
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 // RTEMS TASKS
paul
Sync...
r117 rtems_task smiq_task( rtems_task_argument argument ); // added to test the spectral matrix simulator
rtems_task avf0_task( rtems_task_argument lfrRequestedMode );
rtems_task matr_task( rtems_task_argument lfrRequestedMode );
paul@pc-solar1.lab-lpp.local
automatic reconnexion of the spacewire link...
r17
paul
Sync...
r117 //******************
// Spectral Matrices
void SM_init_rings( void );
void ASM_init_ring( void );
void SM_reset_current_ring_nodes( void );
void ASM_reset_current_ring_node( void );
void ASM_init_header( Header_TM_LFR_SCIENCE_ASM_t *header);
paul
Sync...
r116 void SM_average(float *averaged_spec_mat_f0, float *averaged_spec_mat_f1,
paul
sync
r113 ring_node_sm *ring_node_tab[],
unsigned int firstTimeF0, unsigned int firstTimeF1 );
paul
Sync
r115 void ASM_reorganize_and_divide(float *averaged_spec_mat, float *averaged_spec_mat_reorganized,
float divider );
void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat,
float divider,
unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart);
paul
the function asm_reorganize format the spectral matrix to the ICD format
r103 void ASM_convert(volatile float *input_matrix, char *output_matrix);
void ASM_send(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix,
paul
Last commit before release 0-13...
r35 unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id);
paul
Sync
r115
paul
Sync...
r117 //*****************
// Basic Parameters
void BP_reset_current_ring_nodes( void );
void BP_init_header(Header_TM_LFR_SCIENCE_BP_t *header,
unsigned int apid, unsigned char sid,
unsigned int packetLength , unsigned char blkNr);
void BP_init_header_with_spare(Header_TM_LFR_SCIENCE_BP_with_spare_t *header,
unsigned int apid, unsigned char sid,
unsigned int packetLength, unsigned char blkNr );
paul
Sync...
r116 void BP_send(char *data,
rtems_id queue_id ,
unsigned int nbBytesToSend );
paul
Sync
r115
paul
Sync...
r117 //******************
// general functions
paul
Sync
r115 void reset_spectral_matrix_regs( void );
paul
Sync...
r117 void set_time(unsigned char *time, unsigned char *timeInBuffer );
paul
Sync...
r116
paul
Minor changes in .h inclusion
r45 #endif // FSW_PROCESSING_H_INCLUDED