diff --git a/Deployment.md b/Deployment.md
index 581440b..b93da86 100644
--- a/Deployment.md
+++ b/Deployment.md
@@ -1,6 +1,6 @@
### CAN API V3 Wrapper Library for PEAK-System PCAN® Interfaces (Windows®)
-_Copyright © 2005-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de)_ \
+_Copyright © 2005-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)_ \
_All rights reserved._
# Deployment
@@ -104,7 +104,7 @@ _All rights reserved._
- Change-log: list all major changes, e.g. from commit comments
- Assets: drag and drop the artifacts archive (see above)
3. Click on `Publish release`.
-4. That“s all folks!
+4. That's all folks!
## Announce the new Release
diff --git a/Doxygen/Doxyfile b/Doxygen/Doxyfile
index ea6f13e..83c8236 100644
--- a/Doxygen/Doxyfile
+++ b/Doxygen/Doxyfile
@@ -48,7 +48,7 @@ PROJECT_NAME = PCANBasic-Wrapper
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = v0.5
+PROJECT_NUMBER = v0.6
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/Examples/C++/can_recv.cpp b/Examples/C++/can_recv.cpp
index 7433acf..e1f9910 100644
--- a/Examples/C++/can_recv.cpp
+++ b/Examples/C++/can_recv.cpp
@@ -1,3 +1,9 @@
+//
+// can_recv.cpp
+// PCANBasic-Wrapper
+// Receive some CAN messages using the C++ API (PeakCAN.h)
+// Library: PeakCAN.dll, libPeakCAN.dylib, libpeakcan.so
+//
#ifdef _MSC_VER
//no Microsoft extensions please!
#ifndef _CRT_SECURE_NO_WARNINGS
@@ -22,7 +28,7 @@ static volatile int running = 1;
static CPeakCAN myDriver = CPeakCAN();
-int main(int argc, const char * argv[]) {
+int main(/*int argc, const char * argv[]*/) {
CANAPI_OpMode_t opMode = {};
opMode.byte = CANMODE_DEFAULT;
CANAPI_Bitrate_t bitrate = {};
@@ -65,10 +71,11 @@ int main(int argc, const char * argv[]) {
fprintf(stdout, "\n");
}
else if (retVal != CCanApi::ReceiverEmpty) {
- fprintf(stderr, "+++ error: read message returned %i\n", retVal);
+ fprintf(stderr, "+++ error: read message returned %i", retVal);
running = 0;
}
}
+ std::cout << std::endl;
teardown:
if ((retVal = myDriver.TeardownChannel()) != CCanApi::NoError)
std::cerr << "+++ error: interface could not be shutdown" << std::endl;
diff --git a/Examples/C++/can_send.cpp b/Examples/C++/can_send.cpp
index 54b9d3f..537682b 100644
--- a/Examples/C++/can_send.cpp
+++ b/Examples/C++/can_send.cpp
@@ -1,3 +1,9 @@
+//
+// can_send.cpp
+// PCANBasic-Wrapper
+// Send some CAN messages using the C API (can_api.h)
+// Library: u3canpcb.dll, libUVCANPCB.dylib, libuvcanpcb.so
+//
#ifdef _MSC_VER
//no Microsoft extensions please!
#ifndef _CRT_SECURE_NO_WARNINGS
@@ -21,7 +27,7 @@
#endif
#define FRAMES (CAN_MAX_STD_ID+1)
-int main(int argc, const char * argv[]) {
+int main(/*int argc, const char * argv[]*/) {
int handle, result, i;
can_bitrate_t bitrate;
can_message_t message;
diff --git a/Examples/Python/CANAPI.py b/Examples/Python/CANAPI.py
index c1decdd..30aec69 100644
--- a/Examples/Python/CANAPI.py
+++ b/Examples/Python/CANAPI.py
@@ -2,16 +2,17 @@
#
# CAN Interface API, Version 3 (Python Wrapper)
#
-# Copyright (c) 2005-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+# Copyright (c) 2005-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
# All rights reserved.
#
# This file is part of CAN API V3.
#
# CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License and
-# under the GNU General Public License v3.0 (or any later version). You can
+# under the GNU General Public License v2.0 (or any later version). You can
# choose between one of them if you use CAN API V3 in whole or in part.
#
-# BSD 2-Clause Simplified License:
+# (1) BSD 2-Clause "Simplified" License
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# GNU General Public License v3.0 or later:
-# CAN API V3 is free software: you can redistribute it and/or modify
+# (2) GNU General Public License v2.0 or later
+#
+# CAN API V3 is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with CAN API V3. If not, see .
+# You should have received a copy of the GNU General Public License along
+# with CAN API V3; if not, see .
#
"""
CAN API V3 Python Wrapper for generic CAN Interfaces.
@@ -54,7 +56,7 @@
$Author: quaoar $
- $Rev: 1278 $
+ $Rev: 1408 $
"""
from ctypes import *
import platform
@@ -916,5 +918,5 @@ def len2dlc(length):
# have a great time
print('Bye, bye!')
-# * $Id: CANAPI.py 1278 2024-04-23 08:34:36Z quaoar $ *** (c) UV Software, Berlin ***
+# * $Id: CANAPI.py 1408 2025-01-16 20:34:17Z quaoar $ *** (c) UV Software, Berlin ***
#
diff --git a/LICENSE.BSD-2-Clause b/LICENSE.BSD-2-Clause
index d7d391e..42b029f 100644
--- a/LICENSE.BSD-2-Clause
+++ b/LICENSE.BSD-2-Clause
@@ -1,6 +1,6 @@
BSD 2-Clause License
-Copyright (c) 2021, Uwe Vogt, UV Software
+Copyright (c) 2005-2025, Uwe Vogt, UV Software
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/LICENSE.GPL-2.0-or-later b/LICENSE.GPL-2.0-or-later
new file mode 100644
index 0000000..9efa6fb
--- /dev/null
+++ b/LICENSE.GPL-2.0-or-later
@@ -0,0 +1,338 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Moe Ghoul, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/LICENSE.GPL-3.0-or-later b/LICENSE.GPL-3.0-or-later
deleted file mode 100644
index f288702..0000000
--- a/LICENSE.GPL-3.0-or-later
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/Libraries/CANAPI/uvcanpcb.rc b/Libraries/CANAPI/uvcanpcb.rc
index 80ae685..8f6b1c2 100644
Binary files a/Libraries/CANAPI/uvcanpcb.rc and b/Libraries/CANAPI/uvcanpcb.rc differ
diff --git a/Libraries/PeakCAN/PeakCAN.rc b/Libraries/PeakCAN/PeakCAN.rc
index f6f8c3a..eaff784 100644
Binary files a/Libraries/PeakCAN/PeakCAN.rc and b/Libraries/PeakCAN/PeakCAN.rc differ
diff --git a/README.md b/README.md
index 29e2b4c..02d9f41 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
### CAN API V3 Wrapper Library for PEAK-System PCAN® Interfaces (Windows®)
-_Copyright © 2005-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)_
+_Copyright © 2005-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)_

@@ -17,7 +17,7 @@ The wrapper library is build upon Peak“s PCANBasic DLL.
```C++
/// \name PeakCAN API
-/// \brief CAN API V3 driver for PEAK-System PCAN interfaces
+/// \brief CAN API V3 Wrapper for PEAK-System PCAN Interfaces
/// \note See CCanApi for a description of the overridden methods
/// \{
class CPeakCAN : public CCanApi {
@@ -94,6 +94,7 @@ To build all 64-bit targets (x64) run the script `x64_build.bat`.
C:\Users\haumea>cd C:\Projects\CAN\Drivers\PeakCAN
C:\Projects\CAN\Drivers\PeakCAN>x64_build.bat
```
+(The version number of the libraries can be adapted by editing the `.rc` files in the corresponding subfolders. Don“t forget to set the version number also in the header file `Version.h`.)
#### uvPeakCAN (DLL)
@@ -126,7 +127,7 @@ Type `can_test /?` to display all program options.
### Development Environment
-- Microsoft Visual Studio Community 2022 (Version 17.10.5)
+- Microsoft Visual Studio Community 2022 (Version 17.12.4)
### Required PCANBasic DLL
@@ -160,7 +161,7 @@ A generic documentation of the CAN API V3 application programming interface can
### Dual-License
Except where otherwise noted, this work is dual-licensed under the terms of the BSD 2-Clause "Simplified" License
-and under the terms of the GNU General Public License v3.0 (or any later version).
+and under the terms of the GNU General Public License v2.0 (or any later version).
You can choose between one of them if you use these portions of this work in whole or in part.
### Trademarks
diff --git a/Sources/CANAPI/.gitignore b/Sources/CANAPI/.gitignore
index c30c556..cfaf4b6 100644
--- a/Sources/CANAPI/.gitignore
+++ b/Sources/CANAPI/.gitignore
@@ -1,4 +1,6 @@
.svn
+# Not realized yet
+CANIPC_Message.h
# we don't use the JSON files yet
can_dev.?
vanilla.?
diff --git a/Sources/CANAPI/CANAPI.h b/Sources/CANAPI/CANAPI.h
index 3343c3c..02ec152 100644
--- a/Sources/CANAPI/CANAPI.h
+++ b/Sources/CANAPI/CANAPI.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Interface Definition)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
-// You can choose between one of them if you use this file.
+// and under the GNU General Public License v2.0 (or any later version). You can
+// choose between one of them if you use CAN API V3 in whole or in part.
+//
+// (1) BSD 2-Clause "Simplified" License
//
-// BSD 2-Clause "Simplified" License:
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
/// \file CANAPI.h
//
@@ -73,9 +75,9 @@
/// zero to compile your program with the CAN API source files or to
/// link your program with the static library at compile-time.
///
-/// \author $Author: quaoar $
+/// \author $Author: makemake $
//
-/// \version $Rev: 1294 $
+/// \version $Rev: 1407 $
//
/// \defgroup can_api CAN Interface API, Version 3
/// \{
@@ -536,4 +538,4 @@ class CANCPP CCanApi {
/// \}
#endif // CANAPI_H_INCLUDED
/// \}
-// $Id: CANAPI.h 1294 2024-05-16 19:50:25Z quaoar $ Copyright (c) UV Software //
+// $Id: CANAPI.h 1407 2025-01-15 21:08:44Z makemake $ Copyright (c) UV Software //
diff --git a/Sources/CANAPI/CANAPI_Defines.h b/Sources/CANAPI/CANAPI_Defines.h
index 670dbfb..4c6f09a 100644
--- a/Sources/CANAPI/CANAPI_Defines.h
+++ b/Sources/CANAPI/CANAPI_Defines.h
@@ -1,17 +1,18 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (Definitions and Options)
*
- * Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+ * Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of CAN API V3.
*
* CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version).
- * You can choose between one of them if you use this file.
+ * and under the GNU General Public License v2.0 (or any later version). You can
+ * choose between one of them if you use CAN API V3 in whole or in part.
+ *
+ * (1) BSD 2-Clause "Simplified" License
*
- * BSD 2-Clause "Simplified" License:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * CAN API V3 is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * CAN API V3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CAN API V3 is distributed in the hope that it will be useful,
@@ -42,16 +44,16 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with CAN API V3. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with CAN API V3; if not, see .
*/
/** @file CANAPI_Defines.h
*
* @brief CAN API V3 for generic CAN Interfaces - Definitions and Options
*
- * @author $Author: quaoar $
+ * @author $Author: makemake $
*
- * @version $Rev: 1293 $
+ * @version $Rev: 1407 $
*
* @addtogroup can_api
* @{
@@ -155,7 +157,7 @@ extern "C" {
#define CAN_API_AUTHOR "Uwe Vogt, UV Software"
#define CAN_API_WEBSITE "www.uv-software.com"
#define CAN_API_CONTACT "info@uv-software.com"
-#define CAN_API_LICENSE "BSD-2-Clause OR GPL-3.0-or-later"
+#define CAN_API_LICENSE "BSD-2-Clause OR GPL-2.0-or-later"
#define CAN_API_COPYRIGHT "Copyright (c) 2004-20%02u, UV Software, Berlin"
#define CAN_API_HAZARD_NOTE "If you connect your CAN device to a real CAN network when using this library,\n" \
"you might damage your application."
diff --git a/Sources/CANAPI/CANAPI_Types.h b/Sources/CANAPI/CANAPI_Types.h
index c2f72e0..4af8126 100644
--- a/Sources/CANAPI/CANAPI_Types.h
+++ b/Sources/CANAPI/CANAPI_Types.h
@@ -1,17 +1,18 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (Data Types and Defines)
*
- * Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+ * Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of CAN API V3.
*
* CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version).
- * You can choose between one of them if you use this file.
+ * and under the GNU General Public License v2.0 (or any later version). You can
+ * choose between one of them if you use CAN API V3 in whole or in part.
+ *
+ * (1) BSD 2-Clause "Simplified" License
*
- * BSD 2-Clause "Simplified" License:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * CAN API V3 is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * CAN API V3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with CAN API V3. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with CAN API V3; if not, see .
*/
/** @file CANAPI_Types.h
*
@@ -51,7 +53,7 @@
*
* @author $Author: makemake $
*
- * @version $Rev: 1356 $
+ * @version $Rev: 1407 $
*
* @addtogroup can_api
* @{
@@ -264,8 +266,10 @@ extern "C" {
#define CANERR_LEC_CRC (-16) /**< LEC - checksum error */
#define CANERR_RESERVED1 (-19) /**< RIP - error frame */
#define CANERR_TX_BUSY (-20) /**< USR - transmitter busy */
+#define CANERR_RESERVED2 (-21) /**< N/A - macCAN specific */
#define CANERR_RX_EMPTY (-30) /**< USR - receiver empty */
#define CANERR_QUE_OVR (-40) /**< USR - queue overrun */
+#define CANERR_RESERVED3 (-41) /**< N/A - macCAN specific */
#define CANERR_TIMEOUT (-50) /**< USR - time-out */
#define CANERR_RESOURCE (-90) /**< USR - resource allocation */
#define CANERR_BAUDRATE (-91) /**< USR - illegal baudrate */
@@ -362,7 +366,7 @@ extern "C" {
#define CANPROP_SET_TRACE_FOLDER 57U /**< set trace file folder location (directory only) (char[]) */
#define CANPROP_SET_TRACE_TYPE 58U /**< set trace file type (for possible values see below) (uint8_t) */
#define CANPROP_SET_TRACE_MODE 59U /**< set trace file mode (for possible options see below) (uint16_t) */
-#define CANPROP_SET_TRACE_SIZE 60U /**< set trace file segment size (in 10 KB steps, 0 = 100MB) (uint 16_t) */
+#define CANPROP_SET_TRACE_SIZE 60U /**< set trace file segment size (in 10 KB steps, 0 = 100MB) (uint16_t) */
#if (OPTION_CANAPI_LIBRARY != 0)
/* - - build-in bit-rate conversion - - - - - - - - - - - - - - - - - */
#define CANPROP_GET_BTR_INDEX 64U /**< bit-rate as CiA index (int32_t) */
@@ -450,16 +454,17 @@ extern "C" {
#define CANPARA_TRACE_TYPE_VENDOR 0x80U /**< trace file: vendor-specific */
/* - - trace file mode - - - - - - - - - - - - - - - - - - - - - - - - */
#define CANPARA_TRACE_MODE_DEFAULT 0x0000U /**< trace file: default (create/append) */
-#define CANPARA_TRACE_MODE_OVERWRITE 0x80U /**< trace file: overwrite existing */
+#define CANPARA_TRACE_MODE_OVERWRITE 0x80U /**< trace file: overwrite existing/create */
#define CANPARA_TRACE_MODE_SEGMENTED 0x01U /**< trace file: segmented trace file */
#define CANPARA_TRACE_MODE_COMPRESSED 0x40U /**< trace file: compressed trace file */
#define CANPARA_TRACE_MODE_PREFIX_DATE 0x02U /**< trace file: date as file name prefix */
#define CANPARA_TRACE_MODE_PREFIX_TIME 0x04U /**< trace file: time as file name prefix */
#define CANPARA_TRACE_MODE_OUTPUT_DLC 0x000U /**< trace file: length as Data Length Code */
#define CANPARA_TRACE_MODE_OUTPUT_LEN 0x100U /**< trace file: length as LENGTH in bytes */
-#define CANPARA_TRACE_MODE_OUTPUT_HEX 0x000U /**< trace file: Id., length and data as HEX */
-#define CANPARA_TRACE_MODE_OUTPUT_DEC 0x200U /**< trace file: Id., length and data as DEC */
-#define CANPARA_TRACE_MODE_CUSTOM_NAME 0x8000U /**< trace file: use of custom file name (basename and extension) */
+/* - - trace file size - - - - - - - - - - - - - - - - - - - - - - - - */
+#define CANPARA_TRACE_SIZE_DEFAULT 1024U /**< trace file: default segment size (in [10 * KB]) */
+#define CANPARA_TRACE_SIZE_LIMIT 62500U /**< trace file: maximum segment size (in [10 * KB]) */
+#define CANPARA_TRACE_SIZE_10KB 10240L /**< trace file: size factor(in [KB]) */
/* - - message formatter - - - - - - - - - - - - - - - - - - - - - - - */
#define CANPARA_FORMAT_DEFAULT 0 /**< message formatter output (default) */
/* - - formatter option: ON or OFF - - - - - - - - - - - - - - - - - - */
diff --git a/Sources/CANAPI/CANAPI_Version.h b/Sources/CANAPI/CANAPI_Version.h
new file mode 100644
index 0000000..4b43b95
--- /dev/null
+++ b/Sources/CANAPI/CANAPI_Version.h
@@ -0,0 +1,74 @@
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
+/*
+ * CAN Interface API, Version 3 (Data Types and Defines)
+ *
+ * Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+ * All rights reserved.
+ *
+ * This file is part of CAN API V3.
+ *
+ * CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
+ * and under the GNU General Public License v2.0 (or any later version). You can
+ * choose between one of them if you use CAN API V3 in whole or in part.
+ *
+ * (1) BSD 2-Clause "Simplified" License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * CAN API V3 IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * (2) GNU General Public License v2.0 or later
+ *
+ * CAN API V3 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * CAN API V3 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with CAN API V3; if not, see .
+ */
+/** @file CANAPI_Version.h
+ *
+ * @brief CAN API V3 for generic CAN Interfaces - Version Number
+ *
+ * @note This is only a dummy file to have a SVN revision number.
+ *
+ * @author $Author: makemake $
+ *
+ * @version $Rev: 1407 $
+ *
+ * @addtogroup can_api
+ * @{
+ */
+#ifndef CANAPI_VERSION_H_INCLUDED
+#define CANAPI_VERSION_H_INCLUDED
+// SVN revision number (update with each commit: III)
+#define CAN_API_REV "$Rev: 1407 $"
+#endif /* CANAPI_VERSION_H_INCLUDED */
+/** @}
+ */
+/* ----------------------------------------------------------------------
+ * Uwe Vogt, UV Software, Chausseestrasse 33 A, 10115 Berlin, Germany
+ * Tel.: +49-30-46799872, Fax: +49-30-46799873, Mobile: +49-170-3801903
+ * E-Mail: uwe.vogt@uv-software.de, Homepage: https://www.uv-software.de
+ */
diff --git a/Sources/CANAPI/CANBTR_Defaults.h b/Sources/CANAPI/CANBTR_Defaults.h
index b9a6cd3..52b77fb 100644
--- a/Sources/CANAPI/CANBTR_Defaults.h
+++ b/Sources/CANAPI/CANBTR_Defaults.h
@@ -1,17 +1,18 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (Definitions and Options)
*
- * Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+ * Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of CAN API V3.
*
* CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version).
- * You can choose between one of them if you use this file.
+ * and under the GNU General Public License v2.0 (or any later version). You can
+ * choose between one of them if you use CAN API V3 in whole or in part.
+ *
+ * (1) BSD 2-Clause "Simplified" License
*
- * BSD 2-Clause "Simplified" License:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * CAN API V3 is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * CAN API V3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CAN API V3 is distributed in the hope that it will be useful,
@@ -42,16 +44,16 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with CAN API V3. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with CAN API V3; if not, see .
*/
/** @file CANBTR_Defines.h
*
* @brief CAN API V3 for generic CAN Interfaces - Definitions and Options
*
- * @author $Author: eris $
+ * @author $Author: makemake $
*
- * @version $Rev: 1270 $
+ * @version $Rev: 1407 $
*
* @addtogroup can_btr
* @{
diff --git a/Sources/CANAPI/LICENSE.BSD-2-Clause b/Sources/CANAPI/LICENSE.BSD-2-Clause
index f16dfd4..42b029f 100644
--- a/Sources/CANAPI/LICENSE.BSD-2-Clause
+++ b/Sources/CANAPI/LICENSE.BSD-2-Clause
@@ -1,6 +1,6 @@
BSD 2-Clause License
-Copyright (c) 2004-2024, Uwe Vogt, UV Software
+Copyright (c) 2005-2025, Uwe Vogt, UV Software
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/Sources/CANAPI/LICENSE.GPL-2.0-or-later b/Sources/CANAPI/LICENSE.GPL-2.0-or-later
new file mode 100644
index 0000000..9efa6fb
--- /dev/null
+++ b/Sources/CANAPI/LICENSE.GPL-2.0-or-later
@@ -0,0 +1,338 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Moe Ghoul, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/Sources/CANAPI/LICENSE.GPL-3.0-or-later b/Sources/CANAPI/LICENSE.GPL-3.0-or-later
deleted file mode 100644
index f288702..0000000
--- a/Sources/CANAPI/LICENSE.GPL-3.0-or-later
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/Sources/CANAPI/README.md b/Sources/CANAPI/README.md
index fa9440c..679426f 100644
--- a/Sources/CANAPI/README.md
+++ b/Sources/CANAPI/README.md
@@ -1,10 +1,8 @@
### CAN Interface API, Version 3
-_Copyright © 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)_ \
+_Copyright © 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)_ \
_All rights reserved._
-Version $Rev: 1356 $
-
# A CAN Interface Wrapper Specification
Originally, the CAN Interface API was based on a CAN interface definition as part of a microcontroller hardware abstraction layer for an 82527-compatible on-chip CAN controller.
@@ -77,7 +75,7 @@ The implementation is using [vanilla-json](https://github.com/uv-software/vanill
### Dual-License
-This work is dual-licensed under the terms of the BSD 2-Clause "Simplified" License and under the terms of the GNU General Public License v3.0 (or any later version).
+This work is dual-licensed under the terms of the BSD 2-Clause "Simplified" License and under the terms of the GNU General Public License v2.0 (or any later version).
You can choose between one of them if you use this work in whole or in part.
### Contact
diff --git a/Sources/CANAPI/can_api.h b/Sources/CANAPI/can_api.h
index f2ed3e2..83e5084 100644
--- a/Sources/CANAPI/can_api.h
+++ b/Sources/CANAPI/can_api.h
@@ -1,17 +1,18 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (generic)
*
- * Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+ * Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of CAN API V3.
*
* CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version).
- * You can choose between one of them if you use this file.
+ * and under the GNU General Public License v2.0 (or any later version). You can
+ * choose between one of them if you use CAN API V3 in whole or in part.
+ *
+ * (1) BSD 2-Clause "Simplified" License
*
- * BSD 2-Clause "Simplified" License:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * CAN API V3 is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * CAN API V3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CAN API V3 is distributed in the hope that it will be useful,
@@ -42,16 +44,16 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with CAN API V3. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with CAN API V3; if not, see .
*/
/** @file can_api.h
*
* @brief CAN API V3 for generic CAN Interfaces
*
- * @author $Author: quaoar $
+ * @author $Author: makemake $
*
- * @version $Rev: 1286 $
+ * @version $Rev: 1407 $
*
* @defgroup can_api CAN Interface API, Version 3
* @{
diff --git a/Sources/CANAPI/can_btr.c b/Sources/CANAPI/can_btr.c
index 315ff75..1c2447f 100644
--- a/Sources/CANAPI/can_btr.c
+++ b/Sources/CANAPI/can_btr.c
@@ -1,17 +1,18 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (Bit-rate Conversion)
*
- * Copyright (c) 2017-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+ * Copyright (c) 2017-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of CAN API V3.
*
* CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version).
- * You can choose between one of them if you use this file.
+ * and under the GNU General Public License v2.0 (or any later version). You can
+ * choose between one of them if you use CAN API V3 in whole or in part.
+ *
+ * (1) BSD 2-Clause "Simplified" License
*
- * BSD 2-Clause "Simplified" License:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * CAN API V3 is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * CAN API V3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with CAN API V3. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with CAN API V3; if not, see .
*/
/** @file can_btr.c
*
@@ -55,9 +57,9 @@
* | SJW | BRP |SAM| TSEG2 | TSEG1 |
* +-7-+-6-+-5-+---+---+---+---+-0-+-7-+-6-+---+-4-+-3-+---+---+-0-+
*
- * @author $Author: eris $
+ * @author $Author: makemake $
*
- * @version $Rev: 1270 $
+ * @version $Rev: 1407 $
*
* @addtogroup can_btr
* @{
diff --git a/Sources/CANAPI/can_btr.h b/Sources/CANAPI/can_btr.h
index e7ddeaa..45adfe8 100644
--- a/Sources/CANAPI/can_btr.h
+++ b/Sources/CANAPI/can_btr.h
@@ -1,17 +1,18 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (Bit-rate Conversion)
*
- * Copyright (c) 2017-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+ * Copyright (c) 2017-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of CAN API V3.
*
* CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version).
- * You can choose between one of them if you use this file.
+ * and under the GNU General Public License v2.0 (or any later version). You can
+ * choose between one of them if you use CAN API V3 in whole or in part.
+ *
+ * (1) BSD 2-Clause "Simplified" License
*
- * BSD 2-Clause "Simplified" License:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * CAN API V3 is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * CAN API V3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CAN API V3 is distributed in the hope that it will be useful,
@@ -42,16 +44,16 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with CAN API V3. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with CAN API V3; if not, see .
*/
/** @file can_btr.h
*
* @brief CAN API V3 for generic CAN Interfaces (Bit-rate Conversion)
*
- * @author $Author: eris $
+ * @author $Author: makemake $
*
- * @version $Rev: 1270 $
+ * @version $Rev: 1407 $
*
* @defgroup can_btr CAN Bit-rate Conversion
* @{
diff --git a/Sources/CANAPI/can_msg.c b/Sources/CANAPI/can_msg.c
index 32dc54b..6cf08e3 100644
--- a/Sources/CANAPI/can_msg.c
+++ b/Sources/CANAPI/can_msg.c
@@ -1,17 +1,18 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (Message Formatter)
*
- * Copyright (c) 2019-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+ * Copyright (c) 2019-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of CAN API V3.
*
* CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version).
- * You can choose between one of them if you use this file.
+ * and under the GNU General Public License v2.0 (or any later version). You can
+ * choose between one of them if you use CAN API V3 in whole or in part.
+ *
+ * (1) BSD 2-Clause "Simplified" License
*
- * BSD 2-Clause "Simplified" License:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * CAN API V3 is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * CAN API V3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CAN API V3 is distributed in the hope that it will be useful,
@@ -42,16 +44,16 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with CAN API V3. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with CAN API V3; if not, see .
*/
/** @file can_msg.c
*
* @brief CAN Message Formatter
*
- * @author $Author: eris $
+ * @author $Author: makemake $
*
- * @version $Rev: 1270 $
+ * @version $Rev: 1407 $
*
* @addtogroup can_msg
* @{
@@ -689,6 +691,8 @@ int msg_set_fmt_tx_prompt(const char *option)
static void format_time(char *string, const msg_message_t *message)
{
static msg_timestamp_t laststamp = { 0, 0 };
+ static int first = 1;
+
struct timespec difftime;
struct tm tm; time_t t;
char timestring[25];
@@ -700,7 +704,8 @@ static void format_time(char *string, const msg_message_t *message)
switch (msg_option.time_stamp) {
case MSG_FMT_TIMESTAMP_RELATIVE:
case MSG_FMT_TIMESTAMP_ZERO:
- if (laststamp.tv_sec == 0) { /* first init */
+ if (first) { /* first time-stamp received */
+ first = 0;
laststamp.tv_sec = message->timestamp.tv_sec;
laststamp.tv_nsec = message->timestamp.tv_nsec;
}
@@ -710,7 +715,7 @@ static void format_time(char *string, const msg_message_t *message)
difftime.tv_sec -= 1;
difftime.tv_nsec += 1000000000;
}
- if (difftime.tv_sec < 0) {
+ if (difftime.tv_sec < 0) { /* FIXME: why shouldn't it be negative? */
difftime.tv_sec = 0;
difftime.tv_nsec = 0;
}
diff --git a/Sources/CANAPI/can_msg.h b/Sources/CANAPI/can_msg.h
index 796d79f..0674e44 100644
--- a/Sources/CANAPI/can_msg.h
+++ b/Sources/CANAPI/can_msg.h
@@ -1,17 +1,18 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (Message Formatter)
*
- * Copyright (c) 2019-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+ * Copyright (c) 2019-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of CAN API V3.
*
* CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version).
- * You can choose between one of them if you use this file.
+ * and under the GNU General Public License v2.0 (or any later version). You can
+ * choose between one of them if you use CAN API V3 in whole or in part.
+ *
+ * (1) BSD 2-Clause "Simplified" License
*
- * BSD 2-Clause "Simplified" License:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * CAN API V3 is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * CAN API V3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with CAN API V3. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with CAN API V3; if not, see .
*/
/** @file can_msg.h
*
@@ -51,7 +53,7 @@
*
* @author $Author: makemake $
*
- * @version $Rev: 1355 $
+ * @version $Rev: 1407 $
*
* @defgroup can_msg CAN Message Formatter
* @{
diff --git a/Sources/PCANBasic/PCANBasic.h b/Sources/PCANBasic/PCANBasic.h
index 5ef917c..8bd4167 100644
--- a/Sources/PCANBasic/PCANBasic.h
+++ b/Sources/PCANBasic/PCANBasic.h
@@ -8,7 +8,7 @@
//
// ------------------------------------------------------------------
// Author : Keneth Wagner
-// Last change: 2024-01-26
+// Last change: 2024-09-24
//
// Language: ANSI-C
// ------------------------------------------------------------------
@@ -185,6 +185,7 @@
#define PCAN_DEVICE_PART_NUMBER 0x2DU // Get the part number associated to a device
#define PCAN_HARD_RESET_STATUS 0x2EU // Activation status of hard reset processing via CAN_Reset calls
#define PCAN_LAN_CHANNEL_DIRECTION 0x2FU // Communication direction of a PCAN-Channel representing a PCAN-LAN interface
+#define PCAN_DEVICE_GUID 0x30U // Get the global unique device identifier (GUID) associated to a device
// DEPRECATED parameters
//
@@ -251,6 +252,7 @@
#define LOOKUP_DEVICE_ID __T("deviceid") // Lookup channel by device id
#define LOOKUP_CONTROLLER_NUMBER __T("controllernumber") // Lookup channel by CAN controller 0-based index
#define LOOKUP_IP_ADDRESS __T("ipaddress") // Lookup channel by IP address (LAN channels only)
+#define LOOKUP_DEVICE_GUID __T("deviceguid") // Lookup channel by device unique identifier (USB channels only)
// Frame Type / Initialization Mode
//
diff --git a/Sources/PCANBasic/PCANBasic_enu.chm b/Sources/PCANBasic/PCANBasic_enu.chm
deleted file mode 100644
index 604f191..0000000
Binary files a/Sources/PCANBasic/PCANBasic_enu.chm and /dev/null differ
diff --git a/Sources/PCANBasic/ReadMe.txt b/Sources/PCANBasic/ReadMe.txt
new file mode 100644
index 0000000..6286055
--- /dev/null
+++ b/Sources/PCANBasic/ReadMe.txt
@@ -0,0 +1,163 @@
+===============================================================================
+ReadMe.txt
+
+PCAN-Basic V4.10.0.964
+Copyright (c) 2024 PEAK-System Technik GmbH Darmstadt, Germany
+All rights reserved.
+===============================================================================
+
+Maximize the Notepad Window to read this file more easily.
+
+
+Contents:
+---------
+ * Introduction
+ * System Requirements
+ * Rights to use these files
+ * Contents of this directory
+ * Installation of PCAN hardware
+ * How to contact PEAK-System Technik GmbH
+ * LIFE SUPPORT APPLIANCES
+
+
+Introduction
+------------
+The PCAN system of the company PEAK-System Technik GmbH consists of a
+collection of Windows Device Drivers. These allow the Real-time connection of
+Windows applications to all CAN busses that are physically connected to the PC
+via a PCAN hardware.
+
+PCAN-Basic is a simple programming interface to the PCAN system. Via one
+Interface DLL it is possible to connect own applications to the Device drivers
+and the PCAN hardware, to communicate with the CAN busses.
+
+The provided drivers, the PCAN-Basic API, and the PCAN-View CAN bus Monitor
+software are the feature-reduced versions of the larger software packages
+PCAN-Developer or PCAN-Explorer. These can be aquired separately.
+
+
+Rights to use these files
+-------------------------
+Please read the End User License Agreement of the company PEAK-System Technik GmbH at:
+www.peak-system.com/quick/eula
+
+PEAK-System Technik GmbH grants the right to the customer to use the files in
+this software package as long as this is done in connection with original
+hardware by PEAK-System or OEM hardware coming from PEAK-System. It is NOT
+allowed to use any of these files (even not parts) with third-party hardware.
+
+If you are not sure whether you have acquired an appropriate license with the
+used hardware, please contact our technical support team (support@peak-system.com).
+
+
+System Requirements
+-------------------
+- Operating systems: Windows 11 (x64/ARM64), Windows 10 (x64)
+
+
+Contents of this directory
+--------------------------
+ReadMe.txt
+ This text file.
+
+LiesMich.txt
+ This text file in German language.
+
+PCANBasic_enu.chm
+ The PCAN-Basic documentation in English.
+
+PCANBasic_deu.chm
+ The PCAN-Basic documentation in German.
+
+PCAN-Parameter_Documentation.pdf
+ Additional documentation about PCAN-Basic Get/Set parameters in English.
+
+\Include
+ - The Header files for different programming languages and development
+ environments.
+
+\x86
+ - Contains the 32-bit (x86) interface DLL and an x86 demo application (exe).
+
+ \BB_LIB
+ x86 LIB file for C++ Builder.
+
+ \VC_LIB
+ x86 LIB file for Visual C/C++.
+
+\x64
+ - Contains the 64-bit (x64) interface DLL and an x64 demo application (exe).
+
+ \VC_LIB
+ x64 LIB file for Visual C/C++.
+
+\ARM64
+ - Contains the ARM64 interface DLL and an ARM64 demo application (exe).
+
+ \VC_LIB
+ ARM64 LIB file for Visual C/C++
+
+\Samples
+ - Contains example files that demonstrate the use of the PCAN-Basic API in
+ different programming languages and development environments.
+
+\NuGet
+ - Contains the PCAN-Basic.NET assembly NuGet package.
+
+
+Installation of PCAN hardware
+-----------------------------
+For information on installing PCAN hardware, please refer to the corresponding
+hardware user manual. These manuals are accessible online at:
+www.peak-system.com/quick/Documentation.
+
+The target system requires to have the PCANBasic.dll library installed in order
+to be able to run applications that use this API. There are two ways to get this
+library installed on a system:
+ 1. Via "Device Driver Setup" (recommended): The same application used for device
+ driver installation can also install this library. It can be downloaded using
+ the following link: www.peak-system.com/quick/DrvSetup.
+ 2. Copying the library manually: Copy the library files contained in this package
+ to the target system as follow:
+
+ For x64 Windows systems:
+ \x86\PCANBasic.dll --> Windows\SysWOW64
+ \x64\PCANBasic.dll --> Windows\System32
+
+ For ARM64 Windows systems:
+ \x86\PCANBasic.dll --> Windows\SysWOW64
+ \x64\PCANBasic.dll --> Application folder (x64 applications)
+ \ARM64\PCANBasic.dll --> Application folder (ARM64 applications)
+
+
+Installation of the NuGet Package
+---------------------------------
+Performing an online or offline installation of the NuGet package for Microsoft
+Visual Studio or Visual Studio Code is described in the documentation of the
+PCAN-Basic.NET Assembly at https://docs.peak-system.com/API/PCAN-Basic.Net/,
+in chapter "Introduction\How-To's and Q&A's".
+
+
+How to contact PEAK-System Technik GmbH
+---------------------------------------
+If you have any questions concerning the installation of PCAN hardware, or
+require information about other PEAK CAN products, then please contact us:
+
+PEAK-System Technik GmbH
+Darmstadt, Germany
+
+Tel. +49 6151 / 8173-20
+FAX +49 6151 / 8173-29
+
+support@peak-system.com
+http://www.peak-system.com
+
+
+LIFE SUPPORT APPLIANCES
+-----------------------
+These products are not designed for use in life support appliances, devices,
+or systems where malfunction of these products can reasonably be expected to
+result in personal injury. PEAK-System customers using or selling these
+products for use in such applications do so at their own risk and agree to
+fully indemnify PEAK-System for any damages resulting from such improper use
+or sale.
diff --git a/Sources/PCANBasic/x64/PCANBasic.lib b/Sources/PCANBasic/x64/PCANBasic.lib
index 13b52e1..e7e4f61 100644
Binary files a/Sources/PCANBasic/x64/PCANBasic.lib and b/Sources/PCANBasic/x64/PCANBasic.lib differ
diff --git a/Sources/PCANBasic/x86/PCANBasic.lib b/Sources/PCANBasic/x86/PCANBasic.lib
index 8b8e9ab..f88571b 100644
Binary files a/Sources/PCANBasic/x86/PCANBasic.lib and b/Sources/PCANBasic/x86/PCANBasic.lib differ
diff --git a/Sources/PeakCAN.cpp b/Sources/PeakCAN.cpp
index ac07ecd..de9163a 100644
--- a/Sources/PeakCAN.cpp
+++ b/Sources/PeakCAN.cpp
@@ -1,18 +1,19 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces)
//
// Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen
-// Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com)
+// Copyright (c) 2013-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of PCANBasic-Wrapper.
//
// PCANBasic-Wrapper is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version). You can
+// and under the GNU General Public License v2.0 (or any later version). You can
// choose between one of them if you use PCANBasic-Wrapper in whole or in part.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -32,10 +33,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF PCANBasic-Wrapper, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// PCANBasic-Wrapper is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// PCANBasic-Wrapper is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// PCANBasic-Wrapper is distributed in the hope that it will be useful,
@@ -43,8 +45,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with PCANBasic-Wrapper. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with PCANBasic-Wrapper; if not, see .
//
#ifdef _MSC_VER
//no Microsoft extensions please!
diff --git a/Sources/PeakCAN.h b/Sources/PeakCAN.h
index 5a0d59c..4948283 100644
--- a/Sources/PeakCAN.h
+++ b/Sources/PeakCAN.h
@@ -1,18 +1,19 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces)
//
// Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen
-// Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com)
+// Copyright (c) 2013-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of PCANBasic-Wrapper.
//
// PCANBasic-Wrapper is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version). You can
+// and under the GNU General Public License v2.0 (or any later version). You can
// choose between one of them if you use PCANBasic-Wrapper in whole or in part.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -32,10 +33,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF PCANBasic-Wrapper, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// PCANBasic-Wrapper is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// PCANBasic-Wrapper is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// PCANBasic-Wrapper is distributed in the hope that it will be useful,
@@ -43,8 +45,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with PCANBasic-Wrapper. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with PCANBasic-Wrapper; if not, see .
//
#ifndef PEAKCAN_H_INCLUDED
#define PEAKCAN_H_INCLUDED
@@ -59,14 +61,14 @@
#define PEAKCAN_LIBRARY_ID CANLIB_PCANBASIC
#define PEAKCAN_LIBRARY_NAME CANDLL_PCANBASIC
#define PEAKCAN_LIBRARY_VENDOR "UV Software, Berlin"
-#define PEAKCAN_LIBRARY_LICENSE "BSD-2-Clause OR GPL-3.0-or-later"
-#define PEAKCAN_LIBRARY_COPYRIGHT "Copyright (c) 2005-2024 by Uwe Vogt, UV Software, Berlin"
+#define PEAKCAN_LIBRARY_LICENSE "BSD-2-Clause OR GPL-2.0-or-later"
+#define PEAKCAN_LIBRARY_COPYRIGHT "Copyright (c) 2005-2025 by Uwe Vogt, UV Software, Berlin"
#define PEAKCAN_LIBRARY_HAZARD_NOTE "If you connect your CAN device to a real CAN network when using this library,\n" \
"you might damage your application."
/// \}
/// \name PeakCAN API
-/// \brief CAN API V3 driver for PEAK-System PCAN interfaces
+/// \brief CAN API V3 Wrapper for PEAK-System PCAN Interfaces
/// \note See CCanApi for a description of the overridden methods
/// \{
class CANCPP CPeakCAN : public CCanApi {
diff --git a/Sources/PeakCAN_Defaults.h b/Sources/PeakCAN_Defaults.h
index 5b66d28..5015dd9 100644
--- a/Sources/PeakCAN_Defaults.h
+++ b/Sources/PeakCAN_Defaults.h
@@ -1,18 +1,19 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces)
*
* Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen
- * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com)
+ * Copyright (c) 2013-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of PCANBasic-Wrapper.
*
* PCANBasic-Wrapper is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version). You can
+ * and under the GNU General Public License v2.0 (or any later version). You can
* choose between one of them if you use PCANBasic-Wrapper in whole or in part.
*
- * BSD 2-Clause "Simplified" License:
+ * (1) BSD 2-Clause "Simplified" License
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -32,10 +33,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF PCANBasic-Wrapper, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * PCANBasic-Wrapper is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * PCANBasic-Wrapper is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* PCANBasic-Wrapper is distributed in the hope that it will be useful,
@@ -43,8 +45,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with PCANBasic-Wrapper. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with PCANBasic-Wrapper; if not, see .
*/
/** @addtogroup can_btr
* @{
diff --git a/Sources/PeakCAN_Defines.h b/Sources/PeakCAN_Defines.h
index 608c43e..883eb93 100644
--- a/Sources/PeakCAN_Defines.h
+++ b/Sources/PeakCAN_Defines.h
@@ -1,18 +1,19 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces)
*
* Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen
- * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com)
+ * Copyright (c) 2013-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of PCANBasic-Wrapper.
*
* PCANBasic-Wrapper is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version). You can
+ * and under the GNU General Public License v2.0 (or any later version). You can
* choose between one of them if you use PCANBasic-Wrapper in whole or in part.
*
- * BSD 2-Clause "Simplified" License:
+ * (1) BSD 2-Clause "Simplified" License
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -32,10 +33,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF PCANBasic-Wrapper, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * PCANBasic-Wrapper is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * PCANBasic-Wrapper is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* PCANBasic-Wrapper is distributed in the hope that it will be useful,
@@ -43,8 +45,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with PCANBasic-Wrapper. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with PCANBasic-Wrapper; if not, see .
*/
/** @addtogroup can_api
* @{
diff --git a/Sources/Version.h b/Sources/Version.h
index 6c88d6e..9787684 100644
--- a/Sources/Version.h
+++ b/Sources/Version.h
@@ -1,18 +1,19 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces)
*
* Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen
- * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com)
+ * Copyright (c) 2013-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of PCANBasic-Wrapper.
*
* PCANBasic-Wrapper is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version). You can
+ * and under the GNU General Public License v2.0 (or any later version). You can
* choose between one of them if you use PCANBasic-Wrapper in whole or in part.
*
- * BSD 2-Clause "Simplified" License:
+ * (1) BSD 2-Clause "Simplified" License
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -32,10 +33,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF PCANBasic-Wrapper, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * PCANBasic-Wrapper is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * PCANBasic-Wrapper is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* PCANBasic-Wrapper is distributed in the hope that it will be useful,
@@ -43,19 +45,19 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with PCANBasic-Wrapper. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with PCANBasic-Wrapper; if not, see .
*/
#ifndef VERSION_H_INCLUDED
#define VERSION_H_INCLUDED
#include "build_no.h"
#ifdef _MSC_VER
#define VERSION_MAJOR 0
-#define VERSION_MINOR 5
-#define VERSION_PATCH 2
+#define VERSION_MINOR 6
+#define VERSION_PATCH 0
#else
#define VERSION_MAJOR 0
-#define VERSION_MINOR 3
+#define VERSION_MINOR 4
#define VERSION_PATCH 0
#endif
#define VERSION_BUILD BUILD_NO
diff --git a/Sources/Wrapper/can_api.c b/Sources/Wrapper/can_api.c
index ff82857..0733570 100644
--- a/Sources/Wrapper/can_api.c
+++ b/Sources/Wrapper/can_api.c
@@ -1,18 +1,19 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces)
*
* Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen
- * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com)
+ * Copyright (c) 2013-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of PCANBasic-Wrapper.
*
* PCANBasic-Wrapper is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version). You can
+ * and under the GNU General Public License v2.0 (or any later version). You can
* choose between one of them if you use PCANBasic-Wrapper in whole or in part.
*
- * BSD 2-Clause "Simplified" License:
+ * (1) BSD 2-Clause "Simplified" License
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -32,10 +33,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF PCANBasic-Wrapper, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * PCANBasic-Wrapper is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * PCANBasic-Wrapper is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* PCANBasic-Wrapper is distributed in the hope that it will be useful,
@@ -43,8 +45,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with PCANBasic-Wrapper. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with PCANBasic-Wrapper; if not, see .
*/
/** @addtogroup can_api
* @{
diff --git a/Sources/Wrapper/can_defs.h b/Sources/Wrapper/can_defs.h
index 09eb847..36854ad 100644
--- a/Sources/Wrapper/can_defs.h
+++ b/Sources/Wrapper/can_defs.h
@@ -1,18 +1,19 @@
-/* SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later */
+/* SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later */
/*
* CAN Interface API, Version 3 (for PEAK-System PCAN Interfaces)
*
* Copyright (c) 2005-2012 Uwe Vogt, UV Software, Friedrichshafen
- * Copyright (c) 2013-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.de.com)
+ * Copyright (c) 2013-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
* All rights reserved.
*
* This file is part of PCANBasic-Wrapper.
*
* PCANBasic-Wrapper is dual-licensed under the BSD 2-Clause "Simplified" License
- * and under the GNU General Public License v3.0 (or any later version). You can
+ * and under the GNU General Public License v2.0 (or any later version). You can
* choose between one of them if you use PCANBasic-Wrapper in whole or in part.
*
- * BSD 2-Clause "Simplified" License:
+ * (1) BSD 2-Clause "Simplified" License
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this
@@ -32,10 +33,11 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF PCANBasic-Wrapper, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * GNU General Public License v3.0 or later:
- * PCANBasic-Wrapper is free software: you can redistribute it and/or modify
+ * (2) GNU General Public License v2.0 or later
+ *
+ * PCANBasic-Wrapper is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* PCANBasic-Wrapper is distributed in the hope that it will be useful,
@@ -43,8 +45,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with PCANBasic-Wrapper. If not, see .
+ * You should have received a copy of the GNU General Public License along
+ * with PCANBasic-Wrapper; if not, see .
*/
/** @addtogroup can_api
* @{
diff --git a/Tests/Driver.h b/Tests/Driver.h
index 7cc6816..6715dce 100644
--- a/Tests/Driver.h
+++ b/Tests/Driver.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#ifndef DRIVER_H_INCLUDED
#define DRIVER_H_INCLUDED
@@ -69,7 +71,7 @@ typedef CPeakCAN CCanDriver;
#define FEATURE_BITRATE_FD_SAM FEATURE_UNSUPPORTED
#define FEATURE_BITRATE_SJA1000 FEATURE_SUPPORTED
#define FEATURE_FILTERING FEATURE_SUPPORTED
-#define FEATURE_TRACE_FILE FEATURE_UNSUPPORTED
+#define FEATURE_TRACEFILE FEATURE_UNSUPPORTED
#define FEATURE_ERROR_FRAMES FEATURE_SUPPORTED
#define FEATURE_ERROR_CODE_CAPTURE FEATURE_SUPPORTED
#define FEATURE_BLOCKING_READ FEATURE_SUPPORTED
diff --git a/Tests/GoogleTest/README.txt b/Tests/GoogleTest/README.txt
index f2e1623..17b392a 100644
--- a/Tests/GoogleTest/README.txt
+++ b/Tests/GoogleTest/README.txt
@@ -13,7 +13,7 @@ URL: https://github.com/google/googletest
Current Version used by CAN API V3 C++ Testing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-v1.14.0 (https://github.com/google/googletest/releases/tag/v1.15.0)
+v1.15.2 (https://github.com/google/googletest/releases/tag/v1.15.2)
Installation and Usage of GoogleTest
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -35,4 +35,4 @@ Important Notes
Last Updated
~~~~~~~~~~~~
-August 17, 2024
+January 17, 2025
diff --git a/Tests/GoogleTest/Windows/x64-Debug/lib/gtest.lib b/Tests/GoogleTest/Windows/x64-Debug/lib/gtest.lib
index f506607..1fe91c1 100644
Binary files a/Tests/GoogleTest/Windows/x64-Debug/lib/gtest.lib and b/Tests/GoogleTest/Windows/x64-Debug/lib/gtest.lib differ
diff --git a/Tests/GoogleTest/Windows/x64-Debug/lib/gtest_main.lib b/Tests/GoogleTest/Windows/x64-Debug/lib/gtest_main.lib
index 45cb9ab..0fe8081 100644
Binary files a/Tests/GoogleTest/Windows/x64-Debug/lib/gtest_main.lib and b/Tests/GoogleTest/Windows/x64-Debug/lib/gtest_main.lib differ
diff --git a/Tests/GoogleTest/Windows/x86-Debug/lib/gtest.lib b/Tests/GoogleTest/Windows/x86-Debug/lib/gtest.lib
index 9845092..b203c8c 100644
Binary files a/Tests/GoogleTest/Windows/x86-Debug/lib/gtest.lib and b/Tests/GoogleTest/Windows/x86-Debug/lib/gtest.lib differ
diff --git a/Tests/GoogleTest/Windows/x86-Debug/lib/gtest_main.lib b/Tests/GoogleTest/Windows/x86-Debug/lib/gtest_main.lib
index 652d049..e32d62b 100644
Binary files a/Tests/GoogleTest/Windows/x86-Debug/lib/gtest_main.lib and b/Tests/GoogleTest/Windows/x86-Debug/lib/gtest_main.lib differ
diff --git a/Tests/README.md b/Tests/README.md
index 00bc688..e305f6e 100644
--- a/Tests/README.md
+++ b/Tests/README.md
@@ -1,6 +1,6 @@
### CAN API V3 Testing with GoogleTest
-_Copyright © 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)_ \
+_Copyright © 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)_ \
_All rights reserved._
# CAN Interface Wrapper Specification
@@ -132,14 +132,10 @@ call the test program with option `--can_help` to see advanced test options to c
## This and That
-### SVN Repo
-
-The CAN API V3 Testing sources are maintained in a SVN repo to synchronized them between the different CAN API V3 wrapper repos.
-
### Dual-License
Except where otherwise noted, this work is dual-licensed under the terms of the BSD 2-Clause "Simplified" License
-and under the terms of the GNU General Public License v3.0 (or any later version).
+and under the terms of the GNU General Public License v2.0 (or any later version).
You can choose between one of them if you use these portions of this work in whole or in part.
### GoogleTest License
diff --git a/Tests/Sources/Bitrates.cpp b/Tests/Sources/Bitrates.cpp
index f79ddee..65fe665 100644
--- a/Tests/Sources/Bitrates.cpp
+++ b/Tests/Sources/Bitrates.cpp
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
#include
@@ -308,4 +310,4 @@ bool CBitrates::IsCanFdWithBrse() {
(aBitrateString[m_nIndex].m_fCanFdWithBrse)) ? true : false;
}
-// $Id: Bitrates.cpp 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin //
+// $Id: Bitrates.cpp 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/Bitrates.h b/Tests/Sources/Bitrates.h
index b222cf4..0027ab9 100644
--- a/Tests/Sources/Bitrates.h
+++ b/Tests/Sources/Bitrates.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#ifndef BITRATES_H_INCLUDED
#define BITRATES_H_INCLUDED
@@ -66,5 +68,5 @@ class CBitrates {
};
#endif // BITRATES_H_INCLUDED
-// $Id: Bitrates.h 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin //
+// $Id: Bitrates.h 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/Config.h b/Tests/Sources/Config.h
index 54f0d7a..978041d 100644
--- a/Tests/Sources/Config.h
+++ b/Tests/Sources/Config.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#ifndef CONFIG_H_INCLUDED
#define CONFIG_H_INCLUDED
@@ -67,5 +69,5 @@
#define GTEST_DISABLED DISABLE_GTEST
#endif // CONFIG_H_INCLUDED
-// $Id: Config.h 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: Config.h 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Sources/Device.cpp b/Tests/Sources/Device.cpp
index f3f48b0..c2120f0 100644
--- a/Tests/Sources/Device.cpp
+++ b/Tests/Sources/Device.cpp
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
#include
@@ -608,4 +610,4 @@ void CCanDevice::ShowChannelCapabilities(const char* prefix) {
std::cout << std::endl;
}
-// $Id: Device.cpp 1314 2024-05-26 08:39:33Z quaoar $ Copyright (c) UV Software, Berlin //
+// $Id: Device.cpp 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/Device.h b/Tests/Sources/Device.h
index 6e49f84..78491e6 100644
--- a/Tests/Sources/Device.h
+++ b/Tests/Sources/Device.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#ifndef DEVICE_H_INCLUDED
#define DEVICE_H_INCLUDED
@@ -177,4 +179,4 @@ class CCanDevice : public CCanDriver {
#endif // DEVICE_H_INCLUDED
-// $Id: Device.h 1314 2024-05-26 08:39:33Z quaoar $ Copyright (c) UV Software, Berlin.
+// $Id: Device.h 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Sources/Options.cpp b/Tests/Sources/Options.cpp
index 9d506a5..7025be0 100644
--- a/Tests/Sources/Options.cpp
+++ b/Tests/Sources/Options.cpp
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#ifdef _MSC_VER
//no Microsoft extensions please!
@@ -753,4 +755,4 @@ int COptions::ShowHelp() {
return m_fShowHelp;
}
-// $Id: Options.cpp 1315 2024-05-26 12:23:58Z makemake $ Copyright (c) UV Software, Berlin //
+// $Id: Options.cpp 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/Options.h b/Tests/Sources/Options.h
index 818394a..d34993f 100644
--- a/Tests/Sources/Options.h
+++ b/Tests/Sources/Options.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#ifndef OPTIONS_H_INCLUDED
#define OPTIONS_H_INCLUDED
@@ -148,4 +150,4 @@ extern COptions g_Options; // global access to testing options
#endif // OPTIONS_H_INCLUDED
-// $Id: Options.h 1314 2024-05-26 08:39:33Z quaoar $ Copyright (c) UV Software, Berlin.
+// $Id: Options.h 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Sources/Progress.cpp b/Tests/Sources/Progress.cpp
index 9e6e809..4c454b2 100644
--- a/Tests/Sources/Progress.cpp
+++ b/Tests/Sources/Progress.cpp
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// Software for Industrial Communication, Motion Control and Automation
//
-// Copyright (c) 2002-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2002-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
-// Class CProgress
+// Class CProgress - A class to display progress on the console.
//
// This class is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this class.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS CLASS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// This class is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// This class is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This class is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with this class. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with this class; if not, see .
//
#include "Progress.h"
#include
@@ -140,4 +142,4 @@ void CCounter::Increment() {
#endif
}
-// $Id: Progress.cpp 811 2024-04-18 14:03:48Z quaoar $ Copyright (c) UV Software, Berlin //
+// $Id: Progress.cpp 841 2025-01-17 18:54:40Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/Progress.h b/Tests/Sources/Progress.h
index 0b96d40..1322ab2 100644
--- a/Tests/Sources/Progress.h
+++ b/Tests/Sources/Progress.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// Software for Industrial Communication, Motion Control and Automation
//
-// Copyright (c) 2002-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2002-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
-// Class CProgress
+// Class CProgress - A class to display progress on the console.
//
// This class is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this class.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS CLASS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// This class is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// This class is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This class is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with this class. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with this class; if not, see .
//
#ifndef PROGRESS_H_INCLUDED
#define PROGRESS_H_INCLUDED
@@ -82,4 +84,4 @@ class CCounter {
#endif // PROGRESS_H_INCLUDED
-// $Id: Progress.h 811 2024-04-18 14:03:48Z quaoar $ Copyright (c) UV Software, Berlin //
+// $Id: Progress.h 841 2025-01-17 18:54:40Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/Properties.cpp b/Tests/Sources/Properties.cpp
index 981f9da..672fdc9 100644
--- a/Tests/Sources/Properties.cpp
+++ b/Tests/Sources/Properties.cpp
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,15 +44,15 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
#include
#include
#include
-#define MAX_PROPERTIES 42
+#define MAX_PROPERTIES 54
#define LIB_PARAM true
#define DRV_PARAM false
@@ -67,6 +69,12 @@
#define PROP_FILTERING PROP_REQUIRED
#endif
+#if (FEATURE_TRACEFILE != FEATURE_SUPPORTED)
+#define PROP_TRACEFILE PROP_OPTIONAL
+#else
+#define PROP_TRACEFILE PROP_REQUIRED
+#endif
+
#define MODE_RUNNING true
#define MODE_STOPPED false
@@ -77,54 +85,68 @@ static struct SProperty {
bool m_fSetter;
bool m_fRequired;
bool m_fModeRunning;
+ const char* m_szMnemonic;
const char* m_szDescription;
} aProperties[MAX_PROPERTIES + 1] = {
- { CANPROP_GET_SPEC , sizeof(uint16_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "version of the wrapper specification (uint16_t)" },
- { CANPROP_GET_VERSION , sizeof(uint16_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "version number of the library (uint16_t)" },
- { CANPROP_GET_PATCH_NO , sizeof(uint8_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "patch number of the library (uint8_t)" },
- { CANPROP_GET_BUILD_NO , sizeof(uint32_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "build number of the library (uint32_t)" },
- { CANPROP_GET_LIBRARY_ID , sizeof(int32_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "library id of the library (int32_t)" },
- { CANPROP_GET_LIBRARY_VENDOR , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "vendor name of the library (char[256])" },
- { CANPROP_GET_LIBRARY_DLLNAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "file name of the library DLL (char[256])" },
- { CANPROP_GET_DEVICE_TYPE , sizeof(int32_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "device type of the CAN interface (int32_t)" },
- { CANPROP_GET_DEVICE_NAME , CANPROP_MAX_BUFFER_SIZE, DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "device name of the CAN interface (char[256])" },
- { CANPROP_GET_DEVICE_VENDOR , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "vendor name of the CAN interface (char[256])" },
- { CANPROP_GET_DEVICE_DLLNAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "file name of the CAN interface DLL (char[256])" },
- { CANPROP_GET_DEVICE_PARAM , CANPROP_MAX_BUFFER_SIZE, DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "device parameter of the CAN interface (char[256])" },
- { CANPROP_GET_OP_CAPABILITY , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "supported operation modes of the CAN controller (uint8_t)" },
- { CANPROP_GET_OP_MODE , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "active operation mode of the CAN controller (uint8_t)" },
- { CANPROP_GET_BITRATE , sizeof(can_bitrate_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "active bit-rate of the CAN controller (can_bitrate_t)" },
- { CANPROP_GET_SPEED , sizeof(can_speed_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "active bus speed of the CAN controller (can_speed_t)" },
- { CANPROP_GET_STATUS , sizeof(can_mode_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "current status register of the CAN controller (uint8_t)" },
- { CANPROP_GET_BUSLOAD , sizeof(uint16_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "current bus load of the CAN controller (uint16_t)" },
- { CANPROP_GET_NUM_CHANNELS , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "numbers of CAN channels on the CAN interface (uint8_t)" },
- { CANPROP_GET_CAN_CHANNEL , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "active CAN channel on the CAN interface (uint8_t)" },
- { CANPROP_GET_CAN_CLOCK , sizeof(int32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "frequency of the CAN controller clock in [Hz] (int32_t)" },
- { CANPROP_GET_TX_COUNTER , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "total number of sent messages (uint64_t)" },
- { CANPROP_GET_RX_COUNTER , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "total number of reveiced messages (uint64_t)" },
- { CANPROP_GET_ERR_COUNTER , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "total number of reveiced error frames (uint64_t)" },
- { CANPROP_GET_RCV_QUEUE_SIZE , sizeof(uint32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "maximum number of message the receive queue can hold (uint32_t)" },
- { CANPROP_GET_RCV_QUEUE_HIGH , sizeof(uint32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "maximum number of message the receive queue has hold (uint32_t)" },
- { CANPROP_GET_RCV_QUEUE_OVFL , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "overflow counter of the receive queue (uint64_t)" },
- { CANPROP_GET_TRM_QUEUE_SIZE , sizeof(uint32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "maximum number of message the transmit queue can hold (uint32_t)" },
- { CANPROP_GET_TRM_QUEUE_HIGH , sizeof(uint32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "maximum number of message the transmit queue has hold (uint32_t)" },
- { CANPROP_GET_TRM_QUEUE_OVFL , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "overflow counter of the transmit queue (uint64_t)" },
- { CANPROP_GET_FILTER_11BIT , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_FILTERING, MODE_RUNNING, "acceptance filter code and mask for 11-bit identifier (uint64_t)" },
- { CANPROP_GET_FILTER_29BIT , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_FILTERING, MODE_RUNNING, "acceptance filter code and mask for 29-bit identifier (uint64_t)" },
- { CANPROP_SET_FILTER_11BIT , sizeof(uint64_t), DRV_PARAM, PROP_SETTER, PROP_FILTERING, MODE_STOPPED, "set value for acceptance filter code and mask for 11-bit identifier (uint64_t)" },
- { CANPROP_SET_FILTER_29BIT , sizeof(uint64_t), DRV_PARAM, PROP_SETTER, PROP_FILTERING, MODE_STOPPED, "set value for acceptance filter code and mask for 29-bit identifier (uint64_t)" },
- { CANPROP_SET_FILTER_RESET , 0U /* NULL pointer*/, DRV_PARAM, PROP_SETTER, PROP_FILTERING, MODE_STOPPED, "reset acceptance filter code and mask to default values (NULL)" },
+ { CANPROP_GET_SPEC , sizeof(uint16_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_SPEC", "version of the wrapper specification (uint16_t)" },
+ { CANPROP_GET_VERSION , sizeof(uint16_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_VERSION", "version number of the library (uint16_t)" },
+ { CANPROP_GET_PATCH_NO , sizeof(uint8_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_PATCH_NO", "patch number of the library (uint8_t)" },
+ { CANPROP_GET_BUILD_NO , sizeof(uint32_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_BUILD_NO", "build number of the library (uint32_t)" },
+ { CANPROP_GET_LIBRARY_ID , sizeof(int32_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_LIBRARY_ID", "library id of the library (int32_t)" },
+ { CANPROP_GET_LIBRARY_VENDOR , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_LIBRARY_VENDOR", "vendor name of the library (char[])" },
+ { CANPROP_GET_LIBRARY_DLLNAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_LIBRARY_DLLNAME", "file name of the library DLL (char[])" },
+ { CANPROP_GET_DEVICE_TYPE , sizeof(int32_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_DEVICE_TYPE", "device type of the CAN interface (int32_t)" },
+ { CANPROP_GET_DEVICE_NAME , CANPROP_MAX_BUFFER_SIZE, DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_DEVICE_NAME", "device name of the CAN interface (char[])" },
+ { CANPROP_GET_DEVICE_VENDOR , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_DEVICE_VENDOR", "vendor name of the CAN interface (char[])" },
+ { CANPROP_GET_DEVICE_DLLNAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_DEVICE_DLLNAME", "file name of the CAN interface DLL (char[])" },
+ { CANPROP_GET_DEVICE_PARAM , CANPROP_MAX_BUFFER_SIZE, DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_DEVICE_PARAM", "device parameter of the CAN interface (char[])" },
+ { CANPROP_GET_OP_CAPABILITY , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_OP_CAPABILITY", "supported operation modes of the CAN controller (uint8_t)" },
+ { CANPROP_GET_OP_MODE , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_OP_MODE", "active operation mode of the CAN controller (uint8_t)" },
+ { CANPROP_GET_BITRATE , sizeof(can_bitrate_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_BITRATE", "active bit-rate of the CAN controller (can_bitrate_t)" },
+ { CANPROP_GET_SPEED , sizeof(can_speed_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_SPEED", "active bus speed of the CAN controller (can_speed_t)" },
+ { CANPROP_GET_STATUS , sizeof(can_mode_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_STATUS", "current status register of the CAN controller (uint8_t)" },
+ { CANPROP_GET_BUSLOAD , sizeof(uint16_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_BUSLOAD", "current bus load of the CAN controller (uint16_t)" },
+ { CANPROP_GET_NUM_CHANNELS , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_NUM_CHANNELS", "numbers of CAN channels on the CAN interface (uint8_t)" },
+ { CANPROP_GET_CAN_CHANNEL , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_CAN_CHANNEL", "active CAN channel on the CAN interface (uint8_t)" },
+ { CANPROP_GET_CAN_CLOCK , sizeof(int32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_CAN_CLOCK", "frequency of the CAN controller clock in [Hz] (int32_t)" },
+ { CANPROP_GET_TX_COUNTER , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_TX_COUNTER", "total number of sent messages (uint64_t)" },
+ { CANPROP_GET_RX_COUNTER , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_RX_COUNTER", "total number of reveiced messages (uint64_t)" },
+ { CANPROP_GET_ERR_COUNTER , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_ERR_COUNTER", "total number of reveiced error frames (uint64_t)" },
+ { CANPROP_GET_RCV_QUEUE_SIZE , sizeof(uint32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_RCV_QUEUE_SIZE", "maximum number of message the receive queue can hold (uint32_t)" },
+ { CANPROP_GET_RCV_QUEUE_HIGH , sizeof(uint32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_RCV_QUEUE_HIGH", "maximum number of message the receive queue has hold (uint32_t)" },
+ { CANPROP_GET_RCV_QUEUE_OVFL , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_RCV_QUEUE_OVFL", "overflow counter of the receive queue (uint64_t)" },
+ { CANPROP_GET_TRM_QUEUE_SIZE , sizeof(uint32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_TRM_QUEUE_SIZE", "maximum number of message the transmit queue can hold (uint32_t)" },
+ { CANPROP_GET_TRM_QUEUE_HIGH , sizeof(uint32_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_TRM_QUEUE_HIGH", "maximum number of message the transmit queue has hold (uint32_t)" },
+ { CANPROP_GET_TRM_QUEUE_OVFL , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_OPTIONAL, MODE_RUNNING, "CANPROP_GET_TRM_QUEUE_OVFL", "overflow counter of the transmit queue (uint64_t)" },
+ { CANPROP_GET_FILTER_11BIT , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_FILTERING, MODE_RUNNING, "CANPROP_GET_FILTER_11BIT", "acceptance filter code and mask for 11-bit identifier (uint64_t)" },
+ { CANPROP_GET_FILTER_29BIT , sizeof(uint64_t), DRV_PARAM, PROP_GETTER, PROP_FILTERING, MODE_RUNNING, "CANPROP_GET_FILTER_29BIT", "acceptance filter code and mask for 29-bit identifier (uint64_t)" },
+ { CANPROP_SET_FILTER_11BIT , sizeof(uint64_t), DRV_PARAM, PROP_SETTER, PROP_FILTERING, MODE_STOPPED, "CANPROP_SET_FILTER_11BIT", "set value for acceptance filter code and mask for 11-bit identifier (uint64_t)" },
+ { CANPROP_SET_FILTER_29BIT , sizeof(uint64_t), DRV_PARAM, PROP_SETTER, PROP_FILTERING, MODE_STOPPED, "CANPROP_SET_FILTER_29BIT", "set value for acceptance filter code and mask for 29-bit identifier (uint64_t)" },
+ { CANPROP_SET_FILTER_RESET , 0U /* NULL pointer*/, DRV_PARAM, PROP_SETTER, PROP_FILTERING, MODE_STOPPED, "CANPROP_SET_FILTER_RESET", "reset acceptance filter code and mask to default values (NULL)" },
+ { CANPROP_SET_FROMTO_11BIT , sizeof(uint64_t), DRV_PARAM, PROP_SETTER, PROP_OPTIONAL, MODE_STOPPED, "CANPROP_SET_FROMTO_11BIT", "add an 11-bit identifier range to the from-to filter list (uint64_t)" },
+ { CANPROP_SET_FROMTO_29BIT , sizeof(uint64_t), DRV_PARAM, PROP_SETTER, PROP_OPTIONAL, MODE_STOPPED, "CANPROP_SET_FROMTO_29BIT", "add an 11-bit identifier range to the from-to filter list (uint64_t)" },
+ { CANPROP_GET_TRACE_ACTIVE , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_GET_TRACE_ACTIVE", "trace file activation state: STOPPED/RUNNING (uint8_t)" },
+ { CANPROP_GET_TRACE_FOLDER , CANPROP_MAX_BUFFER_SIZE, DRV_PARAM, PROP_GETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_GET_TRACE_FOLDER", "trace file folder location (directory only) (char[])" },
+ { CANPROP_GET_TRACE_TYPE , sizeof(uint8_t), DRV_PARAM, PROP_GETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_GET_TRACE_TYPE", "trace file type (for possible values see below) (uint8_t)" },
+ { CANPROP_GET_TRACE_MODE , sizeof(uint16_t), DRV_PARAM, PROP_GETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_GET_TRACE_MODE", "trace file mode (for possible options see below) (uint16_t)" },
+ { CANPROP_GET_TRACE_SIZE , sizeof(uint16_t), DRV_PARAM, PROP_GETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_GET_TRACE_SIZE", "trace file segment size (in 10 KB steps, 0 = 100MB) (uint 16_t)" },
+ /* note: CANPROP_GET_TRACE_FILE can only be called if a trace-file session is active (property is tested separately) */
+ { CANPROP_SET_TRACE_ACTIVE , sizeof(uint8_t), DRV_PARAM, PROP_SETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_SET_TRACE_ACTIVE", "start/stop trace file logging with configured settings (uint8_t)" },
+ { CANPROP_SET_TRACE_FOLDER , CANPROP_MAX_BUFFER_SIZE, DRV_PARAM, PROP_SETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_SET_TRACE_FOLDER", "set trace file folder location (directory only) (char[])" },
+ { CANPROP_SET_TRACE_TYPE , sizeof(uint8_t), DRV_PARAM, PROP_SETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_SET_TRACE_TYPE", "set trace file type (for possible values see below) (uint8_t)" },
+ { CANPROP_SET_TRACE_MODE , sizeof(uint16_t), DRV_PARAM, PROP_SETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_SET_TRACE_MODE", "set trace file mode (for possible options see below) (uint16_t)" },
+ { CANPROP_SET_TRACE_SIZE , sizeof(uint16_t), DRV_PARAM, PROP_SETTER, PROP_TRACEFILE, MODE_RUNNING, "CANPROP_SET_TRACE_SIZE", "set trace file segment size (in 10 KB steps, 0 = 100MB) (uint16_t)" },
/* note: SET_FIRST_CHANNEL must be called before any GET_CHANNEL_xyz, therefore we define it as a PROP_GETTER because it gets a (virtual) index */
- { CANPROP_SET_FIRST_CHANNEL , 0U /* NULL pointer*/, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "set index to the first entry in the interface list (NULL)" },
- { CANPROP_GET_CHANNEL_NO , sizeof(int32_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "get channel no. at actual index in the interface list (int32_t)" },
- { CANPROP_GET_CHANNEL_NAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "get channel name at actual index in the interface list (char[256])" },
- { CANPROP_GET_CHANNEL_DLLNAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "get file name of the DLL at actual index in the interface list (char[256])" },
- { CANPROP_GET_CHANNEL_VENDOR_ID , sizeof(int32_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "get library id at actual index in the interface list (int32_t)" },
- { CANPROP_GET_CHANNEL_VENDOR_NAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "get vendor name at actual index in the interface list(char[256])" },
+ { CANPROP_SET_FIRST_CHANNEL , 0U /* NULL pointer*/, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_SET_FIRST_CHANNEL", "set index to the first entry in the interface list (NULL)" },
+ { CANPROP_GET_CHANNEL_NO , sizeof(int32_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_CHANNEL_NO", "get channel no. at actual index in the interface list (int32_t)" },
+ { CANPROP_GET_CHANNEL_NAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_CHANNEL_NAME", "get channel name at actual index in the interface list (char[])" },
+ { CANPROP_GET_CHANNEL_DLLNAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_CHANNEL_DLLNAME", "get file name of the DLL at actual index in the interface list (char[])" },
+ { CANPROP_GET_CHANNEL_VENDOR_ID , sizeof(int32_t), LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_CHANNEL_VENDOR_ID", "get library id at actual index in the interface list (int32_t)" },
+ { CANPROP_GET_CHANNEL_VENDOR_NAME , CANPROP_MAX_BUFFER_SIZE, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_GET_CHANNEL_VENDOR_NAME", "get vendor name at actual index in the interface list(char[])" },
/* note: SET_NEXT_CHANNEL is also defined as a setter because it gets the next (virtual) index (see above), but it can be EOF when there is no device entry */
- { CANPROP_SET_NEXT_CHANNEL , 0U /* NULL pointer*/, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "set index to the next entry in the interface list (NULL)" },
+ { CANPROP_SET_NEXT_CHANNEL , 0U /* NULL pointer*/, LIB_PARAM, PROP_GETTER, PROP_REQUIRED, MODE_RUNNING, "CANPROP_SET_NEXT_CHANNEL", "set index to the next entry in the interface list (NULL)" },
/* end marker */
- { CANPROP_INVALID, 0U, false, false, false, false, "" }
+ { CANPROP_INVALID, 0U, false, false, false, false, "", "" }
};
CProperties::CProperties() {
@@ -180,6 +202,13 @@ uint32_t CProperties::SizeOf() {
return (size_t)0;
}
+const char* CProperties::Mnemonic() {
+ if (m_nIndex < MAX_PROPERTIES)
+ return aProperties[m_nIndex].m_szMnemonic;
+ else
+ return aProperties[MAX_PROPERTIES].m_szMnemonic;
+}
+
const char* CProperties::Description() {
if (m_nIndex < MAX_PROPERTIES)
return aProperties[m_nIndex].m_szDescription;
@@ -187,4 +216,4 @@ const char* CProperties::Description() {
return aProperties[MAX_PROPERTIES].m_szDescription;
}
-// $Id: Properties.cpp 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin //
+// $Id: Properties.cpp 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/Properties.h b/Tests/Sources/Properties.h
index b15add0..446695e 100644
--- a/Tests/Sources/Properties.h
+++ b/Tests/Sources/Properties.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#ifndef PROPERTIES_H_INCLUDED
#define PROPERTIES_H_INCLUDED
@@ -70,9 +72,10 @@ class CProperties {
bool IsRequired();
bool IsModeRunning();
uint32_t SizeOf();
+ const char* Mnemonic();
const char* Description();
};
#endif // PROPERTIES_H_INCLUDED
-// $Id: Properties.h 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin //
+// $Id: Properties.h 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/Settings.h b/Tests/Sources/Settings.h
index 44eb97d..6caad73 100644
--- a/Tests/Sources/Settings.h
+++ b/Tests/Sources/Settings.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#ifndef SETTINGS_H_INCLUDED
#define SETTINGS_H_INCLUDED
@@ -89,7 +91,7 @@
// - number of CAN frames to be send while in monitor mode
// note: not too big because of time-out interval.
#define TEST_MONITOR 16 // default = 16
-// - additional number of CAN frames to be send if recive queue is full
+// - additional number of CAN frames to be send if receive queue is full
// note: not too big because of time-out interval.
#define TEST_QRCVFULL 1 // default = 1
// - maximum number of CAN frames to be send until in bus off state
@@ -146,6 +148,10 @@
#define DEVICE_LOOP_DIVISOR 10U
#define DEVICE_LOOP_EXTRA 10
+// defines for trace file(s)
+// - trace file folder
+#define TRACEFILE_FOLDER ".traces"
+
// useful stuff
// - invalid interface handle
#define INVALID_HANDLE (-1)
@@ -158,4 +164,4 @@
#endif
#endif // SETTINGS_H_INCLUDED
-// $Id: Settings.h 1314 2024-05-26 08:39:33Z quaoar $ Copyright (c) UV Software, Berlin.
+// $Id: Settings.h 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Sources/Timer.cpp b/Tests/Sources/Timer.cpp
index 30bc5a3..5a32538 100644
--- a/Tests/Sources/Timer.cpp
+++ b/Tests/Sources/Timer.cpp
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// Software for Industrial Communication, Motion Control and Automation
//
-// Copyright (c) 2002-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2002-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
-// Class CTimer
+// Class CTimer - A class with methods for timeouts, delays and timestamps.
//
// This class is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this class.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS CLASS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// This class is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// This class is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This class is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with this class. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with this class; if not, see .
//
#ifdef _DEBUG
#undef THIS_FILE
@@ -260,4 +262,4 @@ double CTimer::DiffTime(struct timespec start, struct timespec stop) {
((double)start.tv_sec + ((double)start.tv_nsec / 1000000000.f)));
}
-// $Id: Timer.cpp 799 2023-10-07 19:15:23Z makemake $ Copyright (c) UV Software, Berlin //
+// $Id: Timer.cpp 841 2025-01-17 18:54:40Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/Timer.h b/Tests/Sources/Timer.h
index 3bb4460..dc6c1d1 100644
--- a/Tests/Sources/Timer.h
+++ b/Tests/Sources/Timer.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// Software for Industrial Communication, Motion Control and Automation
//
-// Copyright (c) 2002-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2002-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
-// Class CTimer
+// Class CTimer - A class with methods for timeouts, delays and timestamps.
//
// This class is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this class.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS CLASS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// This class is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// This class is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This class is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with this class. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with this class; if not, see .
//
#ifndef TIMER_H_INCLUDED
#define TIMER_H_INCLUDED
@@ -90,4 +92,4 @@ class CTimer {
#endif // TIMER_H_INCLUDED
-// $Id: Timer.h 810 2024-04-18 14:01:00Z quaoar $ Copyright (c) UV Software, Berlin //
+// $Id: Timer.h 841 2025-01-17 18:54:40Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Sources/main.cpp b/Tests/Sources/main.cpp
index 1dd850c..b298312 100644
--- a/Tests/Sources/main.cpp
+++ b/Tests/Sources/main.cpp
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include
#include
@@ -62,7 +64,7 @@ GTEST_API_ int main(int argc, char **argv) {
#endif
std::cout << CCanDriver::GetVersion() << std::endl;
std::cout << "Copyright (c) 2004-2012 by UV Software, Friedrichshafen" << std::endl;
- std::cout << "Copyright (c) 2013-2024 by UV Software, Berlin" << std::endl;
+ std::cout << "Copyright (c) 2013-2025 by UV Software, Berlin" << std::endl;
std::cout << "Build: " << __DATE__ << " " << __TIME__ << " (" << REVISION_NO << ")" << std::endl;
// --- initialize GoogleTest framework --
printf("Running main() from %s\n", __FILE__);
@@ -80,4 +82,4 @@ GTEST_API_ int main(int argc, char **argv) {
return RUN_ALL_TESTS();
}
-// $Id: main.cpp 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin //
+// $Id: main.cpp 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Tests/Testcases/TC00_SmokeTest.cc b/Tests/Testcases/TC00_SmokeTest.cc
index 5009e68..c42fce0 100644
--- a/Tests/Testcases/TC00_SmokeTest.cc
+++ b/Tests/Testcases/TC00_SmokeTest.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,13 +44,27 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
class SmokeTest : public testing::Test {
- virtual void SetUp() {}
+ virtual void SetUp() {
+#if (FEATURE_TRACEFILE == FEATURE_SUPPORTED)
+#if defined(_WIN32) || defined(_WIN64)
+ struct _stat info;
+ if (_stat(TRACEFILE_FOLDER, &info) != 0) {
+ _mkdir(TRACEFILE_FOLDER);
+ }
+#else
+ struct stat info;
+ if (stat(TRACEFILE_FOLDER, &info) != 0) {
+ mkdir(TRACEFILE_FOLDER, (mode_t)0755);
+ }
+#endif
+#endif
+ }
virtual void TearDown() {}
protected:
// ...
@@ -240,8 +256,10 @@ TEST_F(SmokeTest, DefaultScenario) {
CCanApi::EChannelState state;
CANAPI_Status_t status = {};
CANAPI_Return_t retVal;
-#if (FEATURE_TRACE_FILE == FEATURE_SUPPORTED)
- uint8_t trace = CANPARA_TRACE_ON;
+#if (FEATURE_TRACEFILE == FEATURE_SUPPORTED)
+ uint8_t traceState = CANPARA_TRACE_ON;
+ uint8_t traceType = CANPARA_TRACE_TYPE_BINARY;
+ uint16_t traceMode = CANPARA_TRACE_MODE_PREFIX_DATE | CANPARA_TRACE_MODE_PREFIX_TIME;
char traceFile[CANPROP_MAX_STRING_LENGTH+1] = "";
#endif
// @pre:
@@ -282,19 +300,25 @@ TEST_F(SmokeTest, DefaultScenario) {
retVal = dut1.GetStatus(status);
EXPECT_EQ(CCanApi::NoError, retVal);
EXPECT_FALSE(status.can_stopped);
-#if (FEATURE_TRACE_FILE == FEATURE_SUPPORTED)
+#if (FEATURE_TRACEFILE == FEATURE_SUPPORTED)
// @- open trace file for DUT1 (if supported)
- trace = CANPARA_TRACE_TYPE_BINARY; // TODO: format from command line
- retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&trace, sizeof(trace));
+ traceType = CANPARA_TRACE_TYPE_BINARY; // TODO: format from command line
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = CANPARA_TRACE_MODE_PREFIX_DATE | CANPARA_TRACE_MODE_PREFIX_TIME;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ strcpy(traceFile, TRACEFILE_FOLDER);
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)traceFile, sizeof(traceFile));
EXPECT_EQ(CCanApi::NoError, retVal);
- trace = CANPARA_TRACE_ON;
- retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&trace, sizeof(trace));
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
EXPECT_EQ(CCanApi::NoError, retVal);
// @- check if trace file is open
- trace = CANPARA_TRACE_OFF;
- retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&trace, sizeof(trace));
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
EXPECT_EQ(CCanApi::NoError, retVal);
- EXPECT_EQ(CANPARA_TRACE_ON, trace);
+ EXPECT_EQ(CANPARA_TRACE_ON, traceState);
#endif
// @- send some frames to DUT2 and receive some frames from DUT2
int32_t frames = g_Options.GetNumberOfSmokeTestFrames();
@@ -304,23 +328,23 @@ TEST_F(SmokeTest, DefaultScenario) {
retVal = dut1.GetStatus(status);
EXPECT_EQ(CCanApi::NoError, retVal);
EXPECT_FALSE(status.can_stopped);
-#if (FEATURE_TRACE_FILE == FEATURE_SUPPORTED)
+#if (FEATURE_TRACEFILE == FEATURE_SUPPORTED)
// @- show file name of trace file written
- if (CANPARA_TRACE_ON == trace) {
+ if (CANPARA_TRACE_ON == traceState) {
if (dut1.GetProperty(CANPROP_GET_TRACE_FILE, (void*)traceFile, CANPROP_MAX_STRING_LENGTH) == CCanApi::NoError) {
traceFile[CANPROP_MAX_STRING_LENGTH] = '\0';
std::cout << "[ FILE ] " << traceFile << std::endl;
}
}
// @- close trace file for DUT1
- trace = CANPARA_TRACE_OFF;
- retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&trace, sizeof(trace));
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
EXPECT_EQ(CCanApi::NoError, retVal);
// @- check if trace file is closed
- trace = CANPARA_TRACE_ON;
- retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&trace, sizeof(trace));
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
EXPECT_EQ(CCanApi::NoError, retVal);
- EXPECT_EQ(CANPARA_TRACE_OFF, trace);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
#endif
// @- stop/reset DUT1
retVal = dut1.ResetController();
@@ -335,4 +359,4 @@ TEST_F(SmokeTest, DefaultScenario) {
// @end.
}
-// $Id: TC00_SmokeTest.cc 1357 2024-07-14 17:33:37Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TC00_SmokeTest.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC01_ProbeChannel.cc b/Tests/Testcases/TC01_ProbeChannel.cc
index f16a087..5782382 100644
--- a/Tests/Testcases/TC01_ProbeChannel.cc
+++ b/Tests/Testcases/TC01_ProbeChannel.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -1085,4 +1087,4 @@ TEST_F(ProbeChannel, GTEST_TESTCASE(WithInvalidLibraryId, GTEST_ENABLED)) {
}
#endif // (OPTION_CANAPI_LIBRARY != OPTION_DISBALED)
-// $Id: TC01_ProbeChannel.cc 1335 2024-06-02 16:26:04Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TC01_ProbeChannel.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC02_InitializeChannel.cc b/Tests/Testcases/TC02_InitializeChannel.cc
index b4226c5..b7445ef 100644
--- a/Tests/Testcases/TC02_InitializeChannel.cc
+++ b/Tests/Testcases/TC02_InitializeChannel.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -966,4 +968,4 @@ TEST_F(InitializeChannel, GTEST_TESTCASE(WithInvalidLibraryId, GTEST_ENABLED)) {
}
#endif // (OPTION_CANAPI_LIBRARY != OPTION_DISBALED)
-// $Id: TC02_InitializeChannel.cc 1314 2024-05-26 08:39:33Z quaoar $ Copyright (c) UV Software, Berlin.
+// $Id: TC02_InitializeChannel.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC03_StartController.cc b/Tests/Testcases/TC03_StartController.cc
index 4980552..9125c97 100644
--- a/Tests/Testcases/TC03_StartController.cc
+++ b/Tests/Testcases/TC03_StartController.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -662,9 +664,9 @@ TEST_F(StartController, GTEST_TESTCASE(WithSameCanBitrateIndexAfterCanStopped, G
CANAPI_Status_t status = {};
CANAPI_Return_t retVal;
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @loop over selected CAN 2.0 bit-timing indexes
// @note: predefined BTR0BTR1 bit-timing table has 10 entries, index 0 to 9.
// @ The index must be given as negative value to 'bitrate.index'!
@@ -796,9 +798,9 @@ TEST_F(StartController, GTEST_TESTCASE(WithDifferentCanBitrateIndexAfterCanStopp
CANAPI_Status_t status = {};
CANAPI_Return_t retVal;
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @loop over selected CAN 2.0 bit-timing indexes
// @note: predefined BTR0BTR1 bit-timing table has 10 entries, index 0 to 9.
// @ The index must be given as negative value to 'bitrate.index'!
@@ -1166,9 +1168,9 @@ TEST_F(StartController, GTEST_TESTCASE(WithSameCanBitrateSettingsAfterCanStopped
CANAPI_Status_t status = {};
CANAPI_Return_t retVal;
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @loop over selected CAN 2.0 bit-rate settings
CCounter counter = CCounter();
for (int i = 0; i < 3; i++) {
@@ -1293,9 +1295,9 @@ TEST_F(StartController, GTEST_TESTCASE(WithDifferentCanBitrateSettingsAfterCanSt
CANAPI_Status_t status = {};
CANAPI_Return_t retVal;
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @loop over selected CAN 2.0 bit-rate settings
CCounter counter = CCounter();
for (int i = 0; i < 3; i++) {
@@ -1696,9 +1698,9 @@ TEST_F(StartController, GTEST_TESTCASE(WithSameCanFdBitrateSettingsAfterCanStopp
if ((!dut1.IsCanFdCapable() || !dut2.IsCanFdCapable()) || g_Options.RunCanClassicOnly())
GTEST_SKIP() << "At least one device is not CAN FD capable!";
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @loop over selected CAN FD bit-rate settings
CCounter counter = CCounter();
for (int i = 0; i < 8; i++) {
@@ -1837,9 +1839,9 @@ TEST_F(StartController, GTEST_TESTCASE(WithDifferentCanFdBitrateSettingsAfterCan
if ((!dut1.IsCanFdCapable() || !dut2.IsCanFdCapable()) || g_Options.RunCanClassicOnly())
GTEST_SKIP() << "At least one device is not CAN FD capable!";
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @loop over selected CAN FD bit-rate settings
CCounter counter = CCounter();
for (int i = 0; i < 8; i++) {
@@ -2313,4 +2315,4 @@ TEST_F(StartController, GTEST_TESTCASE(WithCanFdBitrateSettingsInCan20Mode, GTES
}
#endif // (CAN_FD_SUPPORTED == FEATURE_SUPPORTED)
-// $Id: TC03_StartController.cc 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TC03_StartController.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC04_ReadMessage.cc b/Tests/Testcases/TC04_ReadMessage.cc
index 12f83ac..00abac7 100644
--- a/Tests/Testcases/TC04_ReadMessage.cc
+++ b/Tests/Testcases/TC04_ReadMessage.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -722,9 +724,9 @@ TEST_F(ReadMessage, GTEST_TESTCASE(IfReceiveQueueFull, GTEST_TC04_8_ENABLED)) {
struct timespec m0 = {}, m1 = {};
#endif
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @pre:
// @- initialize DUT1 with configured settings
retVal = dut1.InitializeChannel();
@@ -954,9 +956,9 @@ TEST_F(ReadMessage, GTEST_TESTCASE(WithFlagXtdInOperationModeXtd, GTEST_ENABLED)
// @- get operation capabilities of DUT1
retVal = dut1.GetOpCapabilities(opCapa);
EXPECT_EQ(CCanApi::NoError, retVal);
- // @- check if supressing extended frames is supported
+ // @- check if suppressing extended frames is supported
if (!opCapa.nxtd)
- GTEST_SKIP() << "Supressing extended frames is not supported by DUT1!";
+ GTEST_SKIP() << "Suppressing extended frames is not supported by DUT1!";
// @- get operation mode of DUT1 and check bit NXTD is not set
retVal = dut1.GetOpMode(opMode);
EXPECT_EQ(CCanApi::NoError, retVal);
@@ -1059,9 +1061,9 @@ TEST_F(ReadMessage, GTEST_TESTCASE(WithFlagXtdInOperationModeNoXtd, GTEST_ENABLE
// @- tear down DUT1 again
retVal = dut1.TeardownChannel();
EXPECT_EQ(CCanApi::NoError, retVal);
- // @ - check if supressing extended frames is supported
+ // @ - check if suppressing extended frames is supported
if (!opCapa.nxtd)
- GTEST_SKIP() << "Supressing extended frames is not supported by DUT1!";
+ GTEST_SKIP() << "Suppressing extended frames is not supported by DUT1!";
// @- set operation mode bit NXTD (suppress extended frames)
opMode = dut1.GetOpMode();
opMode.nxtd = 1;
@@ -1180,9 +1182,9 @@ TEST_F(ReadMessage, GTEST_TESTCASE(WithFlagRtrInOperationModeRtr, GTEST_ENABLED)
// @- get operation capabilities of DUT1
retVal = dut1.GetOpCapabilities(opCapa);
EXPECT_EQ(CCanApi::NoError, retVal);
- // @- check if supressing remote frames is supported
+ // @- check if suppressing remote frames is supported
if (!opCapa.nrtr)
- GTEST_SKIP() << "Supressing remote frames is not supported by DUT1!";
+ GTEST_SKIP() << "Suppressing remote frames is not supported by DUT1!";
// @- get operation mode of DUT1 and check bit NRTR is not set
retVal = dut1.GetOpMode(opMode);
EXPECT_EQ(CCanApi::NoError, retVal);
@@ -1306,9 +1308,9 @@ TEST_F(ReadMessage, GTEST_TESTCASE(WithFlagRtrInOperationModeNoRtr, GTEST_ENABLE
// @- tear down DUT1 again
retVal = dut1.TeardownChannel();
EXPECT_EQ(CCanApi::NoError, retVal);
- // @ - check if supressing remote frames is supported
+ // @ - check if suppressing remote frames is supported
if (!opCapa.nrtr)
- GTEST_SKIP() << "Supressing remote frames is not supported by DUT1!";
+ GTEST_SKIP() << "Suppressing remote frames is not supported by DUT1!";
// @- set operation mode bit NRTR (suppress remote frames)
opMode = dut1.GetOpMode();
opMode.nrtr = 1;
@@ -2013,4 +2015,4 @@ TEST_F(ReadMessage, GTEST_TESTCASE(WithDifferentTimeoutValues, GTEST_ENABLED)) {
// @todo: (1) blocking read
// @todo: (2) test reentrancy
-// $Id: TC04_ReadMessage.cc 1329 2024-05-30 18:13:31Z quaoar $ Copyright (c) UV Software, Berlin.
+// $Id: TC04_ReadMessage.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC05_WriteMessage.cc b/Tests/Testcases/TC05_WriteMessage.cc
index c5a898a..7cf02cf 100644
--- a/Tests/Testcases/TC05_WriteMessage.cc
+++ b/Tests/Testcases/TC05_WriteMessage.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -1397,9 +1399,9 @@ TEST_F(WriteMessage, GTEST_TESTCASE(WithFlagXtdInOperationModeNoXtd, GTEST_ENABL
// @- tear down DUT1 again
retVal = dut1.TeardownChannel();
EXPECT_EQ(CCanApi::NoError, retVal);
- // @ - check if supressing extended frames is supported
+ // @ - check if suppressing extended frames is supported
if (!opCapa.nxtd)
- GTEST_SKIP() << "Supressing extended frames is not supported by DUT1!";
+ GTEST_SKIP() << "Suppressing extended frames is not supported by DUT1!";
// @- set operation mode bit NXTD (suppress extended frames)
opMode = g_Options.GetOpMode(DUT1);
opMode.nxtd = 1;
@@ -1507,9 +1509,9 @@ TEST_F(WriteMessage, GTEST_TESTCASE(WithFlagRtrInOperationModeNoRtr, GTEST_ENABL
// @- tear down DUT1 again
retVal = dut1.TeardownChannel();
EXPECT_EQ(CCanApi::NoError, retVal);
- // @ - check if supressing remote frames is supported
+ // @ - check if suppressing remote frames is supported
if (!opCapa.nrtr)
- GTEST_SKIP() << "Supressing remote frames is not supported by DUT1!";
+ GTEST_SKIP() << "Suppressing remote frames is not supported by DUT1!";
// @- set operation mode bit NRTR (suppress remote frames)
opMode = g_Options.GetOpMode(DUT1);
opMode.nrtr = 1;
@@ -2021,9 +2023,9 @@ TEST_F(WriteMessage, GTEST_TESTCASE(IfTransmitterBusy, GTEST_TC04_19_ENABLED)) {
memset(trmMsg.data, 0, CANFD_MAX_LEN);
#endif
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @pre:
// @- initialize DUT1 with configured settings
retVal = dut1.InitializeChannel();
@@ -2223,4 +2225,4 @@ TEST_F(WriteMessage, GTEST_TESTCASE(WithFlagEsi, GTEST_ENABLED)) {
// @todo: (1) blocking write
// @todo: (2) test reentrancy
-// $Id: TC05_WriteMessage.cc 1314 2024-05-26 08:39:33Z quaoar $ Copyright (c) UV Software, Berlin.
+// $Id: TC05_WriteMessage.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC06_ResetController.cc b/Tests/Testcases/TC06_ResetController.cc
index 70f3f1d..2ef1a11 100644
--- a/Tests/Testcases/TC06_ResetController.cc
+++ b/Tests/Testcases/TC06_ResetController.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -481,4 +483,4 @@ TEST_F(ResetController, GTEST_TESTCASE(CheckStatisticalCounters, GTEST_ENABLED))
// @end.
}
-// $Id: TC06_ResetController.cc 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TC06_ResetController.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC08_TeardownChannel.cc b/Tests/Testcases/TC08_TeardownChannel.cc
index 55b2eee..779bc0d 100644
--- a/Tests/Testcases/TC08_TeardownChannel.cc
+++ b/Tests/Testcases/TC08_TeardownChannel.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -333,4 +335,4 @@ TEST_F(TeardownChannel, GTEST_TESTCASE(IfChannelTornDown, GTEST_ENABLED)) {
// @note: shuting down all channels is not possible with the C++ API!
-// $Id: TC08_TeardownChannel.cc 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TC08_TeardownChannel.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC09_GetStatus.cc b/Tests/Testcases/TC09_GetStatus.cc
index 09796f9..2002aac 100644
--- a/Tests/Testcases/TC09_GetStatus.cc
+++ b/Tests/Testcases/TC09_GetStatus.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -417,9 +419,9 @@ TEST_F(GetStatus, GTEST_TESTCASE(IfInBusOffState, GTEST_TC09_8_ENABLED)) {
memset(trmMsg.data, 0, CANFD_MAX_LEN);
#endif
// @
- // @note: This test can be very fragile
+ // @note: This test is very fragile
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can be very fragile!";
+ GTEST_SKIP() << "This test is very fragile!";
// @note: This test cannot run if there is another device on bus!
if (g_Options.Is3rdDevicePresent())
GTEST_SKIP() << "This test cannot run if there is another device on bus!";
@@ -587,9 +589,9 @@ TEST_F(GetStatus, GTEST_TESTCASE(IfWarningLevelReached, GTEST_TC09_9_ENABLED)) {
memset(trmMsg.data, 0, CANFD_MAX_LEN);
#endif
// @
- // @note: This test can be very fragile
+ // @note: This test is very fragile
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can be very fragile!";
+ GTEST_SKIP() << "This test is very fragile!";
// @note: This test cannot run if there is another device on bus!
if (g_Options.Is3rdDevicePresent())
GTEST_SKIP() << "This test cannot run if there is another device on bus!";
@@ -754,9 +756,9 @@ TEST_F(GetStatus, GTEST_TESTCASE(IfErrorsOnBus, GTEST_TC09_10_ENABLED)) {
memset(trmMsg.data, 0, CANFD_MAX_LEN);
#endif
// @
- // @note: This test can be very fragile
+ // @note: This test is very fragile
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can be very fragile!";
+ GTEST_SKIP() << "This test is very fragile!";
// @note: This test cannot run if there is another device on bus!
if (g_Options.Is3rdDevicePresent())
GTEST_SKIP() << "This test cannot run if there is another device on bus!";
@@ -935,9 +937,9 @@ TEST_F(GetStatus, GTEST_TESTCASE(IfTransmitterBusy, GTEST_TC09_11_ENABLED)) {
memset(trmMsg.data, 0, CANFD_MAX_LEN);
#endif
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @pre:
// @- initialize DUT1 with configured settings
retVal = dut1.InitializeChannel();
@@ -1186,9 +1188,9 @@ TEST_F(GetStatus, GTEST_TESTCASE(IfReceiveQueueFull, GTEST_TC09_14_ENABLED)) {
struct timespec m0 = {}, m1 = {};
#endif
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @pre:
// @- initialize DUT1 with configured settings
retVal = dut1.InitializeChannel();
@@ -1354,4 +1356,4 @@ TEST_F(GetStatus, GTEST_TESTCASE(IfReceiveQueueFull, GTEST_TC09_14_ENABLED)) {
// @end.
}
-// $Id: TC09_GetStatus.cc 1328 2024-05-29 18:49:38Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TC09_GetStatus.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC11_GetBitrate.cc b/Tests/Testcases/TC11_GetBitrate.cc
index 784c51c..5855e59 100644
--- a/Tests/Testcases/TC11_GetBitrate.cc
+++ b/Tests/Testcases/TC11_GetBitrate.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -688,4 +690,4 @@ TEST_F(GetBitrate, GTEST_TESTCASE(WithVariousCanFdBitrateSettings, GTEST_ENABLED
}
#endif // (CAN_FD_SUPPORTED == FEATURE_SUPPORTED)
-// $Id: TC11_GetBitrate.cc 1314 2024-05-26 08:39:33Z quaoar $ Copyright (c) UV Software, Berlin.
+// $Id: TC11_GetBitrate.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC12_GetProperty.cc b/Tests/Testcases/TC12_GetProperty.cc
index 558c1da..956e002 100644
--- a/Tests/Testcases/TC12_GetProperty.cc
+++ b/Tests/Testcases/TC12_GetProperty.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -91,13 +93,18 @@ TEST_F(GetProperty, GTEST_TESTCASE(SunnydayScenario, GTEST_SUNNYDAY)) {
uint16_t param = testcase.GetFirstEntry();
while (param != CANPROP_INVALID) {
counter.Increment();
+ memset(buffer, 0, CANPROP_MAX_BUFFER_SIZE);
// printf("param=%i (%s)\n", param, testcase.Description());
// @-- get property value (incl. pre-initialization parameter)
retVal = dut1.GetProperty(param, (void*)buffer, testcase.SizeOf());
if (testcase.IsRequired()) {
EXPECT_EQ(CCanApi::NoError, retVal);
+ RecordProperty(testcase.Mnemonic(), (retVal == CCanApi::NoError) ? "PASS" : "FAIL");
} else if (retVal != CCanApi::NoError) {
EXPECT_EQ(CCanApi::NotSupported, retVal);
+ RecordProperty(testcase.Mnemonic(), (retVal == CCanApi::NotSupported) ? "n/a" : "fail");
+ } else {
+ RecordProperty(testcase.Mnemonic(), "pass");
}
// next please
param = testcase.GetNextEntry();
@@ -235,6 +242,7 @@ TEST_F(GetProperty, GTEST_TESTCASE(WithInvalidParmeterValue, GTEST_ENABLED)) {
EXPECT_FALSE(status.can_stopped);
// @test:
CCounter counter = CCounter();
+ memset(buffer, 0, CANPROP_MAX_BUFFER_SIZE);
// @- try to get a property value with invalid value for parameter 'param'
retVal = dut1.GetProperty(CANPROP_INVALID, (void*)buffer, CANPROP_MAX_BUFFER_SIZE);
EXPECT_EQ(CCanApi::NotSupported, retVal);
@@ -299,6 +307,7 @@ TEST_F(GetProperty, GTEST_TESTCASE(WithWrongParameterSize, GTEST_ENABLED)) {
// @-- exclude properties with size zero (they return no value)
if (testcase.SizeOf() != 0U) {
counter.Increment();
+ memset(buffer, 0, CANPROP_MAX_BUFFER_SIZE);
uint32_t size = CANPROP_MAX_BUFFER_SIZE;
if ((testcase.SizeOf() != CANPROP_MAX_BUFFER_SIZE) && (param != CANPROP_GET_BUSLOAD))
size = testcase.SizeOf() - 1U;
@@ -365,6 +374,7 @@ TEST_F(GetProperty, GTEST_TESTCASE(IfChannelNotInitialized, GTEST_ENABLED)) {
uint16_t param = testcase.GetFirstEntry();
while (param != CANPROP_INVALID) {
counter.Increment();
+ memset(buffer, 0, CANPROP_MAX_BUFFER_SIZE);
// printf("param=%i (%s)\n", param, testcase.Description());
// @-- get property value (incl. pre-initialization parameter)
retVal = dut1.GetProperty(param, (void*)buffer, testcase.SizeOf());
@@ -447,6 +457,7 @@ TEST_F(GetProperty, GTEST_TESTCASE(IfChannelInitialized, GTEST_ENABLED)) {
uint16_t param = testcase.GetFirstEntry();
while (param != CANPROP_INVALID) {
counter.Increment();
+ memset(buffer, 0, CANPROP_MAX_BUFFER_SIZE);
// printf("param=%i (%s)\n", param, testcase.Description());
// @-- get property value (incl. pre-initialization parameter)
retVal = dut1.GetProperty(param, (void*)buffer, testcase.SizeOf());
@@ -524,6 +535,7 @@ TEST_F(GetProperty, GTEST_TESTCASE(IfControllerStarted, GTEST_ENABLED)) {
uint16_t param = testcase.GetFirstEntry();
while (param != CANPROP_INVALID) {
counter.Increment();
+ memset(buffer, 0, CANPROP_MAX_BUFFER_SIZE);
// printf("param=%i (%s)\n", param, testcase.Description());
// @-- get property value (incl. pre-initialization parameter)
retVal = dut1.GetProperty(param, (void*)buffer, testcase.SizeOf());
@@ -612,6 +624,7 @@ TEST_F(GetProperty, GTEST_TESTCASE(IfControllerStopped, GTEST_ENABLED)) {
uint16_t param = testcase.GetFirstEntry();
while (param != CANPROP_INVALID) {
counter.Increment();
+ memset(buffer, 0, CANPROP_MAX_BUFFER_SIZE);
// printf("param=%i (%s)\n", param, testcase.Description());
// @-- get property value (incl. pre-initialization parameter)
retVal = dut1.GetProperty(param, (void*)buffer, testcase.SizeOf());
@@ -686,6 +699,7 @@ TEST_F(GetProperty, GTEST_TESTCASE(IfChannelTornDown, GTEST_ENABLED)) {
uint16_t param = testcase.GetFirstEntry();
while (param != CANPROP_INVALID) {
counter.Increment();
+ memset(buffer, 0, CANPROP_MAX_BUFFER_SIZE);
// printf("param=%i (%s)\n", param, testcase.Description());
// @-- get property value (incl. pre-initialization parameter)
retVal = dut1.GetProperty(param, (void*)buffer, testcase.SizeOf());
@@ -711,4 +725,4 @@ TEST_F(GetProperty, GTEST_TESTCASE(IfChannelTornDown, GTEST_ENABLED)) {
}
-// $Id: TC12_GetProperty.cc 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TC12_GetProperty.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC21_GetBusSpeed.cc b/Tests/Testcases/TC21_GetBusSpeed.cc
index 08ed69d..0e69cbe 100644
--- a/Tests/Testcases/TC21_GetBusSpeed.cc
+++ b/Tests/Testcases/TC21_GetBusSpeed.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -663,4 +665,4 @@ TEST_F(GetBusSpeed, GTEST_TESTCASE(WithVariousCanFdBitrateSettings, GTEST_DISABL
}
#endif // (CAN_FD_SUPPORTED == FEATURE_SUPPORTED)
-// $Id: TC21_GetBusSpeed.cc 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TC21_GetBusSpeed.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC23_SetFilter11Bit.cc b/Tests/Testcases/TC23_SetFilter11Bit.cc
index 6e39d6f..2c58570 100644
--- a/Tests/Testcases/TC23_SetFilter11Bit.cc
+++ b/Tests/Testcases/TC23_SetFilter11Bit.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -623,9 +625,9 @@ TEST_F(SetFilter11Bit, GTEST_TESTCASE(WithValidValues, GTEST_ENABLED)) {
const uint32_t maskSet[4] = { 0x000U, 0x0F0U, 0x70FU, 0x7FFU };
CANAPI_Return_t retVal;
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @pre:
// @- initialize DUT1 with configured settings
retVal = dut1.InitializeChannel();
@@ -789,4 +791,4 @@ TEST_F(SetFilter11Bit, GTEST_TESTCASE(WithInvalidValues, GTEST_ENABLED)) {
#endif // FEATURE_FILTERING != FEATURE_UNSUPPORTED
-// $Id: TC23_SetFilter11Bit.cc 1373 2024-07-31 18:55:39Z gonggong $ Copyright (c) UV Software, Berlin.
+// $Id: TC23_SetFilter11Bit.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC25_SetFilter29Bit.cc b/Tests/Testcases/TC25_SetFilter29Bit.cc
index 2b2975f..bd7ecf5 100644
--- a/Tests/Testcases/TC25_SetFilter29Bit.cc
+++ b/Tests/Testcases/TC25_SetFilter29Bit.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -624,9 +626,9 @@ TEST_F(SetFilter29Bit, GTEST_TESTCASE(WithValidValues, GTEST_ENABLED)) {
const uint32_t maskSet[4] = { 0x00000000U, 0x000000F0U, 0x0000070FU, 0x000007FFU };
CANAPI_Return_t retVal;
// @
- // @note: This test can take a very long time
+ // @note: This test takes quite a long time
if (g_Options.RunQuick())
- GTEST_SKIP() << "This test can take a very long time!";
+ GTEST_SKIP() << "This test takes quite a long time!";
// @pre:
// @- initialize DUT1 with configured settings
retVal = dut1.InitializeChannel();
@@ -858,4 +860,4 @@ TEST_F(SetFilter29Bit, GTEST_TESTCASE(IfXtdFramesSuppressed, GTEST_ENABLED)) {
#endif // FEATURE_FILTERING != FEATURE_UNSUPPORTED
-// $Id: TC25_SetFilter29Bit.cc 1373 2024-07-31 18:55:39Z gonggong $ Copyright (c) UV Software, Berlin.
+// $Id: TC25_SetFilter29Bit.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TC27_ResetFilter.cc b/Tests/Testcases/TC27_ResetFilter.cc
index f2c30a3..f238b05 100644
--- a/Tests/Testcases/TC27_ResetFilter.cc
+++ b/Tests/Testcases/TC27_ResetFilter.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -628,4 +630,4 @@ TEST_F(ResetFilter, GTEST_TESTCASE(IfChannelTornDown, GTEST_ENABLED)) {
#endif // FEATURE_FILTERING != FEATURE_UNSUPPORTED
-// $Id: TC27_ResetFilter.cc 1373 2024-07-31 18:55:39Z gonggong $ Copyright (c) UV Software, Berlin.
+// $Id: TC27_ResetFilter.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TCx1_CallSequences.cc b/Tests/Testcases/TCx1_CallSequences.cc
index 5807ce1..f7bec3c 100644
--- a/Tests/Testcases/TCx1_CallSequences.cc
+++ b/Tests/Testcases/TCx1_CallSequences.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -1504,4 +1506,4 @@ TEST_F(CallSequences, GTEST_TESTCASE(ReadInitializeTeardown, GTEST_DISABLED)) {
// @end.
}
-// $Id: TCx1_CallSequences.cc 1336 2024-06-03 06:58:36Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TCx1_CallSequences.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TCx2_BitrateConverter.cc b/Tests/Testcases/TCx2_BitrateConverter.cc
index 10a2ae8..05428d1 100644
--- a/Tests/Testcases/TCx2_BitrateConverter.cc
+++ b/Tests/Testcases/TCx2_BitrateConverter.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
#include
@@ -1603,4 +1605,4 @@ TEST_F(BitrateConverter, GTEST_TESTCASE(BitrateToStringWithNullPointerForString,
//
// @note: passing a pointer for 'btr0btr1' is not possible with the C++ API!
-// $Id: TCx2_BitrateConverter.cc 1272 2024-04-16 19:55:27Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TCx2_BitrateConverter.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TCx4_TracefileRecorder.cc b/Tests/Testcases/TCx4_TracefileRecorder.cc
new file mode 100644
index 0000000..7760976
--- /dev/null
+++ b/Tests/Testcases/TCx4_TracefileRecorder.cc
@@ -0,0 +1,1538 @@
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
+//
+// CAN Interface API, Version 3 (Testing)
+//
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// All rights reserved.
+//
+// This file is part of CAN API V3.
+//
+// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
+// and under the GNU General Public License v2.0 (or any later version).
+// You can choose between one of them if you use this file.
+//
+// (1) BSD 2-Clause "Simplified" License
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// 1. Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// CAN API V3 IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// CAN API V3 is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
+//
+#include "pch.h"
+
+#ifndef FEATURE_TRACEFILE
+#define FEATURE_TRACEFILE FEATURE_UNSUPPORTED
+#ifdef _MSC_VER
+#pragma message ( "FEATURE_TRACEFILE not set, default = FEATURE_UNSUPPORTED" )
+#else
+#warning FEATURE_TRACEFILE not set, default = FEATURE_UNSUPPORTED
+#endif
+#endif
+#if (FEATURE_TRACEFILE != FEATURE_UNSUPPORTED)
+
+#define NONWRITABLE_FOLDER "/"
+
+#define TEST_FRAMES1 7
+#define TEST_FRAMES2 9
+#define TEST_FRAMES3 256
+
+#define TEST_TRACESIZE (CANPARA_TRACE_SIZE_10KB / CANPARA_TRACE_SIZE_10KB)
+#define TEST_FILESIZE (TEST_TRACESIZE * CANPARA_TRACE_SIZE_10KB)
+
+class TraceFile : public testing::Test {
+ virtual void SetUp() {
+#if defined(_WIN32) || defined(_WIN64)
+ struct _stat info;
+ if (_stat(TRACEFILE_FOLDER, &info) != 0) {
+ _mkdir(TRACEFILE_FOLDER);
+ }
+#else
+ struct stat info;
+ if (stat(TRACEFILE_FOLDER, &info) != 0) {
+ mkdir(TRACEFILE_FOLDER, (mode_t)0755);
+ }
+#endif
+ }
+ virtual void TearDown() {}
+protected:
+ // ...
+};
+
+// @gtest TCx4.0: Trace CAN messages (sunnyday scenario)
+//
+// @expected: CANERR_NOERROR
+//
+TEST_F(TraceFile, GTEST_TESTCASE(SunnydayScenario, GTEST_SUNNYDAY)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ uint8_t traceType;
+ uint16_t traceMode;
+ uint16_t traceSize;
+ char string[CANPROP_MAX_STRING_LENGTH+1] = "";
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @test:
+ // @- set trace file location to "TraceFiles" in current directory
+ strcpy(string, TRACEFILE_FOLDER);
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- open trace file for DUT1 (vendor specific)
+ traceType = CANPARA_TRACE_TYPE_VENDOR;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = CANPARA_TRACE_MODE_OVERWRITE;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- check if trace file is open
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_ON, traceState);
+ // @- check trace file format (expect vendor specific)
+ traceType = CANPARA_TRACE_TYPE_BINARY;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_VENDOR, traceType);
+ // @- check trace file mode (expect overwrite)
+ traceMode = CANPARA_TRACE_MODE_DEFAULT;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_MODE_OVERWRITE, traceMode);
+ // @- check trace file size (expect 10240 * 10KB = 100MB)
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_SIZE_DEFAULT, traceSize);
+ // @- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames();
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- close trace file for DUT1
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- check if trace file is closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @post:
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.1: Trace CAN messages with invalid interface handle(s)
+//
+// @note: checking channel handles is not possible with the C++ API!
+
+// @gtest TCx4.2: Trace CAN messages if CAN channel is not initialized
+//
+// @note: this test is covered by TC21.5 (resp. TC12.5)
+
+// @gtest TCx4.2: Trace CAN messages if CAN controller is not started
+//
+// @note: this test is covered by TC21.6 (resp. TC12.6)
+
+// @gtest TCx4.4: Trace CAN messages if CAN controller is started
+//
+// @note: this test is covered by TC21.7 (resp. TC12.7)
+
+// @gtest TCx4.5: Trace CAN messages if CAN controller was previously stopped
+//
+// @note: this test is covered by TC21.8 (resp. TC12.8)
+
+// @gtest TCx4.6: Trace CAN messages if CAN channel was previously torn down
+//
+// @note: this test is covered by TC21.9 (resp. TC12.9)
+
+// @gtest TCx4.7: Check trace-file option 'TRACE_TYPE'
+//
+// @expected: CANERR_ILLPARA for invalid trace types
+//
+TEST_F(TraceFile, GTEST_TESTCASE(CheckOptionTraceType, GTEST_ENABLED)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ uint8_t traceType;
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- check if trace file is closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @test:
+ // @- get trace file default type (binary format)
+ CCounter counter = CCounter();
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_BINARY, traceType);
+ // @- sub(1): with valid type 0x00 (binary format)
+ counter.Increment();
+ traceType = CANPARA_TRACE_TYPE_BINARY;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_BINARY, traceType);
+ // @- sub(2): with valid type 0x01 (logger format)
+ counter.Increment();
+ traceType = CANPARA_TRACE_TYPE_LOGGER;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_LOGGER, traceType);
+ // @- sub(3): with invalid type 0x02 (expect ILLPARA)
+ counter.Increment();
+ traceType = 0x02;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_LOGGER, traceType);
+ // @- sub(4): with invalid type 0x7F (expect ILLPARA)
+ counter.Increment();
+ traceType = 0x7F;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_LOGGER, traceType);
+ // @- sub(5): with valid type 0x80 (vendor specific)
+ counter.Increment();
+ traceType = CANPARA_TRACE_TYPE_VENDOR;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_VENDOR, traceType);
+ // @- sub(6): with invalid type 0x81 (expect ILLPARA)
+ counter.Increment();
+ traceType = 0x81;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_VENDOR, traceType);
+ // @- sub(7): with invalid type 0xFF (expect ILLPARA)
+ counter.Increment();
+ traceType = UINT8_MAX;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+ traceType = 0x00;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_VENDOR, traceType);
+ // @post:
+ counter.Clear();
+ // @- check if trace file is still closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames();
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.8: Check trace-file option 'TRACE_MODE'
+//
+// @expected: CANERR_ILLPARA for invalid trace modes
+//
+TEST_F(TraceFile, GTEST_TESTCASE(CheckOptionTraceMode, GTEST_ENABLED)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ uint16_t traceMode;
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- check if trace file is closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @test:
+ // @- get trace file default mode (0x0000)
+ CCounter counter = CCounter();
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_MODE_DEFAULT, traceMode);
+ // @- sub(1): with valid mode 0x0000 (default)
+ counter.Increment();
+ traceMode = CANPARA_TRACE_MODE_DEFAULT;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+#if (0)
+ EXPECT_EQ(CANPARA_TRACE_MODE_DEFAULT, traceMode);
+#else
+ EXPECT_EQ(CANPARA_TRACE_MODE_OVERWRITE, traceMode);
+#endif
+ // @- sub(2): with valid mode 0x80 (overwrite)
+ counter.Increment();
+ traceMode = CANPARA_TRACE_MODE_OVERWRITE;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_MODE_OVERWRITE, traceMode);
+ // @- sub(3): with valid mode 0x01 (segmented)
+ counter.Increment();
+ traceMode = CANPARA_TRACE_MODE_SEGMENTED;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+#if (0)
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+#if (0)
+ EXPECT_EQ(CANPARA_TRACE_MODE_SEGMENTED, traceMode);
+#else
+ EXPECT_EQ(CANPARA_TRACE_MODE_SEGMENTED | CANPARA_TRACE_MODE_OVERWRITE, traceMode);
+#endif
+#else
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+#endif
+ // @- sub(4): with valid mode 0x40 (compressed)
+ counter.Increment();
+ traceMode = CANPARA_TRACE_MODE_COMPRESSED;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+#if (0)
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+#if (0)
+ EXPECT_EQ(CANPARA_TRACE_MODE_COMPRESSED, traceMode);
+#else
+ EXPECT_EQ(CANPARA_TRACE_MODE_COMPRESSED | CANPARA_TRACE_MODE_OVERWRITE, traceMode);
+#endif
+else
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+#endif
+ // @- sub(5): with valid mode 0x02 (date prefix)
+ counter.Increment();
+ traceMode = CANPARA_TRACE_MODE_PREFIX_DATE;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+#if (0)
+ EXPECT_EQ(CANPARA_TRACE_MODE_PREFIX_DATE, traceMode);
+#else
+ EXPECT_EQ(CANPARA_TRACE_MODE_PREFIX_DATE | CANPARA_TRACE_MODE_OVERWRITE, traceMode);
+#endif
+ // @- sub(6): with valid mode 0x04 (time prefix)
+ counter.Increment();
+ traceMode = CANPARA_TRACE_MODE_PREFIX_TIME;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+#if (0)
+ EXPECT_EQ(CANPARA_TRACE_MODE_PREFIX_TIME, traceMode);
+#else
+ EXPECT_EQ(CANPARA_TRACE_MODE_PREFIX_TIME | CANPARA_TRACE_MODE_OVERWRITE, traceMode);
+#endif
+ // @- sub(7): with valid mode 0x100 (LEN output)
+ counter.Increment();
+ traceMode = CANPARA_TRACE_MODE_OUTPUT_LEN;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+#if (0)
+ EXPECT_EQ(CANPARA_TRACE_MODE_OUTPUT_LEN, traceMode);
+#else
+ EXPECT_EQ(CANPARA_TRACE_MODE_OUTPUT_LEN | CANPARA_TRACE_MODE_OVERWRITE, traceMode);
+#endif
+ // @- sub(8): with all valid modes combined
+ counter.Increment();
+ traceMode = (CANPARA_TRACE_MODE_OVERWRITE | \
+ /*CANPARA_TRACE_MODE_SEGMENTED |*/ \
+ /*CANPARA_TRACE_MODE_COMPRESSED |*/ \
+ CANPARA_TRACE_MODE_PREFIX_DATE | \
+ CANPARA_TRACE_MODE_PREFIX_TIME | \
+ CANPARA_TRACE_MODE_OUTPUT_LEN);
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ((CANPARA_TRACE_MODE_OVERWRITE | \
+ /*CANPARA_TRACE_MODE_SEGMENTED |*/ \
+ /*CANPARA_TRACE_MODE_COMPRESSED |*/ \
+ CANPARA_TRACE_MODE_PREFIX_DATE | \
+ CANPARA_TRACE_MODE_PREFIX_TIME | \
+ CANPARA_TRACE_MODE_OUTPUT_LEN), traceMode);
+ // @- sub(9): with invalid modes combined (expect ILLPARA)
+ counter.Increment();
+ traceMode = (CANPARA_TRACE_MODE_OVERWRITE | \
+ /*CANPARA_TRACE_MODE_SEGMENTED |*/ \
+ /*CANPARA_TRACE_MODE_COMPRESSED |*/ \
+ CANPARA_TRACE_MODE_PREFIX_DATE | \
+ CANPARA_TRACE_MODE_PREFIX_TIME | \
+ CANPARA_TRACE_MODE_OUTPUT_LEN);
+ traceMode = ~traceMode;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ((CANPARA_TRACE_MODE_OVERWRITE | \
+ /*CANPARA_TRACE_MODE_SEGMENTED |*/ \
+ /*CANPARA_TRACE_MODE_COMPRESSED |*/ \
+ CANPARA_TRACE_MODE_PREFIX_DATE | \
+ CANPARA_TRACE_MODE_PREFIX_TIME | \
+ CANPARA_TRACE_MODE_OUTPUT_LEN), traceMode);
+ // @- sub(10): with invalid mode 0xFFFF (expect ILLPARA)
+ counter.Increment();
+ traceMode = UINT16_MAX;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+ traceMode = 0x0000;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ((CANPARA_TRACE_MODE_OVERWRITE | \
+ /*CANPARA_TRACE_MODE_SEGMENTED |*/ \
+ /*CANPARA_TRACE_MODE_COMPRESSED |*/ \
+ CANPARA_TRACE_MODE_PREFIX_DATE | \
+ CANPARA_TRACE_MODE_PREFIX_TIME | \
+ CANPARA_TRACE_MODE_OUTPUT_LEN), traceMode);
+ // @post:
+ counter.Clear();
+ // @- check if trace file is still closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames();
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.9: Check trace-file option 'TRACE_SIZE'
+//
+// @expected: CANERR_ILLPARA for invalid trace sizes
+//
+TEST_F(TraceFile, GTEST_TESTCASE(CheckOptionTraceSize, GTEST_ENABLED)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ uint16_t traceSize;
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- check if trace file is closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @test:
+ CCounter counter = CCounter();
+ // @- get default trace file size (10240 * 10KB = 100MB)
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_SIZE_DEFAULT, traceSize);
+ // @- sub(1): with valid size 0 (default)
+ counter.Increment();
+ traceSize = 0;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_SIZE_DEFAULT, traceSize);
+ // @- sub(2): with valid size 1 (10KB)
+ counter.Increment();
+ traceSize = 1;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(1, traceSize);
+ // @- sub(3): with valid size 10240 (100MB)
+ counter.Increment();
+ traceSize = CANPARA_TRACE_SIZE_DEFAULT;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_SIZE_DEFAULT, traceSize);
+ // @- sub(4): with valid size 62500 (640MB)
+ counter.Increment();
+ traceSize = CANPARA_TRACE_SIZE_LIMIT;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_SIZE_LIMIT, traceSize);
+ // @- sub(5): with invalid size 62501 (expect ILLPARA)
+ counter.Increment();
+ traceSize = CANPARA_TRACE_SIZE_LIMIT + 1;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_SIZE_LIMIT, traceSize);
+ // @- sub(6): with invalid size 65535 (expect ILLPARA)
+ counter.Increment();
+ traceSize = UINT16_MAX;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::IllegalParameter, retVal);
+ traceSize = 0;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_SIZE_LIMIT, traceSize);
+ // @post:
+ counter.Clear();
+ // @- check if trace file is still closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames();
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.10: Check trace-file option 'TRACE_FOLDER'
+//
+// @expected: CANERR_NOERROR (validity is checked with 'TRACE_ACTIVE' = 'TRACE_ON')
+//
+TEST_F(TraceFile, GTEST_TESTCASE(CheckOptionTraceFolder, GTEST_ENABLED)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ char string[CANPROP_MAX_STRING_LENGTH+1] = "";
+ char folder[CANPROP_MAX_STRING_LENGTH+1] = "";
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- check if trace file is closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @test:
+ // @- get current working directory
+ getcwd(folder, CANPROP_MAX_STRING_LENGTH);
+ folder[CANPROP_MAX_STRING_LENGTH] = '\0';
+ // @- get default trace file folder (current working directory)
+ CCounter counter = CCounter();
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ(folder, string);
+ // @- sub(1): with default folder "."
+ counter.Increment();
+ strcpy(string, ".");
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ(".", string);
+ // @- sub(2): with parent folder ".."
+ counter.Increment();
+ strcpy(string, "..");
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ("..", string);
+ // @- sub(3): with user folder "~"
+ counter.Increment();
+ strcpy(string, "~");
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ("~", string);
+ // @- sub(4): with root folder "/"
+ counter.Increment();
+ strcpy(string, "/");
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ("/", string);
+ // @- sub(5): with no folder
+ counter.Increment();
+ string[0] = '\0';
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ("", string); // FIXME: should be "." or not?
+ // @- sub(6): with temporary folder "traces"
+ counter.Increment();
+ strcpy(string, "traces");
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ("traces", string);
+ // @- sub(8): with temporary folder ".traces"
+ counter.Increment();
+ strcpy(string, ".traces");
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ(".traces", string);
+ // @- sub(8): with temporary folder "./traces"
+ counter.Increment();
+ strcpy(string, "./traces");
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ("./traces", string);
+ // @- sub(9): with temporary folder "~/traces"
+ counter.Increment();
+ strcpy(string, "~/traces");
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ("~/traces", string);
+ // @- sub(10): with temporary folder "~/traces/bin"
+ counter.Increment();
+ strcpy(string, "~/traces/bin");
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ("~/traces/bin", string);
+ // @post:
+ counter.Clear();
+ // @- check if trace file is still closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames();
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.11: Check trace-file option 'TRACE_ACTIVE'
+//
+// @expected: CANERR_RESOURCE if trace file is already opened
+//
+TEST_F(TraceFile, GTEST_TESTCASE(CheckOptionTraceActive, GTEST_ENABLED)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ char string[CANPROP_MAX_STRING_LENGTH+1] = "";
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- check if trace file is closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @test:
+ // @- note: set trace file location to "TraceFiles" in current directory
+ CCounter counter = CCounter();
+ strcpy(string, TRACEFILE_FOLDER);
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- sub(1): set tracing OFF if not started (expect NOERROR)
+ counter.Increment();
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- sub(2): set tracing ON with value 42 (expect NOERROR)
+ counter.Increment();
+ traceState = 42;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_ON, traceState);
+ // @- sub(3): set tracing ON if already started (expect RESOURCE error)
+ counter.Increment();
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::ResourceError, retVal);
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_ON, traceState);
+ // @- sub(4): set tracing OFF to close trace file (expect NOERROR)
+ counter.Increment();
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- sub(5): set tracing OFF if already stopped (expect NOERROR)
+ counter.Increment();
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @post:
+ counter.Clear();
+ // @- check if trace file is still closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames();
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.12: Check trace-file option 'TRACE_FILE'
+//
+// @expected: CANERR_NOERROR
+//
+TEST_F(TraceFile, GTEST_TESTCASE(CheckOptionTraceFileName, GTEST_DISABLED)) {
+ // @
+ // @todo: implement test case; the device name is part of the trace file name
+ // @ provide the device name via CDevice::GetDeviceName()
+ // @ provide the current working directory via getcwd()
+ // @ sub(1): with default file name
+ // @ sub(2): with date/time prefix
+ // @ sub(3): with segment number (when implemented)
+ // @
+}
+
+// @gtest TCx4.13: Trace CAN messages with default options
+//
+// @expected: CANERR_NOERROR (type=VENDOR, mode=OVERWRITE, size=100MB, folder=".")
+//
+TEST_F(TraceFile, GTEST_TESTCASE(WithDefaultOptions, GTEST_ENABLED)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ uint8_t traceType;
+ uint16_t traceMode;
+ uint16_t traceSize;
+ char string[CANPROP_MAX_STRING_LENGTH+1] = "";
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @test:
+ // @- note: set trace file location to "TraceFiles" in current directory
+ strcpy(string, TRACEFILE_FOLDER);
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- open trace file for DUT1 (default options)
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- check if trace file is open
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_ON, traceState);
+ // @- check trace file format (expect binary)
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_BINARY, traceType);
+ // @- check trace file mode (expect default)
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_MODE_DEFAULT, traceMode);
+ // @- check trace file size (expect 10240 * 10KB = 100MB)
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_SIZE_DEFAULT, traceSize);
+ // @- check trace file location (expect "TraceFiles" in current directory)
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, CANPROP_MAX_STRING_LENGTH);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ(TRACEFILE_FOLDER, string);
+ // @- check trace file name (expect extension ".dat")
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FILE, (void*)string, CANPROP_MAX_STRING_LENGTH);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @ todo: check the entire file name
+ // @- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames();
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- close trace file for DUT1
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- check if trace file is closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @post:
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.14: Trace CAN messages with option APPEND (if trace file exists)
+//
+// @todo: implement this test case if option APPEND is ever realized.
+
+// @gtest TCx4.15: Trace CAN messages with option OVERWRITE (if trace file exists)
+//
+// @expected: CANERR_xyz
+//
+TEST_F(TraceFile, GTEST_TESTCASE(WithOptionOverwriteIfFileExists, GTEST_ENABLED)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ uint16_t traceMode;
+ char string[CANPROP_MAX_STRING_LENGTH+1] = "";
+ char fname1[CANPROP_MAX_STRING_LENGTH+1] = "";
+ char fname2[CANPROP_MAX_STRING_LENGTH+1] = "";
+ struct stat fileStat1;
+ struct stat fileStat2;
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @test:
+ // @- note: set trace file location to "TraceFiles" in current directory
+ strcpy(string, TRACEFILE_FOLDER);
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- sub(1):
+ // @-- open trace file for DUT1 (default options)
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- check if trace file is open
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_ON, traceState);
+ // @-- get trace file name (1)
+ fname1[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FILE, (void*)fname1, CANPROP_MAX_STRING_LENGTH);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @-- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames() + TEST_FRAMES1;
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @-- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @-- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @-- close trace file for DUT1
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- check if trace file exists
+ EXPECT_EQ(0, stat(fname1, &fileStat1));
+ // @- sub(2):
+ // @-- set trace option to OVERWRITE
+ traceMode = CANPARA_TRACE_MODE_OVERWRITE;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- open trace file for DUT1 (with mode OVERWRITE)
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- check if trace file is open
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_ON, traceState);
+ // @-- get trace file name (2) and compare with file name (1)
+ fname2[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FILE, (void*)fname2, CANPROP_MAX_STRING_LENGTH);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @-- send some frames to DUT2 and receive some frames from DUT2
+ frames = g_Options.GetNumberOfTestFrames() + TEST_FRAMES2;
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @-- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @-- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @-- close trace file for DUT1
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @-- check if trace file exists (expect same name, but different size)
+ EXPECT_EQ(0, stat(fname2, &fileStat2));
+ EXPECT_STREQ(fname1, fname2);
+ EXPECT_NE(fileStat1.st_size, fileStat2.st_size);
+ // @-- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @post:
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.16: Trace CAN messages with non-writable folder (permission denied)
+//
+// @expected: CANERR_RESOURCE (errno=EROFS)
+//
+TEST_F(TraceFile, GTEST_TESTCASE(WithNonWritableFolder, GTEST_ENABLED)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ uint8_t traceType;
+ uint16_t traceMode;
+ uint16_t traceSize;
+ char string[CANPROP_MAX_STRING_LENGTH+1] = "";
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @test:
+ // @- set trace file location to non-writable root folder "/"
+ strcpy(string, NONWRITABLE_FOLDER);
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- open trace file for DUT1 (expect RESOURCE error)
+ errno = 0;
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::ResourceError, retVal);
+ EXPECT_EQ(EROFS, errno);
+ // @- check if trace file is open (expect OFF)
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- check trace file format (expect binary)
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_BINARY, traceType);
+ // @- check trace file mode (expect default)
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_MODE_DEFAULT, traceMode);
+ // @- check trace file size (expect 10240 * 10KB = 100MB)
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_SIZE_DEFAULT, traceSize);
+ // @- check trace file location (expect non-writable root folder "/")
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, CANPROP_MAX_STRING_LENGTH);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ(NONWRITABLE_FOLDER, string);
+ // @- check trace file name (expect RESOURC error)
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FILE, (void*)string, CANPROP_MAX_STRING_LENGTH);
+ EXPECT_EQ(CCanApi::ResourceError, retVal);
+ // @- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames();
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- close trace file for DUT1
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- check if trace file is closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @post:
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.17: Trace CAN messages with limitation
+//
+// @expected: CANERR_NOERROR (but trace file size is limited)
+//
+TEST_F(TraceFile, GTEST_TESTCASE(WithSizeLimitation, GTEST_ENABLED)) {
+ CCanDevice dut1 = CCanDevice(TEST_DEVICE(DUT1));
+ CCanDevice dut2 = CCanDevice(TEST_DEVICE(DUT2));
+ CCanApi::EChannelState state;
+ CANAPI_Status_t status = {};
+ CANAPI_Return_t retVal;
+ uint8_t traceState;
+ uint8_t traceType;
+ uint16_t traceMode;
+ uint16_t traceSize;
+ char string[CANPROP_MAX_STRING_LENGTH+1] = "";
+ char fname[CANPROP_MAX_STRING_LENGTH+1] = "";
+ struct stat fileStat;
+ // @pre:
+ // @- probe if DUT1 is present and not occupied
+ retVal = dut1.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT1) << " is not available";
+ // @- probe if DUT2 is present and not occupied
+ retVal = dut2.ProbeChannel(state);
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut2.ProbeChannel() failed with error code " << retVal;
+ ASSERT_EQ(CCanApi::ChannelAvailable, state) << "[ ERROR! ] " << g_Options.GetDeviceName(DUT2) << " is not available";
+ // @- check if different channels have been selected
+ ASSERT_TRUE((g_Options.GetChannelNo(DUT1) != g_Options.GetChannelNo(DUT2)) || \
+ (g_Options.GetLibraryId(DUT1) != g_Options.GetLibraryId(DUT2))) << "[ ERROR! ] same channel selected twice";
+ // @- initialize DUT1 with configured settings
+ retVal = dut1.InitializeChannel();
+ ASSERT_EQ(CCanApi::NoError, retVal) << "[ ERROR! ] dut1.InitializeChannel() failed with error code " << retVal;
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @test:
+ // @- note: set trace file location to "TraceFiles" in current directory
+ strcpy(string, TRACEFILE_FOLDER);
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_FOLDER, (void*)string, sizeof(string));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- set trace file size to 1 * 10KB = 10KB
+ traceSize = TEST_TRACESIZE;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- open trace file for DUT1 (default options with size limitation)
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- check if trace file is open
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_ON, traceState);
+ // @- check trace file format (expect binary)
+ traceType = UINT8_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_TYPE, (void*)&traceType, sizeof(traceType));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_TYPE_BINARY, traceType);
+ // @- check trace file mode (expect default)
+ traceMode = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_MODE, (void*)&traceMode, sizeof(traceMode));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_MODE_DEFAULT, traceMode);
+ // @- check trace file size (expect 1 * 10KB = 10KB)
+ traceSize = UINT16_MAX;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_SIZE, (void*)&traceSize, sizeof(traceSize));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(TEST_TRACESIZE, traceSize);
+ // @- check trace file location (expect "TraceFiles" in current directory)
+ string[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FOLDER, (void*)string, CANPROP_MAX_STRING_LENGTH);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_STREQ(TRACEFILE_FOLDER, string);
+ // @- check trace file name (expect extension ".dat")
+ fname[0] = '\0';
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_FILE, (void*)fname, CANPROP_MAX_STRING_LENGTH);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- start DUT1 with configured bit-rate settings
+ retVal = dut1.StartController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- send some frames to DUT2 and receive some frames from DUT2
+ int32_t frames = g_Options.GetNumberOfTestFrames() + TEST_FRAMES3;
+ EXPECT_EQ(frames, dut1.SendSomeFrames(dut2, frames));
+ EXPECT_EQ(frames, dut1.ReceiveSomeFrames(dut2, frames));
+ // @- get status of DUT1 and check to be in RUNNING state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_FALSE(status.can_stopped);
+ // @- stop/reset DUT1
+ retVal = dut1.ResetController();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @- close trace file for DUT1
+ traceState = CANPARA_TRACE_OFF;
+ retVal = dut1.SetProperty(CANPROP_SET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @- check if trace file is closed
+ traceState = CANPARA_TRACE_ON;
+ retVal = dut1.GetProperty(CANPROP_GET_TRACE_ACTIVE, (void*)&traceState, sizeof(traceState));
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_EQ(CANPARA_TRACE_OFF, traceState);
+ // @- check if trace file size is limited to 1 * 10KB = 10KB
+ EXPECT_EQ(0, stat(fname, &fileStat));
+ EXPECT_EQ(TEST_FILESIZE, fileStat.st_size);
+ // @- get status of DUT1 and check to be in INIT state
+ retVal = dut1.GetStatus(status);
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ EXPECT_TRUE(status.can_stopped);
+ // @post:
+ // @- tear down DUT1
+ retVal = dut1.TeardownChannel();
+ EXPECT_EQ(CCanApi::NoError, retVal);
+ // @end.
+}
+
+// @gtest TCx4.18: Trace CAN messages with segmentation
+//
+// @expected: CANERR_xyz
+//
+TEST_F(TraceFile, GTEST_TESTCASE(WithFileSegmentation, GTEST_DISABLED)) {
+}
+
+#endif // FEATURE_TRACEFILE != FEATURE_UNSUPPORTED
+
+// $Id: TCx4_TracefileRecorder.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Testcases/TCxX_Summary.cc b/Tests/Testcases/TCxX_Summary.cc
index 4c0b905..59f31e6 100644
--- a/Tests/Testcases/TCxX_Summary.cc
+++ b/Tests/Testcases/TCxX_Summary.cc
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,8 +44,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#include "pch.h"
@@ -427,4 +429,4 @@ TEST_F(Summary, GTEST_TESTCASE(GetDevice2Information, GTEST_ENABLED)) {
// @end.
}
-// $Id: TCxX_Summary.cc 1333 2024-06-01 22:18:12Z makemake $ Copyright (c) UV Software, Berlin.
+// $Id: TCxX_Summary.cc 1411 2025-01-17 18:59:07Z quaoar $ Copyright (c) UV Software, Berlin.
diff --git a/Tests/Version.h b/Tests/Version.h
index fb3e648..159323d 100644
--- a/Tests/Version.h
+++ b/Tests/Version.h
@@ -1,17 +1,18 @@
-// SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-or-later
+// SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0-or-later
//
// CAN Interface API, Version 3 (Testing)
//
-// Copyright (c) 2004-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2004-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
// All rights reserved.
//
// This file is part of CAN API V3.
//
// CAN API V3 is dual-licensed under the BSD 2-Clause "Simplified" License
-// and under the GNU General Public License v3.0 (or any later version).
+// and under the GNU General Public License v2.0 (or any later version).
// You can choose between one of them if you use this file.
//
-// BSD 2-Clause "Simplified" License:
+// (1) BSD 2-Clause "Simplified" License
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this
@@ -31,10 +32,11 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF CAN API V3, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
-// GNU General Public License v3.0 or later:
-// CAN API V3 is free software: you can redistribute it and/or modify
+// (2) GNU General Public License v2.0 or later
+//
+// CAN API V3 is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// CAN API V3 is distributed in the hope that it will be useful,
@@ -42,13 +44,13 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with CAN API V3. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with CAN API V3; if not, see .
//
#ifndef VERSION_H_INCLUDED
#define VERSION_H_INCLUDED
-// SVN revision number (update with each commit: XXVII)
-#define REVISION_NO "$Rev: 1373 $"
+// SVN revision number (update with each commit: XXXIV)
+#define REVISION_NO "$Rev: 1412 $"
#endif // VERSION_H_INCLUDED
-// $Id: Version.h 1373 2024-07-31 18:55:39Z gonggong $ Copyright (c) UV Software, Berlin //
+// $Id: Version.h 1412 2025-01-17 19:04:10Z quaoar $ Copyright (c) UV Software, Berlin //
diff --git a/Utilities/can_moni/COPYING b/Utilities/can_moni/COPYING
index f288702..9efa6fb 100644
--- a/Utilities/can_moni/COPYING
+++ b/Utilities/can_moni/COPYING
@@ -1,622 +1,281 @@
GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
+ Version 2, June 1991
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
this License.
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
@@ -628,15 +287,15 @@ free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
+convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
- This program is free software: you can redistribute it and/or modify
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
+ the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -644,31 +303,36 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, see .
Also add information on how to contact you by electronic and paper mail.
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Moe Ghoul, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/Utilities/can_moni/Driver.h b/Utilities/can_moni/Driver.h
index a7edba7..889c831 100644
--- a/Utilities/can_moni/Driver.h
+++ b/Utilities/can_moni/Driver.h
@@ -1,12 +1,12 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
+// SPDX-License-Identifier: GPL-2.0-or-later
//
// CAN Monitor for PEAK-System PCAN Interfaces (CAN API V3)
//
-// Copyright (c) 2007,2012-2024 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
+// Copyright (c) 2007,2012-2025 Uwe Vogt, UV Software, Berlin (info@uv-software.com)
//
-// This program is free software: you can redistribute it and/or modify
+// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
+// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
@@ -14,8 +14,8 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, see .
//
#ifndef DRIVER_H_INCLUDED
#define DRIVER_H_INCLUDED
@@ -29,7 +29,7 @@
#define CAN_TRACE_SUPPORTED 0 // write trace file (1=PCAN)
#endif
#define MONITOR_INTERFACE "PEAK-System PCAN Interfaces"
-#define MONITOR_COPYRIGHT "2007,2012-2024 by Uwe Vogt, UV Software, Berlin"
+#define MONITOR_COPYRIGHT "2007,2012-2025 by Uwe Vogt, UV Software, Berlin"
#define MONITOR_PLATFORM "Windows"
#define MONITOR_ALIASNAME "PCB:"
diff --git a/Utilities/can_moni/README.md b/Utilities/can_moni/README.md
index a1da4d5..56e8c25 100644
--- a/Utilities/can_moni/README.md
+++ b/Utilities/can_moni/README.md
@@ -1,5 +1,5 @@
-__CAN Monitor for PEAK-System PCAN Interfaces, Version 0.5.2__ \
-Copyright © 2007,2012-2024 by Uwe Vogt, UV Software, Berlin
+__CAN Monitor for PEAK-System PCAN Interfaces, Version 0.6__ \
+Copyright © 2007,2012-2025 by Uwe Vogt, UV Software, Berlin
```
Usage: can_moni [