Initial grouping attempts

As mentioned in this entry the PLM protocol handler is going to manage the PLM All Link database to provide control and feedback of each device and button.

Tonight I removed the code that configures the PLM for monitor mode (this is no longer necessary) and added code to read the link table at startup time. Using the response from this, I deleted all the links that I had set up in various test scenarios.

Then came the need to build the links rather than starting with the complicated state of synchronizing all the links with the listed devices, I decided to implement the creation of a single device, this will be necessary for adding future devices and will allow a more controlled test environment. From what I can tell, the procedure for getting the PLM-as-controller link to work is to

  1. Command the PLM into linking mode as controller
  2. Command the target device into linking mode

This works but unfortunately the group that the link is connected to is NOT recorded in the PLM, so much for using the PLM as the storage for the link database. There are a couple of things I might try like rewriting the new link record to include the target group in the link data, apparently this is target device specific but at the moment I cannot figure out if I can use it. Or if the worse comes to the worse, I can add functions to allow the PLM protocol handler to write _its_ understanding of the database to the config file. As I have already written the ability to set arbitrary data into things (using a map) I might just go the route of adding it to the config file.

Link records, two different buttons on the same KPL

plcd[1347]: PLMProtocol::GetPLMLinkDatabase:     sent: 0269
plcd[1347]: PLMProtocol::GetPLMLinkDatabase: received: 026906
plcd[1347]: PLMProtocol::GetPLMLinkDatabase: received: 0257e2011a1e8c020f36
plcd[1347]: PLMProtocol::GetPLMLinkDatabase: Mapping 1a1e8c00 to group 1
plcd[1347]: PLMProtocol::GetPLMLinkDatabase:     sent: 026a
plcd[1347]: PLMProtocol::GetPLMLinkDatabase: received: 026a06
plcd[1347]: PLMProtocol::GetPLMLinkDatabase: received: 0257e2021a1e8c020f36
plcd[1347]: PLMProtocol::GetPLMLinkDatabase: Mapping 1a1e8c00 to group 2
plcd[1347]: PLMProtocol::GetPLMLinkDatabase:     sent: 026a
plcd[1347]: PLMProtocol::GetPLMLinkDatabase: received: 026a15

Subject: