-
-
Notifications
You must be signed in to change notification settings - Fork 413
FTY remerge from master as of 2024-06-15 #2472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jimklimov
merged 121 commits into
networkupstools:FTY
from
jimklimov:FTY-remerge-20240615
Jun 26, 2024
Merged
FTY remerge from master as of 2024-06-15 #2472
jimklimov
merged 121 commits into
networkupstools:FTY
from
jimklimov:FTY-remerge-20240615
Jun 26, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a new driver for Bicker DC UPS systems based on the PSZ-1063 extension module. This includes UPSIC-1205, UPSIC-2403 and DC2412-UPS(LD) models. Signed-off-by: Nicola Fontana <ntd@entidi.it>
The protocol supports shutdown after a custom delay settable between 0 and 255 seconds. Unfortunately the real device (UPSIC-2403D) seems to always enforce a 2 seconds delay. Signed-off-by: Nicola Fontana <ntd@entidi.it>
Signed-off-by: Nicola Fontana <ntd@entidi.it>
Signed-off-by: Nicola Fontana <ntd@entidi.it>
Signed-off-by: Nicola Fontana <ntd@entidi.it>
Signed-off-by: Nicola Fontana <ntd@entidi.it>
Signed-off-by: Nicola Fontana <ntd@entidi.it>
Bicker told me to refer to the UPS Gen software's user manual for more details on their protocol, and in fact that manual contains much more info. Added a summary of available commands to the comments, as a quick reference for feature implementation. Signed-off-by: Nicola Fontana <ntd@entidi.it>
In the previous implementation the command index was always '\x03', as stated by the UPSIC manual. After new evidence has been found (UPS-Gen2 software user manual), it came out there are much more commands grouped in different indexes. Signed-off-by: Nicola Fontana <ntd@entidi.it>
I'm planning to add functions for reading strings, i.e. without knowing beforehand the size of the response packets. This required some refactoring of the receiving functions. Also, while at it, added docblocks to many Bicker functions, hopefully easing the maintenance in the future. Signed-off-by: Nicola Fontana <ntd@entidi.it>
Identification fields are now queried from the device. Also "battery.charge" is now set properly. Signed-off-by: Nicola Fontana <ntd@entidi.it>
Signed-off-by: Nicola Fontana <ntd@entidi.it>
Added the needed infrastructure for getting and setting parameters. Actually the only parameter that is surely working is "ups.delay.start". Signed-off-by: Nicola Fontana <ntd@entidi.it>
When a command is unsupported, the "\x01\x03\xEE\x07\x04" response packet is returned. This is different from a response packet with a wrong command index. WARNING: the "unsupported" packet has been found sperimentally and it is an undocumented feature. Signed-off-by: Nicola Fontana <ntd@entidi.it>
User provided strings could contain printf special sequences and as such they should never be used in the format argument of dstate_setinfo(). Signed-off-by: Nicola Fontana <ntd@entidi.it>
Accessing an uint16_t on odd addresses is not portable. Avoid having to deal with that issue by always constructing words mathematically from single bytes. This also solves any endianness difference. Signed-off-by: Nicola Fontana <ntd@entidi.it>
Signed-off-by: Nicola Fontana <ntd@entidi.it>
`char` is by default signed and (as the name implies) designed to access string characters. For accessing bytes, the `uint8_t` type is more appropriate. Signed-off-by: Nicola Fontana <ntd@entidi.it>
Ensure the format string in logging messages is the correct one without subcasting. Furthermore, due to the promotion rules of the C language (where any given type, even unsigned, is promoted to int when possible), explicitly cast to unsigned where required. Signed-off-by: Nicola Fontana <ntd@entidi.it>
Change BICKER_PACKET from a constant value to a macro that depends on the data length. This should make clear that the packet size depends directly from the data size. Refactored some code here and there trying to minimize the presence of magic numbers and clarify the intentions. Signed-off-by: Nicola Fontana <ntd@entidi.it>
Using an in/out struct and making some specific field mandatory is cumbersome and error prone. Now the data needed for setting or getting parameters is explicitly required by the arguments. Signed-off-by: Nicola Fontana <ntd@entidi.it>
These devices seem to be picky on what you use to set parameters. Signed-off-by: Nicola Fontana <ntd@entidi.it>
Every Bicker parameter that has a correspondence in nut-names.txt has been mapped. If the parameter is disabled on the device, no NUT variable is created. If the NUT variable is set to an empty string, the parameter is reset and disabled on the device and that NUT variable is removed. Signed-off-by: Nicola Fontana <ntd@entidi.it>
WIP: Bicker serial driver
…ices [networkupstools#2446, networkupstools#2455] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…" normally [networkupstools#2446] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…stools#2455] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…tart/stop" wrappings [networkupstools#2455] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… prepare Windows Firewall for upsd [networkupstools#2446, networkupstools#2455] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Add `net start/stop` docs and practical support to `nut.exe`
…has launched Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… O_NDELAY means EOF (the other side closed socket) [networkupstools#2484] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…s of these guards Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…around it [networkupstools#2484] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Make sure NUT driver daemons close their Unix sockets when their counterparts do
Combine several small PRs for issue networkupstools#1316 and their NEWS entries
…lenstest Define an `auglenstestsdir` to install the augeas `test_nut.aug` file
…al-nutscan.la to simplify nut-scanner recipes Initiated in DMF branch by commit 4fec99a Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…d of defining them at first assignment Would help later when merging DMF/FTY branches; for now just a bit of syntactic sugar and reduction of diffs against them. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ave libserial-nutscan.la Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…n_la_LDFLAGS Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ase after recent recipe changes Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
34 tasks
…e (is flag now) Lingered in FTY branch, long gone in master. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…mmonstr.la Initially that embedding was done to help libnutscan builds with libcommonstr.la helper, but then a separate link with libnutwincompat.la was back-ported - so this line removal helps both to constrain the helper size/scope, and against a build-time conflict. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…serial-nutscan Port recipe for `libserial-nutscan.la` from DMF/FTY branch and clean up nut-scanner makefile
…wincompat-nutscan Revise `libwincompat.la` vs. `libcommonstr.la` helpers in `libnutscan` build recipe
clients/upsclient.h: include sys/types.h
…pstools#2473] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ge-20240615 Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…etworkupstools#2473] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ge-20240615 Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
DMF
NUT Data/Dynamic Mapping File/Format/Functionality feature
impacts-release-2.8.2
Issues reported against NUT release 2.8.2 (maybe vanilla or with minor packaging tweaks)
nutconf
NUT configuration library and tool
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bump the copy of 42ity fork contents to minimize difference with the master. Follows up from previous resync in PR #2275 (made before NUT v2.8.2 was released, including some features backported from the FTY branch), and related to #1316 generally.
Regarding parts that originated in 42ITy and were upstreamed earlier, the
nutconfeffort got largely updated in the upstream during the past few months.