Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #175, define msgids via topicids #176

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ set(TO_LAB_PLATFORM_CONFIG_FILE_LIST
# This makes them individually overridable by the missions, without modifying
# the distribution default copies
foreach(TO_LAB_CFGFILE ${TO_LAB_PLATFORM_CONFIG_FILE_LIST})
get_filename_component(CFGKEY "${TO_LAB_CFGFILE}" NAME_WE)
if (DEFINED TO_LAB_CFGFILE_SRC_${CFGKEY})
set(DEFAULT_SOURCE GENERATED_FILE "${TO_LAB_CFGFILE_SRC_${CFGKEY}}")
else()
set(DEFAULT_SOURCE FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TO_LAB_CFGFILE}")
endif()
generate_config_includefile(
FILE_NAME "${TO_LAB_CFGFILE}"
FALLBACK_FILE "${CMAKE_CURRENT_LIST_DIR}/config/default_${TO_LAB_CFGFILE}"
${DEFAULT_SOURCE}
)
endforeach()
10 changes: 6 additions & 4 deletions config/default_to_lab_msgids.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
#ifndef TO_LAB_MSGIDS_H
#define TO_LAB_MSGIDS_H

#define TO_LAB_CMD_MID 0x1880
#define TO_LAB_SEND_HK_MID 0x1881
#include "cfe_core_api_base_msgids.h"
#include "to_lab_topicids.h"

#define TO_LAB_HK_TLM_MID 0x0880
#define TO_LAB_DATA_TYPES_MID 0x0881
#define TO_LAB_CMD_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(TO_LAB_CMD_TOPICID)
#define TO_LAB_SEND_HK_MID CFE_PLATFORM_CMD_TOPICID_TO_MIDV(TO_LAB_SEND_HK_TOPICID)
#define TO_LAB_HK_TLM_MID CFE_PLATFORM_TLM_TOPICID_TO_MIDV(TO_LAB_HK_TLM_TOPICID)
#define TO_LAB_DATA_TYPES_MID CFE_PLATFORM_TLM_TOPICID_TO_MIDV(TO_LAB_DATA_TYPES_TOPICID)

#endif
31 changes: 31 additions & 0 deletions config/default_to_lab_topicids.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/************************************************************************
* NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes”
*
* Copyright (c) 2020 United States Government as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
************************************************************************/

/**
* @file
* TO_LAB Application Topic IDs
*/
#ifndef TO_LAB_TOPICIDS_H
#define TO_LAB_TOPICIDS_H

#define TO_LAB_CMD_TOPICID 0x80
#define TO_LAB_SEND_HK_TOPICID 0x81
#define TO_LAB_HK_TLM_TOPICID 0x80
#define TO_LAB_DATA_TYPES_TOPICID 0x81

#endif
1 change: 1 addition & 0 deletions mission_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ set(TO_LAB_MISSION_CONFIG_FILE_LIST
to_lab_tbl.h
to_lab_tbldefs.h
to_lab_tblstruct.h
to_lab_topicids.h
)

if (CFE_EDS_ENABLED_BUILD)
Expand Down
Loading