Open a SeaIO module. This function will attempt to open a specified SeaIO module. The method of specification is a string formatted like "sealevel_rtu://dev/[your_serial]" or "sealevel_tcp://x.x.x.x:y" where x's represent ip address and y the port. If you leave out the port, 502 will be used as the default. You may also enter the device's DCHP name like: "sealevel_tcp://Samwise". For SeaDAC Lite modules use sealevel_d2x://xxxx where xxxx=8112 or 8115 etc..
- Parameters
-
| [out] | *SeaMaxPointer | Pointer to a seaMaxModule object. |
| [in] | *filename | Filename to open. |
- Returns
- int Error code.
- Return values
-
| 0 | Successfully opened device. |
| -ENAMETOOLONG | Too many characters in filename string. |
| -EINVAL | Unallocated pointer. |
| -EBADF | Invalid filename. |
| -EBUSY | Communications medium busy. |
| -EXDEV | Unable to initialize communications. |
| -ENOMEM | Low memory. |
| -EPERM | Unable to retrieve current communication settings. |
References NO_CONNECT, and SeaMaxLinClose().
Referenced by CSeaMaxLin::Open().