mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 23:03:35 +08:00
msg: templates: update empy contexts, required fields and license header years
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
@# Start of Template
|
||||
@#
|
||||
@# Context:
|
||||
@# - msgs (List) list of all msg files
|
||||
@# - msgs (List) list of all RTPS messages
|
||||
@# - multi_topics (List) list of all multi-topic names
|
||||
@# - ids (List) list of all RTPS msg ids
|
||||
@# - spec (msggen.MsgSpec) Parsed specification of the .msg file
|
||||
@###############################################
|
||||
@{
|
||||
import os
|
||||
@@ -152,7 +152,7 @@ void *send(void *args)
|
||||
// copy raw data into local buffer. Payload is shifted by header length to make room for header
|
||||
serialize_@(send_base_types[idx])(&writer, &@(topic)_data, &data_buffer[header_length], &length);
|
||||
|
||||
if (0 < (read = transport_node->write(static_cast<char>(@(ids[0].index(topic) + 1)), data_buffer, length))) {
|
||||
if (0 < (read = transport_node->write(static_cast<char>(@(msgs[0].index(topic) + 1)), data_buffer, length))) {
|
||||
data->total_sent += read;
|
||||
tx_last_sec_read += read;
|
||||
++data->sent;
|
||||
@@ -261,7 +261,7 @@ void micrortps_start_topics(const uint32_t &datarate, struct timespec &begin, ui
|
||||
|
||||
switch (topic_ID) {
|
||||
@[ for idx, topic in enumerate(recv_topics)]@
|
||||
case @(ids[0].index(topic) + 1): {
|
||||
case @(msgs[0].index(topic) + 1): {
|
||||
@(receive_base_types[idx])_s @(topic)_data;
|
||||
deserialize_@(receive_base_types[idx])(&reader, &@(topic)_data, data_buffer);
|
||||
|
||||
|
||||
@@ -12,14 +12,11 @@
|
||||
@# Context:
|
||||
@# - file_name_in (String) Source file
|
||||
@# - spec (msggen.MsgSpec) Parsed specification of the .msg file
|
||||
@# - md5sum (String) MD5Sum of the .msg specification
|
||||
@# - search_path (dict) search paths for genmsg
|
||||
@# - topics (List of String) multi-topic names
|
||||
@# - ids (List) list of all RTPS msg ids
|
||||
@###############################################
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2013-2018 PX4 Development Team. All rights reserved.
|
||||
* Copyright (C) 2013-2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -12,14 +12,10 @@
|
||||
@# Context:
|
||||
@# - file_name_in (String) Source file
|
||||
@# - spec (msggen.MsgSpec) Parsed specification of the .msg file
|
||||
@# - md5sum (String) MD5Sum of the .msg specification
|
||||
@# - search_path (dict) search paths for genmsg
|
||||
@# - topics (List of String) multi-topic names
|
||||
@# - ids (List) list of all RTPS msg ids
|
||||
@###############################################
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2013-2018 PX4 Development Team. All rights reserved.
|
||||
* Copyright (C) 2013-2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -5,11 +5,6 @@
|
||||
@#
|
||||
@###############################################
|
||||
@# Start of Template
|
||||
@#
|
||||
@# Context:
|
||||
@# - msgs (List) list of all msg files
|
||||
@# - multi_topics (List) list of all multi-topic names
|
||||
@# - ids (List) list of all RTPS msg ids
|
||||
@###############################################
|
||||
/****************************************************************************
|
||||
*
|
||||
|
||||
@@ -5,11 +5,6 @@
|
||||
@#
|
||||
@###############################################
|
||||
@# Start of Template
|
||||
@#
|
||||
@# Context:
|
||||
@# - msgs (List) list of all msg files
|
||||
@# - multi_topics (List) list of all multi-topic names
|
||||
@# - ids (List) list of all RTPS msg ids
|
||||
@###############################################
|
||||
/****************************************************************************
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user