In PanelPro's?Script Output?table - when printing event.newValue if event.propertyName == "currentPropertyName" -?I am seeing reports like "RD10" or "None", with corresponding report?"Orientation B Address 10(S)" , nothing corresponding to "None", in its Reporters table. (There must have been?some change made in the relevant part of the JMRI code recently?for some time ago the two non-None reports used to coincide.)
What you see in the reporters table is the report string generated by the RailCom tag. ?RD10 is the system name of the RailCom tag. ?
None is python¡¯s way of saying there is no report, but the reporter table shows that as blank.
I was trying to use, unsuccessfully,?your function reply(message) with message=None that I deemed to be a valid message. How can I generate a valid Z21reply type message, e.g. the non-None one above?
Right, None is not a valid message. ?The message format s described in the Z21 protocol manual.
To be precise, my problem is this.
In the simplest situation, suppose we have a single locomotive in a block being watched by our detector, heading towards the adjacent block. As its front wheels are?entering the adjacent block, the detector issues a message "None"?indicating, somewhat misleadingly,?that the loco has left the block. This is what I am calling the last message in my first post.?What is called the new event there happens when even the rear wheels are leaving the block.
I don't know for sure, only surmise that at this moment ?there must come another message from the detector, but this being again "None" our reporter takes no notice. However, I want to be informed when exactly the loco leaves the block entirely.
In this particular case, when you see None, the command station is telling us it believes there is nothing in the block.
The Z21 sends us an array of RailCom Tags it associates with the block. ?We clear our copy of the array and repopulate it with the new values every time the command station sends us new values ( it sends 2 at a time ). ?The only way for this array to remain empty, and hence for there to be no report, is for the command station to send us an empty array.
If you want to verify that, the CollectingReporterExample.py script (??) shows you how to ask for the report and print each value.
The other thing to look at to see if the block is completely free is by looking st the associated sensor in the sensor table.