Hi 

The way my application is working is that it updates periodically some 
predefined variables. These variable are defined by Objdictgen and mapped to 
some index, let’s say 0x2000, in object dictionary. I have something like 100 
different variables, all having different unique names, because I want see 
their states by name in both application and CANopen Analyzer tool by reading 
EDS file.

The problem is that if any of this variables is changed I need to send a PDO 
and only in this case. So what I want is following: after my app finished 
execution I want to scroll quickly through all output variables (by index for 
example) and create PDOs only for updated ones.  Hope it clarifies a little bit.

 

Regards

Artyom

 

Von: canfestival-devel@lists.sourceforge.net 
[mailto:canfestival-devel@lists.sourceforge.net] 
Gesendet: Dienstag, 21. November 2017 14:44
An: canfestival-devel@lists.sourceforge.net
Betreff: Re: [Canfestival-devel] Alternative methods of accessing object 
dictionary from application

 

Hi Artyom,

 

Sorry for the long delay. I did not see the message :(

AFIK you should not get any corruption in the dictionary as long as you do not 
change the dictionary itself ...number of nodes, subnodes etc.

If all you want to do is read you should be okay whatevery you do.

 

If you want to write then you should be okay as long as you only write to 
variable that do not affect a state of some sort.

Changing hearbeat timeout and cob-id etc. directy might give some unexpected 
results.

 

If you tell us a littlebit more about what you want to do it might be easyer to 
give a more precise answer

 

 

 

On Tue, Nov 7, 2017 at 4:37 AM, <canfestival-devel@lists.sourceforge.net 
<mailto:canfestival-devel@lists.sourceforge.net> > wrote:

Hi Lars, 

I know these functions, but my understanding is that these APIs should not be 
used outside of callbacks, as pdf manual suggests, to avoid data corruption in 
dictionary. So I'm looking for something else, or maybe I'm wrong here...

 

 

2017-11-06 20:18 GMT+01:00 <canfestival-devel@lists.sourceforge.net 
<mailto:canfestival-devel@lists.sourceforge.net> >:

Hi Artyom,

You might want to take a look into the function readLocalDict and 
writeLocalDict. Both found in objacces.h

Best regards
Lars

 

On Mon, Nov 6, 2017 at 12:32 PM, <canfestival-devel@lists.sourceforge.net 
<mailto:canfestival-devel@lists.sourceforge.net> > wrote:

Dear all

 

As I see from examples, standard method of accessing object dictionary from 
user application is using variable identifiers. But are there any alternative 
methods of accessing object dictionary from user application, for example using 
index/subindex, or similar? In my app I need to look through some range of 
indexes quickly and doing so via variables doesn't seem to be an efficient way, 
and I don't want to define arrays in dictionary as they look ugly.

 

Thank you and best regards

Artyom

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Canfestival-devel mailing list
Canfestival-devel@lists.sourceforge.net 
<mailto:Canfestival-devel@lists.sourceforge.net> 
https://lists.sourceforge.net/lists/listinfo/canfestival-devel

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Canfestival-devel mailing list
Canfestival-devel@lists.sourceforge.net 
<mailto:Canfestival-devel@lists.sourceforge.net> 
https://lists.sourceforge.net/lists/listinfo/canfestival-devel

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Canfestival-devel mailing list
Canfestival-devel@lists.sourceforge.net 
<mailto:Canfestival-devel@lists.sourceforge.net> 
https://lists.sourceforge.net/lists/listinfo/canfestival-devel

 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Canfestival-devel mailing list
Canfestival-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/canfestival-devel

Reply via email to