SeaMAX API

Modules

 Deprecated Functions
 

Functions

int __stdcall SM_Version (int *major, int *minor, int *revision, int *build)
 Returns the SeaMAX library's version info as major.minor.revision.build. More...
 
int __stdcall SM_Open (SM_HANDLE *handle, char *connection)
 Opens a connection to a Sealevel I/O module. More...
 
int __stdcall SM_OpenSecure (SM_HANDLE *handle, char *connection, int securityMode, char *securityKey)
 Opens a secure connection to a Sealevel I/O module. More...
 
int __stdcall SM_ConfigureSerialConnection (SM_HANDLE handle, int baudrate, int parity)
 Configures the local PC's serial port baudrate (For Serial Connections Only). More...
 
int __stdcall SM_ConfigureSerialTimeouts (SM_HANDLE handle, int multiple, int constant, int interval)
 Configures the local PC's serial port timeout parameters (For Serial Connections Only). More...
 
int __stdcall SM_Close (SM_HANDLE handle)
 Closes the SeaMAX handle and releases all allocated memory. More...
 
int __stdcall SM_SelectDevice (SM_HANDLE handle, int slaveID)
 Targets a new Modbus device. More...
 
int __stdcall SM_SetPolarity (SM_HANDLE handle, bool activeLow)
 Configures the polarity of all Digital IO reads and writes. More...
 
int __stdcall SM_GetDeviceConfig (SM_HANDLE handle, DeviceConfig *config)
 Queries the Sealevel I/O module to determine the module model number, type, baudrate, parity, and firmware version number. More...
 
int __stdcall SM_GetFirmwareVersion (SM_HANDLE handle, int *major, int *minor, int *revision)
 Queries the Sealevel I/O module to determine the extended firmware version. More...
 
int __stdcall SM_GetAnalogConfig (SM_HANDLE handle, int number, AnalogConfig *configuration)
 Gets the device's analog configuration. More...
 
int __stdcall SM_GetAnalogInputConfig (SM_HANDLE handle, unsigned char *reference, unsigned char *mode)
 Gets the device's analog configuration. More...
 
int __stdcall SM_GetAnalogInputRanges (SM_HANDLE handle, unsigned char *ranges)
 Gets the device's analog inputs range configuration. More...
 
int __stdcall SM_SetAnalogConfig (SM_HANDLE handle, int number, AnalogConfig *configuration)
 Sets the device's analog configuration. More...
 
int __stdcall SM_SetAnalogInputConfig (SM_HANDLE handle, unsigned char reference, unsigned char mode)
 Sets the device's analog configuration. More...
 
int __stdcall SM_SetAnalogInputRanges (SM_HANDLE handle, unsigned char *ranges)
 Sets the device's analog inputs range configuration. More...
 
int __stdcall SM_GetAnalogOutputRanges (SM_HANDLE handle, unsigned char *ranges)
 Polls the Sealevel I/O device for its analog hardware jumper configuration. More...
 
int __stdcall SM_GetPIOPresets (SM_HANDLE handle, unsigned char *config)
 Retrieves a Sealevel I/O module's programmable IO bit presets. More...
 
int __stdcall SM_SetPIOPresets (SM_HANDLE handle, unsigned char *config)
 Configures a Sealevel I/O module's programmable IO bit presets. More...
 
int __stdcall SM_GetPIODirection (SM_HANDLE handle, unsigned char *config)
 Retrieves a Sealevel I/O module's programmable IO direction. More...
 
int __stdcall SM_SetPIODirection (SM_HANDLE handle, unsigned char *config)
 Configures a Sealevel I/O module's programmable IO direction. More...
 
int __stdcall SM_ReadPIO (SM_HANDLE handle, unsigned char *values)
 Reads the entire I/O space of a Sealevel programmable IO device. More...
 
int __stdcall SM_WritePIO (SM_HANDLE handle, unsigned char *values)
 Writes the IO space of a programmable I/O Sealevel I/O module. More...
 
int __stdcall SM_SetCommunications (SM_HANDLE handle, int baudrate, int parity)
 Configures a Sealevel I/O module's communication parameters. More...
 
int __stdcall SM_SetSoftwareAddress (SM_HANDLE handle, int slaveID)
 Configure's a Sealevel I/O module's software selectable Modbus slave ID (Modbus devices only). More...
 
int __stdcall SM_ReadDigitalOutputs (SM_HANDLE handle, int start, int number, unsigned char *values)
 Reads the current state of one or more digital outputs. More...
 
int __stdcall SM_ReadDigitalInputs (SM_HANDLE handle, int start, int number, unsigned char *values)
 Reads the current state of one or more digital inputs. More...
 
int __stdcall SM_ReadAnalogInputs (SM_HANDLE handle, int start, int number, double *analogValues, unsigned char *ranges, unsigned char *byteValues)
 Reads one or more Sealevel I/O device analog input(s). More...
 
int __stdcall SM_ReadAnalogOutputs (SM_HANDLE handle, int start, int number, double *analogValues, unsigned char *ranges, unsigned char *byteValues)
 Reads one or more Sealevel I/O device analog output(s). More...
 
int __stdcall SM_WriteDigitalOutputs (SM_HANDLE handle, int start, int number, unsigned char *values)
 Writes the state of one or more digital outputs. More...
 
int __stdcall SM_WriteAnalogOutputs (SM_HANDLE handle, int start, int number, double *analogValues, unsigned char *ranges, unsigned char *byteValues)
 Writes one or more analog outputs. More...
 
int __stdcall SM_NotifyInputState (SM_HANDLE handle, int cancel)
 Checks or cancels the notify input state status. More...
 
int __stdcall SM_NotifyOnInputChange (SM_HANDLE handle, int start, int number, unsigned char *values, int delay, int blocking)
 Continuously reads the discrete inputs until a change occurs. More...
 
int __stdcall SM_GlobalCommsReset (SM_HANDLE handle)
 Resets a connected device to default address ID and baudrate. More...
 
int __stdcall SM_CustomMessage (SM_HANDLE handle, unsigned char *message, int messageSize, int expectedBytes)
 Sends a custom modbus message to the selected device, and retrieves the response. More...
 
int __stdcall SM_GetLastError ()
 Returns the most recent SeaMAX Error and clears the error code. More...
 
int __stdcall SM_GetLastWin32Error ()
 Returns the most recent Win32 Error and clears the error code. More...
 
int __stdcall SM_GetLastFTDIError ()
 Returns the most recent FTDI Error and clears the error code. More...
 

Detailed Description

The SeaMAX API consists of the functions outline below, and provides an easy-to-use interface for Sealevel I/O device configuration and access. For more information, click a function name below for detailed information on function use, parameter types, and return codes.

Note
Not every function below may apply to your specific Sealevel I/O device. A complete list of of model specific SeaMAX API functions is available in the SeaMAX by Sealevel Model Number document.
 
 
Generated on Mon Oct 3 2022.