CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

can_putd

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
g@rd3n3r



Joined: 14 Jul 2016
Posts: 2

View user's profile Send private message

can_putd
PostPosted: Tue Nov 14, 2017 2:56 pm     Reply with quote

revisiting after a long haitus.

can_putd(int32 id, int * data, int len,int priority, int1 ext, int1 rtr);

question about priority. The lower the value the higher the priority the message will be, right?
Ttelmah



Joined: 11 Mar 2010
Posts: 13389

View user's profile Send private message

PostPosted: Tue Nov 14, 2017 3:39 pm     Reply with quote

No. The message with the _lowest_ priority is postponed in the event of a conflict.

Read the comments in the driver itself:
Quote:

// priority - priority of message. The higher the number, the
// sooner the CAN peripheral will send the message.
// Numbers 0 through 3 are valid.


0 to 3 only. 3 is the highest priority, 0 the lowest.

This is standard on CAN itself.
newguy



Joined: 24 Jun 2004
Posts: 1505
Location: Edmonton, Alberta

View user's profile Send private message

PostPosted: Tue Nov 14, 2017 4:42 pm     Reply with quote

As Ttelmah has said, this is an internal (to the CAN peripheral) priority which is used to determine which message (if more than one), gets routed to the TX circuitry when a transmit slot opens up on the CAN bus.

For things like J1939 and/or NMEA 2000, you're correct in that the priority there corresponds to the first 3 bits transmitted on the CAN bus, and in that instance, the number of dominant/recessive bits determines who "wins" if more than one device attempt to simultaneously transmit on the bus.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group