Message type parsing changed. It forms from 5 bits, but the decoding was done by 4 bits.
Change-Id: Ibac8c1ca1242a7e269ddef0c04ad8c6148f65592
diff --git a/omci_defs.go b/omci_defs.go
index 3062c4a..06f22dd 100644
--- a/omci_defs.go
+++ b/omci_defs.go
@@ -90,7 +90,13 @@
log.Printf("binary.Read failed: %s", err)
return 0, 0, 0, 0, 0, OmciContent{}, errors.New("binary.Read failed")
}
+ /* Message Type = Set
+ 0... .... = Destination Bit: 0x0
+ .1.. .... = Acknowledge Request: 0x1
+ ..0. .... = Acknowledgement: 0x0
+ ...0 1000 = Message Type: Set (8)
+ */
log.Printf("OmciRun - TransactionId: %d MessageType: %d, ME Class: %d, ME Instance: %d, Content: %x",
- m.TransactionId, m.MessageType&0x0F, m.MessageId.Class, m.MessageId.Instance, m.Content)
- return m.TransactionId, m.DeviceId, m.MessageType & 0x0F, m.MessageId.Class, m.MessageId.Instance, m.Content, nil
+ m.TransactionId, m.MessageType&0x1F, m.MessageId.Class, m.MessageId.Instance, m.Content)
+ return m.TransactionId, m.DeviceId, m.MessageType & 0x1F, m.MessageId.Class, m.MessageId.Instance, m.Content, nil
}