201 ./drivers/can_virtual Fake CAN network (Linux, Cygwin) |
205 ./drivers/can_virtual Fake CAN network (Linux, Cygwin) |
202 ./drivers/can_vcom VScom VSCAN interface |
206 ./drivers/can_vcom VScom VSCAN interface |
203 ./drivers/hcs12 HCS12 full target interface |
207 ./drivers/hcs12 HCS12 full target interface |
204 ./examples Examples |
208 ./examples Examples |
205 ./examples/TestMasterSlave 2 nodes, NMT SYNC SDO PDO, win32+unix |
209 ./examples/TestMasterSlave 2 nodes, NMT SYNC SDO PDO, win32+unix |
|
210 ./examples/TestMasterSlaveLSS 3 nodes, NMT SYNC SDO PDO LSS, win32+unix |
206 ./examples/TestMasterMicroMod 1 node, control Peak I/O Module, unix |
211 ./examples/TestMasterMicroMod 1 node, control Peak I/O Module, unix |
207 ./examples/gene_SYNC_HCS12 Just send periodic SYNC on HCS12 |
212 ./examples/gene_SYNC_HCS12 Just send periodic SYNC on HCS12 |
208 ./examples/win32test Ask some DS301 infos to a node (win32) |
213 ./examples/win32test Ask some DS301 infos to a node (win32) |
209 ./objdictgen Object Dictionary editor GUI |
214 ./objdictgen Object Dictionary editor GUI |
210 ./objdictgen/config Pre-defined OD profiles |
215 ./objdictgen/config Pre-defined OD profiles |
407 \paragraph{VScom} |
412 \paragraph{VScom} |
408 \begin{verbatim} |
413 \begin{verbatim} |
409 ./configure --can=vscom |
414 ./configure --can=vscom |
410 \end{verbatim} |
415 \end{verbatim} |
411 The VSCAN API archive will be automatically downloaded and decompressed (unzip required). See \href{http://www.vscom.de/1_1_05.htm}{www.vscom.de} for available adapters. |
416 The VSCAN API archive will be automatically downloaded and decompressed (unzip required). See \href{http://www.vscom.de/1_1_05.htm}{www.vscom.de} for available adapters. |
|
417 |
|
418 \subsubsection{LSS services} |
|
419 Canfestival optionally supports LSS services but they must be enabled. |
|
420 \begin{verbatim} |
|
421 ./configure --enable-lss |
|
422 \end{verbatim} |
|
423 |
|
424 Additionally, the FastScan LSS service can also be enabled. |
|
425 \begin{verbatim} |
|
426 ./configure --enable-lss --enable-lss-fs |
|
427 \end{verbatim} |
|
428 |
412 \subsection{Testing your CanFestival installation} |
429 \subsection{Testing your CanFestival installation} |
413 |
430 |
414 \subsection{User space} |
431 \subsubsection{User space} |
415 |
432 |
416 Sample provided in /example/TestMasterSlave is installed into your |
433 Sample provided in /example/TestMasterSlave is installed into your |
417 system during installation. |
434 system during installation. |
418 |
435 |
419 |
436 |
983 * -M : 1M,500K,250K,125K,100K,50K,20K,10K * |
1001 * -M : 1M,500K,250K,125K,100K,50K,20K,10K * |
984 * * |
1002 * * |
985 ************************************************************** |
1003 ************************************************************** |
986 \end{verbatim} |
1004 \end{verbatim} |
987 |
1005 |
|
1006 \subsection{TestMasterSlaveLSS} |
|
1007 |
|
1008 |
|
1009 \begin{verbatim} |
|
1010 ************************************************************** |
|
1011 * TestMasterSlaveLSS * |
|
1012 * * |
|
1013 * A LSS example for PC. It does implement 3 CanOpen * |
|
1014 * nodes in the same process. A master and 2 slaves. All * |
|
1015 * communicate together, exchanging periodically NMT, SYNC, * |
|
1016 * SDO and PDO. Master configure heartbeat producer time * |
|
1017 * at 1000 ms for the slaves by concise DCF. * |
|
1018 * * |
|
1019 * Usage: * |
|
1020 * ./TestMasterSlaveLSS [OPTIONS] * |
|
1021 * * |
|
1022 * OPTIONS: * |
|
1023 * -l : Can library ["libcanfestival_can_virtual.so"] * |
|
1024 * * |
|
1025 * SlaveA: * |
|
1026 * -a : bus name ["0"] * |
|
1027 * -A : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) * |
|
1028 * * |
|
1029 * SlaveB: * |
|
1030 * -b : bus name ["1"] * |
|
1031 * -B : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) * |
|
1032 * * |
|
1033 * Master: * |
|
1034 * -m : bus name ["2"] * |
|
1035 * -M : 1M,500K,250K,125K,100K,50K,20K,10K,none(disable) * |
|
1036 * * |
|
1037 ************************************************************** |
|
1038 \end{verbatim} |
|
1039 |
|
1040 The function used to request LSS services is \textit{configNetworkNode}. It works similar to \textit{writeNetworkDict} and its model is the following: |
|
1041 \begin{verbatim} |
|
1042 UNS8 configNetworkNode (CO_Data* d, UNS8 command, void *dat1, void* dat2, |
|
1043 LSSCallback_t Callback) |
|
1044 \end{verbatim} |
|
1045 |
|
1046 \subsection{FastScan} |
|
1047 FastScan is a special LSS service that allow the dynamically identification of the slave nodes even if they do not have a valid nodeID. This identification is based on the LSS address, composed by vendor ID, product code, revision number and serial number (refer to the DS305 for more information). The LSS address can be partially known or fully unknown. To represent this fact in Canfestival, we use the structure \textit{lss\_fs\_transfer\_t}. The parameter \textit{FS\_LSS\_ID} is an array of four elements which represents the four elements of the LSS address. The other parameter, \textit{FS\_BitChecked}, is also an array and it represents how many bits of each LSS address element are UNKNOWN. The next example is taken from \textit{TestMasterSlaveLSS}, where only the last two digits (8 bits) of vendor ID and product code are unknown and revision number and serial number are totally unknown. |
|
1048 |
|
1049 \begin{verbatim} |
|
1050 lss_fs_transfer_t lss_fs; |
|
1051 /* The VendorID and ProductCode are partialy known, */ |
|
1052 /* except the last two digits (8 bits). */ |
|
1053 lss_fs.FS_LSS_ID[0]=Vendor_ID; |
|
1054 lss_fs.FS_BitChecked[0]=8; |
|
1055 lss_fs.FS_LSS_ID[1]=Product_Code; |
|
1056 lss_fs.FS_BitChecked[1]=8; |
|
1057 /* serialNumber and RevisionNumber are unknown, */ |
|
1058 /* i.e. the 8 digits (32bits) are unknown. */ |
|
1059 lss_fs.FS_BitChecked[2]=32; |
|
1060 lss_fs.FS_BitChecked[3]=32; |
|
1061 res=configNetworkNode(&d,LSS_IDENT_FASTSCAN,&lss_fs,0,CheckLSSAndContinue); |
|
1062 \end{verbatim} |
988 |
1063 |
989 \section{Developing a new node} |
1064 \section{Developing a new node} |
990 |
1065 |
991 Using provided examples as a base for your new node is generally a |
1066 Using provided examples as a base for your new node is generally a |
992 good idea. You can also use the provided {*}.od files as a base for |
1067 good idea. You can also use the provided {*}.od files as a base for |