You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Macro command for change RS232 transmit delay time #437
The other request is macro. I do not think we could change RS232 serial port transmit delay time. Can you add a command to control the transmit delay time(msec/line)? Thanks in advance.
I confirmed the operation using com0com with a loopback from COM2 to COM1.
I have sent PR #773 with the following modifications:
Fixed it so that 0 can be specified for the transmission delay in milliseconds.
Modified it so that changes to the transmission delay are reflected in the running macro (set in the ComVar structure: cv).
Adjusted it so that the transmission delay is applied after the transmission buffer is empty (checked if the transmission buffer is empty using GetOutBuffInfo).
This modification is because the sending of the send command and the transmission to the COM port are done asynchronously,
so the change in transmission delay occurs after the sent data is cleared.
Changed it so that the next macro command is executed after the transmission delay change is complete (modified to wait for WM_USER_DDECMNDEND).
This is a fix related to point 3, ensuring that the return occurs after the transmission delay changes via the setserialdelaychar and setserialdelayline commands are completed.
Changed the number of transmission buffers (sendmem_fifo) from 10 to unlimited.
This modification is to prevent a shortage of the transmission buffer when the transmission delay is increased.
I have added TTL files for operation confirmation:
tests/setserialdelay_1.ttl
tests/setserialdelay_2.ttl
I would appreciate it if you could review the source.
Other notes:
In tests/setserialdelay_2.ttl:
I found a bug where using send(ln)broadcast and send(ln)multicast can cause data loss. I will create a separate issue for this.
I discovered that even when executing commands in pairs with sendkcode and send, there are cases where they do not execute in the order of sendkcode -> send.
It seems that increasing the transmission delay raises the frequency of occurrence.
There is no solution yet.
The manual addition for the macro command is still pending:
doc\ja\html\html\macro\command\setserialdelaychar.html
doc\en\html\html\macro\command\setserialdelayline.html
Activity
nmaya commentedon Jan 27, 2025
マクロコマンドで変更できる必要があるか、INIで指定できさえすればよいか、要検討
綴りミスを修正、コメント追加 #437
nmaya commentedon Apr 10, 2025
candidate of command name
setserialdelaychar, setserialdelayline マクロコマンドを追加 #437
nmaya commentedon Aug 10, 2025
I’ve added the feature, and we created a test binary.
Can you check that it works properly?
https://github.com/TeraTermProject/teraterm/actions/runs/16856155566
Merge remote-tracking branch 'upstream/feature/TeraTermProject#437-ma…
setserialdelaychar, setserialdelayline マクロコマンドを修正 TeraTermProject#437
setserialdelaychar, setserialdelayline マクロコマンドの動作確認用TTLファイルを追加 TeraTe…
hkanou commentedon Aug 15, 2025
I confirmed the operation using com0com with a loopback from COM2 to COM1.
I have sent PR #773 with the following modifications:
This modification is because the sending of the send command and the transmission to the COM port are done asynchronously,
so the change in transmission delay occurs after the sent data is cleared.
This is a fix related to point 3, ensuring that the return occurs after the transmission delay changes via the setserialdelaychar and setserialdelayline commands are completed.
This modification is to prevent a shortage of the transmission buffer when the transmission delay is increased.
I have added TTL files for operation confirmation:
I would appreciate it if you could review the source.
Other notes:
It seems that increasing the transmission delay raises the frequency of occurrence.
There is no solution yet.
doc\ja\html\html\macro\command\setserialdelaychar.html
doc\en\html\html\macro\command\setserialdelayline.html
in Japanese
com0comを使用して COM2 -> COM1 の折り返しで動作を確認しました。
下記の修正を行う PR #773 をお送りさせて頂きました。
sendコマンドの送信とCOMポートへの送信は非同期で行われるため、送信済のデータがなくなってから送信遅延の変更を行う修正です。
3.の関連でsetserialdelaychar, setserialdelayline コマンドによる送信遅延の変更が終わってから復帰する修正です。
送信遅延を大きくした際、送信バッファが不足しないようにする修正です。
動作確認用のTTLファイルを追加しました。
ソースレビューをして頂けると助かります。
その他
別 issue を起票します。
送信遅延を大きくすると発生頻度が上がるように見えます。
対処は未です。
doc\ja\html\html\macro\command\setserialdelaychar.html
doc\en\html\html\macro\command\setserialdelayline.html
21 remaining items
setserialdelaychar, setserialdelayline マクロコマンドのヘルプ追加漏れ TeraTermProjec…
.gitignore で html ファイルが無視されるので修正 TeraTermProject#437
setserialdelaychar、setserialdelayline による送信遅延コマンドを送信バッファにpushするよう見直した T…
編集ミスを修正した TeraTermProject#437
fix conflicts TeraTermProject#437
Merge pull request #773 from hkanou/hkanou_#437
Merge pull request #798 from hkanou/hkanou_#787
Merge pull request #800 from hkanou/hkanou_#774
hkanou commentedon Aug 23, 2025
main にマージさせて頂きました。
本 issue をクローズ致します。
送信バッファ(sendmem_fifo)の数を10から無制限に変更した TeraTermProject#437
送信バッファ(sendmem_fifo)の数を10から無制限に変更した TeraTermProject#437
Merge pull request #806 from hkanou/mfc/#437_sendmem_fifo
Merge pull request #808 from hkanou/mfc/#774
Merge pull request #809 from hkanou/mfc/#787