Reputation:
I need to find for example the message 0x02 for byte(1) in the bus.
When I use
on message 0x02
{
}
Is it like?
on message *
{
if(this.id==0x02)
{
}
}
How can I then use on message for .byte(1)
?
Upvotes: 0
Views: 3108
Reputation: 682
Your second piece of code is the right way to go.
on message *
{
if(this.id == 0x02)
{
write("%x", this.byte(1));
}
}
As shown above, you can use .byte(1)
even for the this
keyword.
Upvotes: 1