[FIX] Fix spelling mistakes in the documentation

Several spelling mistakes are fixed and the documents are unified to
American English.

Change-Id: I79a2d61e9c7fe40d5407c9bca27e520679c64568
Reviewed-on: http://brateggevoat1/gerrit/2360
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[FIX] Show support of ext. NMT commands in the feature flags of the XDDs

* This applies only to XDDs that are used for openPOWERLINK-based devices.

Change-Id: Ic77c68092b554897656ffee349ac696821569c96
Signed-off-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-on: http://brateggevoat1/gerrit/2349
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[FIX] Fix spelling mistake of SDO sent frame state

Change-Id: Ia8d42b55a839bcf8c0a1df323253aefd9902074c
Reviewed-on: http://brateggevoat1/gerrit/2359
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[FIX] Fix CN extended NMT command handling

This fix ensures that the CN reacts to the extended NMT command if the
node's corresponding bit is set.
- Use bit mask instead of bit offset with logic AND
- Prepare offset and mask in nmtcnu_addInstance

Resolves: #772

Change-Id: I40e2ce9ee6cfc2d536ece8e3c2fa8982f47c8b3f
Reviewed-on: http://brateggevoat1/gerrit/2356
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
[FIX] Fix SDO command invalid handle error in CFM

The CFM node event process function may only abort and undefine a valid
SDO command connection.

Resolves: #768

Change-Id: I50aa73cdcfddcff5e2b1fef2faccb5fd2808f247
Reviewed-on: http://brateggevoat1/gerrit/2350
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[TASK] Add target_getTickCount() for Linux and Windows

Change-Id: I57f918e1e712fb90a6c2b9303eaaca320b3a229a
Reviewed-on: http://brateggevoat1/gerrit/2334
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[FIX] Ensure that heartbeat frequency is not exceeded

The application might check heartbeat more frequently than the
heartbeat is updated in the driver. The control module now is
configured with a minimum frequency for returning an heartbeat error.

Change-Id: I303a0571f28cc287f213c880edd4f2e786d5a6b1
Reviewed-on: http://brateggevoat1/gerrit/2335
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[FIX] Remove kernel check timeout in MN embedded demo

Since the control module ensures not exceeding heartbeat frequency
the timeout in the application can be removed.

Change-Id: I2f0e08aae036452e2f443ce5266f40dd3cc78541
Reviewed-on: http://brateggevoat1/gerrit/2372
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[FIX] Fix stack off signalization in demos

Change-Id: I06755db9391b1118657bc84ce7556bbcdbc9c4ca
Reviewed-on: http://brateggevoat1/gerrit/2373
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[FIX] Fix timer overflow in generic timer module

Check the timeout value to be sure that we don't get an overflow. We
can handle values up to UINT_MAX / 2.

Resolves: #335

Change-Id: Ie07a7a82112dfba958b1627ecf67cc89bc3ee4b2
Reviewed-on: http://brateggevoat1/gerrit/2370
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[TASK] Optimize eventk_process()

Use switch/case instead of function pointer table.

Change-Id: Ifae16899bf32ab9d7f6aebef4abf7a54aaca0fde
Reviewed-on: http://brateggevoat1/gerrit/2375
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[TASK] Optimize searching for OD index entries

- Calculate number of entries at initialization
- Using binary search instead of linear search

Change-Id: If41a0331a4798bcf5d49a4681e7471ee20f4e082
Reviewed-on: http://brateggevoat1/gerrit/2376
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[TASK] Add names for Linux pthreads to ease debugging

Add names for Linux pthreads. This eases debugging as threads can
be identified by there names within top or ftrace.

Change-Id: I8a49ee1f89a86071a19d9cab47f3eb8fd1becb1e
Reviewed-on: http://brateggevoat1/gerrit/2382
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[FIX] Fix NMT command handling with PRes Chaining nodes

This fix solves potential deadlocks with PRes Chaining nodes which hang in
PreOperational2 state.
Before the MN sends the NMT reset command to a PRes Chaining node it must
deactivate the PRes Chainging mode by sending a syncRequest frame (as
recommended by EPSG DS 302-C V1.0.0).
The function nmtmnu_sendNmtCommandEx is modified in order to follow this
recommendation with plain and extended NMT reset commands. In case of
extended NMT reset commands the active PRes Chaining nodes are removed
from the bit array in the NMT command data field. When the syncResponse
frame is received a plain NMT reset command is sent to the node.
Note that plain NMT resets to all noads (broadcast, nodeId=0xFF) are
dispatched immediately without considering the node's PRes Chaining mode.

Resolves: #799 and #781

Change-Id: I724b1eefe97da335a1514b2a1fd7f62e0e072542
Reviewed-on: http://brateggevoat1/gerrit/2374
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[FIX] Increase default value for request queues

On a network with more than 10 nodes the queue for status requests
was too small and buffer overflows occured. Therefore the size of
the request queues for IdentReq and StatusReq is increased to be
large enough for networks up to 40 nodes.

For small MN systems, the values can be scaled down by redefining
them in oplkcfg.h.

Change-Id: I2252db5175bec38274c095243beb557ac06267d7
Reviewed-on: http://brateggevoat1/gerrit/2384
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>
[TASK] Add debug code to retrieve maximum used circbuffer size

Change-Id: Ia95857359307f99f267802f8548d853095a90bb1
Reviewed-on: http://brateggevoat1/gerrit/2385
Tested-by: Jenkins <jenkins@brateggevoat1.br-automation.co.at>
Reviewed-by: Wolfgang Seiss <wolfgang.seiss@br-automation.com>
Reviewed-by: Joerg Zelenka <joerg.zelenka@br-automation.com>
Reviewed-by: Josef Baumgartner <josef.baumgartner@br-automation.com>