31 void GenericHubComponentImpl ::send_data(
const HubType type,
41 status = serialize.
serialize(
static_cast<U32
>(type));
43 status = serialize.
serialize(
static_cast<U32
>(port));
76 type =
static_cast<HubType>(type_in);
85 U32 rawSize =
static_cast<U32
>(fwBuffer.
getSize() -
sizeof(U32) -
sizeof(U32) -
sizeof(
FwBuffSizeType));
86 FW_ASSERT(rawSize ==
static_cast<U32
>(size));
90 status = wrapper.setBuffLen(rawSize);
141 void GenericHubComponentImpl ::LogRecv_handler(
const NATIVE_INT_TYPE portNum,
149 serializer.resetSer();
150 status = serializer.serialize(
id);
152 status = serializer.serialize(timeTag);
154 status = serializer.serialize(severity);
156 status = serializer.serialize(args);
158 U32 size = serializer.getBuffLength();
159 this->send_data(HubType::HUB_TYPE_EVENT, portNum, buffer, size);
163 void GenericHubComponentImpl ::TlmRecv_handler(
const NATIVE_INT_TYPE portNum,
170 serializer.resetSer();
171 status = serializer.serialize(
id);
173 status = serializer.serialize(timeTag);
175 status = serializer.serialize(val);
177 U32 size = serializer.getBuffLength();
178 this->send_data(HubType::HUB_TYPE_CHANNEL, portNum, buffer, size);
PlatformIntType NATIVE_INT_TYPE
uint8_t U8
8-bit unsigned integer
#define FW_LOG_BUFFER_MAX_SIZE
FwSizeStoreType FwBuffSizeType
#define FW_PORT_SERIALIZATION
for multi-note systems)
#define FW_TLM_BUFFER_MAX_SIZE
PlatformIndexType FwIndexType
C++-compatible configuration header for fprime configuration.
void set(U8 *data, U32 size, U32 context=NO_CONTEXT)
SerializeBufferBase & getSerializeRepr()
External serialize buffer with no copy semantics.
Enum representing event severity.
@ SERIALIZED_SIZE
The size of the serial representation.
virtual U8 * getBuffAddr()=0
gets buffer address for data filling
SerializeStatus setBuffLen(Serializable::SizeType length)
sets buffer length manually after filling with data
Serializable::SizeType getBuffLength() const
returns current buffer size
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Auto-generated base for GenericHub component.
void bufferDeallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port bufferDeallocate.
Fw::Buffer dataOutAllocate_out(FwIndexType portNum, U32 size)
Invoke output port dataOutAllocate.
void buffersOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port buffersOut.
void dataOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port dataOut.
Fw::SerializeStatus portOut_out(FwIndexType portNum, Fw::SerializeBufferBase &buffer)
Invoke output port portOut.
void dataInDeallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port dataInDeallocate.
void LogSend_out(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Invoke output port LogSend.
void TlmSend_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke output port TlmSend.
@ HUB_TYPE_EVENT
Event transmission.
@ HUB_TYPE_BUFFER
Buffer type transmission.
@ HUB_TYPE_CHANNEL
Telemetry channel type.
@ HUB_TYPE_PORT
Port type transmission.
GenericHubComponentImpl(const char *const compName)
~GenericHubComponentImpl()
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.