Skip to content

Comments

Const, Control116 and Service116 Interfaces Changed or New in UPOS 1.16#21

Closed
mjpcger wants to merge 29 commits intoJavaPOSWorkingGroup:masterfrom
mjpcger:master
Closed

Const, Control116 and Service116 Interfaces Changed or New in UPOS 1.16#21
mjpcger wants to merge 29 commits intoJavaPOSWorkingGroup:masterfrom
mjpcger:master

Conversation

@mjpcger
Copy link
Contributor

@mjpcger mjpcger commented Sep 27, 2023

The DeviceClassConst, DeviceClassControl116 and services/DeviceClassService116 interfaces of those device classes that have been changed or that are new in UPOS 1.16 (DeviceMonitor, GestureControl, GraphicDisplay, IndividualRecognition, Lights, POSPower, SoundPlayer, SoundRecorder, SpeechSynthesis, VideoCapture and VoiceRecognition).

Remark: Diff shows much more changes within the Lights and POSPower interfaces as have really been made. Don't know the reason: different linefeeds convention? tabs / spaces? Problem of diff???

Added interfaces for new or changed device classes in UPOS 1.16. Updated interfaces for existing LightsConst and POSPowerConst to support added constants.
Interfaces for devices that have not been changed in UPOS 1.16 have been added.
Licence headers of the other 1.16 interfaces have been changed to match the Javapos conditions.
@mjpcger
Copy link
Contributor Author

mjpcger commented Sep 28, 2023

Have changed some headers and created interfaces for device classe that are unchanged in UPOS 1.16

@kuniss
Copy link
Member

kuniss commented Sep 28, 2023

Thanks for the PR, @mjpcger!
The Check PR was failing due to an out of memory error during javadoc generation. Seems, the processing JVM has not enough memory. I have to extend it in the GitHub Actions.
So, it is not your fault!

@kuniss kuniss self-assigned this Sep 28, 2023
@kuniss kuniss added this to the 1.16 milestone Sep 28, 2023
kuniss and others added 9 commits October 11, 2023 23:02
Also, updated Eclipse meta files for Eclipse 2023-09.
As a workaround for a type error in `PointCardRW.CapCardEntranceSensor`
which is there since Version 1.5.
Solves GH issues #20.
reported by the Gradle build scan.
Bug fixed: getUrl() must return String, not int.
Bug fixed: getUrl() must return String, not int.
@mjpcger
Copy link
Contributor Author

mjpcger commented Oct 15, 2023

Fixed some bugs in GraphicDisplay: getURL must return String, not int...

@kuniss
Copy link
Member

kuniss commented Oct 16, 2023

@mjpcger, the build failed for this PR because the javadoc runs out of memory.
Could you please do me a favor and try to put the following lines just below the java{} block in ?

javadoc {
    maxMemory = '64m'
}

And then commit it to the PR. This should re-trigger the build, automatically.

Hopefully, this will solve the compilation problem.

Increase memory for javadoc
@mjpcger
Copy link
Contributor Author

mjpcger commented Oct 16, 2023

I did it, unfortunately, build errors still happen.

@kuniss
Copy link
Member

kuniss commented Oct 16, 2023

Seems our javadoc generation needs a lot of memory...
May I ask you for a last try to increase it t0 512MB?

javadoc {
    maxMemory = '512m'
}

Just more memory for javadoc
@mjpcger
Copy link
Contributor Author

mjpcger commented Oct 16, 2023

Does not look better...

Missing setter for property Storage.
Missing setter for property Storage.
@mjpcger
Copy link
Contributor Author

mjpcger commented Oct 16, 2023

Due to missing setter for property Storage in GestureControl, I checked again the properties for all new device classes and found no more missing setters, getters, methods or wrong data types.

Layout of service and control interfaces has been reworked to match the structure of previously defined device classes.
Layout of service and control interfaces has been reworked to match the structure of previously defined device classes.
@mjpcger
Copy link
Contributor Author

mjpcger commented Oct 17, 2023

Just another rework for UPOS 1.16 interfaces, new ordering by capability, property and method in lexical order.

@kuniss
Copy link
Member

kuniss commented Nov 2, 2023

Have removed the following constants: SPLY_ST_HOST_HARDTOTALS and GDSP_ST_HOST_HARDTOTALS.

Reason: The description of both constants in the UPOS specification is senseless, both devices do not write to, they read from host or hard totals device, therefore, these constants are superfluous in practice.

UPOS specification 1.16.1 needs rework at this point.

@mjpcger , even if they useless - if they are defined in the UPOS specification and already implemented in OPOS we should add them to JavaPOS too! Just to have the same constants in OPOS and JavaPOS and to "consume" the constant value.

But in general you are right. All the Storage property descriptions are wrong as the devices do not write data, only read. In that sense a combination of 2 sources for reading is meaningless.

I guess, this is a simple copy'n'paste error in the specification.

@mjpcger
Copy link
Contributor Author

mjpcger commented Nov 3, 2023

Then at least the two constants should be marked as deprecated.

Useless constants have been re-added but marked as deprecated because they are (erroneously) present within the specification and in OPOS header files as well.
Copy link
Member

@kuniss kuniss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mjpcger ,
I validated all the Control sources against the UPOS 1.16 RCDS document (dtc/22-02-18).
The comments are not for you (except for one), but general comments.
Only some of them, like parameter naming ones, you may work on. But you do not need to do it. I can do it when I merge it to the main trunk.

public static final int SPLY_ST_HOST = 1;
public static final int SPLY_ST_HARDTOTALS = 2;
@Deprecated
public static final int SPLY_ST_HOST_HARDTOTALS = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error in spec!
As this is a output device it does not make sense to read from 2 sources.

// "ErrorEvent" "ErrorCodeExtended" Property Constants
/////////////////////////////////////////////////////////////////////

public static final int ESPLY_NOROOM = 201;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error in spec!
As this is an output device the storage space cannot be exhausted.

public static final int GDSP_ST_HOST = 1;
public static final int GDSP_ST_HARDTOTALS = 2;
@Deprecated
public static final int GDSP_ST_HOST_HARDTOTALS = 3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error in spec!
Does not make any sense for an output device as it cannot read from 2 sources.

// "ErrorEvent" "ErrorCodeExtended" Property Constants
/////////////////////////////////////////////////////////////////////

public static final int EGDSP_NOROOM = 201; // (Several)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error in spec!
Constant does not make sense as there is nothing written to storage, so it cannot be exhausted.

As recommended to allow error free javadoc processing
kuniss added a commit that referenced this pull request Dec 7, 2023
In fact, it was forgotten to fetch the PR's head before working on it.
So, now a comparison has been done and some adjustments has been made.
Mainly,
- sorting was corrected
- @Deprecation was added to some meaningless storage constants
- methods clearInput and clearInputProperties were added to
SpeechSynthesis, even if they are meaningless for this category but
defined in the UnifiedPOS standard
Some more memory for javadoc...
@kuniss
Copy link
Member

kuniss commented Dec 7, 2023

I let the "error in spec" issue above open as well as the PR until this has been discussed and decided in the UnifiedPOS committee.

@kuniss
Copy link
Member

kuniss commented Dec 8, 2023

@mjpcger
Copy link
Contributor Author

mjpcger commented Dec 8, 2023

Have tried to link both snapshots to JavaPOS-SPF and JavaPOS-SPF-Test. Unfortunately, the constants JposConst.JPOS_TRUE and JposConst.JPOS_FALSE remain missing. Due to a design error for property CapCardEntranceSensor of device class PointCardRW, these constants should be added at least to jpos 1.16, better to 1.15.3 as well.

@mjpcger
Copy link
Contributor Author

mjpcger commented Dec 8, 2023

I added my modified JposCons.class file to my projects and made a brief test with DeviceMonitor and GraphicDisplay. Seems to work as expected for both device classes.

@kuniss
Copy link
Member

kuniss commented Dec 9, 2023

Have tried to link both snapshots to JavaPOS-SPF and JavaPOS-SPF-Test. Unfortunately, the constants JposConst.JPOS_TRUE and JposConst.JPOS_FALSE remain missing. Due to a design error for property CapCardEntranceSensor of device class PointCardRW, these constants should be added at least to jpos 1.16, better to 1.15.3 as well.

That's because the branch is not up to date to the master branch: pr-21-javapos116...master
I need to rebase the branch on the master...

kuniss added a commit that referenced this pull request Dec 11, 2023
In fact, it was forgotten to fetch the PR's head before working on it.
So, now a comparison has been done and some adjustments has been made.
Mainly,
- sorting was corrected
- @Deprecation was added to some meaningless storage constants
- methods clearInput and clearInputProperties were added to
SpeechSynthesis, even if they are meaningless for this category but
defined in the UnifiedPOS standard
@kuniss
Copy link
Member

kuniss commented Dec 11, 2023

@mjpcger, I rebased the PR branch on master and published it again as second snapshot. Now the constants from 1.15.2 should be contained. Please check the 2nd snapshot release.

The snapshot artifact is available at https://oss.sonatype.org/content/repositories/snapshots/org/javapos/javapos-contracts/1.16.0-SNAPSHOT/

@mjpcger
Copy link
Contributor Author

mjpcger commented Dec 11, 2023

Works as expected. Use javapos-config-loader from master now because no snapshot for 1.16 is available. I would recommend to generate a snapshot from javapos-config-loader as well, with new device classes in jpos.dtd file, may be as in the sample jpos.dtd in the attached
jcl.zip file.

@mjpcger
Copy link
Contributor Author

mjpcger commented Dec 11, 2023

Or shall I create a pull request for the config loader?

@kuniss
Copy link
Member

kuniss commented Dec 12, 2023

Yes, you are right, @mjpcger! The javapos-config-loader needs to be updated too if new categories are added.
You don't need make a PR. I want to implement code generation for all files in the loader which are category listing related. It is more than jpos.dtd! See the profile package, e.g.
In fact, there are 7 files affected. E.g., see this example for all RFIDScanner references: https://github.com/search?q=repo%3AJavaPOSWorkingGroup%2Fjavapos-config-loader%20RFIDScanner&type=code

I hope, I will find the time for that shortly.

@kuniss
Copy link
Member

kuniss commented Dec 18, 2023

The JavaPOS 1.16 compliant javapos-config-loader is now also available as snapshot artifact at https://oss.sonatype.org/content/repositories/snapshots/org/javapos/javapos-config-loader/3.2.0-SNAPSHOT/.

@mjpcger
Copy link
Contributor Author

mjpcger commented Dec 21, 2023

The snapshot works perfectly for those device classes I have integrated into JavaPOS-SPF and JavaPOS-SPF-Test up to now: DeviceMonitor and GraphicDisplay.

@kuniss
Copy link
Member

kuniss commented Dec 21, 2023

The snapshot works perfectly for those device classes I have integrated into JavaPOS-SPF and JavaPOS-SPF-Test up to now: DeviceMonitor and GraphicDisplay.

Good to hear! Does the javapos-controlssnapshot works also for you?

@mjpcger
Copy link
Contributor Author

mjpcger commented Dec 21, 2023

Yes, all three snapshots work as expected (GraphicDisplay and DeviceMonitor, the other device classes: I don't know).

@mjpcger
Copy link
Contributor Author

mjpcger commented Feb 4, 2025

Don't know why checks have failed - These are only constants and two @deprecated marks...
IDE shows everything is OK.

New constants specified in UPOS 1.15.1 have been added to EVRW, FiscalPrinter, POSPrinter and Scanner.
@mjpcger mjpcger closed this by deleting the head repository Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants