mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 04:51:37 +08:00
Removed forward declarations (not compatible with MISRA)
This commit is contained in:
@@ -7,13 +7,12 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <uavcan/stdint.hpp>
|
#include <uavcan/stdint.hpp>
|
||||||
#include <uavcan/util/compile_time.hpp>
|
#include <uavcan/util/compile_time.hpp>
|
||||||
|
#include <uavcan/transport/abstract_transfer_buffer.hpp>
|
||||||
#include <uavcan/impl_constants.hpp>
|
#include <uavcan/impl_constants.hpp>
|
||||||
|
|
||||||
namespace uavcan
|
namespace uavcan
|
||||||
{
|
{
|
||||||
|
|
||||||
class UAVCAN_EXPORT ITransferBuffer;
|
|
||||||
|
|
||||||
void bitarrayCopy(const unsigned char* src_org, int src_offset, int src_len, unsigned char* dst_org, int dst_offset);
|
void bitarrayCopy(const unsigned char* src_org, int src_offset, int src_len, unsigned char* dst_org, int dst_offset);
|
||||||
|
|
||||||
class UAVCAN_EXPORT BitStream
|
class UAVCAN_EXPORT BitStream
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <uavcan/impl_constants.hpp>
|
||||||
|
#include <uavcan/stdint.hpp>
|
||||||
|
|
||||||
|
namespace uavcan
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* API for transfer buffer users.
|
||||||
|
*/
|
||||||
|
class UAVCAN_EXPORT ITransferBuffer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~ITransferBuffer() { }
|
||||||
|
|
||||||
|
virtual int read(unsigned offset, uint8_t* data, unsigned len) const = 0;
|
||||||
|
virtual int write(unsigned offset, const uint8_t* data, unsigned len) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
#include <uavcan/stdint.hpp>
|
#include <uavcan/stdint.hpp>
|
||||||
#include <uavcan/error.hpp>
|
#include <uavcan/error.hpp>
|
||||||
#include <uavcan/transport/frame.hpp>
|
#include <uavcan/transport/frame.hpp>
|
||||||
|
#include <uavcan/transport/abstract_transfer_buffer.hpp>
|
||||||
#include <uavcan/linked_list.hpp>
|
#include <uavcan/linked_list.hpp>
|
||||||
#include <uavcan/dynamic_memory.hpp>
|
#include <uavcan/dynamic_memory.hpp>
|
||||||
#include <uavcan/impl_constants.hpp>
|
#include <uavcan/impl_constants.hpp>
|
||||||
@@ -17,18 +18,6 @@
|
|||||||
namespace uavcan
|
namespace uavcan
|
||||||
{
|
{
|
||||||
UAVCAN_PACKED_BEGIN
|
UAVCAN_PACKED_BEGIN
|
||||||
/**
|
|
||||||
* API for transfer buffer users.
|
|
||||||
*/
|
|
||||||
class UAVCAN_EXPORT ITransferBuffer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual ~ITransferBuffer() { }
|
|
||||||
|
|
||||||
virtual int read(unsigned offset, uint8_t* data, unsigned len) const = 0;
|
|
||||||
virtual int write(unsigned offset, const uint8_t* data, unsigned len) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal for TransferBufferManager
|
* Internal for TransferBufferManager
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user