public ReadFileRequest ( BacnetAddress adr, BacnetObjectId object_id, int &position, uint &count, bool &end_of_file, byte &file_buffer, int &file_buffer_offset, byte invoke_id ) : bool | ||
adr | BacnetAddress | |
object_id | BacnetObjectId | |
position | int | |
count | uint | |
end_of_file | bool | |
file_buffer | byte | |
file_buffer_offset | int | |
invoke_id | byte | |
Результат | bool |
public bool ReadFileRequest(BacnetAddress adr, BacnetObjectId object_id, ref int position, ref uint count, out bool end_of_file, out byte[] file_buffer, out int file_buffer_offset, byte invoke_id = 0)
{
using (BacnetAsyncResult result = (BacnetAsyncResult)BeginReadFileRequest(adr, object_id, position, count, true, invoke_id))
{
for (int r = 0; r < m_retries; r++)
{
if (result.WaitForDone(m_timeout))
{
Exception ex;
EndReadFileRequest(result, out count, out position, out end_of_file, out file_buffer, out file_buffer_offset, out ex);
if (ex != null) throw ex;
else return true;
}
if (r < (m_retries - 1))
result.Resend();
}
}
position = -1;
count = 0;
file_buffer = null;
end_of_file = true;
file_buffer_offset = -1;
return false;
}