Go to Post Dear Mr. Lavery, Congratulations. For the fourth year running, you have successfully ruined my Christmas holiday with your untimely release of a most obfuscating, but no less tantalizing, hint. - dubious elise [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 27-02-2010, 08:00
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
Re: CAN Jaguar enhancements

Ian,

Thanks for your feedback!

Quote:
Originally Posted by imac256 View Post
A couple of things:

1st:
The device number is set in the setTransaction method in the sendMessage call. Here is the code for that from Rev 50.
You are correct about the setTransaction() method and the kTrustedMessages statement. I just missed it. I had been staring at it for a while and was multitasking as well.

However, because the SYNC message is not destined for just one device, the device number should NOT be sent. It is a broadcast message, as you have shown below. This could cause some issues. I think my setting of the m_deviceNumber to zero before sending the SYNC message is still the best way to go. OR, one could modify setTransaction().

Quote:

2nd:
I think that you might want to include more than just the API call in the messageID. For the syncronization program I am writing for my team in C++ I include every field so that my final message ID is this:
Code:
#define CAN_MSGID_MFR_BCAST         0x00000000    //Define the Broadcast manufacturer
//Define the Syncronization message Header
#define LM_API_SYNC       CAN_MSGID_DTYPE_BCAST | CAN_MSGID_MFR_BCAST | CAN_MSGID_API_SYNC
You can do this, but it is redundant. Because CAN_MSGID_DTYPE_BCAST and CAN_MSGID_MFR_BCAST are both 0, there is no added information to the LM_API_SYNC other than CAN_MSGID_API_SYNC. The compiler will pre-compile with the same end result. It IS however, nicer code and more future friendly should anything change.

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CAN Jaguar Malfunction PranavSathy CAN 4 21-02-2010 18:32
CAN Jaguar Synchronous Updates?? Bryscus Programming 3 30-01-2010 16:13
Getting started with CAN/Jaguar CVassos Programming 1 27-01-2010 23:43
CAN bus Jaguar intermittent errors bear1511 Programming 1 27-01-2010 22:49
Black Jaguar RS232->CAN - anyone? oddjob C/C++ 12 22-01-2010 16:25


All times are GMT -5. The time now is 02:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi