Skip to content

Commit

Permalink
HotFix #170, correct IC merge issues
Browse files Browse the repository at this point in the history
Correct various merge issues in the latest IC
  • Loading branch information
jphickey committed Nov 14, 2023
1 parent 500839d commit 3316bfa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 41 deletions.
20 changes: 8 additions & 12 deletions fsw/src/to_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
** TO Global Data Section
*/
TO_LAB_GlobalData_t TO_LAB_Global;
TO_LAB_Subs_t * TO_LAB_Subs;
CFE_TBL_Handle_t TO_SubTblHandle;

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
Expand Down Expand Up @@ -98,12 +96,12 @@ void TO_LAB_delete_callback(void)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
CFE_Status_t TO_LAB_init(void)

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.

Check notice

Code scanning / CodeQL

Function too long Note

TO_LAB_init has too many lines (113, while 60 are allowed).
{
CFE_Status_t status;
char PipeName[16];
uint16 PipeDepth;
uint16 i;
char ToTlmPipeName[16];
uint16 ToTlmPipeDepth;
CFE_Status_t status;
char PipeName[16];
uint16 PipeDepth;
uint16 i;
char ToTlmPipeName[16];
uint16 ToTlmPipeDepth;
void * TblPtr;
TO_LAB_Sub_t *SubEntry;

Expand Down Expand Up @@ -187,8 +185,6 @@ CFE_Status_t TO_LAB_init(void)
/* Only process until invalid MsgId is found*/
break;
}
status = CFE_SB_SubscribeEx(TO_LAB_Subs->Subs[i].Stream, TO_LAB_Global.Tlm_pipe, TO_LAB_Subs->Subs[i].Flags,
TO_LAB_Subs->Subs[i].BufLimit);

status = CFE_SB_SubscribeEx(SubEntry->Stream, TO_LAB_Global.Tlm_pipe, SubEntry->Flags, SubEntry->BufLimit);
if (status != CFE_SUCCESS)
Expand Down Expand Up @@ -262,8 +258,8 @@ void TO_LAB_openTLM(void)
void TO_LAB_forward_telemetry(void)
{
OS_SockAddr_t d_addr;
CFE_Status_t status;
CFE_Status_t CFE_SB_status;
int32 OsStatus;
CFE_Status_t CfeStatus;
CFE_SB_Buffer_t *SBBufPtr;
const void * NetBufPtr;
size_t NetBufSize;
Expand Down
32 changes: 4 additions & 28 deletions fsw/src/to_lab_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,6 @@
/**
* CI global data structure
*/
typedef struct
{
CFE_SB_PipeId_t Tlm_pipe;
CFE_SB_PipeId_t Cmd_pipe;
osal_id_t TLMsockid;
bool downlink_on;
char tlm_dest_IP[17];
bool suppress_sendto;

TO_LAB_HkTlm_t HkTlm;
TO_LAB_DataTypesTlm_t DataTypesTlm;
} TO_LAB_GlobalData_t;

/************************************************************************
* Function Prototypes
************************************************************************/

void TO_LAB_AppMain(void);
void TO_LAB_openTLM(void);
int32 TO_LAB_init(void);
void TO_LAB_exec_local_command(CFE_SB_Buffer_t *SBBufPtr);
void TO_LAB_process_commands(void);
void TO_LAB_forward_telemetry(void);

typedef struct
{
CFE_SB_PipeId_t Tlm_pipe;
Expand All @@ -83,11 +59,11 @@ typedef struct

} TO_LAB_GlobalData_t;

/*
** Prototypes Section
*/
void TO_LAB_AppMain(void);
/************************************************************************
* Function Prototypes
************************************************************************/

void TO_LAB_AppMain(void);
void TO_LAB_openTLM(void);
int32 TO_LAB_init(void);
void TO_LAB_process_commands(void);
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/to_lab_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void TO_LAB_TaskPipe(const CFE_SB_Buffer_t *SBBufPtr)
break;

default:
CFE_EVS_SendEvent(TO_LAB_MSGID_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO: Invalid Msg ID Rcvd 0x%x",
CFE_EVS_SendEvent(TO_LAB_MID_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO: Invalid Msg ID Rcvd 0x%x",
__LINE__, (unsigned int)CFE_SB_MsgIdToValue(MsgId));
break;
}
Expand Down
1 change: 1 addition & 0 deletions fsw/tables/to_lab_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "cfe_tbl_filedef.h" /* Required to obtain the CFE_TBL_FILEDEF macro definition */
#include "cfe_sb_api_typedefs.h"
#include "to_lab_tbl.h"
#include "cfe_msgids.h"

/*
** Add the proper include file for the message IDs below
Expand Down

0 comments on commit 3316bfa

Please sign in to comment.