a few more doxygen blocks
This commit is contained in:
parent
c6aef08e55
commit
0cb3c72226
35
acn/dmp.cpp
35
acn/dmp.cpp
|
@ -27,7 +27,12 @@
|
|||
namespace ACN {
|
||||
namespace DMP {
|
||||
|
||||
address_type::address_type(uint8_t val) {
|
||||
/**
|
||||
* @brief address_type::address_type
|
||||
* @param val
|
||||
*/
|
||||
address_type::address_type(const uint8_t val)
|
||||
{
|
||||
z_reserved = (val >> 7) & 0b1;
|
||||
relative = (val >> 6) & 0b1;
|
||||
type = (data_type)((val >> 4) & 0b11);
|
||||
|
@ -35,6 +40,13 @@ address_type::address_type(uint8_t val) {
|
|||
width = (address_length)(val & 0b11);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief range::range
|
||||
* @param stream
|
||||
* @param t
|
||||
* @param l
|
||||
*/
|
||||
range::range(PDU::Stream stream, data_type t, address_length l) :
|
||||
incriment(0),
|
||||
count(0)
|
||||
|
@ -45,7 +57,15 @@ range::range(PDU::Stream stream, data_type t, address_length l) :
|
|||
count = read(stream, l);
|
||||
}
|
||||
|
||||
uint32_t range::read(PDU::Stream stream, address_length length) {
|
||||
|
||||
/**
|
||||
* @brief range::read
|
||||
* @param stream
|
||||
* @param length
|
||||
* @return
|
||||
*/
|
||||
uint32_t range::read(PDU::Stream stream, address_length length)
|
||||
{
|
||||
switch (length) {
|
||||
case ONE:
|
||||
return stream->readType<uint8_t>();
|
||||
|
@ -59,6 +79,10 @@ uint32_t range::read(PDU::Stream stream, address_length length) {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pdu::Pdu
|
||||
* @param stream
|
||||
*/
|
||||
Pdu::Pdu(PDU::Stream stream)
|
||||
: PDU::Pdu(stream, 1) // vectors are 1 octet
|
||||
{
|
||||
|
@ -79,7 +103,12 @@ Pdu::Pdu(PDU::Stream stream)
|
|||
}
|
||||
}
|
||||
|
||||
void Pdu::readSetData() {
|
||||
|
||||
/**
|
||||
* @brief Pdu::readSetData
|
||||
*/
|
||||
void Pdu::readSetData()
|
||||
{
|
||||
// header may be inherited. check that one exists
|
||||
if (!header()) {
|
||||
stream_->setstate(std::ios_base::failbit);
|
||||
|
|
|
@ -59,7 +59,7 @@ struct address_type : PDU::pdu_header {
|
|||
data_type type : 2; // D1, D0
|
||||
uint8_t x_reserved : 2; // X1, X0
|
||||
address_length width : 2; // A1, A0
|
||||
address_type(uint8_t);
|
||||
address_type(const uint8_t);
|
||||
};
|
||||
|
||||
// 5.1.5
|
||||
|
|
|
@ -29,7 +29,12 @@ namespace ACN {
|
|||
namespace RLP {
|
||||
namespace TCP {
|
||||
|
||||
preamble_t::preamble_t(PDU::Stream stream) {
|
||||
/**
|
||||
* @brief preamble_t::preamble_t
|
||||
* @param stream
|
||||
*/
|
||||
preamble_t::preamble_t(PDU::Stream stream)
|
||||
{
|
||||
stream->read(acn_id, sizeof(acn_id));
|
||||
if (stream->gcount() != 12)
|
||||
stream->setstate(std::ios_base::failbit);
|
||||
|
@ -37,11 +42,15 @@ preamble_t::preamble_t(PDU::Stream stream) {
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
Validate compliance with ACN EPI 33. ACN Root Layer Protocol Operation on TCP
|
||||
4.2. Reception
|
||||
*/
|
||||
preamble_t::operator bool () {
|
||||
/**
|
||||
* @brief preamble_t::operator bool
|
||||
* is preamble_t valid ACN EPI 33?
|
||||
*
|
||||
* Validate compliance with ACN EPI 33. ACN Root Layer Protocol Operation on
|
||||
* TCP: 4.2. Reception
|
||||
*/
|
||||
preamble_t::operator bool ()
|
||||
{
|
||||
// 2. Preamble Format: The ACN Packet Identifier shall be the text string
|
||||
// “ASC-E1.17\0\0\0” encoded in [ASCII].
|
||||
if (memcmp(acn_id, ACN_PACKET_IDENTIFIER, 12))
|
||||
|
|
|
@ -29,7 +29,12 @@ namespace ACN {
|
|||
namespace RLP {
|
||||
namespace UDP {
|
||||
|
||||
preamble_t::preamble_t(PDU::Stream stream) {
|
||||
/**
|
||||
* @brief preamble_t::preamble_t
|
||||
* @param stream
|
||||
*/
|
||||
preamble_t::preamble_t(PDU::Stream stream)
|
||||
{
|
||||
length = stream->readType<decltype(length)>();
|
||||
postamble_size = stream->readType<decltype(postamble_size)>();
|
||||
stream->read(acn_id, 12);
|
||||
|
@ -38,11 +43,14 @@ preamble_t::preamble_t(PDU::Stream stream) {
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
Validate compliance with ACN EPI 17: ACN Root Layer Protocol on UDP
|
||||
4.2. Reception
|
||||
*/
|
||||
preamble_t::operator bool () {
|
||||
/**
|
||||
* @brief preamble_t::operator bool
|
||||
*
|
||||
* Validate compliance with ACN EPI 17: ACN Root Layer Protocol
|
||||
* on UDP: 4.2. Reception
|
||||
*/
|
||||
preamble_t::operator bool ()
|
||||
{
|
||||
// 2. Preamble Format: The preamble size includes both size fields so the
|
||||
// minimum value for preamble size is 16 (octets).
|
||||
if (length < PREAMBLE_MINIMUM_SIZE)
|
||||
|
|
Loading…
Reference in New Issue