AddNetworkDevice(string, string, bool, double)
- Updated2026-02-05
- 1 minute(s) read
Adds a Network cDAQ device to the system and, if specified, attempts to reserve it.
Syntax
Namespace: NationalInstruments.DAQmx
public Device AddNetworkDevice(string ipAddress, string deviceName, [MarshalAs(UnmanagedType.U1)] bool attemptReservation, double timeout)
Remarks
MAX automatically attempts to reserve a device when the device is added, but this method does not, unless attemptReservation is set to true.
Parameters
| Name | Type | Description |
|---|---|---|
| ipAddress | string | Specifies the string containing the IP address (in dotted decimal notation) of the device to add to the system. |
| deviceName | string | The name to assign to the device. If unspecified, NI-DAQmx chooses the device name. |
| attemptReservation | bool | Specifies whether a reservation should be attempted after the device is successfully added. |
| timeout | double | Specifies the time in seconds to wait for the device to respond before timing out. |
Returns
The device object the operation applied to.
Exceptions
| Type | Description |
|---|---|
| NationalInstruments.DAQmx.DaqException | The NI-DAQmx driver returned an error. |