Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Serialization of CQC SMS Serial Interface Driver
#31
Great thanks. Will try it out.
Reply
#32
This is a no go as well.. Driver is in an error state when trying to send message.

[Image: Screen-Shot-2019-09-15-at-12-31-23.jpg]

Driver details:

[Image: Screen-Shot-2019-09-15-at-12-32-26.jpg]
Reply
#33
Ugh... To get rid of the warning message about unitialized fields, I set them to error state until such time as they get a value stored. But apparently the driver isn't storing values up front, and some that should be write only (and hence not affected by this) are read/write.

Let me take one more shot at it and I think we'll be OK.
Dean Roddey
Explorans limites defectum
Reply
#34
OK, one more time...


Attached Files
.cqcdrvpack   SMS_WithBusyFld_DefValues.CQCDrvPack (Size: 8.89 KB / Downloads: 3)
Dean Roddey
Explorans limites defectum
Reply
#35
Thanks.. set up another test of four consecutive SMS messages. Before each one I use WaitFieldValue to ensure SMSGateway.Busy is False before sending the message.

[Image: Screen-Shot-2019-09-15-at-15-23-29.jpg]

Only the first message is sent out, then this error:

[Image: Screen-Shot-2019-09-15-at-15-25-12.jpg]

I then upped the wait time to 10000 in WaitFieldValue and ran the same commands in scheduled action test so that I could see the actual number of milliseconds of wait time. The change to 10000 did the trick as I see that your changes changed the amount of wait time. Driver is busy for about 6500 milliseconds after sending a message whereas before it was about 2500 milliseconds.
Reply
#36
Before it wasn't imposing any inter-send delay. So it would make sense it was shorter before. That's why you had to do it. Now it's imposing that. Of course one reason for WaitFieldValue() is that you can put a conservatively large time in, but won't wait any longer than is really required. So you can account for a worst case, but only ever pay for what really happens.

Oh, and another reason for the slight increase is that it's not just setting Busy back to false before returning from the SendMessage, it's doing it later during the driver's poll callback after the minimum time has expired. But the poll interval is a couple seconds. So there will also tend to be on average a couple seconds extra. I could now lower that poll interval since the stuff that the poll method does is controlled by time stamps now. So it won't do things too fast. That would let it more quickly get Busy back to false, if that would matter much.
Dean Roddey
Explorans limites defectum
Reply
#37
(09-15-2019, 12:22 PM)Dean Roddey Wrote: Before it wasn't imposing any inter-send delay. So it would make sense it was shorter before. That's why you had to do it. Now it's imposing that. Of course one reason for WaitFieldValue() is that you can put a conservatively large time in, but won't wait any longer than is really required. So you can account for a worst case, but only ever pay for what really happens.

Oh, and another reason for the slight increase is that it's not just setting Busy back to false before returning from the SendMessage, it's doing it later during the driver's poll callback after the minimum time has expired. But the poll interval is a couple seconds. So there will also tend to be on average a couple seconds extra. I could now lower that poll interval since the stuff that the poll method does is controlled by time stamps now. So it won't do things too fast. That would let it more quickly get Busy back to false, if that would matter much.

Great change. Thanks. My particular CQC implementation makes heavy use of SMS.
Reply
#38
Hi all, I was contacted by Chris to help with this, but I don’t think I can offer much.
My only thought was to check if the AT command set supports a completed indicator of some sort.

The other (possibly dumb) idea was some form of generic async to sync driver that could generally queue action requests and feed them out sequentially.

Anyway, I am a long time out of it and I’m sure there are probably better ways these days.

Cheers

Rohan
HAMFIELD
Software & Hardware Solutions
Makers of the Translink C-Bus Gateway
for the Apple iPad, iPhone and iPod Touch.
Reply
#39
(09-15-2019, 03:22 PM)rhamer Wrote: My only thought was to check if the AT command set supports a completed indicator of some sort.

Sending SMS is the AT+CMGS command which, after sending a message, provides response of OK after message is send

Here: https://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/at-cmgs-text-mode/

And

Page 120: https://www.elecrow.com/wiki/images/2/20..._V1.09.pdf
Reply
#40
It could be made async queuing them up and spooling them out. It would just be tricky to implement by eye.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  6.0.0 Interface Viewer - Action Trace Mark Stega 1 319 03-09-2021, 06:39 PM
Last Post: Dean Roddey
  Cannot Bind Interface to 80 gReatAutomation 1 605 11-05-2020, 04:18 PM
Last Post: Dean Roddey
  ClickPLC driver now failing after upgrade znelbok 2 595 09-21-2020, 10:48 PM
Last Post: znelbok
  Pentair driver tom 5 1,348 08-02-2020, 11:29 PM
Last Post: kblagron
  Marantz receiver driver (IP) dlmorgan999 6 1,391 05-15-2020, 03:32 PM
Last Post: dlmorgan999
  Variables Driver Client gReatAutomation 4 1,092 04-25-2020, 12:46 PM
Last Post: gReatAutomation
  Check Box widget on WebRIVA vs Interface Viewer bryanb 1 692 04-23-2020, 06:15 AM
Last Post: bryanb
  Reconfig of Driver Causes Built In Triggers to Fire gReatAutomation 2 836 03-25-2020, 04:09 PM
Last Post: gReatAutomation
  Lutron RadioRA2 Driver and Lutron Visor Control gReatAutomation 29 9,112 03-19-2020, 01:03 PM
Last Post: gReatAutomation
  Timers Driver / Field Time Image / Seconds gReatAutomation 1 788 03-16-2020, 05:48 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)