在udp通信matlab中控制超时值
control timeout valus in udp communication matlab
如何更改 UDP 通信中的 "timeout" 值?
我收到此警告:
Warning: Unsuccessful read: The specified amount of data was not returned within the Timeout period.
我想增加超时值,这样我就不会遇到这个警告...
要设置超时,您可以使用:
u.Timeout=99;
在这种情况下,超时 属性 没有记录,至少我找不到任何文档。在处理未知或未完全记录的对象时,我通常会尝试 get
methods
和 properties
来检查它们:
>> methods(x)
Methods for class udp:
Contents eq fscanf instrhelp ne size
binblockread fclose fwrite instrhwinfo obj2mfile stopasync
binblockwrite fgetl get instrnotify open subsasgn
class fgets horzcat instrument openvar subsref
close fieldnames icinterface isa propinfo udp
ctranspose flushinput igetfield isequal query vertcat
delete flushoutput inspect isetfield readasync
disp fopen instrcallback isvalid record
display fprintf instrfind length scanstr
end fread instrfindall methods set
>> properties(x)
No properties for class udp or no class udp.
>> get(x)
ByteOrder = bigEndian
BytesAvailable = 0
BytesAvailableFcn =
BytesAvailableFcnCount = 48
BytesAvailableFcnMode = terminator
BytesToOutput = 0
ErrorFcn =
InputBufferSize = 512
Name = UDP-127.0.0.1
ObjectVisibility = on
OutputBufferSize = 512
OutputEmptyFcn =
RecordDetail = compact
RecordMode = overwrite
RecordName = record.txt
RecordStatus = off
Status = open
Tag =
Timeout = 3
TimerFcn =
TimerPeriod = 1
TransferStatus = idle
Type = udp
UserData = []
ValuesReceived = 0
ValuesSent = 0
UDP specific properties:
DatagramAddress =
DatagramPort = []
DatagramReceivedFcn =
DatagramTerminateMode = on
InputDatagramPacketSize = 512
LocalHost =
LocalPort = 52148
LocalPortMode = auto
OutputDatagramPacketSize = 512
ReadAsyncMode = continuous
RemoteHost = 127.0.0.1
RemotePort = 9090
Terminator = LF
请注意,并不总是支持 get
。如果您收到 Error using get Conversion to double from A is not possible.
,其他两种方法会显示所有可访问的内容。
如何更改 UDP 通信中的 "timeout" 值? 我收到此警告:
Warning: Unsuccessful read: The specified amount of data was not returned within the Timeout period.
我想增加超时值,这样我就不会遇到这个警告...
要设置超时,您可以使用:
u.Timeout=99;
在这种情况下,超时 属性 没有记录,至少我找不到任何文档。在处理未知或未完全记录的对象时,我通常会尝试 get
methods
和 properties
来检查它们:
>> methods(x)
Methods for class udp:
Contents eq fscanf instrhelp ne size
binblockread fclose fwrite instrhwinfo obj2mfile stopasync
binblockwrite fgetl get instrnotify open subsasgn
class fgets horzcat instrument openvar subsref
close fieldnames icinterface isa propinfo udp
ctranspose flushinput igetfield isequal query vertcat
delete flushoutput inspect isetfield readasync
disp fopen instrcallback isvalid record
display fprintf instrfind length scanstr
end fread instrfindall methods set
>> properties(x)
No properties for class udp or no class udp.
>> get(x)
ByteOrder = bigEndian
BytesAvailable = 0
BytesAvailableFcn =
BytesAvailableFcnCount = 48
BytesAvailableFcnMode = terminator
BytesToOutput = 0
ErrorFcn =
InputBufferSize = 512
Name = UDP-127.0.0.1
ObjectVisibility = on
OutputBufferSize = 512
OutputEmptyFcn =
RecordDetail = compact
RecordMode = overwrite
RecordName = record.txt
RecordStatus = off
Status = open
Tag =
Timeout = 3
TimerFcn =
TimerPeriod = 1
TransferStatus = idle
Type = udp
UserData = []
ValuesReceived = 0
ValuesSent = 0
UDP specific properties:
DatagramAddress =
DatagramPort = []
DatagramReceivedFcn =
DatagramTerminateMode = on
InputDatagramPacketSize = 512
LocalHost =
LocalPort = 52148
LocalPortMode = auto
OutputDatagramPacketSize = 512
ReadAsyncMode = continuous
RemoteHost = 127.0.0.1
RemotePort = 9090
Terminator = LF
请注意,并不总是支持 get
。如果您收到 Error using get Conversion to double from A is not possible.
,其他两种方法会显示所有可访问的内容。