CANopen Manager / Slave Manual - esd electronics, Inc.
CANopen Manager / Slave Manual - esd electronics, Inc.
CANopen Manager / Slave Manual - esd electronics, Inc.
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>CANopen</strong>-<strong>Slave</strong><br />
Handler is the object event handler of this entry which is called by the <strong>CANopen</strong><br />
slave library to indicate data changes to the application. Refer to chapter 4.6 for<br />
a detailed description of the data event handler.<br />
Return: 0 or an error code described in the appendix.<br />
canOpenInitDictionaryTS()<br />
Name: canOpenInitDictionary() - Initialize dictionary and attach timestamp handler<br />
Synopsis: int canOpenInitDictionaryTs<br />
(<br />
HNODE Hnode, /* Node handle */<br />
unsigned short Index, /* Index */<br />
unsigned short Subindex, /* Subindex */<br />
const char * EntryName, /* Textual description */<br />
unsigned short Flags, /* Properties of entry */<br />
pDictionaryData Data, /* Default data */<br />
PFN_COS_DATA_HANDLER_TS Handler /* Data event handler */<br />
)<br />
Description: Initialize a single dictionary entry of the <strong>CANopen</strong> nodes Hnode object<br />
dictionary. The entry has to be created previously with a call to<br />
canOpenExtendDictionary(). This initialization has to take place for every entry<br />
in the object dictionary before the object can be used. If the function is called in<br />
any other node state but NodeOffline it will return with an error.<br />
Index has to be in range of the Manufacturer Specific Area or the Standardized<br />
Device Profile Area (0x2000 to 0x9FFF) and Subindex in the range from 0x00 to<br />
0xFE. The entry at sub-index 0xFF which describes the structure of this object<br />
dictionary entry according to /1/ is initialized implicitely. For complex data types<br />
of OBJ_ARRAY the sub-index 0 is initialized automatically to the number of subentries.<br />
For complex data types of OBJ_RECORD the sub-index 0 has to be<br />
initialized to the number of sub-entries by the application.<br />
EntryName is an optional textual description of the entry. This description is only<br />
important for configuration file generation. Usually set this parameter to NULL,<br />
because this description extends the memory requirements for an individual<br />
subentry.<br />
The parameter flags defines the access rights and other properties of the object<br />
dictionary entry. Supported values are READ_ACCESSand WRITE_ACCESS. To<br />
allow the mapping into a PDO the entry has to be marked as MAPPABLE. If the<br />
entry should be mappable more than once it has to be marked as MULTI_MAP.<br />
Data is a pointer to a union of structures of type DictionaryData. The<br />
application has to initialize the data type related part of the union and is<br />
responsible. For numerical data types the structure has members for the current<br />
value, the default value and the lower and upper limits. The memory to keep<br />
<strong>CANopen</strong> <strong>Slave</strong> Software <strong>Manual</strong> • Doc. No.: C.2002.21 / Rev. 2.2 Page 31 of 65