increment sequence number every message
This commit is contained in:
parent
355f2b3365
commit
337a8a650d
@ -143,7 +143,7 @@ struct data_header
|
|||||||
/// > for every packet sent on that universe. There is no implied relationship
|
/// > for every packet sent on that universe. There is no implied relationship
|
||||||
/// > between the sequence number of an E1.31 Synchronization Packet and the
|
/// > between the sequence number of an E1.31 Synchronization Packet and the
|
||||||
/// > sequence number of an E1.31 Data Packet on that same universe.
|
/// > sequence number of an E1.31 Data Packet on that same universe.
|
||||||
uint8_t sequence_number;
|
mutable uint8_t sequence_number;
|
||||||
|
|
||||||
/// @brief \cite sACN 6.2.6 E1.31 Data Packet: Options
|
/// @brief \cite sACN 6.2.6 E1.31 Data Packet: Options
|
||||||
///
|
///
|
||||||
|
@ -66,16 +66,15 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::unordered_map <uint16_t, Universe *> universes_;
|
std::unordered_map <uint16_t, Universe *> universes_;
|
||||||
std::mutex universes_mutext_;
|
mutable std::mutex universes_mutext_;
|
||||||
|
|
||||||
/// > \cite sACN 6.2.5 E1.31 Data Packet: Sequence Number
|
/// > \cite 6.3.2 E1.31 Synchronization Packet: Sequence Number
|
||||||
/// >
|
/// >
|
||||||
/// > Sources shall maintain a sequence for each universe they transmit.
|
/// > Sources shall maintain a sequence for each universe they transmit.
|
||||||
/// > The sequence number for a universe shall be incremented by one for
|
/// > The sequence number for a universe shall be incremented by one for
|
||||||
/// > every packet sent on that universe. There is no implied relationship
|
/// > every packet sent on that universe. There is no implied relationship
|
||||||
/// > between the sequence number of an E1.31 Synchronization Packet and
|
/// > between the sequence number of an E1.31 Synchronization Packet and
|
||||||
/// > the sequence number of an E1.31 Data Packet on that same universe.
|
/// > the sequence number of an E1.31 Data Packet on that same universe.
|
||||||
std::unordered_map <uint16_t, uint8_t> data_sequences_;
|
|
||||||
std::unordered_map <uint16_t, uint8_t> sync_sequences_;
|
std::unordered_map <uint16_t, uint8_t> sync_sequences_;
|
||||||
|
|
||||||
std::promise<void> discovery_exitSignal_;
|
std::promise<void> discovery_exitSignal_;
|
||||||
|
@ -201,6 +201,12 @@ void Universe::synchronize(uint8_t sequence_number)
|
|||||||
*/
|
*/
|
||||||
void Universe::sACNsend() const
|
void Universe::sACNsend() const
|
||||||
{
|
{
|
||||||
|
/// > \cite sACN 6.2.5 E1.31 Data Packet: Sequence Number
|
||||||
|
/// >
|
||||||
|
/// > ... The sequence number for a universe shall be incremented by one for
|
||||||
|
/// > every packet sent on that universe...
|
||||||
|
provenance_->sequence_number++;
|
||||||
|
|
||||||
// header
|
// header
|
||||||
auto addrtyp = std::make_shared<ACN::DMP::address_type>();
|
auto addrtyp = std::make_shared<ACN::DMP::address_type>();
|
||||||
addrtyp->byte = 0;
|
addrtyp->byte = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user