File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ namespace dogma {
5353
5454 inline bool IsMagicTdc5 () const { return GetMagicType () == 0x1e ; }
5555
56+ inline uint32_t GetMagic () const { return SWAP_VALUE (tuMagic); }
57+
5658 inline uint32_t GetAddr () const { return SWAP_VALUE (tuAddr); }
5759
5860 inline uint32_t GetTrigType () const { return SWAP_VALUE (tuTrigTypeNumber) >> 24 ; }
@@ -85,12 +87,12 @@ namespace dogma {
8587 tuLenPayload = SWAP_VALUE (new_payload);
8688 }
8789
88- inline uint32_t SetTdc5PaketLength (uint32_t sz)
90+ inline uint32_t SetTdc5PaketLength (uint32_t sz)
8991 {
9092 if (sz < sizeof (DogmaTu))
9193 sz = sizeof (DogmaTu);
9294 uint32_t sz4 = sz / 4 , odd_len = sz - sz4 * 4 ;
93- if (odd_len > 0 )
95+ if (odd_len > 0 )
9496 sz4++;
9597 SetPayloadLen (sz4 - sizeof (DogmaTu) / 4 );
9698 SetFrameBits (odd_len); // store in frame bits extra bytes not match to 4 bytes borders
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ bool dogma::UdpAddon::ReadUdp()
185185 errmsg = " Magic number not match" ;
186186 } else if (tu->IsMagicDefault ()) {
187187 msgsize = tu->GetSize (); // size must match with number of received bytes
188- if (res != msgsize)
188+ if (res != msgsize)
189189 errmsg = dabc::format (" Send buffer %u differ from message size %u - ignore it" , (unsigned ) res, (unsigned ) msgsize);
190190 } else if (tu->IsMagicTdc5 ()) {
191191 msgsize = tu->SetTdc5PaketLength (res); // total size will be rounded by 4 bytes boundary
@@ -195,6 +195,7 @@ bool dogma::UdpAddon::ReadUdp()
195195 } else {
196196 fTotalDiscardMagic ++;
197197 errmsg = " Magic subtype not match" ;
198+ DOUT0 (" Magic %08x" , tu->GetMagic ());
198199 }
199200
200201 if (!errmsg.empty ()) {
You can’t perform that action at this time.
0 commit comments