THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.

Revision history  [back]

Hi,

I think your problem lies in

local subtree = tree:add(bgNotificationData, btMsgData, "Message Data")

Let me explain:

bgNotificationData is the proto

msgData is a field extractor which gets called and its actual data is then transferred into btMsgData

Now, thing is like this, when you call TreeItem:add, your 1st arg is a Proto. This means that 2nd arg is either a tvb range, or a value.

If the 2nd arg is a tvb range, then the 3rd one is the value (if given)

If the 2nd arg is not a tvb range, then it is automatically the value of the field.

In your code, since the 2nd arg is not a tvb range, but a value from the field extractor, that's actually the value of the field, rendering the 3rd argument useless.

You might want to try something like

local subtree = tree:add(bgNotificationData,tvb:range([offset],[length]),tostring(btMsgData)):append_text("Message Data")

or something similar

Then, you can

subtree:add(rawMessage,tostring(btMsgData))

Hi,

I think your problem lies in

local subtree = tree:add(bgNotificationData, btMsgData, "Message Data")

Let me explain:

bgNotificationData is the proto

msgData msgData * is a field extractor which gets called and its actual data is then transferred into btMsgData*btMsgData

Now, thing is like this, when you call TreeItem:add, your 1st arg is a Proto. This means that 2nd arg is either a tvb range, or a value.

If the 2nd arg is a tvb range, then the 3rd one is the value (if given)

If the 2nd arg is not a tvb range, then it is automatically the value of the field.

In your code, since the 2nd arg is not a tvb range, but a value from the field extractor, that's actually the value of the field, rendering the 3rd argument useless.

You might want to try something like

local subtree = tree:add(bgNotificationData,tvb:range([offset],[length]),tostring(btMsgData)):append_text("Message Data")

or something similar

Then, you can

subtree:add(rawMessage,tostring(btMsgData))