fprime/Drv/BlockDriver/BlockDriverImpl.hpp
Joshua Anderson 3cccd731d9
Refactor FW_OBJECT_NAMES switches and fix building without object names
Instead of adding the name argument to a constructor when FW_OBJECT_NAMES
is enabled, always supply a name argument.

Add a marco that conditionally sets the name to "" if FW_OBJECT_NAMES is not set.
This cleans up a lot of the conditional compilation switches that weren't being tested
and would silently break, while still stripping the strings from the binary.
2020-10-07 17:19:05 -07:00

43 lines
1.1 KiB
C++

#ifndef DRV_BLOCK_DRIVER_IMPL_HPP
#define DRV_BLOCK_DRIVER_IMPL_HPP
#include <Drv/BlockDriver/BlockDriverComponentAc.hpp>
namespace Drv {
class BlockDriverImpl : public BlockDriverComponentBase {
public:
// Only called by derived class
BlockDriverImpl(const char* compName);
void init(NATIVE_INT_TYPE queueDepth);
~BlockDriverImpl(void);
// a little hack to get the reference running
void callIsr(void);
private:
// downcalls for input ports
void InterruptReport_internalInterfaceHandler(U32 ip);
void BufferIn_handler(NATIVE_INT_TYPE portNum, Drv::DataBuffer& buffer);
void Sched_handler(NATIVE_INT_TYPE portNum, NATIVE_UINT_TYPE context);
//! Handler implementation for PingIn
//!
void PingIn_handler(
const NATIVE_INT_TYPE portNum, /*!< The port number*/
U32 key /*!< Value to return to pinger*/
);
// static ISR callback
static void s_driverISR(void* arg);
// cycle count
U32 m_cycles;
};
}
#endif