Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Serialization of CQC SMS Serial Interface Driver
#21
If the driver itself remembers the last time it sent, it can provide that capability by just waiting for the remaining amount of time if the last one was within the timeout. I guess I could make the timeout a driver prompt so you can adjust if you want.
Dean Roddey
Explorans limites defectum
Reply
#22
Here is another one to try. This one is considerably more complex a change to do by eye, but hopefully it's right. So the deal is that the Busy field is still there. When you send a message it sets the busy field and sets a time stamp for then plus 5 seconds. The poll will then watch for that time to expire and then it will clear the Busy flag. That way we don't have the driver blocking for any longer than needed to send the message, and the Busy field can be used to limit the rate.

If you try to send while the Busy field is set, it will be rejected. So import, then do a reconfig on the driver to pick up the changes.


Attached Files
.cqcdrvpack   SMS_WithBusyField2.CQCDrvPack (Size: 8.83 KB / Downloads: 1)
Dean Roddey
Explorans limites defectum
Reply
#23
Thanks. I'll give it a try.
Reply
#24
This does not work. The driver goes from OK to Red, to OK, to RED.

The "Some fields of this driver got no initial values." is coming from the SMS driver.

[Image: Screen-Shot-2019-09-14-at-10-23-40.jpg]
Reply
#25
OK, I got something wrong. I can't really realistically run it because it will just time out trying to talk to the hardware, so I was sort of having to do it by eye. You might have to set up the remote port server for me so that I can actually run it. I don't need to send any messages most likely.

If you put it into verbose mode and check the logs it may give us a hint that would let me fix it without having to do that.
Dean Roddey
Explorans limites defectum
Reply
#26
Here are logs with driver in debug mode.
Reply
#27
Hmmm... Something was going way too fast. It logged a lot of messages all in a second, then went off line. I'll have to see if I can figure that out.
Dean Roddey
Explorans limites defectum
Reply
#28
OK, the dangers of doing stuff by eye. He had a HeartBeat flag in the poll that he would set to true if he got a response from the modem. I needed to now use the Poll for multiple things, so I speeded up the poll and use time stamps to do the different things. So now his code to get that heartbeat flag wasn't always being called. So the first time it called the poll method, that would be false and his logic would say, oh well no response so recycling the connection.


Attached Files
.cqcdrvpack   SMS_WithBusyField3.CQCDrvPack (Size: 8.86 KB / Downloads: 1)
Dean Roddey
Explorans limites defectum
Reply
#29
(09-14-2019, 05:04 PM)Dean Roddey Wrote: OK, the dangers of doing stuff by eye. He had a HeartBeat flag in the poll that he would set to true if he got a response from the modem. I needed to now use the Poll for multiple things, so I speeded up the poll and use time stamps to do the different things. So now his code to get that heartbeat flag wasn't always being called. So the first time it called the poll method, that would be false and his logic would say, oh well no response so recycling the connection.

Thanks.. What was changed, in layman's terms Big Grin
Reply
#30
It's just that the driver itself now imposes the delay, so you don't have to. It will return as soon as it has sent the message, but it sets the Busy field and will keep it set for the next 5 seconds. If you try to send while the Busy field is set, it will return an error. So continue to use the WaitFieldValue() thing to wait for it not to be busy.

Of course now that the delays are in the driver, you can use that to some advantage in some cases. If you have other things to do in the action, interweave some of that between msg sends, then wait for the Busy field, send a message, do some other things, wait for the Busy field, etc...
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TTS Driver Error kblagron 7 760 03-03-2023, 01:05 AM
Last Post: kblagron
  Admin Interface Help Doesn't Work alexismtz13 1 645 04-28-2022, 01:14 PM
Last Post: Dean Roddey
  Driver for Amazon 4k Stick Darrie 3 897 01-15-2022, 02:21 PM
Last Post: znelbok
  CQSL Interface Driver connects but no control NightLight 3 949 10-26-2021, 01:12 PM
Last Post: NightLight
  6.0.0 Interface Viewer - Action Trace Mark Stega 1 863 03-09-2021, 06:39 PM
Last Post: Dean Roddey
  Cannot Bind Interface to 80 gReatAutomation 1 1,159 11-05-2020, 04:18 PM
Last Post: Dean Roddey
  ClickPLC driver now failing after upgrade znelbok 2 1,279 09-21-2020, 10:48 PM
Last Post: znelbok
  Pentair driver tom 5 2,435 08-02-2020, 11:29 PM
Last Post: kblagron
  Marantz receiver driver (IP) dlmorgan999 6 2,487 05-15-2020, 03:32 PM
Last Post: dlmorgan999
  Variables Driver Client gReatAutomation 4 2,036 04-25-2020, 12:46 PM
Last Post: gReatAutomation

Forum Jump:


Users browsing this thread: 1 Guest(s)