Skip to content

Tags: step855/libplctag

Tags

v2.5.0

Toggle v2.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Release for 2.5.0 (libplctag#354). Fix libplctag#275. Fix libplctag#338…

…. Fix libplctag#344. Fix libplctag#352.

* Don't call the tag's abort function if it doesn't have one.

* Remove refactored common request status checking code.

* Add common request status checking code.
* Fix duplicate slash in path.

* Bump version for request use-after-free fix.

* callback with user data (libplctag#345)

* add callback with user data

* add test_callback2

* rename plc_tag_register_callback2 to plc_tag_register_callback_ex

* rename test_callback2 to test_callback_ex

* refer to each other

* start fix ups of version.

Co-authored-by: Kyle Hayes <kyle.hayes@gmail.com>

* Break apart the ifdef checks as something in Intellisense is breaking and setting _WIN32 even on Linux.

* Add test_callback_ex to POSIX build.

* Rename string.c to string_standard.c to support better string documentation.

* Fix string docs and examples (libplctag#347)

* Rename string.c to string_standard.c to support better string documentation.

* Split string examples into standard and non-standard.

* Update example docs to describe new string examples.

* Add string tests for standard and UDT strings.

* Fix up extended callback code.   Type of function pointer is not castable to/from a void pointer.  Formatting. (libplctag#348)

* Synthesize create events. (libplctag#349)

* Fix version comment, version 2.5 now.

* Synthesize create events.   Needs to be reworked when event queuing is done.

* Fix event status (libplctag#350)

* Add better (?) status handling for tag events.

* Raise and fire events with new functions.

* Add status output.   Fix required version on test_callback_ex.c.

* More event fixes.   Don't synthesize created event on started events.   Missed special tag created event raise code.

* Add @Joylei's windows event test.

* Change code to use extended callback and only wake one thread instead of all threads.

* Add create callback and fix missing events and duplicate events. (libplctag#351)

* Make mutex locking recursive.

* Raise a read started event when the initial read is triggered.

* Add callback to creation args so that early events can work.

* Fix event handle to avoid duplication, drops and handle early events.

* Clean up example of simple callback.

* Add create callback (libplctag#353)

* Make mutex locking recursive.

* Raise a read started event when the initial read is triggered.

* Add callback to creation args so that early events can work.

* Fix event handle to avoid duplication, drops and handle early events.

* Clean up example of simple callback.

* Add new ignorable directory to .gitignore.

* Remove direct calls to callback function and use raise and dispatch functions.

* DS_Store again.   Where is this coming from?

* Add debugging output of status when raising an event.

* Add casts to force status to correct size.

* Yikes, caught typo of plc_tag_destroy() called instead of plc_tag_decode_error()!

* Wasn't checking for test_callback_ex to exist before running tests.

* Backout change to aid merge.

* Add missing check for test_callback_ex.

* Output status when DELETE event is raised.

* Handle tag deletion events.

Co-authored-by: joylei <leingliu@gmail.com>

v2.4.12

Toggle v2.4.12's commit message
Work around git snafu. Can't really delete tags in GitHub?

v2.4.11

Toggle v2.4.11's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge prerelease with fix libplctag#328. (libplctag#337)

* Adding string test.

* Fix libplctag#328 (libplctag#336)

* Checkin for testing with Valgrind.

* Update string test to catch errors.

* Add overwrite check for string count word.

v2.4.10

Toggle v2.4.10's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge prerelease with fix libplctag#328. (libplctag#337)

* Adding string test.

* Fix libplctag#328 (libplctag#336)

* Checkin for testing with Valgrind.

* Update string test to catch errors.

* Add overwrite check for string count word.

v2.4.9

Toggle v2.4.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Prerelease - fixes for Micro8x0 tag listing. (libplctag#335)

* Bump version for more tag listing fixes.

* Allow Omron/Micro8x0 tag listing again.   More fixes.

* More debugging on setting vtable values to determine why raw tags don't work for Micro8x0.

* Split tag listing into Logix and Micro800 code.

* Only output hard errors.

* Update copyright year.

* Fix compile warnings.

* Clean up code.   Make sure callbacks are made for read/write completion.

* Turn into test tool for run_tests.sh.

* Add test_special to test special tags.

* Set up test_tag_attributes as a new test for run_tests.sh.

v2.4.8

Toggle v2.4.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge prerelease, fixes for 100k tags, add tests (libplctag#332)

* Fix libplctag#317 tag list for other plcs (libplctag#318)

* Allow @tags to be created by all CIP PLCs.

* Bump version for Omron/Micro800 tag listing attempt.

* Clean up tag if the returned tag does not have a good status.

* Some PLCs support tag listing but not UDT listing.

* Omron supports request packing.   Omron and Micro800 support tag listing but not UDT listing.

* Omron fixes (libplctag#323)

* Fix indentation.

* Suppress Omron request packing and tag listing.   Not fully supported.

* On use old ForwardOpen on PCCC PLCs.

* Add more tests for PLC-5, Micrologix and DH+ bridging.

* Add test counts, clean up output.

* Exit error codes were swapped.

* Change into a runnable test for the test harness.

* Add more tests and test renaming.

* Automatic read scheduling is not WARN level logging.

* Add random jitter to start of auto reads.

* Abort any in-flight requests when tag is being destroyed.  This will leak otherwise!

* Change how auto read times are handled to prevent temporal clustering.

* Add test_many_tag_perf test program

* New test program to test large numbers of tags using callbacks.

* Commenting out debugging code.

* Wait async for tag creation to complete.

* Still working.   Tried 30 tags.  Need smarter waiting for creation complete.

* Change how tag creation completion is determined based on first read completion.

* Test is now for 100k tags for 30 seconds.  Make this work.

* Fix minor clang warnings. (libplctag#326)

* Fix minor clang warnings.

* Only calculate new auto read time if we triggered a read.  This avoids skips.

* Count start and completion of read/write.

* Small changes to support 100k tags (libplctag#329)

* Add max and average timing for reads.

* Add 100k tag test.

* Update version for new release.

* Lots of tag support (libplctag#330)

* Add max and average timing for reads.

* Add 100k tag test.

* Tweaks for 100k tags.

* Fix logging message.   It is not fatal if we cannot copy the keys.

* Test many tags (libplctag#331)

* Fix logging message.   It is not fatal if we cannot copy the keys.

* Log which port is being opened for the socket.

* Allow the port to be specified.

* Add macOS debugging of socketpair() failure.

* Getting closer, supports 1000 tags well.

* Decrementing ref count could cause the tag to be destroyed, so move it to the end.

* If resource release caused a delete, then the status setting would be a use after free.

* More testing and increase load to 100k tags and 60 seconds.

* Update copyright year.

v2.4.7

Toggle v2.4.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix Omron failures: remove tag listing support and multi-request pack…

…ets. Fix DH+ bridging. (libplctag#325)

* Fix libplctag#317 tag list for other plcs (libplctag#318)

* Allow @tags to be created by all CIP PLCs.

* Bump version for Omron/Micro800 tag listing attempt.

* Clean up tag if the returned tag does not have a good status.

* Some PLCs support tag listing but not UDT listing.

* Omron supports request packing.   Omron and Micro800 support tag listing but not UDT listing.

* Omron fixes (libplctag#323)

* Fix indentation.

* Suppress Omron request packing and tag listing.   Not fully supported.

* On use old ForwardOpen on PCCC PLCs.

* Add more tests for PLC-5, Micrologix and DH+ bridging.

* Add test counts, clean up output.

v2.4.6

Toggle v2.4.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix libplctag#309, Fix libplctag#312, PCCC PLC enhancements (libplcta…

…g#316)

* Bump version for next release.

* Initial add of condition vars to POSIX platform.

* Add initial Windows condition var implementation.

* Need to clear the condition variable flag when leaving wait successfully.

* Add timeout to socket read/write.

* Fix up calls to socket read/write for new timeout parameter.

* Condition variable waits use absolute time, not relative time!

* Complete rewrite of the state machine to use condition vars and socket timeouts.

* Handle socket timeouts.

* Fix up debugging.

* Adding thread_stress to test like async_stress, but multithreaded.

* Clear the tag ID when starting plc_tag_create() as there is no ID at this point.

* Add caller informatio to condition variable functions.

* Clearing the tag ID for debugging happens whether or not the tag is being destroyed.

* Separate out clean up stages for clarity and debugging.

* Change modbus to use fair queuing and fix exposed race condition in run_tags.

Calling rc_dec on the tag could result in the PLC destructor being called but the call to rc_dec is within the PLC mutex.

* Simplify run_tags() tag list handling.

* Added debugging output and fixed compilation warnings on conditional variable functions.

* Added thread_stress.c to Windows build.

* Oops, add the port for the default.

* Add function to clear a condition variable.

Needed for making sure that the cond var is clear before starting to wait for read/write to complete.

* Add constant for the maximum event ID.

* Add condition var to tag.  Add new public functions for waking and base class initialization.

* Whitespace.

* Call base class initialization.

* Call base class initialization.

* Add condition var to session structure.

* Recoding to use condition vars and socket timeouts.

* Comment out timeBeginPeriod() call as it is no longer needed.

The condition variable and socket waits seem to be working well.

* Add time in debugging output.

* Adde thread _stress test.

* On reconnect or initial connect we want to make sure that the session handle is zero.

* Add delay response option to allows test_callback.c to succeed on faster machines.

* Add delay response param to allow callback tests to pass.

* Add response delay in tests for all platforms.

* Bump the delay to 20ms to allow the test to complete correctly.

* Print out milliseconds on timeout failure.

* Set timeout to 50ms to handle really bad CI test VMs.

* Silence warnings about unitialized variables by setting pointers to null.

* Debugging 200 tag stress test results.  PLC overrun?

* Drop log level down to a more reasonable level for production. (libplctag#289)

* Fix libplctag#264 (libplctag#292)

* Change how PCCC/DF1 tag names are parsed to use a struct for the data.

* Add bit tag handling.

* Output which bit is selected on bit tags.

* Tested support for bit tags with N and B files.

* Removing Windows multimedia library since we do not call timeBeginPeriod().

* Support more PCCC data file names (libplctag#296)

* Change PCCC types to be the actual byte type value.  Why translate this?

* Set the element size and type based on the decoding of the PCCC data file name.

* Remove unused commented out code.

* fix incorrect use of address.bit instead of address.is_bit.   Fix type case now that bit is an integer.

* add is_bit flag and bit number.

* Support field names including bits for common data file types.

* Fixed check for single bits.  They are allowed if the element size is 2 bytes.

* Fixed logic on tag timeout.   It was treated as a fatal failure.

* Changed data timeout to 5 seconds.   Network is really bad.

* Support plc_tag_set_debug_level() and change library load path support on Linux. (libplctag#301)

* Hide internal library symbols. (libplctag#302)

* Next version.

* Add modbus test server to test code.

* Add script to run multiple tests.

* Adding macOS ARM binaries to build.  Removed most EXPERIMENTAL names.

* Noting Arm support for macOS.

* Fix 308 - Omron performance (libplctag#313)

* Add more tests for Omron.

* Add Omron support for larger packets and attempt to support Omron strings.

* Fix 312 - add connection grouping. (libplctag#314)

* Add connection group support.

* Fix incorrect checks when searching for an existing Modbus PLC connection.

* Modbus emulator is very slow to start up, add a sleep to wait for it.

* If there is no port open locally, we will get a ECONNREFUSED error.

* Remove duplicate code.

* Merge Modbus perf updates (libplctag#315)

* Initial add of sock_wait_event() and sock_wake().

* Add socket wake pipe constructor.  Need two fds.

* Add start of Windows implementation for socket_wait_event() and socket_wake().

* Disconnect and close are the same event?

* Removed duplicate event type, DISCONNECT vs. CLOSE.

* Move wake pipe creation to first part of connection process instead of doing it on demand.

* Cobble together code to do a wake socket instead of using Windows events.

* Minor compilation fixes.

* Add wrapper function to wake tags.

* Oops, forgot to export plc_tag_generic_wake_tag_impl()!

* Fix typo in debug output.

* Move wake channel set up earlier so that the status does not poison the final return status.

* Move wake channel creation earlier so that the status does not poison the return status.

* Refactor to use socket events.  Basic read and write for single tags works.

* Rework error path clean up of sockets to properly clean up new wake sockets.

* Fix clean up on error path.   Rework receive_response() to lower latency and make sure that we only read exactly the right amount.

* Add new vtable entry for waking the PLC.

* Cleanup some FIXMEs.

* Clean up more FIXMEs.

* Start to include stand enough headers for stand-along compilation.

* Add vtable entry and implementation for waking plc through tag.

* More FIXME cleanups.

* Compilation fixes for socket events.

* Remove unused state enum.

* Try to fix some macOS compilation errors.

* More macOS compilation fixes.

* Set debugging output to debug macOS test failure.

* More macOS.   SIGPIPE suppression is annoying.

* Change to using socketpair() instead of pipe() for better macOS behavior.   MacOS really wants to generate SIGPIPE.

* Removed old, commented out code.

* Clean up calculation of Forward Open packet size.

v2.4.6-pre

Toggle v2.4.6-pre's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix 312 - add connection grouping. (libplctag#314)

* Add connection group support.

v2.4.5

Toggle v2.4.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix libplctag#295, fix libplctag#306 (libplctag#311)

Fixes issue libplctag#295, timeout not honored when PLC is not connected.  This is particularly problematic on Windows.  This makes the connection process async as well.

Fixes issue libplctag#306, Modbus tags got unequal time.   This changes how Modbus queues work.  

Additional changes:
 - fix output of list_tags so that program tags have the correct full name including the program name.
 - change the socket read/write functions to try doing the socket operation first and only fall back to select() if the operation fails to send/receive data and there is a timeout.  This saves a system call in the common case that data can be written and in the case that a read is broken into multiple calls.