JavaPOSWorkingGroup / javapos-contracts

Hosts the interfaces and data types of the UnifiedPOS reference implementation for Java.
Other
8 stars 9 forks source link

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

Open mjpcger opened 11 months ago

mjpcger commented 11 months ago

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???

mjpcger commented 11 months ago

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

kuniss commented 11 months ago

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!

mjpcger commented 11 months ago

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

kuniss commented 11 months ago

@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.

mjpcger commented 11 months ago

I did it, unfortunately, build errors still happen.

kuniss commented 11 months ago

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'
}
mjpcger commented 11 months ago

Does not look better...

mjpcger commented 11 months ago

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.

mjpcger commented 11 months ago

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

mjpcger commented 10 months ago

And at least comment adjustments to match the style used in other Const interface classes. Additionally, OPOS_ prefix rfemoved from some extended error code values.

mjpcger commented 10 months ago

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.

kuniss commented 10 months ago

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 commented 10 months ago

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

kuniss commented 9 months ago

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 commented 9 months ago

@mjpcger, you may try the snapshots built from your contribution: https://oss.sonatype.org/content/repositories/snapshots/org/javapos/javapos-contracts/1.16.0-SNAPSHOT/ https://oss.sonatype.org/content/repositories/snapshots/org/javapos/javapos-controls/1.16.0-SNAPSHOT/

Any feedback is appreciated.

mjpcger commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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: https://github.com/JavaPOSWorkingGroup/javapos-contracts/compare/pr-21-javapos116...master I need to rebase the branch on the master...

kuniss commented 9 months ago

@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 commented 9 months ago

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 commented 9 months ago

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

kuniss commented 9 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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