diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e2465db --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,169 @@ +# Changelog + +## Development Build: v2.5.0-rc4+dev31 +- Remove unused PktSize variable. +- Standardize naming of TO_LAB functions/macros etc. +- Create CHANGELOG.md +- See , , and + +## Development Build: v2.5.0-rc4+dev23 +- Update cmake mimimum required to something more recent +- See + +## Development Build: v2.5.0-rc4+dev21 + +- Remove registration of empty EVS filters +- Update codeql workflow for reusable updates +- See + + +## Development Build: v2.5.0-rc4+dev16 + +- Update Copyright Headers +- Standardize version.h +- See and + +## Development Build: v2.5.0-rc4+dev9 + +- Apply header guard standard +- See + +## Development Build: v2.5.0-rc4+dev4 + +- Use CFE_MSG_PTR conversion macro +- Set new baseline for cFS-Caelum-rc4: v2.5.0-rc4 +- See and + +## Development Build: v2.4.0-rc1+dev58 + +- Apply CFE_SB_ValueToMsgId where required +- See and + +## Development Build: v2.4.0-rc1+dev49 + +- Implement Coding Standard in CodeQL workflow +- See and + +## Development Build: v2.4.0-rc1+dev47 + +- Removes app registration call, `CFE_ES_RegisterApp()` since applications do not need to register themselves. +- See + +## Development Build: v2.4.0-rc1+dev41 + +- Use `cfe.h` header file +- See + +## Development Build: v2.4.0-rc1+dev38 + +- Remove numeric pipe ID from event printf +- Add Testing Tools to the Security Policy +- See + +## Development Build: v.2.4.0-rc1+dev32 + +- Removes end-of-function comments in `to_lab_app.c` +- Adds static analysis and code format check to continuous integration workflow. Updates workflow status badges in ReadMe +- Adds CodeQL analysis to continuous integration workflow +- See + +## Development Build: v.2.4.0-rc1+dev21 + +- TO remains command-able after a "remove all subscriptions" command; the command now only removes all subscriptions to the Tlm_pipe +- See + +## Development Build: v.2.4.0-rc1+dev17 + +- Aligns messages according to changes in cFE . Uses the "raw" message cmd/tlm types in definition +- See + +## Development Build: v.2.4.0-rc1+dev13 + +- Replaces deprecated SB API's with MSG +- See + +## Development Build: v.2.4.0-rc1+dev9 + +- Update the TLMsockid field to be `osal_id_t` instead of uint32 +- Set revision number to 99 to indicate development status in telemetry +- See + +## Development Build: v.2.4.0-rc1+dev6 + +- Adds header guard to `to_lab_sub_table.h` +- See + +## Development Build: v.2.4.0-rc1+dev3 + +- Remove reference to deprecated `CFE_ES_SHELL_TLM_MID`. +- See + +## Development Build: v2.3.0+dev45 + +- Fixes bug where an unset address values caused subscriptions to MsgId 0 over 200 times. Added a `TO_UNUSED` entry at the end of the subscription list and a break in the subscription loop when `TO_UNUSED` found. No more subscriptions on the unused table slots (no MsgId 0 subscriptions). +- Corrects return value of `TO_LAB_init()` to be `int32` instead of `int`. Declaration now matches definition, and app builds without errors. +- Add build number and baseline to version reporting. +- See + +## Development Build: v2.3.7 + +- Makes the `TO_LAB_Subs` table into a CFE_TBL-managed table. +- See + + +## Development Build: v2.3.6 + +- Replace references to `ccsds.h` types with the `cfe_sb.h`-provided type. +- See + +## Development Build: v2.3.5 + +- Apply code style +- See + +## Development Build: v2.3.4 + +- Configure the maximum depth supported by OSAL, rather than a hard coded 64. +- See + +## Development Build: v2.3.3 + +- Apply the CFE_SB_MsgIdToValue() and CFE_SB_ValueToMsgId() routines where compatibility with an integer MsgId is necessary - syslog prints, events, compile-time MID #define values. +- Deprecates shell tlm subscription +- Changes to documentation +- See + +## Development Build: v2.3.2 + +- Use OSAL socket API instead of BSD Sockets + +- Use global namespace to isolate variables + +- Minor updates (see ) + +## Development Build: v2.3.1 + +- Fix for a clean build with OMIT_DEPRECATED +- Minor updates (see ) + +## _**OFFICIAL RELEASE: 2.3.0 - Aquila**_ + +- Minor updates (see ) + +- Not backwards compatible with OSAL 4.2.1 + +- Released as part of cFE 6.7.0, Apache 2.0 + +## _**OFFICIAL RELEASE: 2.2.0a**_ + +- Released as part of cFE 6.6.0a, Apache 2.0 + +## Known issues + +As a lab application, extensive testing is not performed prior to release and only minimal functionality is included. + +## Getting Help + +For best results, submit issues:questions or issues:help wanted requests at . + +Official cFS page: diff --git a/README.md b/README.md index 0cc9f24..9144e1e 100644 --- a/README.md +++ b/README.md @@ -11,160 +11,6 @@ to_lab is a simple telemetry downlink application that sends CCSDS telecommand p To send telemetry to the "ground" or UDP/IP port, edit the subscription table in the platform include file: fsw/platform_inc/to_lab_sub_table.h. to_lab will subscribe to the packet IDs that are listed in this table and send the telemetry packets it receives to the UDP/IP port. -## Version History - -### Development Build: v2.5.0-rc4+dev23 -- Update cmake mimimum required to something more recent -- See - -### Development Build: v2.5.0-rc4+dev21 - -- Remove registration of empty EVS filters -- Update codeql workflow for reusable updates -- See - - -### Development Build: v2.5.0-rc4+dev16 - -- Update Copyright Headers -- Standardize version.h -- See and - -### Development Build: v2.5.0-rc4+dev9 - -- Apply header guard standard -- See - -### Development Build: v2.5.0-rc4+dev4 - -- Use CFE_MSG_PTR conversion macro -- Set new baseline for cFS-Caelum-rc4: v2.5.0-rc4 -- See and - -### Development Build: v2.4.0-rc1+dev58 - -- Apply CFE_SB_ValueToMsgId where required -- See and - -### Development Build: v2.4.0-rc1+dev49 - -- Implement Coding Standard in CodeQL workflow -- See and - -### Development Build: v2.4.0-rc1+dev47 - -- Removes app registration call, `CFE_ES_RegisterApp()` since applications do not need to register themselves. -- See - -### Development Build: v2.4.0-rc1+dev41 - -- Use `cfe.h` header file -- See - -### Development Build: v2.4.0-rc1+dev38 - -- Remove numeric pipe ID from event printf -- Add Testing Tools to the Security Policy -- See - -### Development Build: v.2.4.0-rc1+dev32 - -- Removes end-of-function comments in `to_lab_app.c` -- Adds static analysis and code format check to continuous integration workflow. Updates workflow status badges in ReadMe -- Adds CodeQL analysis to continuous integration workflow -- See - -### Development Build: v.2.4.0-rc1+dev21 - -- TO remains command-able after a "remove all subscriptions" command; the command now only removes all subscriptions to the Tlm_pipe -- See - -### Development Build: v.2.4.0-rc1+dev17 - -- Aligns messages according to changes in cFE . Uses the "raw" message cmd/tlm types in definition -- See - -### Development Build: v.2.4.0-rc1+dev13 - -- Replaces deprecated SB API's with MSG -- See - -### Development Build: v.2.4.0-rc1+dev9 - -- Update the TLMsockid field to be `osal_id_t` instead of uint32 -- Set revision number to 99 to indicate development status in telemetry -- See - -### Development Build: v.2.4.0-rc1+dev6 - -- Adds header guard to `to_lab_sub_table.h` -- See - -### Development Build: v.2.4.0-rc1+dev3 - -- Remove reference to deprecated `CFE_ES_SHELL_TLM_MID`. -- See - -### Development Build: v2.3.0+dev45 - -- Fixes bug where an unset address values caused subscriptions to MsgId 0 over 200 times. Added a `TO_UNUSED` entry at the end of the subscription list and a break in the subscription loop when `TO_UNUSED` found. No more subscriptions on the unused table slots (no MsgId 0 subscriptions). -- Corrects return value of `TO_LAB_init()` to be `int32` instead of `int`. Declaration now matches definition, and app builds without errors. -- Add build number and baseline to version reporting. -- See - -### Development Build: v2.3.7 - -- Makes the `TO_LAB_Subs` table into a CFE_TBL-managed table. -- See - - -### Development Build: v2.3.6 - -- Replace references to `ccsds.h` types with the `cfe_sb.h`-provided type. -- See - -### Development Build: v2.3.5 - -- Apply code style -- See - -### Development Build: v2.3.4 - -- Configure the maximum depth supported by OSAL, rather than a hard coded 64. -- See - -### Development Build: v2.3.3 - -- Apply the CFE_SB_MsgIdToValue() and CFE_SB_ValueToMsgId() routines where compatibility with an integer MsgId is necessary - syslog prints, events, compile-time MID #define values. -- Deprecates shell tlm subscription -- Changes to documentation -- See - -### Development Build: v2.3.2 - -- Use OSAL socket API instead of BSD Sockets - -- Use global namespace to isolate variables - -- Minor updates (see ) - -### Development Build: v2.3.1 - -- Fix for a clean build with OMIT_DEPRECATED -- Minor updates (see ) - -### _**OFFICIAL RELEASE: 2.3.0 - Aquila**_ - -- Minor updates (see ) - -- Not backwards compatible with OSAL 4.2.1 - -- Released as part of cFE 6.7.0, Apache 2.0 - -### _**OFFICIAL RELEASE: 2.2.0a**_ - -- Released as part of cFE 6.6.0a, Apache 2.0 - ## Known issues As a lab application, extensive testing is not performed prior to release and only minimal functionality is included. diff --git a/fsw/mission_inc/to_lab_perfids.h b/fsw/mission_inc/to_lab_perfids.h index 8a50941..2ffdbda 100644 --- a/fsw/mission_inc/to_lab_perfids.h +++ b/fsw/mission_inc/to_lab_perfids.h @@ -23,7 +23,7 @@ #ifndef TO_LAB_PERFIDS_H #define TO_LAB_PERFIDS_H -#define TO_MAIN_TASK_PERF_ID 34 -#define TO_SOCKET_SEND_PERF_ID 35 +#define TO_LAB_MAIN_TASK_PERF_ID 34 +#define TO_LAB_SOCKET_SEND_PERF_ID 35 #endif diff --git a/fsw/src/to_lab_app.c b/fsw/src/to_lab_app.c index 46394af..1aed08c 100644 --- a/fsw/src/to_lab_app.c +++ b/fsw/src/to_lab_app.c @@ -73,15 +73,15 @@ int32 TO_LAB_SendHousekeeping(const CFE_MSG_CommandHeader_t *data); /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ -/* TO_Lab_AppMain() -- Application entry point and main process loop */ +/* TO_LAB_AppMain() -- Application entry point and main process loop */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void TO_Lab_AppMain(void) +void TO_LAB_AppMain(void) { uint32 RunStatus = CFE_ES_RunStatus_APP_RUN; int32 status; - CFE_ES_PerfLogEntry(TO_MAIN_TASK_PERF_ID); + CFE_ES_PerfLogEntry(TO_LAB_MAIN_TASK_PERF_ID); status = TO_LAB_init(); @@ -95,11 +95,11 @@ void TO_Lab_AppMain(void) */ while (CFE_ES_RunLoop(&RunStatus) == true) { - CFE_ES_PerfLogExit(TO_MAIN_TASK_PERF_ID); + CFE_ES_PerfLogExit(TO_LAB_MAIN_TASK_PERF_ID); - OS_TaskDelay(TO_TASK_MSEC); /*2 Hz*/ + OS_TaskDelay(TO_LAB_TASK_MSEC); /*2 Hz*/ - CFE_ES_PerfLogEntry(TO_MAIN_TASK_PERF_ID); + CFE_ES_PerfLogEntry(TO_LAB_MAIN_TASK_PERF_ID); TO_LAB_forward_telemetry(); @@ -114,7 +114,7 @@ void TO_Lab_AppMain(void) ** This function will be called in the event that the TO app is killed. ** It will close the network socket for TO */ -void TO_delete_callback(void) +void TO_LAB_delete_callback(void) { OS_printf("TO delete callback -- Closing TO Network socket.\n"); if (TO_LAB_Global.downlink_on) @@ -125,7 +125,7 @@ void TO_delete_callback(void) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ -/* TO_init() -- TO initialization */ +/* TO_LAB_init() -- TO initialization */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ int32 TO_LAB_init(void) @@ -157,7 +157,7 @@ int32 TO_LAB_init(void) if (status != CFE_SUCCESS) { - CFE_EVS_SendEvent(TO_TBL_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't register table status %i", __LINE__, + CFE_EVS_SendEvent(TO_LAB_TBL_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't register table status %i", __LINE__, (int)status); return status; } @@ -166,7 +166,7 @@ int32 TO_LAB_init(void) if (status != CFE_SUCCESS) { - CFE_EVS_SendEvent(TO_TBL_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't load table status %i", __LINE__, + CFE_EVS_SendEvent(TO_LAB_TBL_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't load table status %i", __LINE__, (int)status); return status; } @@ -175,7 +175,7 @@ int32 TO_LAB_init(void) if (status != CFE_SUCCESS && status != CFE_TBL_INFO_UPDATED) { - CFE_EVS_SendEvent(TO_TBL_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't get table addr status %i", __LINE__, + CFE_EVS_SendEvent(TO_LAB_TBL_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't get table addr status %i", __LINE__, (int)status); return status; } @@ -188,14 +188,14 @@ int32 TO_LAB_init(void) CFE_SB_Subscribe(CFE_SB_ValueToMsgId(TO_LAB_SEND_HK_MID), TO_LAB_Global.Cmd_pipe); } else - CFE_EVS_SendEvent(TO_CRCMDPIPE_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't create cmd pipe status %i", + CFE_EVS_SendEvent(TO_LAB_CRCMDPIPE_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't create cmd pipe status %i", __LINE__, (int)status); /* Create TO TLM pipe */ status = CFE_SB_CreatePipe(&TO_LAB_Global.Tlm_pipe, ToTlmPipeDepth, ToTlmPipeName); if (status != CFE_SUCCESS) { - CFE_EVS_SendEvent(TO_TLMPIPE_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't create Tlm pipe status %i", + CFE_EVS_SendEvent(TO_LAB_TLMPIPE_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't create Tlm pipe status %i", __LINE__, (int)status); } @@ -204,7 +204,7 @@ int32 TO_LAB_init(void) { if (!CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream)) { - /* Only process until invalid MsgId (aka TO_UNUSED) is found*/ + /* Only process until invalid MsgId (aka TO_LAB_UNUSED) is found*/ break; } else if (CFE_SB_IsValidMsgId(TO_LAB_Subs->Subs[i].Stream)) @@ -214,7 +214,7 @@ int32 TO_LAB_init(void) } if (status != CFE_SUCCESS) - CFE_EVS_SendEvent(TO_SUBSCRIBE_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(TO_LAB_SUBSCRIBE_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't subscribe to stream 0x%x status %i", __LINE__, (unsigned int)CFE_SB_MsgIdToValue(TO_LAB_Subs->Subs[i].Stream), (int)status); } @@ -222,9 +222,9 @@ int32 TO_LAB_init(void) /* ** Install the delete handler */ - OS_TaskInstallDeleteHandler(&TO_delete_callback); + OS_TaskInstallDeleteHandler(&TO_LAB_delete_callback); - CFE_EVS_SendEvent(TO_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "TO Lab Initialized.%s, Awaiting enable command.", + CFE_EVS_SendEvent(TO_LAB_INIT_INF_EID, CFE_EVS_EventType_INFORMATION, "TO Lab Initialized.%s, Awaiting enable command.", TO_LAB_VERSION_STRING); return CFE_SUCCESS; @@ -242,7 +242,7 @@ int32 TO_LAB_EnableOutput(const TO_LAB_EnableOutputCmd_t *data) (void)CFE_SB_MessageStringGet(TO_LAB_Global.tlm_dest_IP, pCmd->dest_IP, "", sizeof(TO_LAB_Global.tlm_dest_IP), sizeof(pCmd->dest_IP)); TO_LAB_Global.suppress_sendto = false; - CFE_EVS_SendEvent(TO_TLMOUTENA_INF_EID, CFE_EVS_EventType_INFORMATION, "TO telemetry output enabled for IP %s", + CFE_EVS_SendEvent(TO_LAB_TLMOUTENA_INF_EID, CFE_EVS_EventType_INFORMATION, "TO telemetry output enabled for IP %s", TO_LAB_Global.tlm_dest_IP); if (!TO_LAB_Global.downlink_on) /* Then turn it on, otherwise we will just switch destination addresses*/ @@ -257,7 +257,7 @@ int32 TO_LAB_EnableOutput(const TO_LAB_EnableOutputCmd_t *data) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ -/* TO_process_commands() -- Process command pipe message */ +/* TO_LAB_process_commands() -- Process command pipe message */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ void TO_LAB_process_commands(void) @@ -285,7 +285,7 @@ void TO_LAB_process_commands(void) break; default: - CFE_EVS_SendEvent(TO_MSGID_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO: Invalid Msg ID Rcvd 0x%x", + CFE_EVS_SendEvent(TO_LAB_MSGID_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO: Invalid Msg ID Rcvd 0x%x", __LINE__, (unsigned int)CFE_SB_MsgIdToValue(MsgId)); break; } @@ -299,7 +299,7 @@ void TO_LAB_process_commands(void) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ -/* TO_exec_local_command() -- Process local message */ +/* TO_LAB_exec_local_command() -- Process local message */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ void TO_LAB_exec_local_command(CFE_SB_Buffer_t *SBBufPtr) @@ -310,36 +310,36 @@ void TO_LAB_exec_local_command(CFE_SB_Buffer_t *SBBufPtr) switch (CommandCode) { - case TO_NOP_CC: + case TO_LAB_NOOP_CC: TO_LAB_Noop((const TO_LAB_NoopCmd_t *)SBBufPtr); break; - case TO_RESET_STATUS_CC: + case TO_LAB_RESET_STATUS_CC: TO_LAB_ResetCounters((const TO_LAB_ResetCountersCmd_t *)SBBufPtr); break; - case TO_SEND_DATA_TYPES_CC: + case TO_LAB_SEND_DATA_TYPES_CC: TO_LAB_SendDataTypes((const TO_LAB_SendDataTypesCmd_t *)SBBufPtr); break; - case TO_ADD_PKT_CC: + case TO_LAB_ADD_PKT_CC: TO_LAB_AddPacket((const TO_LAB_AddPacketCmd_t *)SBBufPtr); break; - case TO_REMOVE_PKT_CC: + case TO_LAB_REMOVE_PKT_CC: TO_LAB_RemovePacket((const TO_LAB_RemovePacketCmd_t *)SBBufPtr); break; - case TO_REMOVE_ALL_PKT_CC: + case TO_LAB_REMOVE_ALL_PKT_CC: TO_LAB_RemoveAll((const TO_LAB_RemoveAllCmd_t *)SBBufPtr); break; - case TO_OUTPUT_ENABLE_CC: + case TO_LAB_OUTPUT_ENABLE_CC: TO_LAB_EnableOutput((const TO_LAB_EnableOutputCmd_t *)SBBufPtr); break; default: - CFE_EVS_SendEvent(TO_FNCODE_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(TO_LAB_FNCODE_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO: Invalid Function Code Rcvd In Ground Command 0x%x", __LINE__, (unsigned int)CommandCode); ++TO_LAB_Global.HkTlm.Payload.CommandErrorCounter; @@ -353,7 +353,7 @@ void TO_LAB_exec_local_command(CFE_SB_Buffer_t *SBBufPtr) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ int32 TO_LAB_Noop(const TO_LAB_NoopCmd_t *data) { - CFE_EVS_SendEvent(TO_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "No-op command"); + CFE_EVS_SendEvent(TO_LAB_NOOP_INF_EID, CFE_EVS_EventType_INFORMATION, "No-op command"); ++TO_LAB_Global.HkTlm.Payload.CommandCounter; return CFE_SUCCESS; } @@ -435,7 +435,7 @@ int32 TO_LAB_SendHousekeeping(const CFE_MSG_CommandHeader_t *data) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ -/* TO_openTLM() -- Open TLM */ +/* TO_LAB_openTLM() -- Open TLM */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ void TO_LAB_openTLM(void) @@ -445,7 +445,7 @@ void TO_LAB_openTLM(void) status = OS_SocketOpen(&TO_LAB_Global.TLMsockid, OS_SocketDomain_INET, OS_SocketType_DATAGRAM); if (status != OS_SUCCESS) { - CFE_EVS_SendEvent(TO_TLMOUTSOCKET_ERR_EID, CFE_EVS_EventType_ERROR, "L%d, TO TLM socket error: %d", __LINE__, + CFE_EVS_SendEvent(TO_LAB_TLMOUTSOCKET_ERR_EID, CFE_EVS_EventType_ERROR, "L%d, TO TLM socket error: %d", __LINE__, (int)status); } @@ -465,10 +465,10 @@ int32 TO_LAB_AddPacket(const TO_LAB_AddPacketCmd_t *data) status = CFE_SB_SubscribeEx(pCmd->Stream, TO_LAB_Global.Tlm_pipe, pCmd->Flags, pCmd->BufLimit); if (status != CFE_SUCCESS) - CFE_EVS_SendEvent(TO_ADDPKT_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't subscribe 0x%x status %i", __LINE__, + CFE_EVS_SendEvent(TO_LAB_ADDPKT_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't subscribe 0x%x status %i", __LINE__, (unsigned int)CFE_SB_MsgIdToValue(pCmd->Stream), (int)status); else - CFE_EVS_SendEvent(TO_ADDPKT_INF_EID, CFE_EVS_EventType_INFORMATION, "L%d TO AddPkt 0x%x, QoS %d.%d, limit %d", + CFE_EVS_SendEvent(TO_LAB_ADDPKT_INF_EID, CFE_EVS_EventType_INFORMATION, "L%d TO AddPkt 0x%x, QoS %d.%d, limit %d", __LINE__, (unsigned int)CFE_SB_MsgIdToValue(pCmd->Stream), pCmd->Flags.Priority, pCmd->Flags.Reliability, pCmd->BufLimit); @@ -488,11 +488,11 @@ int32 TO_LAB_RemovePacket(const TO_LAB_RemovePacketCmd_t *data) status = CFE_SB_Unsubscribe(pCmd->Stream, TO_LAB_Global.Tlm_pipe); if (status != CFE_SUCCESS) - CFE_EVS_SendEvent(TO_REMOVEPKT_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(TO_LAB_REMOVEPKT_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't Unsubscribe to Stream 0x%x, status %i", __LINE__, (unsigned int)CFE_SB_MsgIdToValue(pCmd->Stream), (int)status); else - CFE_EVS_SendEvent(TO_REMOVEPKT_INF_EID, CFE_EVS_EventType_INFORMATION, "L%d TO RemovePkt 0x%x", __LINE__, + CFE_EVS_SendEvent(TO_LAB_REMOVEPKT_INF_EID, CFE_EVS_EventType_INFORMATION, "L%d TO RemovePkt 0x%x", __LINE__, (unsigned int)CFE_SB_MsgIdToValue(pCmd->Stream)); ++TO_LAB_Global.HkTlm.Payload.CommandCounter; return CFE_SUCCESS; @@ -515,13 +515,13 @@ int32 TO_LAB_RemoveAll(const TO_LAB_RemoveAllCmd_t *data) status = CFE_SB_Unsubscribe(TO_LAB_Subs->Subs[i].Stream, TO_LAB_Global.Tlm_pipe); if (status != CFE_SUCCESS) - CFE_EVS_SendEvent(TO_REMOVEALLPTKS_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(TO_LAB_REMOVEALLPTKS_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO Can't Unsubscribe to stream 0x%x status %i", __LINE__, (unsigned int)CFE_SB_MsgIdToValue(TO_LAB_Subs->Subs[i].Stream), (int)status); } } - CFE_EVS_SendEvent(TO_REMOVEALLPKTS_INF_EID, CFE_EVS_EventType_INFORMATION, + CFE_EVS_SendEvent(TO_LAB_REMOVEALLPKTS_INF_EID, CFE_EVS_EventType_INFORMATION, "L%d TO Unsubscribed to all Commands and Telemetry", __LINE__); ++TO_LAB_Global.HkTlm.Payload.CommandCounter; @@ -530,7 +530,7 @@ int32 TO_LAB_RemoveAll(const TO_LAB_RemoveAllCmd_t *data) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ -/* TO_forward_telemetry() -- Forward telemetry */ +/* TO_LAB_forward_telemetry() -- Forward telemetry */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ void TO_LAB_forward_telemetry(void) @@ -556,11 +556,11 @@ void TO_LAB_forward_telemetry(void) if (TO_LAB_Global.downlink_on == true) { - CFE_ES_PerfLogEntry(TO_SOCKET_SEND_PERF_ID); + CFE_ES_PerfLogEntry(TO_LAB_SOCKET_SEND_PERF_ID); status = OS_SocketSendTo(TO_LAB_Global.TLMsockid, SBBufPtr, size, &d_addr); - CFE_ES_PerfLogExit(TO_SOCKET_SEND_PERF_ID); + CFE_ES_PerfLogExit(TO_LAB_SOCKET_SEND_PERF_ID); } else { @@ -568,7 +568,7 @@ void TO_LAB_forward_telemetry(void) } if (status < 0) { - CFE_EVS_SendEvent(TO_TLMOUTSTOP_ERR_EID, CFE_EVS_EventType_ERROR, + CFE_EVS_SendEvent(TO_LAB_TLMOUTSTOP_ERR_EID, CFE_EVS_EventType_ERROR, "L%d TO sendto error %d. Tlm output suppressed\n", __LINE__, (int)status); TO_LAB_Global.suppress_sendto = true; } diff --git a/fsw/src/to_lab_app.h b/fsw/src/to_lab_app.h index 6a3efc5..b686c2e 100644 --- a/fsw/src/to_lab_app.h +++ b/fsw/src/to_lab_app.h @@ -35,8 +35,8 @@ /*****************************************************************************/ -#define TO_TASK_MSEC 500 /* run at 2 Hz */ -#define TO_UNUSED CFE_SB_MSGID_RESERVED +#define TO_LAB_TASK_MSEC 500 /* run at 2 Hz */ +#define TO_LAB_UNUSED CFE_SB_MSGID_RESERVED /** * Depth of pipe for commands to the TO_LAB application itself @@ -57,7 +57,7 @@ /* ** Prototypes Section */ -void TO_Lab_AppMain(void); +void TO_LAB_AppMain(void); /******************************************************************************/ diff --git a/fsw/src/to_lab_events.h b/fsw/src/to_lab_events.h index c141f8a..44369fa 100644 --- a/fsw/src/to_lab_events.h +++ b/fsw/src/to_lab_events.h @@ -26,25 +26,25 @@ /*****************************************************************************/ /* Event message ID's */ -#define TO_EVM_RESERVED 0 +#define TO_LAB_EVM_RESERVED 0 -#define TO_INIT_INF_EID 1 -#define TO_CRCMDPIPE_ERR_EID 2 -#define TO_TLMOUTENA_INF_EID 3 -#define TO_SUBSCRIBE_ERR_EID 4 -#define TO_TLMPIPE_ERR_EID 5 -#define TO_TLMOUTSOCKET_ERR_EID 6 -#define TO_TLMOUTSTOP_ERR_EID 7 -#define TO_MSGID_ERR_EID 8 -#define TO_FNCODE_ERR_EID 9 -#define TO_ADDPKT_ERR_EID 10 -#define TO_REMOVEPKT_ERR_EID 11 -#define TO_REMOVEALLPTKS_ERR_EID 12 -#define TO_ADDPKT_INF_EID 15 -#define TO_REMOVEPKT_INF_EID 16 -#define TO_REMOVEALLPKTS_INF_EID 17 -#define TO_NOOP_INF_EID 18 -#define TO_TBL_ERR_EID 19 +#define TO_LAB_INIT_INF_EID 1 +#define TO_LAB_CRCMDPIPE_ERR_EID 2 +#define TO_LAB_TLMOUTENA_INF_EID 3 +#define TO_LAB_SUBSCRIBE_ERR_EID 4 +#define TO_LAB_TLMPIPE_ERR_EID 5 +#define TO_LAB_TLMOUTSOCKET_ERR_EID 6 +#define TO_LAB_TLMOUTSTOP_ERR_EID 7 +#define TO_LAB_MSGID_ERR_EID 8 +#define TO_LAB_FNCODE_ERR_EID 9 +#define TO_LAB_ADDPKT_ERR_EID 10 +#define TO_LAB_REMOVEPKT_ERR_EID 11 +#define TO_LAB_REMOVEALLPTKS_ERR_EID 12 +#define TO_LAB_ADDPKT_INF_EID 15 +#define TO_LAB_REMOVEPKT_INF_EID 16 +#define TO_LAB_REMOVEALLPKTS_INF_EID 17 +#define TO_LAB_NOOP_INF_EID 18 +#define TO_LAB_TBL_ERR_EID 19 /******************************************************************************/ diff --git a/fsw/src/to_lab_msg.h b/fsw/src/to_lab_msg.h index 6d7973a..09bd1df 100644 --- a/fsw/src/to_lab_msg.h +++ b/fsw/src/to_lab_msg.h @@ -23,13 +23,13 @@ #ifndef TO_LAB_MSG_H #define TO_LAB_MSG_H -#define TO_NOP_CC 0 /* no-op command */ -#define TO_RESET_STATUS_CC 1 /* reset status */ -#define TO_ADD_PKT_CC 2 /* add packet */ -#define TO_SEND_DATA_TYPES_CC 3 /* send data types */ -#define TO_REMOVE_PKT_CC 4 /* remove packet */ -#define TO_REMOVE_ALL_PKT_CC 5 /* remove all packet */ -#define TO_OUTPUT_ENABLE_CC 6 /* output enable */ +#define TO_LAB_NOOP_CC 0 /* no-op command */ +#define TO_LAB_RESET_STATUS_CC 1 /* reset status */ +#define TO_LAB_ADD_PKT_CC 2 /* add packet */ +#define TO_LAB_SEND_DATA_TYPES_CC 3 /* send data types */ +#define TO_LAB_REMOVE_PKT_CC 4 /* remove packet */ +#define TO_LAB_REMOVE_ALL_PKT_CC 5 /* remove all packet */ +#define TO_LAB_OUTPUT_ENABLE_CC 6 /* output enable */ /******************************************************************************/ @@ -98,7 +98,6 @@ typedef TO_LAB_NoArgsCmd_t TO_LAB_SendDataTypesCmd_t; typedef struct { CFE_SB_MsgId_t Stream; - uint16 PktSize; CFE_SB_Qos_t Flags; uint8 BufLimit; } TO_LAB_AddPacket_Payload_t; @@ -116,7 +115,7 @@ typedef struct CFE_SB_MsgId_t Stream; CFE_SB_Qos_t Flags; uint16 BufLimit; -} TO_subscription_t; +} TO_LAB_subscription_t; /******************************************************************************/ diff --git a/fsw/src/to_lab_version.h b/fsw/src/to_lab_version.h index 79313f8..312ecbe 100644 --- a/fsw/src/to_lab_version.h +++ b/fsw/src/to_lab_version.h @@ -24,7 +24,7 @@ #define TO_LAB_VERSION_H /* Development Build Macro Definitions */ -#define TO_LAB_BUILD_NUMBER 23 /*!< Development Build: Number of commits since baseline */ +#define TO_LAB_BUILD_NUMBER 31 /*!< Development Build: Number of commits since baseline */ #define TO_LAB_BUILD_BASELINE \ "v2.5.0-rc4" /*!< Development Build: git tag that is the base for the current development */ diff --git a/fsw/tables/to_lab_sub.c b/fsw/tables/to_lab_sub.c index c415c47..9bd8c01 100644 --- a/fsw/tables/to_lab_sub.c +++ b/fsw/tables/to_lab_sub.c @@ -75,7 +75,7 @@ TO_LAB_Subs_t TO_LAB_Subs = {.Subs = {/* CFS App Subscriptions */ {CFE_SB_MSGID_WRAP_VALUE(CFE_ES_APP_TLM_MID), {0, 0}, 4}, {CFE_SB_MSGID_WRAP_VALUE(CFE_ES_MEMSTATS_TLM_MID), {0, 0}, 4}, - /* TO_UNUSED entry to mark the end of valid MsgIds */ - {TO_UNUSED, {0, 0}, 0}}}; + /* TO_LAB_UNUSED entry to mark the end of valid MsgIds */ + {TO_LAB_UNUSED, {0, 0}, 0}}}; CFE_TBL_FILEDEF(TO_LAB_Subs, TO_LAB_APP.TO_LAB_Subs, TO Lab Sub Tbl, to_lab_sub.tbl)