<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator><link href="https://opensource.lely.com/canopen/feed.xml" rel="self" type="application/atom+xml" /><link href="https://opensource.lely.com/canopen/" rel="alternate" type="text/html" /><updated>2024-08-01T13:50:11+02:00</updated><id>https://opensource.lely.com/canopen/feed.xml</id><title type="html">Lely CANopen</title><author><name>Your Name</name></author><entry><title type="html">New release: v2.3.5</title><link href="https://opensource.lely.com/canopen/release/v2.3.5/" rel="alternate" type="text/html" title="New release: v2.3.5" /><published>2024-08-01T00:00:00+02:00</published><updated>2024-08-01T00:00:00+02:00</updated><id>https://opensource.lely.com/canopen/release/v2.3.5</id><content type="html" xml:base="https://opensource.lely.com/canopen/release/v2.3.5/"><![CDATA[<p>v2.3.5 has just been released. This is a minor release.</p>

<h3 id="changes">Changes</h3>

<p>Server-SDO block transfer support is now optional. It can be disabled at compile
time with the <code class="language-plaintext highlighter-rouge">--disable-ssdo-blk</code> option to <code class="language-plaintext highlighter-rouge">configure</code>, or by defining the
<code class="language-plaintext highlighter-rouge">LELY_NO_CO_SSDO_BLK</code> preprocessor macro.</p>

<p>If Server-SDO block transfer support is enabled, the maximum number of segments
per block can now be changed from the default value of 127 by defining the
<code class="language-plaintext highlighter-rouge">CO_SSDO_MAX_SEQNO</code> preprocessor macro.</p>

<p>Finally, the Client-SDO no longer gives up immediately if the server does not
support the requested block size during a block upload request. Instead, the
client halves the block size and tries again until the server accepts the
request.</p>

<h3 id="known-issues">Known issues</h3>

<p>See <a href="release/v2.3.3/">v2.3.3</a>.</p>

<h3 id="download">Download</h3>

<p>You can download the source from
<a href="https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.5/lely-core-v2.3.5.zip">GitLab</a>
or the Ubuntu packages from our
<a href="https://launchpad.net/~lely/+archive/ubuntu/ppa">PPA</a>.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="release" /><summary type="html"><![CDATA[v2.3.5 has just been released. This is a minor release.]]></summary></entry><entry><title type="html">New release: v2.3.4, v2.2.19 and v2.1.12</title><link href="https://opensource.lely.com/canopen/release/v2.3.4/" rel="alternate" type="text/html" title="New release: v2.3.4, v2.2.19 and v2.1.12" /><published>2024-05-21T00:00:00+02:00</published><updated>2024-05-21T00:00:00+02:00</updated><id>https://opensource.lely.com/canopen/release/v2.3.4</id><content type="html" xml:base="https://opensource.lely.com/canopen/release/v2.3.4/"><![CDATA[<p>v2.3.4, v2.2.10 and v2.1.12 have just been released. These are minor releases
containing only bugfixes.</p>

<h3 id="bug-fixes">Bug fixes</h3>

<p>The following bugs have been fixed in all three versions:</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">co_time_of_day_set()</code> now actually stores the result. Previously it would
only compute the result but not actually make it available to the caller.</li>
</ul>

<p>The following additional issues have been addressed in v2.3.4:</p>
<ul>
  <li>EMCY messages generated by the stack when a heartbeat or life-guarding event
occurs are now automatically removed when the event is resolved. This fixes a
potential memory usage issue if the application did not remove the EMCY
messages manually. To make this fix possible, two other changes were
necessary:</li>
  <li>The <code class="language-plaintext highlighter-rouge">co_emcy_find()</code> and <code class="language-plaintext highlighter-rouge">co_emcy_remove()</code> functions have been added. These
functions allow the caller to resolved (and remove) EMCY errors other than the
most recent error.</li>
  <li>The error register is now computed on demand. Since EMCY errors can now be
resolved in arbitrary order, we cannot rely on the error register value of the
most recent EMCY error to remain correct.</li>
</ul>

<h3 id="known-issues">Known issues</h3>

<p>See <a href="release/v2.3.3/">v2.3.3</a>.</p>

<h3 id="download">Download</h3>

<p>You can download the source from
<a href="https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.4/lely-core-v2.3.4.zip">GitLab</a>
or the Ubuntu packages from our
<a href="https://launchpad.net/~lely/+archive/ubuntu/ppa">PPA</a>.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="release" /><summary type="html"><![CDATA[v2.3.4, v2.2.10 and v2.1.12 have just been released. These are minor releases containing only bugfixes.]]></summary></entry><entry><title type="html">New release: v2.3.3, v2.2.9 and v2.1.11</title><link href="https://opensource.lely.com/canopen/release/v2.3.3/" rel="alternate" type="text/html" title="New release: v2.3.3, v2.2.9 and v2.1.11" /><published>2023-11-12T00:00:00+01:00</published><updated>2023-11-12T00:00:00+01:00</updated><id>https://opensource.lely.com/canopen/release/v2.3.3</id><content type="html" xml:base="https://opensource.lely.com/canopen/release/v2.3.3/"><![CDATA[<p>v2.3.3, v2.2.9 and v2.1.11 have just been released. These are minor releases
containing only bugfixes.</p>

<h3 id="bug-fixes">Bug fixes</h3>

<p>The following bugs have been fixed in all three versions:</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">configure.ac</code> now prepends the default flags to <code class="language-plaintext highlighter-rouge">$CFLAGS</code> and <code class="language-plaintext highlighter-rouge">$CXXFLAGS</code>.
This allows the user to override the default flags.</li>
  <li>During a firmware update, a missing SDO download response message after the
“start program” command no longer results in an error. This may happen if a
device reboots immediately after receiving the command, before sending an SDO
response. While this is non-conforming behavior, the firmware update process
is more robust if we ignore the SDO timeout in this case.</li>
  <li>GCC 13 is now supported. All build warnings have been fixed.</li>
  <li>liblely-util and liblely-co no longer rely on the availability of
specified-width integer types and macros. These types and macros are optional
according to the standard. The least-width types and macros are used instead.</li>
  <li>The previous bug fix, combined with a few other small fixes, enables support
for the <a href="https://www.ti.com/tool/C2000-CGT">TI C2000 C/C++ Compiler</a>. This
compiler targets the TI C2000 Microcontroller platforms. A distinguishing
feature of these platforms is the absence of 8-bit bytes.</li>
  <li>CAN frames with CAN-ID 000h (NMT commands) are now only processed by the NMT
service and not by other CAN frame receiver callbacks. This prevents difficult
to debug issues with misconfigured CANopen services which accidentally use
000h as the COB-ID. Since those services might be recreated by the NMT
service, this could even lead to segmentation faults in the worst case.</li>
  <li><code class="language-plaintext highlighter-rouge">dcfgen</code> now generates an explicit SDO download request to set sub-index 0 of
the PDO mapping parameter object to 0 before writing the actual mapping
parameters, even when the EDS/DCF file suggests that it might already be 0.
The standard is vague on whether this is necessary, but always writing the
value is the most robust solution.</li>
  <li>A missing member initializer has been added <code class="language-plaintext highlighter-rouge">__frbuf_init()</code>.</li>
</ul>

<p>The following additional issues have been addressed in v2.3.3 and v2.2.9:</p>
<ul>
  <li>Defining <code class="language-plaintext highlighter-rouge">LELY_NO_CO_OBJ_FILE</code> no longer results in a linker error in
liblely-coapp.</li>
</ul>

<p>The following additional issues have been addressed in v2.3.3:</p>
<ul>
  <li>Padding bytes in MPDO messages are now discarded, like the standard requires.</li>
</ul>

<h3 id="known-issues">Known issues</h3>

<p>The following known issues are still present:</p>
<ul>
  <li>When compiling with clang with C17 support, the following error is reported
for multiple files:
    <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>error: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Werror,-Wdeprecated-pragma]
</code></pre></div>    </div>
    <p>This cannot be easily fixed, since the <code class="language-plaintext highlighter-rouge">ATOMIC_VAR_INIT</code> macro is also used
in the <code class="language-plaintext highlighter-rouge">&lt;lely/libc/stdatomic.h&gt;</code> compatibility layer for compilers without
support for C11 atomics.
For now, the error can be fixed by adding <code class="language-plaintext highlighter-rouge">-std=c11</code> to <code class="language-plaintext highlighter-rouge">$CFLAGS</code> when
compiling with clang.</p>
  </li>
</ul>

<h3 id="download">Download</h3>

<p>You can download the source from
<a href="https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.3/lely-core-v2.3.3.zip">GitLab</a>
or the Ubuntu packages from our
<a href="https://launchpad.net/~lely/+archive/ubuntu/ppa">PPA</a>.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="release" /><summary type="html"><![CDATA[v2.3.3, v2.2.9 and v2.1.11 have just been released. These are minor releases containing only bugfixes.]]></summary></entry><entry><title type="html">New release: v2.3.2, v2.2.8 and v2.1.10</title><link href="https://opensource.lely.com/canopen/release/v2.3.2/" rel="alternate" type="text/html" title="New release: v2.3.2, v2.2.8 and v2.1.10" /><published>2023-01-12T00:00:00+01:00</published><updated>2023-01-12T00:00:00+01:00</updated><id>https://opensource.lely.com/canopen/release/v2.3.2</id><content type="html" xml:base="https://opensource.lely.com/canopen/release/v2.3.2/"><![CDATA[<p>v2.3.2, v2.2.8 and v2.1.10 have just been released. These are minor releases
containing only bugfixes.</p>

<h3 id="bug-fixes">Bug fixes</h3>

<p>The following bugs have been fixed in all three versions:</p>
<ul>
  <li>GCC 12 is now supported. All build warnings have been fixed.</li>
  <li>Several clang warnings have been fixed. And the <code class="language-plaintext highlighter-rouge">-Wno-static-in-inline</code> flag
has been added to <code class="language-plaintext highlighter-rouge">$CFLAGS</code> to suppress warnings about the use of
<code class="language-plaintext highlighter-rouge">extern inline</code>.</li>
  <li>The <code class="language-plaintext highlighter-rouge">r[ead] p[do]</code> and <code class="language-plaintext highlighter-rouge">w[rite] p[do]</code> commands in <code class="language-plaintext highlighter-rouge">coctl</code> (and the ASCII
gateway) mimick RPDO/TPDO access to the local object dictionary. These
commands now correctly ignore the <code class="language-plaintext highlighter-rouge">AccessType</code> to prevent errors.</li>
  <li><code class="language-plaintext highlighter-rouge">coctl</code> no longer changes tries to change the bitrate if it was already
correct, or if retrieving the bitrate fails. This prevents the network
interface from being left in a down state after initialization.</li>
  <li>A potential use-after-free in the user-defined destructor of a promise has
been fixed.</li>
  <li>Potential race conditions in <code class="language-plaintext highlighter-rouge">ev_future_submit()</code> and <code class="language-plaintext highlighter-rouge">ev_future_when_all_n()</code>
have been fixed.</li>
  <li>The Server-SDO now copies the CRC support flag from the Client-SDO request to
its own response. Even though the server supports CRC in SDO block transfers,
reporting this when the client does not may result in an error in some
clients. To prevent confusion, if the client does not support CRC, we pretend
to not support it either.</li>
  <li>The CAN frame receiver now uses strict CAN ID matching and does not mask
unused bits before comparison. This prevents situations where a CAN frame is
sent to a receiver even though the ID differs from what the receiver expects,
which may result in assertion failures.</li>
</ul>

<p>The following additional issues have been addressed in v2.3.2 and v2.2.8:</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">dcfgen</code> now explicitly generates an SDO request to disable the heartbeat
consumer, if necessary.</li>
  <li>The EDS/DCF Python tools now accept a <code class="language-plaintext highlighter-rouge">LastEDS</code> key in the <code class="language-plaintext highlighter-rouge">FileInfo</code> section
of EDS/DCF files.</li>
  <li>The CAN network interface in liblely-io2 now correctly reports the read/write
error count to the user-defined callback function. Previously, the last error
code was supplied to the callback instead of the error count.</li>
</ul>

<p>The following additional issues have been addressed in v2.3.2:</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">--disable-diag</code> (<code class="language-plaintext highlighter-rouge">LELY_NO_DIAG</code>) no longer results in build errors.</li>
  <li>SDO/PDO communication parameters and PDO mapping parameter records are now
copied explicity instead of with <code class="language-plaintext highlighter-rouge">memcpy()</code>. This fixes potential errors when
sub-objects are missing from the local object dictionary.</li>
  <li>Receiving an empty string via SDO no longer results in an <code class="language-plaintext highlighter-rouge">std::string</code>
instance being initialized with a null pointer, which is undefined behavior.</li>
</ul>

<h3 id="known-issues">Known issues</h3>

<p>The following known issues are still present:</p>
<ul>
  <li>When compiling with clang with C17 support, the following error is reported
for multiple files:
    <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>error: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Werror,-Wdeprecated-pragma]
</code></pre></div>    </div>
    <p>This cannot be easily fixed, since the <code class="language-plaintext highlighter-rouge">ATOMIC_VAR_INIT</code> macro is also used
in the <code class="language-plaintext highlighter-rouge">&lt;lely/libc/stdatomic.h&gt;</code> compatibility layer for compilers without
support for C11 atomics.
For now, the error can be fixed by adding <code class="language-plaintext highlighter-rouge">-std=c11</code> to <code class="language-plaintext highlighter-rouge">$CFLAGS</code> when
compiling with clang.</p>
  </li>
</ul>

<h3 id="download">Download</h3>

<p>You can download the source from
<a href="https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.2/lely-core-v2.3.2.zip">GitLab</a>
or the Ubuntu packages from our
<a href="https://launchpad.net/~lely/+archive/ubuntu/ppa">PPA</a>.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="release" /><summary type="html"><![CDATA[v2.3.2, v2.2.8 and v2.1.10 have just been released. These are minor releases containing only bugfixes.]]></summary></entry><entry><title type="html">New release: v2.3.1, v2.2.7 and v2.1.9</title><link href="https://opensource.lely.com/canopen/release/v2.3.1/" rel="alternate" type="text/html" title="New release: v2.3.1, v2.2.7 and v2.1.9" /><published>2022-04-29T00:00:00+02:00</published><updated>2022-04-29T00:00:00+02:00</updated><id>https://opensource.lely.com/canopen/release/v2.3.1</id><content type="html" xml:base="https://opensource.lely.com/canopen/release/v2.3.1/"><![CDATA[<p>v2.3.1, v2.2.7 and v2.1.9 have just been released. These are minor releases
containing only bugfixes.</p>

<h3 id="bug-fixes">Bug fixes</h3>

<p>The following bugs have been fixed in all three versions:</p>
<ul>
  <li>GCC 11 is now supported. All build warnings have been fixed.</li>
</ul>

<p>The following additional issues have been addressed in v2.3.1 and v2.2.7:</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">dcfgen</code> now properly formats <code class="language-plaintext highlighter-rouge">INTEGER8</code> values when creating concise DCF
files.</li>
</ul>

<h3 id="download">Download</h3>

<p>You can download the source from
<a href="https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.1/lely-core-v2.3.1.zip">GitLab</a>
or the Ubuntu packages from our
<a href="https://launchpad.net/~lely/+archive/ubuntu/ppa">PPA</a>.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="release" /><summary type="html"><![CDATA[v2.3.1, v2.2.7 and v2.1.9 have just been released. These are minor releases containing only bugfixes.]]></summary></entry><entry><title type="html">New release: v2.3.0</title><link href="https://opensource.lely.com/canopen/release/v2.3.0/" rel="alternate" type="text/html" title="New release: v2.3.0" /><published>2021-04-08T00:00:00+02:00</published><updated>2021-04-08T00:00:00+02:00</updated><id>https://opensource.lely.com/canopen/release/v2.3.0</id><content type="html" xml:base="https://opensource.lely.com/canopen/release/v2.3.0/"><![CDATA[<p>v2.3.0 has just been released. This is a major release containing several new
features and a few minor API changes (see <a href="#api-changes">below</a>).</p>

<h3 id="ecss-compliance">ECSS compliance</h3>

<p>This release contains several changes necessary to make the Lely CANopen stack
suitable for use <a href="/canopen/news/ESA/">in space</a>, in particular to
make it compliant with the
<a href="https://ecss.nl/standard/ecss-e-st-50-15c-space-engineering-canbus-extension-protocol-1-may-2015/">ECSS-E-ST-50-15C - CANbus extension protocol</a>.
Full ECSS compliance requires breaking changes and will not be achieved until
the v3 release (under deleveopment in the <code class="language-plaintext highlighter-rouge">ecss</code> branch at
<a href="https://gitlab.com/n7space/canopen/lely-core.">https://gitlab.com/n7space/canopen/lely-core.</a>). This release contains the
necessary non-breaking changes (with the exception of a few
<a href="#api-changes">minor changes</a> that should not affect normal users).</p>

<h4 id="configuration-options">Configuration options</h4>

<p>An ECSS-compliant build can be generated by specifying the
<code class="language-plaintext highlighter-rouge">--enable-ecss-compliance</code> option to the <code class="language-plaintext highlighter-rouge">configure</code> script. This option
disables all functionality not covered by the ECSS-E-ST-50-15C - CANbus
extension protocol, which includes the I/O libraries and all C++ APIs.
Additionally, it configures the project for a <em>freestanding</em> environment with
(almost) no support from the standard C library.</p>

<p>Standard C library support can also be selectively disabled with the following
new <code class="language-plaintext highlighter-rouge">configure</code> options (or preprocessor macros)</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">--disable-errno</code> (<code class="language-plaintext highlighter-rouge">LELY_NO_ERRNO</code>):
disable support for <code class="language-plaintext highlighter-rouge">errno</code> and <code class="language-plaintext highlighter-rouge">&lt;errno.h&gt;</code>.</li>
  <li><code class="language-plaintext highlighter-rouge">--disable-malloc</code> (<code class="language-plaintext highlighter-rouge">LELY_NO_MALLOC</code>)
disable support for dynamic memory allocation.</li>
  <li><code class="language-plaintext highlighter-rouge">--disable-stdio</code> (<code class="language-plaintext highlighter-rouge">LELY_NO_STDIO</code>)
disable standard I/O support.</li>
</ul>

<p class="notice--warning"><strong>Note:</strong> <code class="language-plaintext highlighter-rouge">LELY_NO_MALLOC</code> support is preliminary and will not yet disable all
dynamic memory allocation.</p>

<p>Additionally, <code class="language-plaintext highlighter-rouge">--disable-diag</code> (<code class="language-plaintext highlighter-rouge">LELY_NO_DIAG</code>) disables the diagnostic
functions from liblely-util.</p>

<p>The NMT boot slave and configuration request services are not covered by ECSS.
They can be disabled with the new <code class="language-plaintext highlighter-rouge">--disable-nmt-boot</code> (<code class="language-plaintext highlighter-rouge">LELY_NO_CO_NMT_BOOT</code>)
and <code class="language-plaintext highlighter-rouge">--disable-nmt-cfg</code> (<code class="language-plaintext highlighter-rouge">LELY_NO_CO_NMT_CFG</code>) options, respectively. Node
guarding is also out of scope. It can be disabled with the new <code class="language-plaintext highlighter-rouge">--disable-ng</code>
(<code class="language-plaintext highlighter-rouge">LELY_NO_CO_NG</code>) option.</p>

<p>For more information, see the
<a href="/canopen/docs/configuration/">build configuration</a> documentation.</p>

<h4 id="static-object-dictionary-generator">Static object dictionary generator</h4>

<p>Disabling dynamic memory allocation prevents the generation of the object
dictionary at runtime. It also precludes the use of the static object dictionary
generated by <a href="/canopen/docs/dcf2c/"><code class="language-plaintext highlighter-rouge">dcf2c</code></a>, since that object
dictionary still needs to be converted to the real object dictionary at runtime.</p>

<p>The new <code class="language-plaintext highlighter-rouge">dcf2dev</code> tool (part of the
<a href="/canopen/docs/dcf-tools/">EDS/DCF tools</a>) can generate a
compile-time object dictionary that is directly usable by the CANopen stack.</p>

<p><strong>Note:</strong> Because of the way array values are handled, the generated object
dictionary can only be used when <code class="language-plaintext highlighter-rouge">LELY_NO_MALLOC</code> is defined.</p>

<h4 id="unit-tests">Unit tests</h4>

<p>Part of the ECSS-compliance effort is the development of a test suite that
covers 100% of the code that is in scope. This test suite is based on the
<a href="http://cpputest.github.io/">CppUTest</a> and can be found in the <code class="language-plaintext highlighter-rouge">unit-tests</code>
directory. It can be disabled with the <code class="language-plaintext highlighter-rouge">--disable-unit-tests</code> option.</p>

<h3 id="new-features">New features</h3>

<h4 id="stop-token">Stop token</h4>

<p>A stop token implementation is now provided by <code class="language-plaintext highlighter-rouge">&lt;lely/util/stop.h&gt;</code> and
<code class="language-plaintext highlighter-rouge">&lt;lely/util/stop.hpp&gt;</code>. The API is based on
<a href="https://en.cppreference.com/w/cpp/header/stop_token"><code class="language-plaintext highlighter-rouge">&lt;stop_token&gt;</code></a> in C++20.
Stop tokens provide a generic mechanism for users to cancel (sequences of)
tasks, using (global) timeouts or any other condition.
<a href="https://vorpus.org/blog/timeouts-and-cancellation-for-humans/">This blog post</a>
provides a good overview of why this is useful.</p>

<p>Support for stop tokens will be added to the asynchronous I/O library in a
future release.</p>

<h4 id="transmit-pdo-sampling-support">Transmit-PDO sampling support</h4>

<p>CiA 301 allows for a SYNC-driven Transmit-PDO to start sampling after a SYNC
message has been received (and before the synchronous window expires). It is now
possible to register a callback function with a TPDO (with
<code class="language-plaintext highlighter-rouge">co_tpdo_set_sample_ind()</code>) that implements the sampling process. Once the
process is complete, the user calls <code class="language-plaintext highlighter-rouge">co_tpdo_sample_res()</code> to report the result,
at which point the PDO is sent.</p>

<p>If the user does not register a sampling callback function, the current value of
the mapped object is sent the moment the SYNC message is received.</p>

<h4 id="multiplex-pdo-support">Multiplex PDO support</h4>

<p>Support for Multiplex PDOs (MPDOs) has been added to the Receive-PDO and
Transmit-PDO services. Both destination address mode (DAM) and source address
mode (SAM) MPDOs are supported.</p>

<p>The object dictionary supports event tracking for SAM-MPDOs. The user can call
<code class="language-plaintext highlighter-rouge">co_dev_sam_mpdo_event()</code> to indicate that an event occurred for a specific
sub-object. If that sub-object is mapped to a SAM-MPDO, the PDO will
automatically be sent. The <code class="language-plaintext highlighter-rouge">SetEvent()</code> method in the C++ CANopen application
library will invoke both <code class="language-plaintext highlighter-rouge">co_dev_tpdo_event()</code> and <code class="language-plaintext highlighter-rouge">co_dev_sam_mpdo_event()</code>, so
the user does not need to know to which type of PDO a sub-object is mapped.
DAM-MPDO events can be triggered with <code class="language-plaintext highlighter-rouge">co_dam_mpdo_event()</code> and the
<code class="language-plaintext highlighter-rouge">DamMpdoEvent()</code> method.</p>

<p>The <code class="language-plaintext highlighter-rouge">RpdoRead()</code>/<code class="language-plaintext highlighter-rouge">RpdoGet()</code> and <code class="language-plaintext highlighter-rouge">OnRpdoWrite()</code> methods treat incoming
SAM-MPDOs the same as regular PDOs. For DAM-MPDOs the originating node-ID and
object (sub-)index are unknown. To respond to an incoming DAM-MPDO, use the
<code class="language-plaintext highlighter-rouge">OnWrite()</code> callback for the local object dictionary. However, it is impossible
to distinguish between an incoming DAM-MPDO and an SDO download request.</p>

<p><code class="language-plaintext highlighter-rouge">dcfgen</code> does not yet create the object scanner and object dispatching lists
used by SAM-MPDOs. Support for SAM-MPDOs will be added in a future release.</p>

<p>MPDO support can be disabled by specifying the <code class="language-plaintext highlighter-rouge">--disable-mpdo</code> to <code class="language-plaintext highlighter-rouge">configure</code>
or by defining the <code class="language-plaintext highlighter-rouge">LELY_NO_CO_MPDO</code> preprocessor macro.</p>

<h4 id="sdo-download-dcf-requests">SDO download DCF requests</h4>

<p>It is now possible for the user to issue a series of SDO download requests in
the form of a concise DCF, either from a file or a memory region. Concise DCF
SDO requests can be generated with <code class="language-plaintext highlighter-rouge">dcfgen</code>. They were already supported as part
of the NMT configuration request sequence during the boot process, but now it is
possible to use them manually from an application.</p>

<p>The <code class="language-plaintext highlighter-rouge">co_csdo_dn_dcf_req()</code> and <code class="language-plaintext highlighter-rouge">co_dev_dn_dcf_req()</code> function can be used to
issue such requests to remote and local object dictionaries, respectively. In
the C++ CANopen application library, use the <code class="language-plaintext highlighter-rouge">WriteDcf()</code>, <code class="language-plaintext highlighter-rouge">SubmitWriteDcf()</code>
and <code class="language-plaintext highlighter-rouge">AsyncWriteDcf()</code> methods.</p>

<p>As part of the implementation, the <code class="language-plaintext highlighter-rouge">co_val_read_file()</code>/<code class="language-plaintext highlighter-rouge">co_val_read_frbuf()</code>
and <code class="language-plaintext highlighter-rouge">co_val_write_file()</code>/<code class="language-plaintext highlighter-rouge">co_val_write_fwbuf()</code> helper functions were added to
read/write a CANopen value directly to/from a file (buffer).</p>

<h4 id="other">Other</h4>

<p>Utilities library:</p>
<ul>
  <li>Re-entrant versions of the error string functions (<code class="language-plaintext highlighter-rouge">errc2str()</code>, <code class="language-plaintext highlighter-rouge">errno2str()</code>
and <code class="language-plaintext highlighter-rouge">errnum2str()</code>) are now available. Following the glibc convention, the
names of the re-entrant versions end in <code class="language-plaintext highlighter-rouge">_r</code>.</li>
  <li>The fiber implementations in the utilities library have been unified. Fibers
can now also be migrated between threads on platforms that support it.</li>
  <li>A <code class="language-plaintext highlighter-rouge">contains()</code> method has been added to all containers in the utilities
library. This method allows the user to check if a node is present in a
container.</li>
  <li>The <code class="language-plaintext highlighter-rouge">pheap_find()</code> and <code class="language-plaintext highlighter-rouge">pheap_remove()</code> methods if the pairing heap now have
a non-recursive implementation. This prevents potential stack overflows when
using those methods with large heaps.</li>
  <li>Several 16-bit Unicode string functions (<code class="language-plaintext highlighter-rouge">str16len()</code>, <code class="language-plaintext highlighter-rouge">str16ncmp()</code> and
<code class="language-plaintext highlighter-rouge">str16ncpy()</code>) are now available in <code class="language-plaintext highlighter-rouge">&lt;lely/util/ustring.h&gt;</code>. These functions
are equivalent to the corresponding standard library functions, except that
they operate on strings of type <code class="language-plaintext highlighter-rouge">char16_t</code> instead of <code class="language-plaintext highlighter-rouge">char</code>.</li>
</ul>

<p>Asynchronous I/O library:</p>
<ul>
  <li>Synchronous CAN channel operations no longer require a valid executor in the
constructor of the CAN channel. This allows synchronous operations to be used
in the absence of an event loop.</li>
  <li>The <code class="language-plaintext highlighter-rouge">ENOTSUP</code> error from RTNETLINK is now ignored when creating a CAN
controller on Linux. This enables support for SLCAN network interfaces, which
do not provide CAN bus attributes.</li>
</ul>

<p>CANopen and C++ CANopen application libraries:</p>
<ul>
  <li>All CANopen services now have <code class="language-plaintext highlighter-rouge">start()</code>, <code class="language-plaintext highlighter-rouge">stop()</code> and <code class="language-plaintext highlighter-rouge">is_stopped()</code> methods.
This allows the user to explicitly disable or enable a service after it is
created. To not break backward compatibility, services are automatically
started after they are created.</li>
  <li>SDO block transfers can now be explicitly requested in the C++ CANopen
application library. The <code class="language-plaintext highlighter-rouge">co_csdo_blk_dn_val_req()</code> has been added to the C
API to make block downloads more convenient.</li>
  <li>The new <code class="language-plaintext highlighter-rouge">co_nmt_chk_bootup()</code> can be used to check if boot-up messages have
been received for a specific node or for all mandatory nodes. This function is
available even if <code class="language-plaintext highlighter-rouge">LELY_NO_CO_NMT_BOOT</code> is defined.</li>
</ul>

<p>EDS/DCF tools:</p>
<ul>
  <li>Bare <code class="language-plaintext highlighter-rouge">$NODEID</code> values are now allowed in EDS/DCF files.</li>
  <li>Keys with empty values are now ignored in EDS/DCF files.</li>
  <li>Custom data types are now supported when using the EDS/DCF tools as a Python
module. The command-line tools ignore unknown data types.</li>
  <li><code class="language-plaintext highlighter-rouge">dcfgen</code> no longer configures the master to read sub-objects from object 1018h
on the slave that do not exist. Only sub-index 1 (Vendor-ID) is mandatory.
Sub-indices 2 (Product code), 3 (Revision number) and 4 (Serial number) are
all optional.</li>
</ul>

<p>CI/CD:</p>
<ul>
  <li>The Docker images used in the CI/CD pipeline are now documented in
<code class="language-plaintext highlighter-rouge">docker/README.md</code>.</li>
  <li>The C and C++ code style is now checked with
<a href="https://clang.llvm.org/docs/ClangFormat.html">clang-format</a> in the CI/CD
pipeline.</li>
  <li>Python code style checks have been added using
<a href="https://pypi.org/project/black/">Black</a> and
<a href="https://pypi.org/project/flake8/">Flake8</a>.</li>
</ul>

<h3 id="api-changes">API changes</h3>

<p>The C++ interface of liblely-co is deprecated and will be removed in a future
version. liblely-coapp now uses the C interface of liblely-co.</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">membuf_init()</code> now takes two extra parameters that can be used to initialize
the buffer with a pre-existing memory region. This change is necessary to
support static memory buffers when <code class="language-plaintext highlighter-rouge">LELY_NO_MALLOC</code> is defined.
<code class="language-plaintext highlighter-rouge">membuf_init(buf, NULL, 0)</code> is equivalent to the original <code class="language-plaintext highlighter-rouge">membuf_init(buf)</code>.</li>
  <li><code class="language-plaintext highlighter-rouge">can_buf_init()</code> now also takes an extra parameter that can be used to
initialize a CAN frame buffer with a pre-existing memory region. The <code class="language-plaintext highlighter-rouge">size</code>
parameter is now required to be a power of 2, instead of automatically being
rounded up. Additionally, the unused <code class="language-plaintext highlighter-rouge">can_buf_create()</code> and
<code class="language-plaintext highlighter-rouge">can_buf_destroy()</code> functions have been removed.</li>
  <li>Due to the new <code class="language-plaintext highlighter-rouge">start()</code> and <code class="language-plaintext highlighter-rouge">stop()</code> methods of CANopen services, the
existing <code class="language-plaintext highlighter-rouge">co_time_start()</code> and <code class="language-plaintext highlighter-rouge">co_time_stop()</code> functions have been renamed to
<code class="language-plaintext highlighter-rouge">co_time_start_prod()</code> and <code class="language-plaintext highlighter-rouge">co_time_stop_prod()</code>, respectively.</li>
</ul>

<h3 id="download">Download</h3>

<p>You can download the source from
<a href="https://gitlab.com/lely_industries/lely-core/-/archive/v2.3.0/lely-core-v2.3.0.zip">GitLab</a>
or the Ubuntu packages from our
<a href="https://launchpad.net/~lely/+archive/ubuntu/ppa">PPA</a>.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="release" /><summary type="html"><![CDATA[v2.3.0 has just been released. This is a major release containing several new features and a few minor API changes (see below).]]></summary></entry><entry><title type="html">New release: v2.2.6, v2.1.8 and v2.0.9</title><link href="https://opensource.lely.com/canopen/release/v2.2.6/" rel="alternate" type="text/html" title="New release: v2.2.6, v2.1.8 and v2.0.9" /><published>2021-04-06T00:00:00+02:00</published><updated>2021-04-06T00:00:00+02:00</updated><id>https://opensource.lely.com/canopen/release/v2.2.6</id><content type="html" xml:base="https://opensource.lely.com/canopen/release/v2.2.6/"><![CDATA[<p>v2.2.6, v2.1.8 and v2.0.9 have just been released. These are minor releases
containing only bugfixes and minor improvements.</p>

<h3 id="bug-fixes">Bug fixes</h3>

<p>The following bugs have been fixed in all three versions:</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">co_val_cmp()</code> now correctly compares <code class="language-plaintext highlighter-rouge">TIME_OF_DAY</code> and <code class="language-plaintext highlighter-rouge">TIME_DIFF</code> values:
the <code class="language-plaintext highlighter-rouge">days</code> member is compared before the <code class="language-plaintext highlighter-rouge">ms</code> member.</li>
  <li>A potential race condition was fixed in asynchronous I/O functions, which made
it possible in a multi-threaded environment for an asynchronous operation to
complete and release its promise before the invoking function acquired the
corresponding future.</li>
  <li>The Transmit-PDO event timer no longer stops in case of an error.</li>
  <li><code class="language-plaintext highlighter-rouge">co_sdev_load()</code> no longer causes compilation failures when
<code class="language-plaintext highlighter-rouge">LELY_NO_CO_OBJ_NAME</code> is defined.</li>
</ul>

<p>The following additional issues have been addressed in v2.2.6:</p>
<ul>
  <li>Drivers inheriting from <code class="language-plaintext highlighter-rouge">canopen::LoopDriver</code> can now use the <code class="language-plaintext highlighter-rouge">Join()</code> method
in their destructor to ensure the thread running the dedicated event loop
finishes its execution before continuing. This is necessary to guarantee that
all tasks involving registered logical drivers have finished before those
drivers are destroyed. The <code class="language-plaintext highlighter-rouge">Join()</code> method is public, so it can also be used
to synchronize the destruction of logical drivers that are not owned by the
driver inheriting from <code class="language-plaintext highlighter-rouge">LoopDriver</code>.</li>
  <li>The <code class="language-plaintext highlighter-rouge">USleep()</code> method in <code class="language-plaintext highlighter-rouge">canopen::LoopDriver</code> now uses an actual timer
instead of relying on the <code class="language-plaintext highlighter-rouge">run_for()</code> method of <code class="language-plaintext highlighter-rouge">ev::Loop</code>. This makes the
implementation consistent with <code class="language-plaintext highlighter-rouge">canopen::FiberDriver</code> and removes the 1 ms
resolution of the timeout.</li>
  <li>The <code class="language-plaintext highlighter-rouge">AsyncWait()</code> operation used by the <code class="language-plaintext highlighter-rouge">USleep()</code> method in
<code class="language-plaintext highlighter-rouge">canopen::LoopDriver</code> and <code class="language-plaintext highlighter-rouge">canopen::FiberDriver</code> is now canceled if the event
loop is interrupted.</li>
  <li><code class="language-plaintext highlighter-rouge">dcfgen</code> now copies the producer heartbeat time from object 1017h in the slave
EDS/DCF if the <code class="language-plaintext highlighter-rouge">heartbeat_producer</code> attribute is not explicitly specified.</li>
  <li><code class="language-plaintext highlighter-rouge">dcfgen</code> no longer omits the SDO request to set the number of mapped objects
to 0 before changing the PDO mapping.</li>
  <li>The <code class="language-plaintext highlighter-rouge">on_can_state()</code> method in <code class="language-plaintext highlighter-rouge">io::CanNet</code> now receives the <code class="language-plaintext highlighter-rouge">new_state</code> and
<code class="language-plaintext highlighter-rouge">old_state</code> arguments in the correct order.</li>
</ul>

<h3 id="download">Download</h3>

<p>You can download the source from
<a href="https://gitlab.com/lely_industries/lely-core/-/archive/v2.2.6/lely-core-v2.2.6.zip">GitLab</a>
or the Ubuntu packages from our
<a href="https://launchpad.net/~lely/+archive/ubuntu/ppa">PPA</a>.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="release" /><summary type="html"><![CDATA[v2.2.6, v2.1.8 and v2.0.9 have just been released. These are minor releases containing only bugfixes and minor improvements.]]></summary></entry><entry><title type="html">Lely CANopen in space</title><link href="https://opensource.lely.com/canopen/news/ESA/" rel="alternate" type="text/html" title="Lely CANopen in space" /><published>2020-12-16T00:00:00+01:00</published><updated>2020-12-16T00:00:00+01:00</updated><id>https://opensource.lely.com/canopen/news/ESA</id><content type="html" xml:base="https://opensource.lely.com/canopen/news/ESA/"><![CDATA[<p>Last year, the European Space Agency (ESA) issued an invitation to tender for
the development of an open-source implementation of the CANopen protocol
suitable for space applications. In particular, an implementation of the
<a href="https://ecss.nl/standard/ecss-e-st-50-15c-space-engineering-canbus-extension-protocol-1-may-2015/">ECSS-E-ST-50-15C - CANbus extension protocol</a>
with accompanying test suite. The Lely CANopen stack was one of the candidates
considered to be a promising starting point for such a development.
<a href="http://n7space.com/">N7 Space</a> submitted a proposal based on our stack and won
the bid. Since the beginning of this year, they have been working, with support
from <a href="https://www.lely.com/">Lely</a>, to improve and extend the stack and to
develop a comprehensive test suite. This work is carried out under a programme
of, and funded by, the European Space Agency.</p>

<p>Several of their improvements have already found their way back into recent
releases. And even more will be part of the upcoming v2.3 release. However, some
changes require us to break the backward compatibility of part of the C API. For
example, one of the ESA requirements is that the stack can be used with (almost)
no support from the standard C library. Supporting such a <em>freestanding</em>
environment, with no dynamic memory allocation, affects several public
interfaces.</p>

<p>Breaking changes warrant an increase in the major version number. For now, v3 is
under development in the <code class="language-plaintext highlighter-rouge">ecss</code> branch at
<a href="https://gitlab.com/n7space/canopen/lely-core">https://gitlab.com/n7space/canopen/lely-core</a>. The first releases mark
milestones in the ESA project. Once it is finished, the <code class="language-plaintext highlighter-rouge">ecss</code> branch will be
merged into the
<a href="https://gitlab.com/lely_industries/lely-core">official repository</a> and released
publicly, probably with version 3.3. Non-breaking changes will continue to be
merged into v2.x releases.</p>

<p class="notice--info"><strong>Disclaimer:</strong> The views expressed here can in no way be taken to reflect the
official opinion of the European Space Agency.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="news" /><summary type="html"><![CDATA[Last year, the European Space Agency (ESA) issued an invitation to tender for the development of an open-source implementation of the CANopen protocol suitable for space applications. In particular, an implementation of the ECSS-E-ST-50-15C - CANbus extension protocol with accompanying test suite. The Lely CANopen stack was one of the candidates considered to be a promising starting point for such a development. N7 Space submitted a proposal based on our stack and won the bid. Since the beginning of this year, they have been working, with support from Lely, to improve and extend the stack and to develop a comprehensive test suite. This work is carried out under a programme of, and funded by, the European Space Agency.]]></summary></entry><entry><title type="html">New release: v2.2.5, v2.1.7 and v2.0.8</title><link href="https://opensource.lely.com/canopen/release/v2.2.5/" rel="alternate" type="text/html" title="New release: v2.2.5, v2.1.7 and v2.0.8" /><published>2020-11-16T00:00:00+01:00</published><updated>2020-11-16T00:00:00+01:00</updated><id>https://opensource.lely.com/canopen/release/v2.2.5</id><content type="html" xml:base="https://opensource.lely.com/canopen/release/v2.2.5/"><![CDATA[<p>v2.2.5, v2.1.7 and v2.0.8 have just been released. These are minor releases
containing only bugfixes and minor improvements.</p>

<h3 id="bug-fixes">Bug fixes</h3>

<p>The following bugs have been fixed in all three versions:</p>
<ul>
  <li>Receive-PDO services now interpret the value of object 1007h (Synchronous
window length) as microseconds instead of milliseconds.</li>
  <li>Transmit-PDO (TPDO) services now ignore the value of object 1007h. Proper
handling of the synchronous window requires support for a user-defined
“sampling” step before transmitting PDOs. This will be added in the next
release.</li>
  <li>Acyclic (event-driven) TPDOs (transmission type 00h) now ignore the
event-timer, as specified in CiA 301.</li>
  <li>RTR-only (synchronous) TPDOs (transmission type FCh) now ignore RTR frames if
no PDO has been buffered by a previous SYNC event.</li>
  <li>An empty <code class="language-plaintext highlighter-rouge">UploadFile</code> attribute now results in an empty value instead of a
file-not-found error during an SDO upload (read) request.</li>
  <li>The <code class="language-plaintext highlighter-rouge">ev::when_all()</code> and <code class="language-plaintext highlighter-rouge">ev::when_any()</code> function overloads now distinguish
between a pair of <code class="language-plaintext highlighter-rouge">ev::Future</code>s and a pair of iterators.</li>
</ul>

<p>The following additional issues have been addressed in v2.2.5:</p>
<ul>
  <li>Some non-compliant devices never send a boot-up message, which results in the
master never starting the NMT ‘boot slave’ process for those nodes. The user
can now manually trigger the boot-up process with the <code class="language-plaintext highlighter-rouge">Boot()</code> method of the
master and driver classes.</li>
  <li>If a slave restarts during the boot-up process, the Client-SDO now remains
available for use by the application (or driver).</li>
  <li><code class="language-plaintext highlighter-rouge">canopen::BasicMaster</code> now has a protected <code class="language-plaintext highlighter-rouge">IsConfig()</code> method which can be
used to check if a remote node is configuring (i.e., i.e., the ‘update
configuration’ step of the NMT ‘boot slave’ process is reached but not yet
completed).</li>
  <li>The <code class="language-plaintext highlighter-rouge">--disable-cython</code> has been added to the <code class="language-plaintext highlighter-rouge">configure</code> script. Using this
option will disable the (deprecated) Python bindings while still allowing the
<a href="/canopen/docs/dcf-tools/">DCF tools</a> to be built.</li>
  <li><code class="language-plaintext highlighter-rouge">dcfchk</code> and <code class="language-plaintext highlighter-rouge">dcfgen</code> now correctly handle implicitly defined PDOs.</li>
  <li><code class="language-plaintext highlighter-rouge">dcfgen</code> now correctly handles objects mapped to multiple PDOs.</li>
  <li>The <code class="language-plaintext highlighter-rouge">configuration_file</code> attribute has been added to the slave section of the
YAML file used by <code class="language-plaintext highlighter-rouge">dcfgen</code>. This attribute can be used to override the name of
the configuration file for the slave as it appears in object 1F22h in
<code class="language-plaintext highlighter-rouge">master.dcf</code>. Note that it has no effect on the name of the <code class="language-plaintext highlighter-rouge">.bin</code> file
generated by <code class="language-plaintext highlighter-rouge">dcfgen</code>.</li>
  <li>Object 1F22h is omitted from <code class="language-plaintext highlighter-rouge">master.dcf</code> by <code class="language-plaintext highlighter-rouge">dcfgen</code> if no slaves use a
configuration file, either because no <code class="language-plaintext highlighter-rouge">.bin</code> files are generated or because
the <code class="language-plaintext highlighter-rouge">configuration_file</code> attribute is explicitly set to an empty string.</li>
</ul>

<h3 id="download">Download</h3>

<p>You can download the source from
<a href="https://gitlab.com/lely_industries/lely-core/-/archive/v2.2.5/lely-core-v2.2.5.zip">GitLab</a>
or the Ubuntu packages from our
<a href="https://launchpad.net/~lely/+archive/ubuntu/ppa">PPA</a>.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="release" /><summary type="html"><![CDATA[v2.2.5, v2.1.7 and v2.0.8 have just been released. These are minor releases containing only bugfixes and minor improvements.]]></summary></entry><entry><title type="html">New release: v2.2.4</title><link href="https://opensource.lely.com/canopen/release/v2.2.4/" rel="alternate" type="text/html" title="New release: v2.2.4" /><published>2020-10-14T00:00:00+02:00</published><updated>2020-10-14T00:00:00+02:00</updated><id>https://opensource.lely.com/canopen/release/v2.2.4</id><content type="html" xml:base="https://opensource.lely.com/canopen/release/v2.2.4/"><![CDATA[<p>v2.2.4 has just been released. This is a minor release containing only bugfixes.</p>

<h3 id="bug-fixes">Bug fixes</h3>

<p>The following bugs have been fixed:</p>
<ul>
  <li>Following <a href="https://en.wikipedia.org/wiki/Robustness_principle">Postel’s law</a>,
Client- and Server-SDOs now accept CAN frames less than 8 bytes if they can be
interpreted unambiguously. This is necessary to communicate with certain
less-than-compliant devices.</li>
  <li>A deadlock when reading CAN frames asynchronously on Linux, introduced in
v2.2.3, has been removed.</li>
  <li>An overload issue in the <code class="language-plaintext highlighter-rouge">submit_read_error()</code> method of <code class="language-plaintext highlighter-rouge">CanRouter</code>, which
prevented submitting instances of <code class="language-plaintext highlighter-rouge">io_can_rt_read_err</code>, has been fixed.</li>
  <li>The EDS/DCF linter in <code class="language-plaintext highlighter-rouge">dcf-tools</code> no longer complains about sub-objects with a
<code class="language-plaintext highlighter-rouge">ParameterValue</code> attribute without a <code class="language-plaintext highlighter-rouge">DefaultValue</code>.</li>
</ul>

<h3 id="download">Download</h3>

<p>You can download the source from
<a href="https://gitlab.com/lely_industries/lely-core/-/archive/v2.2.4/lely-core-v2.2.4.zip">GitLab</a>
or the Ubuntu packages from our
<a href="https://launchpad.net/~lely/+archive/ubuntu/ppa">PPA</a>.</p>]]></content><author><name>Jos Seldenthuis</name></author><category term="release" /><summary type="html"><![CDATA[v2.2.4 has just been released. This is a minor release containing only bugfixes.]]></summary></entry></feed>