Extended | echo
Extended | echo
Hello,
I've got a question about the multiple type in PCANMessage. Is that normal that I get 2 type in my messsage went it's extended and echo (2 and 32 -> "34"). I guess standard is working (because it's 0 and 32 -> "32").
"MsgType Extended | Echo Peak.Can.Basic.MessageType"
Matthieu
I've got a question about the multiple type in PCANMessage. Is that normal that I get 2 type in my messsage went it's extended and echo (2 and 32 -> "34"). I guess standard is working (because it's 0 and 32 -> "32").
"MsgType Extended | Echo Peak.Can.Basic.MessageType"
Matthieu
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Extended | echo
Hello Matthieu,
That's completely normal, yes.
MessageType is a byte value, a bit mask determines which message types for a given message are valid.
If both "Extended" and "Echo" are given as type, then this will be reflected in MessageType by returning
the bit-combination (using AND) of both values as a Byte.
Best Regards
Marvin
That's completely normal, yes.
MessageType is a byte value, a bit mask determines which message types for a given message are valid.
If both "Extended" and "Echo" are given as type, then this will be reflected in MessageType by returning
the bit-combination (using AND) of both values as a Byte.
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
Re: Extended | echo
Ok, thanks for respond.
It's still suprising because when you send a standart message, it's only echo. However, when it's extended both type are present.
"canMessage.MsgType Echo Peak.Can.Basic.MessageType"
Matthieu.
It's still suprising because when you send a standart message, it's only echo. However, when it's extended both type are present.
"canMessage.MsgType Echo Peak.Can.Basic.MessageType"
Matthieu.
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Extended | echo
Hello Matthieu,
This is easily explained:
A standard frame has the type value 0x00,
logically that made sense because on a SJA1000 controller
a frame could never be a standard frame and another
type at the same time, for historical reasons this was kept
and built upon.
Echo is the only case in which a standard frame is not logically excluded,
if you however see an echo frame as a completely independent type it makes sense.
I will relay this to our developers because i think you have a valid point in asking this question
and i do see your point about an echo message retaining its original message type, even if its a standard frame.
Best Regards
Marvin
This is easily explained:
A standard frame has the type value 0x00,
logically that made sense because on a SJA1000 controller
a frame could never be a standard frame and another
type at the same time, for historical reasons this was kept
and built upon.
Echo is the only case in which a standard frame is not logically excluded,
if you however see an echo frame as a completely independent type it makes sense.
I will relay this to our developers because i think you have a valid point in asking this question
and i do see your point about an echo message retaining its original message type, even if its a standard frame.
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
Re: Extended | echo
thank you, looking forward the developers point of view.
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Extended | echo
Hello,
Okay, i spoke to development and they have a valid point regarding this:
If you see an echo-frame 0x20 it can only be a standard frame as it is a valid combination of both values. Any other frame-type would not yield 0x20.
so if you check against both standard frame AND echo you will get "true".
Depending on your code you just need to adjust your check slightly.
Best Regards
Marvin
Okay, i spoke to development and they have a valid point regarding this:
Code: Select all
#define PCAN_MESSAGE_STANDARD 0x00
#define PCAN_MESSAGE_RTR 0x01
#define PCAN_MESSAGE_EXTENDED 0x02
#define PCAN_MESSAGE_FD 0x04
#define PCAN_MESSAGE_BRS 0x08
#define PCAN_MESSAGE_ESI 0x10
#define PCAN_MESSAGE_ECHO 0x20
#define PCAN_MESSAGE_ERRFRAME 0x40
#define PCAN_MESSAGE_STATUS 0x80
so if you check against both standard frame AND echo you will get "true".
Depending on your code you just need to adjust your check slightly.
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team