mirror of
https://github.com/deavmi/doap
synced 2024-07-04 14:30:55 +02:00
CoapPacket
- Cleared up code
This commit is contained in:
parent
6dfd908184
commit
ccda78ed6d
|
@ -441,16 +441,16 @@ public class CoapPacket
|
|||
// Delta value is 2 bytes (BE)
|
||||
ubyte[] optionIdBytes = data[idx..idx+2];
|
||||
ushort unProcessedValue = *(cast(ushort*)optionIdBytes.ptr);
|
||||
ushort optionId = order(unProcessedValue, Order.BE);
|
||||
|
||||
// The value found is then lacking 269 (so add it back)
|
||||
optionId+=269;
|
||||
ushort deltaAddition = order(unProcessedValue, Order.BE);
|
||||
deltaAddition+=269;
|
||||
|
||||
// Then tack on the delta
|
||||
optionId+=delta;
|
||||
// Update delta
|
||||
delta+=deltaAddition;
|
||||
|
||||
// TODO: What to do about delta? I think we should make it the new delta
|
||||
delta=optionId;
|
||||
// Our option ID is then calculated from the current delta
|
||||
ushort optionId = delta;
|
||||
|
||||
// Jump over [Option delta extended (16bit)] here
|
||||
idx+=2;
|
||||
|
|
Loading…
Reference in New Issue
Block a user