JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

IrpTransmogrifier: new program/library for IRP protocols
Goto page Previous  1, 2, 3 ... 10, 11, 12, 13, 14  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Wed May 19, 2021 3:09 pm    Post subject: Reply with quote

Turned out that it was pretty easy to write a Protocol.sort(Map<String,Long>map) function as outlined above.

Code:
   /**
     * Test of sort method, of class Protocol.
     */
    @Test
    public void testSort() {
        System.out.println("sort");
        Map<String, Long> unsortedMap = new HashMap<>(8);
        unsortedMap.put("january", 1L);
        unsortedMap.put("february", 2L);
        unsortedMap.put("F", 3L);
        unsortedMap.put("D", 4L);
        unsortedMap.put("T", 0L);
        Map<String, Long> sortedMap = rc5.sort(unsortedMap);
        String[] expResult = new String []{ "D", "F", "T", "february", "january" };
        String[] result = sortedMap.keySet().toArray(new String[5]);
        assertEquals(result, expResult);
    }

rc5 is an instance of class Protocol.

Checking it soon.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4515
Location: Cambridge, UK

                    
PostPosted: Thu May 20, 2021 8:14 am    Post subject: Reply with quote

Perhaps you misunderstood what I want to achieve. Maintaining the insert order is exactly what I want. I am providing Command(...) with a LinkedHashMap in the order that I want the parameters listed in the Girr file. That order happens to be the order in the IRP Definitions section, but that is a matter for RMIR. I do not need Girr to link back to the IRP, or anything like that, to get the order. Simply maintain the order I provide.

I could not see why the change I suggested, changing HashMap to LinkedHashMap in just one line, would not achieve this so I have compiled Girr locally with this change and tested it. It works as I expected. I did, however, have to make some additional changes in CommandNGTest.java as that currently builds in, in the expected results, the changes of order that HashMap makes. I changed HashMap to LinkedHashMap in lines 59 and 66 and amended the expResult values at lines 413, 427 and 438 to the order in which CommandNGTest() adds them. This actually seems to me to be an improvement, as to rely in a test on the juggling of order that HashMap makes does not seem very satisfactory. So I hope you will feel that you can make these changes.
_________________
Graham
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Thu May 20, 2021 2:31 pm    Post subject: Reply with quote

Yes, I had misunderstood you: I thought it was a IrpTransmogrifier issue, but it was about the Girr library. I have checked in the requested changes, and fixed the (agreed!) stupid tests.

Still, I think the new functions (Protocol.sort(Map<String,Long>) and Parameterspec.sort(Map<String,Long>)) are pretty cool...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Thu Jun 03, 2021 8:09 am    Post subject: Reply with quote

Barf wrote:
I plan to release version 1.2.10 in June or so. (The version number "1.2.9" was botched... so there will not be a version with that number.) This will just be collecting a number of tweaks and fixes, in particular to IrpProtocols.xml. The then-current rmProtocols.xml of RMIR will be merged into IrpProtocols.xml (likely).


Said and done. Release candidate 1 of 1.2.10 is found here.

Release notes:

Code:
2021-06-??: Version 1.2.10. This version is considered "Long Time Stable".

* Many small or internal fixes to the API, wrappers, tests, documentation, the build process.
* Added xpath processing to XmlTransmogrifier.
* Clarified Variations and remote marker; some constructs now disallowed, #200.
* New options --xml.
* Fixed broken xinclude, #199.
* Updated X10 protocols (mostly by Graham).
* Updated Apple protocol.


Please report any issues. Planned to make final 1.2.10 release soon.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Thu Jun 03, 2021 2:07 pm    Post subject: Reply with quote

Release candidate 1 of Girr 2.2.10 is found here.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4515
Location: Cambridge, UK

                    
PostPosted: Fri Jun 04, 2021 7:51 am    Post subject: Reply with quote

When I pull the latest IrpTransmogrifier code from github with Eclipse, package it with mvn and run it to get its version, it still says 1.2.10-SNAPSHOT commidId f33c30d, not the 22c688c of release candidate 1. Am I doing something wrong, or is the source not updated yet?
_________________
Graham
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Fri Jun 04, 2021 8:54 am    Post subject: Reply with quote

Sorry, I can not find anything wrong here. Confused 22c688c8632a6b9eb4cf69b5617140b1377aba86 is correct;

Code:
$ java -cp IrpTransmogrifier-1.2.10-SNAPSHOT.jar org.harctoolbox.irp.Version
IrpTransmogrifier version 1.2.10-SNAPSHOT
22c688c8632a6b9eb4cf69b5617140b1377aba86

Somehow your build is picking the wrong version.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4515
Location: Cambridge, UK

                    
PostPosted: Fri Jun 04, 2021 1:13 pm    Post subject: Reply with quote

Barf wrote:
Somehow your build is picking the wrong version.

This is mysterious. I have checked file dates on the source files that Maven is building from, and they appear to be the latest ones. I see that the Version command simply prints out a value that is hard coded in Version.class, so I have looked into Version.class both (a) as created by my "mvn package" command from what appear to be the latest sources, and (b) the one in the IrpTransmogrifier-1.2.10-SNAPSHOT.jar file in your ci-build and they are different, though supposedly created from identical source files. They are the two values I quoted from in my earlier post. I don't understand how that can happen.
_________________
Graham
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Sat Jun 05, 2021 2:01 pm    Post subject: Reply with quote

Graham found some non-deterministic stuff in the tests for the Girr library, so after fixing this, I tagged the CI release as release candidate 2 for 2.2.10 (commitId a1c21931a2045ceccd4ef381859826fe2c642293)..

The build problems have been clarified in personal communication with Graham.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Mon Jun 28, 2021 9:24 am    Post subject: Reply with quote

Version 1.2.10 of IrpTransmogrifier has been released. This version is considered "Long Time Stable"!! Cool

It is available on GitHub as well as in the Maven central repository.

Release notes:
Code:

* New protocols NEC-Yamaha and NEC1-Yamaha.
* Make RCMM32 an alias to Nokia32.
* Merge protocol fixes from rmProtocols.xml of RMIR, latest snapshot. #208.
* Make DirecTV an alias to DirecTV_P3. #206.
* Many small or internal fixes to the API, wrappers, tests, documentation, the build process.
* Added xpath processing to XmlTransmogrifier.
* Clarified Variations and remote marker; some constructs now disallowed, #200.
* New options --xml.
* Fixed broken xinclude, #199.
* Updated X10 protocols (mostly by Graham).
* Updated Apple protocol.


Also the Girr library version 2.2.10, also Long Time Stable, has been release. Unfortunately, at the time of this writing, it is not yet on Maven Central, hopefully tomorrow.
Code:

Change Remote to implement Iterable (#24). CommandSets should be first order citizens, function like getCommands in Remote and RemoteSet may exist, but only as deprecated.

New schema version 1.2 with systemID http://www.harctoolbox.org/schemas/girr_ns-1.2.xsd.


Many thanks to Graham for all his feedback and suggestions!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4515
Location: Cambridge, UK

                    
PostPosted: Mon Jun 28, 2021 12:47 pm    Post subject: Reply with quote

Barf wrote:
Also the Girr library version 2.2.10, also Long Time Stable, has been release. Unfortunately, at the time of this writing, it is not yet on Maven Central

It is on Maven Central now Very Happy . I have updated RMIR with these, also with jp12serial v0.26 binaries for Windows but not other OS. This is now in the SVN, as version 2.12.19. It isn't quite the final v2.12.19 as at least the other binaries for jp12serial v0.26 are needed, but when they are available I will post a development build of v2.12.19 for testing.

There have been sufficient updates since the last official release, even though many are minor, that I am considering calling the next release v2.13.0. Comments on this are welcome.
_________________
Graham
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Tue Jun 29, 2021 5:19 am    Post subject: Reply with quote

mathdon wrote:
... the other binaries for jp12serial v0.26 are needed,

As I already wrote in a personal PM, I just checked in them. Including Raspberry.

Quote:

There have been sufficient updates since the last official release, even though many are minor, that I am considering calling the next release v2.13.0. Comments on this are welcome.


Well, there is the semver, but I doubt that very many are following that literally -- I certainly do not. The difference between major, minor and patch versions are in practice not really crystal clear. Linus Torvalds recently changed the major version of the Linux kernel from 4 to 5 with a similar rationale...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4515
Location: Cambridge, UK

                    
PostPosted: Thu Mar 24, 2022 1:21 pm    Post subject: Reply with quote

I have now posted development build RMIR v2.14.4 in the RMIR Development folder on SourceForge and also posted the source to the SVN. The rmProtocols.xml file includes a major update to the Keeprite A/C protocol which I hope you will find acceptable.
_________________
Graham
Back to top
View user's profile Send private message
Barf
Expert


Joined: 24 Oct 2008
Posts: 1402
Location: Munich, Germany

                    
PostPosted: Mon Apr 25, 2022 9:42 am    Post subject: Reply with quote

mathdon wrote:

The rmProtocols.xml file includes a major update to the Keeprite A/C protocol ...


I have merged in the changes (from svn version 1913 to be exact), and checked in as commit 873e6f90e80881cf7807d90d72feceed3d4748fe. However, I made the following changes:

* Renamed Eufy 11s to Eufy, and Keeprite A/C to Keeprite. In both cases, I see no advantage in the longer name.
* In NEC1-Yamaha it appears that you are using the irp of NEC-Yamaha (i.e. without repeat). I did not take your change.

Please let me know if you disagree.

I have a problem with the F12* stuff. I will elaborate and probably present an alternative solution in a future post.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4515
Location: Cambridge, UK

                    
PostPosted: Mon Apr 25, 2022 11:05 am    Post subject: Reply with quote

I didn't create the protocols.ini entries for Eufy 11s and Keeprite A/C, I just kept those existing names for rmProtocols.xml. It doesn't cause a problem if you to use shortened names, but the existing names will remain in protocols.ini for backward compatibility. I think the NEC1-Yamaha IRP was an oversight. It looks as if I did a copy and paste and forgot to update the IRP.

I am sorry you are revisiting the F12x issue as I thought we had arrived at an agreed solution. I will need to find my test files which are by now buried among many others.
_________________
Graham
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Software All times are GMT - 5 Hours
Goto page Previous  1, 2, 3 ... 10, 11, 12, 13, 14  Next
Page 11 of 14

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control