SerialPort.RequestOpen(Int32, Boolean, IExecutor, IOutcomeReceiver) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Request to open the port.
[Android.Runtime.Register("requestOpen", "(IZLjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)]
public void RequestOpen(int flags, bool exclusive, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver receiver);
[<Android.Runtime.Register("requestOpen", "(IZLjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "", ApiSince=37)>]
member this.RequestOpen : int * bool * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
Parameters
- flags
- Int32
open flags that define read/write mode and other options. Value is either 0 or a combination of the following: OPEN_FLAG_READ_ONLY; OPEN_FLAG_WRITE_ONLY; OPEN_FLAG_READ_WRITE; OPEN_FLAG_NONBLOCK; OPEN_FLAG_DATA_SYNC; OPEN_FLAG_SYNC
- exclusive
- Boolean
whether to request exclusive access to the port, preventing other processes from opening it.
- executor
- IExecutor
the executor used to run receiver. This value cannot be null.
- receiver
- IOutcomeReceiver
the outcome receiver. This value cannot be null.
- Attributes
Remarks
Request to open the port.
Exceptions passed to receiver may be IllegalStateException if the port is not found; IOException if the port cannot be opened; SecurityException if the user rejects the open request.
Android reference for android.hardware.serial.SerialPort.requestOpen.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.