27GenericHubComponentImpl ::GenericHubComponentImpl(
const char*
const compName) : GenericHubComponentBase(compName) {}
30 GenericHubComponentBase::init(instance);
33GenericHubComponentImpl ::~GenericHubComponentImpl() {}
35void GenericHubComponentImpl ::send_data(
const HubType type,
45 status = serialize.
serialize(
static_cast<U32
>(type));
47 status = serialize.
serialize(
static_cast<U32
>(port));
52 dataOut_out(0, outgoing);
61 send_data(HUB_TYPE_BUFFER, portNum, fwBuffer.
getData(), fwBuffer.
getSize());
62 bufferDeallocate_out(0, fwBuffer);
65void GenericHubComponentImpl ::dataIn_handler(
const NATIVE_INT_TYPE portNum,
67 HubType type = HUB_TYPE_MAX;
82 type =
static_cast<HubType
>(type_in);
92 FW_ASSERT(rawSize ==
static_cast<U32
>(size));
93 if (type == HUB_TYPE_PORT) {
96 status = wrapper.setBuffLen(rawSize);
98 portOut_out(port, wrapper);
99 dataInDeallocate_out(0, fwBuffer);
100 }
else if (type == HUB_TYPE_BUFFER) {
102 buffersOut_out(port, fwBuffer);
PlatformIntType NATIVE_INT_TYPE
uint8_t U8
8-bit unsigned integer
#define FW_PORT_SERIALIZATION
C++-compatible configuration header for fprime configuration.
void set(U8 *data, U32 size, U32 context=NO_CONTEXT)
SerializeBufferBase & getSerializeRepr()
SerializeStatus setBuffLen(NATIVE_UINT_TYPE length)
sets buffer length manually after filling with data
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
virtual U8 * getBuffAddr()=0
gets buffer address for data filling
NATIVE_UINT_TYPE getBuffLength() const
returns current buffer size
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.