SeaMAX Dot Net Returns the SeaMAX library's version info as major.minor.revision.build. Integer where the Major version number will be stored. Integer where the Minor version number will be stored. Integer where the Revision version number will be stored. Integer where the Build version number will be stored. Returns 0 if successful. Opens a connection to a Sealevel I/O module. String representing the connection to be made. Returns 0 if successful, otherwise returns a negative value. Configures the local PC's serial port baudrate (For Serial Connections Only). SeaMAX.Baudrate value representing the new baudrate to be used. SeaMAX.Parity value representing the new parity to be used. Returns 0 if successful, otherwise returns a negative value. Configures the local PC's serial port timeout parameters (For Serial Connections Only). Integer specifying the timeout multiplier to be used. Integer specifying the timeout constant to be used. Integer specifying the timeout character interval to be used. Returns 0 if successful, otherwise returns a negative value. Closes the SeaMAX connection and deconstructs the SeaMAX instance. Returns 0 if successful, otherwise returns a negative value. Targets a new Modbus device. New Modbus slave ID to be used in future SeaMAX operations. Valid values are 0 - 247. Returns 0 if successful, otherwise returns a negative value. Queries the Sealevel I/O module to determine the module model number, type, baudrate, and parity. Integer where the model number will be stored. Returns 0 if successful, otherwise returns a negative value. Queries the Sealevel I/O module to determine the module model number, type, baudrate, and parity. Integer where the model number will be stored. SeaMAX.CommunicationType where the type of communications interface of the device will be stored. SeaMAX.Baudrate where the baudrate of the device will be stored. SeaMAX.Parity where the parity of the device will be stored. Returns 0 if successful, otherwise returns a negative value. Queries the Sealevel I/O module to determine the module model number, type, baudrate, parity, and firmware version number. Valid DeviceConfig struct Returns 0 if successful, otherwise returns a negative value. Gets the device's analog configuraton. Analog to digital reference point. Device input mode. Returns 0 if successful, otherwise returns a negative value. Gets the device's analog inputs range configuraton. SeaMAX.ChannelRange Array where the desired channel ranges will be stored.. Returns 0 if successful, otherwise returns a negative value. Sets the device's analog configuraton. Analog to digital reference point. Device input mode. Returns 0 if successful, otherwise returns a negative value. Sets the device's analog inputs range configuraton. Array of desired channel ranges. Returns 0 if successful, otherwise returns a negative value. Sets the device's analog inputs range configuraton. SeaMAX.ChannelRange array where the desired channel ranges will be stored. Returns 0 if successful, otherwise returns a negative value. Reads the entire I/O space of a Sealevel programmable IO device. This method attempts to read the state of the programmable IO for any applicable Sealevel I/O module. The data is returned as a packed array of bytes reflecting the state of ports A1 to C4, MSB to LSB. Byte array where the state of the PIO inputs will be stored. Must have 1 byte allocated for each bank of 8 I/O points. Returns 0 if successful, otherwise returns a negative value. Writes the IO space of a programmable I/O Sealevel I/O module. This method attempts to configure the state of all programmable IO. The data should be a packed array of bytes, in order of ports A1 to C4, MSB to LSB. Byte array containing the desired output values of the programmable IO. Must have 1 byte allocated for each bank of 8 I/O points. If any particular port is set as an input, rather than output, the corresponding byte in the array will be ignored. Returns 0 if successful, otherwise returns a negative value. Configures a Sealevel I/O module's serial communication parameters. SeaMAX.Baudrate containing the desired baudrate. SeaMAX.Parity containing the desired parity. Returns 0 if successful, otherwise returns a negative value. Configure's a Sealevel I/O module's software selectable Modbus slave ID (Modbus devices only). This method attempts to set the software selectable address (slave ID) of a Sealevel I/O module, whose side rotary switch is set to the '0' position. By default, setting the side switch to zero will result in a Modbus slave ID address of 247. The 'Set Software Slave ID' Modbus function requires a security key byte, recieved by performing a 'Get Module Configuration (0x45)'. If the security key has not previously been explicitly requested , the SetSoftwareAddress() method will automatically perform the 'Get Module Configuration' function prior to executing the 'Set Software Slave ID' If the side rotary switch is not in the zero position, this Modbus function will fail. Integer containing the desired slave ID of the currently selected module. Returns 0 if successful, otherwise returns a negative value. Reads the current state of one or more digital outputs. The output state(s) parameter will be an array of bytes where each byte represents 8 outputs and their states. The LSB of the first byte (values[0]) will contain the first 8 output states and will be ordered from LSB to MSB. Starting output to read (zero-indexed). Quantity of outputs to read. Byte array where the digital output values will be stored. The array must have at least 1 byte allocated for every 8 outputs. Returns 0 if successful, otherwise returns a negative value. Reads the state of one or more digital inputs. The digital input values in the values array (after a successful read) are packed as one input per bit. The LSB of the first byte (values[0]) contains the first addressed input. The next inputs follow toward the high order end of this byte, and then from low order to high order in subsequent bytes. Starting input (zero-indexed). Quantity of digital inputs to read. Byte array where the digital input values will be stored. The array must have at least 1 byte allocated for each 8 inputs. Returns 0 if successful, otherwise returns a negative value. Reads one or more analog inputs. This function will return, via parameters, either an array of bytes, an array of doubles, or both. If you pass either the byte array or double array as null, that type of data will not be returned. Both arrays may not be null. Starting input (zero-indexed). Quantity of analog inputs to read. Input values as floating point values (voltages). A double array must be supplied if a byte array is not. Must contain space allocated for 1 double per analog input. Array of channel ranges that correspond directly to each requested input. Register state values as 16-bit big-endian byte pairs. A byte array must be supplied if a double array is not. Must contain space allocated for 2 bytes per analog input. Returns 0 if successful, otherwise returns a negative value. Writes the state of one or more digital outputs. The LSB of the first byte (values[0]) should contain the first 8 output states and should be ordered from LSB to MSB. Starting output (zero-indexed). Quantity of outputs to write. Byte array containing the desired output state(s). At least one byte must be allocated for every 8 outputs. Returns 0 if successful, otherwise returns a negative value. Writes to the selected device's analog outputs. Use only AnalogValues or ByteValues, but not both. Starting output (zero-indexed). Quantity of analog outputs to write. Desired output values as floating point values (voltages). Leave null if ByteValues are used. Array of analog output ranges. Can be null if providing byte values. Desired output values as 16-bit byte values. Leave null if AnalogValues are used. >=0 Number of bytes successfully written. Returns negative if an error occured. Continuously reads the discrete inputs until a change occurs. Only one notify request can be outstanding at a time. Modbus address to begin the read (zero-indexed). Quantity of inputs to read. On input change, this buffer will be populated with the input state. Time to delay between issuing reads (ms). Indicates whether to wait for a change (non-zero), or immediately return control to the caller (zero). Returns 0 if successful, otherwise returns a negative value. Checks or cancels the notify input state status. Non zero value indicates the current notify operation should be canceled. Returns 0 if no change was detected. Returns 1 if an input state has changed. Returns 2 if the last input read failed and will try again. Returns negative if failed.