1
0
Fork 0

doc improvements

This commit is contained in:
Kevin Matz 2022-11-20 23:00:38 -05:00
parent 54ead231ad
commit 8fd8ef977d
1 changed files with 18 additions and 22 deletions

View File

@ -43,24 +43,23 @@ Component::Component(UUID::uuid cid, std::string fctn)
/**
* @brief Component::UdpPayloadReceiver
* @brief \cite epi17 EPI 17 payload receiver for UDP
* @param stream
*
* EPI 17
*/
void Component::UdpPayloadReceiver(PDU::Stream stream)
{
/// Read the input stream as EPI 17 transported RLP
auto transport = RLP::UDP::transport();
transport.iStream(stream);
*stream >> transport;
/// The RLP PDU Block will only contain suscessfully read PDU
/// The RLP PDU Block will contain only suscessfully read PDU
for(auto const &root : *transport.root.pdu)
RlpReceiver(root);
}
/**
* @brief Component::rlpSendUdp
* @brief \cite epi17 EPI 17 payload sender over UDP
* @param vector
* @param data
* @param ip
@ -69,37 +68,36 @@ void Component::rlpSendUdp (const uint32_t vector,
const PDU::Message<PDU::pdu_data> data,
const SDT::UDP::ipAddress& ip)
{
/// Construct the RLP PDU.
/// Constructs an RLP PDU.
auto rlp = std::make_shared<RLP::Pdu>();
rlp->setVector(vector);
rlp->setHeader(rlp_header_);
rlp->setData(data);
/// Use the EPI 17 tranport format.
/// Adds the PDU to the root block of the EPI 17 tranport format.
UDP::transport transport(true);
transport.root.pdu->push_back(rlp);
/// Fill an output stream with the transported PDU
/// Fills an output stream with the transported PDU
size_t length = transport.streamSize();
uint8_t buffer[length];
PDU::Stream stream(new PDU::pdu_stream(buffer, length));
*stream << transport;
/// Platform devices shall impliment the send.
/// Platform devices shall impliment the sending on the network.
sendUDP(stream, ip);
}
/**
* @brief Component::TcpPacketReceiver
* @brief \cite epi33 EPI 33 payload receiver for TCP
* @param stream
*
* EPI 33
*/
void Component::TcpPacketReceiver(PDU::Stream stream)
{
/// Read input stream as EPI 33 transported RLP
auto transport = RLP::TCP::transport();
transport.iStream(stream);
*stream >> transport;
/// The RLP PDU Block will only contain suscessfully read PDU
for(auto const &root : *transport.root.pdu)
@ -108,7 +106,7 @@ void Component::TcpPacketReceiver(PDU::Stream stream)
/**
* @brief Component::rlpSendTcp
* @brief \cite epi33 EPI 33 payload sender over TCP
* @param vector
* @param data
* @param ip
@ -117,23 +115,23 @@ void Component::rlpSendTcp (const uint32_t vector,
const PDU::Message<PDU::pdu_data> data,
const SDT::UDP::ipAddress& ip)
{
/// Construct the RLP PDU.
/// Constructs an RLP PDU.
auto rlp = std::make_shared<RLP::Pdu>();
rlp->setVector(vector);
rlp->setHeader(rlp_header_);
rlp->setData(data);
/// Use the EPI 33 tranport format.
/// Adds the PDU to the root block of the EPI 33 tranport format.
TCP::transport transport(true);
transport.root.pdu->push_back(rlp);
/// Fill an output stream with the transported PDU
/// Fills an output stream with the transported PDU
size_t length = transport.streamSize();
uint8_t buffer[length];
PDU::Stream stream(new PDU::pdu_stream(buffer, length));
*stream << transport;
/// Platform devices shall impliment the send.
/// Platform devices shall impliment the sending on the network.
sendTCP(stream, ip);
}
@ -163,11 +161,9 @@ void Component::RlpReceiver(PDU::Message<RLP::Pdu> root)
/**
* @brief Component::RlpRegisterVectorHandler
* @brief Add callback handler for an RLP vector.
* @param vect
* @param handle
*
* Add callback handler for a given RLP vector.
*/
void Component::RlpRegisterVector(uint32_t vect, PDU::Handler<RLP::Pdu> handle)
{