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

JAXA's RACS2 Demo integration to the Space ROS project #80

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
15 changes: 15 additions & 0 deletions mars_rover/cFS/apps/run_app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 2.6.4)
project(CFE_RUN_APP C)

include_directories(fsw/mission_inc)
include_directories(fsw/platform_inc)

aux_source_directory(fsw/src APP_SRC_FILES)

# Create the app module
add_cfe_app(run_app ${APP_SRC_FILES})

target_link_libraries(run_app
${PROTOBUF_LIBRARY}
protobuf-c
)
7 changes: 7 additions & 0 deletions mars_rover/cFS/apps/run_app/fsw/mission_inc/run_app_perfids.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef _run_app_perfids_h_
#define _run_app_perfids_h_


#define SAMPLE_APP_PERF_ID 91

#endif /* _run_app_perfids_h_ */
9 changes: 9 additions & 0 deletions mars_rover/cFS/apps/run_app/fsw/platform_inc/run_app_msgids.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef _run_app_msgids_h_
#define _run_app_msgids_h_

#define RUN_APP_CMD_MID 0x1892
#define RUN_APP_SEND_HK_MID 0x1893
#define RUN_APP_HK_TLM_MID 0x0893
#define RACS2_BRIDGE_MID 0x1EFE

#endif /* _run_app_msgids_h_ */
261 changes: 261 additions & 0 deletions mars_rover/cFS/apps/run_app/fsw/src/RACS2Brdige_std_msgs.pb-c.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
/* Generated from: RACS2Brdige_std_msgs.proto */

/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif

#include "RACS2Brdige_std_msgs.pb-c.h"
void racs2_bridge_std_msgs__init
(RACS2BridgeStdMsgs *message)
{
static const RACS2BridgeStdMsgs init_value = RACS2_BRIDGE_STD_MSGS__INIT;
*message = init_value;
}
size_t racs2_bridge_std_msgs__get_packed_size
(const RACS2BridgeStdMsgs *message)
{
assert(message->base.descriptor == &racs2_bridge_std_msgs__descriptor);
return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t racs2_bridge_std_msgs__pack
(const RACS2BridgeStdMsgs *message,
uint8_t *out)
{
assert(message->base.descriptor == &racs2_bridge_std_msgs__descriptor);
return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t racs2_bridge_std_msgs__pack_to_buffer
(const RACS2BridgeStdMsgs *message,
ProtobufCBuffer *buffer)
{
assert(message->base.descriptor == &racs2_bridge_std_msgs__descriptor);
return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
RACS2BridgeStdMsgs *
racs2_bridge_std_msgs__unpack
(ProtobufCAllocator *allocator,
size_t len,
const uint8_t *data)
{
return (RACS2BridgeStdMsgs *)
protobuf_c_message_unpack (&racs2_bridge_std_msgs__descriptor,
allocator, len, data);
}
void racs2_bridge_std_msgs__free_unpacked
(RACS2BridgeStdMsgs *message,
ProtobufCAllocator *allocator)
{
if(!message)
return;
assert(message->base.descriptor == &racs2_bridge_std_msgs__descriptor);
protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor racs2_bridge_std_msgs__field_descriptors[14] =
{
{
"bool_data",
1,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_BOOL,
offsetof(RACS2BridgeStdMsgs, has_bool_data),
offsetof(RACS2BridgeStdMsgs, bool_data),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"float_data",
2,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_FLOAT,
offsetof(RACS2BridgeStdMsgs, has_float_data),
offsetof(RACS2BridgeStdMsgs, float_data),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"double_data",
3,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_DOUBLE,
offsetof(RACS2BridgeStdMsgs, has_double_data),
offsetof(RACS2BridgeStdMsgs, double_data),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"int32_data",
4,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_INT32,
offsetof(RACS2BridgeStdMsgs, has_int32_data),
offsetof(RACS2BridgeStdMsgs, int32_data),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"int64_data",
5,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_INT64,
offsetof(RACS2BridgeStdMsgs, has_int64_data),
offsetof(RACS2BridgeStdMsgs, int64_data),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"string_data",
6,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_STRING,
0, /* quantifier_offset */
offsetof(RACS2BridgeStdMsgs, string_data),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"uint32_data",
7,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_UINT32,
offsetof(RACS2BridgeStdMsgs, has_uint32_data),
offsetof(RACS2BridgeStdMsgs, uint32_data),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"uint64_data",
8,
PROTOBUF_C_LABEL_OPTIONAL,
PROTOBUF_C_TYPE_UINT64,
offsetof(RACS2BridgeStdMsgs, has_uint64_data),
offsetof(RACS2BridgeStdMsgs, uint64_data),
NULL,
NULL,
0, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"float32_array_data",
9,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_FLOAT,
offsetof(RACS2BridgeStdMsgs, n_float32_array_data),
offsetof(RACS2BridgeStdMsgs, float32_array_data),
NULL,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"float64_array_data",
10,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_DOUBLE,
offsetof(RACS2BridgeStdMsgs, n_float64_array_data),
offsetof(RACS2BridgeStdMsgs, float64_array_data),
NULL,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"int32_array_data",
11,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_INT32,
offsetof(RACS2BridgeStdMsgs, n_int32_array_data),
offsetof(RACS2BridgeStdMsgs, int32_array_data),
NULL,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"int64_array_data",
12,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_INT64,
offsetof(RACS2BridgeStdMsgs, n_int64_array_data),
offsetof(RACS2BridgeStdMsgs, int64_array_data),
NULL,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"uint32_array_data",
13,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_UINT32,
offsetof(RACS2BridgeStdMsgs, n_uint32_array_data),
offsetof(RACS2BridgeStdMsgs, uint32_array_data),
NULL,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
{
"uint64_array_data",
14,
PROTOBUF_C_LABEL_REPEATED,
PROTOBUF_C_TYPE_UINT64,
offsetof(RACS2BridgeStdMsgs, n_uint64_array_data),
offsetof(RACS2BridgeStdMsgs, uint64_array_data),
NULL,
NULL,
0 | PROTOBUF_C_FIELD_FLAG_PACKED, /* flags */
0,NULL,NULL /* reserved1,reserved2, etc */
},
};
static const unsigned racs2_bridge_std_msgs__field_indices_by_name[] = {
0, /* field[0] = bool_data */
2, /* field[2] = double_data */
8, /* field[8] = float32_array_data */
9, /* field[9] = float64_array_data */
1, /* field[1] = float_data */
10, /* field[10] = int32_array_data */
3, /* field[3] = int32_data */
11, /* field[11] = int64_array_data */
4, /* field[4] = int64_data */
5, /* field[5] = string_data */
12, /* field[12] = uint32_array_data */
6, /* field[6] = uint32_data */
13, /* field[13] = uint64_array_data */
7, /* field[7] = uint64_data */
};
static const ProtobufCIntRange racs2_bridge_std_msgs__number_ranges[1 + 1] =
{
{ 1, 0 },
{ 0, 14 }
};
const ProtobufCMessageDescriptor racs2_bridge_std_msgs__descriptor =
{
PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
"RACS2Bridge_std_msgs",
"RACS2BridgeStdMsgs",
"RACS2BridgeStdMsgs",
"",
sizeof(RACS2BridgeStdMsgs),
14,
racs2_bridge_std_msgs__field_descriptors,
racs2_bridge_std_msgs__field_indices_by_name,
1, racs2_bridge_std_msgs__number_ranges,
(ProtobufCMessageInit) racs2_bridge_std_msgs__init,
NULL,NULL,NULL /* reserved[123] */
};
Loading