First Commit
This commit is contained in:
@@ -0,0 +1,221 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>SeaMAX Dot Net</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Sealevel.SeaMAX.SM_Version(System.Int32@,System.Int32@,System.Int32@,System.Int32@)">
|
||||
<summary>
|
||||
Returns the SeaMAX library's version info as major.minor.revision.build.
|
||||
</summary>
|
||||
<param name="Major">Integer where the Major version number will be stored.</param>
|
||||
<param name="Minor">Integer where the Minor version number will be stored.</param>
|
||||
<param name="Revision">Integer where the Revision version number will be stored.</param>
|
||||
<param name="Build">Integer where the Build version number will be stored.</param>
|
||||
<returns>Returns 0 if successful.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_Open(System.String)">
|
||||
<summary>
|
||||
Opens a connection to a Sealevel I/O module.
|
||||
</summary>
|
||||
<param name="Connection">String representing the connection to be made.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_ConfigureSerialConnection(Sealevel.SeaMAX.Baudrate,Sealevel.SeaMAX.Parity)">
|
||||
<summary>
|
||||
Configures the local PC's serial port baudrate (For Serial Connections Only).
|
||||
</summary>
|
||||
<param name="Baudrate">SeaMAX.Baudrate value representing the new baudrate to be used.</param>
|
||||
<param name="Parity">SeaMAX.Parity value representing the new parity to be used.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_ConfigureSerialTimeouts(System.Int32,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Configures the local PC's serial port timeout parameters (For Serial Connections Only).
|
||||
</summary>
|
||||
<param name="multiple">Integer specifying the timeout multiplier to be used.</param>
|
||||
<param name="constant">Integer specifying the timeout constant to be used.</param>
|
||||
<param name="interval">Integer specifying the timeout character interval to be used.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_Close">
|
||||
<summary>
|
||||
Closes the SeaMAX connection and deconstructs the SeaMAX instance.
|
||||
</summary>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_SelectDevice(System.Int32)">
|
||||
<summary>
|
||||
Targets a new Modbus device.
|
||||
</summary>
|
||||
<param name="SlaveID">New Modbus slave ID to be used in future SeaMAX operations. Valid values are 0 - 247.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_GetConfig(System.Int32@)">
|
||||
<summary>
|
||||
Queries the Sealevel I/O module to determine the module model number, type, baudrate, and parity.
|
||||
</summary>
|
||||
<param name="model">Integer where the model number will be stored.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_GetConfig(System.Int32@,Sealevel.SeaMAX.CommunicationType@,Sealevel.SeaMAX.Baudrate@,Sealevel.SeaMAX.Parity@)">
|
||||
<summary>
|
||||
Queries the Sealevel I/O module to determine the module model number, type, baudrate, and parity.
|
||||
</summary>
|
||||
<param name="model">Integer where the model number will be stored.</param>
|
||||
<param name="commType">SeaMAX.CommunicationType where the type of communications interface of the device will be stored.</param>
|
||||
<param name="baudrate">SeaMAX.Baudrate where the baudrate of the device will be stored.</param>
|
||||
<param name="parity">SeaMAX.Parity where the parity of the device will be stored.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_GetDeviceConfig(Sealevel.SeaMAX.DeviceConfig@)">
|
||||
<summary>
|
||||
Queries the Sealevel I/O module to determine the module model number, type, baudrate, parity, and firmware version number.
|
||||
</summary>
|
||||
<param name="config">Valid DeviceConfig struct</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_GetAnalogInputConfig(Sealevel.SeaMAX.ReferencePoint@,Sealevel.SeaMAX.ChannelMode@)">
|
||||
<summary>
|
||||
Gets the device's analog configuraton.
|
||||
</summary>
|
||||
<param name="reference">Analog to digital reference point.</param>
|
||||
<param name="mode">Device input mode.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_GetAnalogInputRanges(Sealevel.SeaMAX.ChannelRange[])">
|
||||
<summary>
|
||||
Gets the device's analog inputs range configuraton.
|
||||
</summary>
|
||||
<param name="ranges">SeaMAX.ChannelRange Array where the desired channel ranges will be stored..</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_SetAnalogInputConfig(Sealevel.SeaMAX.ReferencePoint,Sealevel.SeaMAX.ChannelMode)">
|
||||
<summary>
|
||||
Sets the device's analog configuraton.
|
||||
</summary>
|
||||
<param name="reference">Analog to digital reference point.</param>
|
||||
<param name="mode">Device input mode.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_SetAnalogInputRanges(Sealevel.SeaMAX.ChannelRange[])">
|
||||
<summary>
|
||||
Sets the device's analog inputs range configuraton.
|
||||
</summary>
|
||||
<param name="ranges">Array of desired channel ranges.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_GetAnalogOutputRanges(Sealevel.SeaMAX.ChannelRange[])">
|
||||
<summary>
|
||||
Sets the device's analog inputs range configuraton.
|
||||
</summary>
|
||||
<param name="Ranges">SeaMAX.ChannelRange array where the desired channel ranges will be stored.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:Sealevel.SeaMAX.SM_GetPIOPresets(System.Byte[])" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:Sealevel.SeaMAX.SM_SetPIOPresets(System.Byte[])" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:Sealevel.SeaMAX.SM_GetPIODirection(System.Byte[])" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:Sealevel.SeaMAX.SM_SetPIODirection(System.Byte[])" -->
|
||||
<member name="M:Sealevel.SeaMAX.SM_ReadPIO(System.Byte[])">
|
||||
<summary>
|
||||
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.
|
||||
</summary>
|
||||
<param name="Data">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.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_WritePIO(System.Byte[])">
|
||||
<summary>
|
||||
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.
|
||||
</summary>
|
||||
<param name="Data">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.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_SetCommunications(Sealevel.SeaMAX.Baudrate,Sealevel.SeaMAX.Parity)">
|
||||
<summary>
|
||||
Configures a Sealevel I/O module's serial communication parameters.
|
||||
</summary>
|
||||
<param name="Baudrate">SeaMAX.Baudrate containing the desired baudrate.</param>
|
||||
<param name="Parity">SeaMAX.Parity containing the desired parity.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_SetSoftwareAddress(System.Int32)">
|
||||
<summary>
|
||||
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.
|
||||
</summary>
|
||||
<param name="SlaveID">Integer containing the desired slave ID of the currently selected module.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_ReadDigitalOutputs(System.Int32,System.Int32,System.Byte[])">
|
||||
<summary>
|
||||
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.
|
||||
</summary>
|
||||
<param name="Start">Starting output to read (zero-indexed).</param>
|
||||
<param name="Quantity">Quantity of outputs to read.</param>
|
||||
<param name="Data">Byte array where the digital output values will be stored. The array must have at least 1 byte allocated for every 8 outputs.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_ReadDigitalInputs(System.Int32,System.Int32,System.Byte[])">
|
||||
<summary>
|
||||
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.
|
||||
</summary>
|
||||
<param name="Start">Starting input (zero-indexed).</param>
|
||||
<param name="Quantity">Quantity of digital inputs to read.</param>
|
||||
<param name="Data">Byte array where the digital input values will be stored. The array must have at least 1 byte allocated for each 8 inputs.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_ReadAnalogInputs(System.Int32,System.Int32,System.Double[],Sealevel.SeaMAX.ChannelRange[],System.Byte[])">
|
||||
<summary>
|
||||
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.
|
||||
</summary>
|
||||
<param name="Start">Starting input (zero-indexed).</param>
|
||||
<param name="Quantity">Quantity of analog inputs to read.</param>
|
||||
<param name="AnalogValues">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.</param>
|
||||
<param name="Ranges">Array of channel ranges that correspond directly to each requested input.</param>
|
||||
<param name="ByteValues">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.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_WriteDigitalOutputs(System.Int32,System.Int32,System.Byte[])">
|
||||
<summary>
|
||||
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.
|
||||
</summary>
|
||||
<param name="Start">Starting output (zero-indexed).</param>
|
||||
<param name="Quantity">Quantity of outputs to write.</param>
|
||||
<param name="Data">Byte array containing the desired output state(s). At least one byte must be allocated for every 8 outputs.</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_WriteAnalogOutputs(System.Int32,System.Int32,System.Double[],Sealevel.SeaMAX.ChannelRange[],System.Byte[])">
|
||||
<summary>
|
||||
Writes to the selected device's analog outputs. Use only AnalogValues or ByteValues, but not both.
|
||||
</summary>
|
||||
<param name="Start">Starting output (zero-indexed).</param>
|
||||
<param name="Quantity">Quantity of analog outputs to write.</param>
|
||||
<param name="AnalogValues">Desired output values as floating point values (voltages). Leave null if ByteValues are used.</param>
|
||||
<param name="Ranges">Array of analog output ranges. Can be null if providing byte values.</param>
|
||||
<param name="ByteValues">Desired output values as 16-bit byte values. Leave null if AnalogValues are used.</param>
|
||||
<returns>>=0 Number of bytes successfully written. Returns negative if an error occured.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_NotifyOnInputChange(System.Int32,System.Int32,System.Byte[],System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Continuously reads the discrete inputs until a change occurs. Only one notify request can be outstanding at a time.
|
||||
</summary>
|
||||
<param name="Start">Modbus address to begin the read (zero-indexed).</param>
|
||||
<param name="Quantity">Quantity of inputs to read.</param>
|
||||
<param name="Data">On input change, this buffer will be populated with the input state.</param>
|
||||
<param name="Delay">Time to delay between issuing reads (ms).</param>
|
||||
<param name="Blocking">Indicates whether to wait for a change (non-zero), or immediately return control to the caller (zero).</param>
|
||||
<returns>Returns 0 if successful, otherwise returns a negative value.</returns>
|
||||
</member>
|
||||
<member name="M:Sealevel.SeaMAX.SM_NotifyInputState(System.Int32)">
|
||||
<summary>
|
||||
Checks or cancels the notify input state status.
|
||||
</summary>
|
||||
<param name="Cancel">Non zero value indicates the current notify operation should be canceled.</param>
|
||||
<returns>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.</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,284 @@
|
||||
#ifndef __SEAMAX_H__
|
||||
#define __SEAMAX_H__
|
||||
|
||||
#ifdef LINUX
|
||||
#include "wincompat.h"
|
||||
#endif
|
||||
|
||||
typedef void *LPVOID;
|
||||
|
||||
#define SM_HANDLE void*
|
||||
#define SME_HANDLE void*
|
||||
#define SDL_HANDLE void*
|
||||
|
||||
/// \page Enumerations Global Types and Enumerations.
|
||||
/// Listed here are the types, enumerations, and definitions used throughout the %SeaMAX library.
|
||||
///
|
||||
/// \section semax_enumerations SeaMAX Enumerations
|
||||
///
|
||||
/// \subsection sm_deviceconfig DeviceConfig
|
||||
/// \code
|
||||
typedef struct configuration
|
||||
{
|
||||
int model;
|
||||
int commType;
|
||||
int baudrate;
|
||||
int parity;
|
||||
int firmware;
|
||||
} DeviceConfig;
|
||||
/// \endcode
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern int __stdcall SM_Version(int* major, int* minor, int* revision, int* build);
|
||||
extern int __stdcall SM_Open(SM_HANDLE* handle, char* connection);
|
||||
extern int __stdcall SM_ConfigureSerialConnection(SM_HANDLE handle, int baudrate, int parity);
|
||||
extern int __stdcall SM_ConfigureSerialTimeouts(SM_HANDLE handle, int multiple, int constant, int interval);
|
||||
extern int __stdcall SM_SelectDevice(SM_HANDLE handle, int slaveID);
|
||||
extern int __stdcall SM_GetDeviceConfig(SM_HANDLE handle, DeviceConfig* config);
|
||||
extern int __stdcall SM_Close(SM_HANDLE handle);
|
||||
extern int __stdcall SM_GetAnalogInputConfig(SM_HANDLE handle, unsigned char* reference, unsigned char* mode);
|
||||
extern int __stdcall SM_GetAnalogInputRanges(SM_HANDLE handle, unsigned char* ranges);
|
||||
extern int __stdcall SM_SetAnalogInputConfig(SM_HANDLE handle, unsigned char reference, unsigned char mode);
|
||||
extern int __stdcall SM_SetAnalogInputRanges(SM_HANDLE handle, unsigned char* ranges);
|
||||
extern int __stdcall SM_GetAnalogOutputRanges(SM_HANDLE handle, unsigned char* ranges);
|
||||
extern int __stdcall SM_GetPIOPresets(SM_HANDLE handle, unsigned char* config);
|
||||
extern int __stdcall SM_SetPIOPresets(SM_HANDLE handle, unsigned char* config);
|
||||
extern int __stdcall SM_GetPIODirection(SM_HANDLE handle, unsigned char* config);
|
||||
extern int __stdcall SM_SetPIODirection(SM_HANDLE handle, unsigned char* config);
|
||||
extern int __stdcall SM_ReadPIO(SM_HANDLE handle, unsigned char* values);
|
||||
extern int __stdcall SM_WritePIO(SM_HANDLE handle, unsigned char* values);
|
||||
extern int __stdcall SM_SetCommunications(SM_HANDLE handle, int baudrate, int parity);
|
||||
extern int __stdcall SM_SetSoftwareAddress(SM_HANDLE handle, int slaveID);
|
||||
extern int __stdcall SM_ReadDigitalInputs(SM_HANDLE handle, int start, int number, unsigned char *values);
|
||||
extern int __stdcall SM_ReadAnalogInputs(SM_HANDLE handle, int start, int number, double* analogValues, unsigned char* ranges, unsigned char *byteValues);
|
||||
extern int __stdcall SM_WriteDigitalOutputs(SM_HANDLE handle, int start, int number, unsigned char *values);
|
||||
extern int __stdcall SM_ReadDigitalOutputs(SM_HANDLE handle, int start, int number, unsigned char *values);
|
||||
extern int __stdcall SM_WriteAnalogOutputs(SM_HANDLE handle, int start, int number, double* analogValues, unsigned char* ranges, unsigned char *byteValues);
|
||||
extern int __stdcall SM_SetBridgeType(SM_HANDLE handle, int bridgeType);
|
||||
// Customer specific methods (Oncology Inc.)
|
||||
extern int __stdcall SM_GlobalCommsReset(SM_HANDLE handle);
|
||||
|
||||
#ifndef LINUX
|
||||
extern int __stdcall SM_NotifyInputState(SM_HANDLE handle, int cancel);
|
||||
extern int __stdcall SM_NotifyOnInputChange(SM_HANDLE handle, int start, int number, unsigned char* values, int delay, int blocking);
|
||||
#endif
|
||||
|
||||
// Deprecated Functions
|
||||
extern int __stdcall SM_GetConfig(SM_HANDLE handle, int* model, int* commType, int* baudrate, int* parity);
|
||||
extern int __stdcall SM_ReadDiscreteInputs(SM_HANDLE handle, int start, int number, unsigned char *values);
|
||||
extern int __stdcall SM_ReadHoldingRegisters(SM_HANDLE handle, int start, int number, unsigned char *values);
|
||||
extern int __stdcall SM_ReadInputRegisters(SM_HANDLE handle, int start, int number, unsigned char *values);
|
||||
extern int __stdcall SM_WriteCoils(SM_HANDLE handle, int start, int number, unsigned char *values);
|
||||
extern int __stdcall SM_ReadCoils(SM_HANDLE handle, int start, int number, unsigned char *values);
|
||||
extern int __stdcall SM_WriteHoldingRegisters(SM_HANDLE handle, int start, int number, unsigned char *values);
|
||||
extern int __stdcall SM_GetADDAExtendedConfig(SM_HANDLE handle, int* multiplierEnabled, unsigned char* daConfig);
|
||||
extern int __stdcall SM_SetADDAConfig(SM_HANDLE handle, unsigned char* deviceConfig, unsigned char* channelsConfig);
|
||||
extern int __stdcall SM_GetADDAConfig(SM_HANDLE handle, unsigned char* deviceConfig, unsigned char* channelsConfig);
|
||||
extern int __stdcall SM_AtoDConversion(SM_HANDLE handle, double *value, unsigned char *data, int channelRange);
|
||||
extern int __stdcall SM_DtoAConversion(SM_HANDLE handle, double value, unsigned char *data, int channelRange);
|
||||
|
||||
extern int __stdcall SME_Initialize(SME_HANDLE* handle);
|
||||
extern int __stdcall SME_Cleanup(SME_HANDLE handle);
|
||||
extern int __stdcall SME_SearchForModules(SME_HANDLE handle);
|
||||
extern int __stdcall SME_FirstModule(SME_HANDLE handle);
|
||||
extern int __stdcall SME_NextModule(SME_HANDLE handle);
|
||||
extern int __stdcall SME_Ping(SME_HANDLE handle);
|
||||
extern int __stdcall SME_ModuleByName(SME_HANDLE handle, char* moduleName);
|
||||
extern int __stdcall SME_ModuleByIP(SME_HANDLE handle, char* ipAddress);
|
||||
extern int __stdcall SME_ModuleByMAC(SME_HANDLE handle, char* mac);
|
||||
extern int __stdcall SME_ModuleCount(SME_HANDLE handle);
|
||||
extern int __stdcall SME_GetName(SME_HANDLE handle, char* moduleName);
|
||||
extern int __stdcall SME_GetNetworkConfig(SME_HANDLE handle, char* ipAddress, char* netmask, char* gateway);
|
||||
extern int __stdcall SME_GetNetworkConfigBytes(SME_HANDLE handle, unsigned char* ipAddress, unsigned char* netmask, unsigned char* gateway);
|
||||
extern int __stdcall SME_GetMACAddress(SME_HANDLE handle, char* address);
|
||||
extern int __stdcall SME_GetDHCPConfig(SME_HANDLE handle, int* status);
|
||||
extern int __stdcall SME_GetType(SME_HANDLE handle, char* type);
|
||||
extern int __stdcall SME_GetFirmwareVersion(SME_HANDLE handle, int* major, int* minor);
|
||||
extern int __stdcall SME_GetNetworkSerialParams(SME_HANDLE handle, int* baudrate, int* parity);
|
||||
extern int __stdcall SME_SetName(SME_HANDLE handle, char *name);
|
||||
extern int __stdcall SME_SetNetworkConfig(SME_HANDLE handle, char* ipAddress, char* netmask, char* gateway);
|
||||
extern int __stdcall SME_SetNetworkConfigBytes(SME_HANDLE handle, unsigned char* ipAddress, unsigned char* netmask, unsigned char* gateway);
|
||||
extern int __stdcall SME_SetDHCPConfig(SME_HANDLE handle, int status);
|
||||
extern int __stdcall SME_RebootModule(SME_HANDLE handle);
|
||||
extern int __stdcall SME_SetNetworkSerialParams(SME_HANDLE handle, int baudrate, int parity);
|
||||
extern int __stdcall SME_GetNetworkSerialParams(SME_HANDLE handle, int* baudrate, int* parity);
|
||||
extern int __stdcall SME_GetWirelessConfig(SME_HANDLE handle, int* network, char* SSID, int* channel, int* security, int* keyType);
|
||||
extern int __stdcall SME_SetWirelessConfig(SME_HANDLE handle, int network, char* SSID, int channel, int security, int keyType, char* key);
|
||||
extern int __stdcall SME_ARPAddress(SME_HANDLE handle, char* ipAddress);
|
||||
extern int __stdcall SME_IsReachable(SME_HANDLE handle);
|
||||
|
||||
extern int __stdcall SDL_Initialize(SDL_HANDLE* handle);
|
||||
extern int __stdcall SDL_Cleanup(SDL_HANDLE handle);
|
||||
extern int __stdcall SDL_SearchForDevices(SDL_HANDLE handle);
|
||||
extern int __stdcall SDL_FirstDevice(SDL_HANDLE handle);
|
||||
extern int __stdcall SDL_NextDevice(SDL_HANDLE handle);
|
||||
extern int __stdcall SDL_DeviceCount(SDL_HANDLE handle);
|
||||
extern int __stdcall SDL_GetName(SDL_HANDLE handle, char* deviceName);
|
||||
extern int __stdcall SDL_GetModel(SDL_HANDLE handle, int* model);
|
||||
extern int __stdcall SDL_GetDeviceID(SDL_HANDLE handle, int* id);
|
||||
extern int __stdcall SDL_GetSerial(SDL_HANDLE handle, char* serialNumber);
|
||||
extern int __stdcall SDL_GetNameBySerial(SDL_HANDLE handle, char* serialNumber, char* deviceName);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef ENUMERATIONS
|
||||
#define ENUMERATIONS
|
||||
|
||||
///
|
||||
/// \page Enumerations
|
||||
/// \subsection sm_baudrates Baudrates
|
||||
///
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
SM_BAUD_INVALID = 0,
|
||||
SM_BAUD_1200 = 1,
|
||||
SM_BAUD_2400 = 2,
|
||||
SM_BAUD_4800 = 3,
|
||||
SM_BAUD_9600 = 4,
|
||||
SM_BAUD_14400 = 5,
|
||||
SM_BAUD_19200 = 6,
|
||||
SM_BAUD_28800 = 7,
|
||||
SM_BAUD_38400 = 8,
|
||||
SM_BAUD_57600 = 9,
|
||||
SM_BAUD_115200 = 10
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \page Enumerations
|
||||
/// \subsection sm_databits Databits
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
SM_DATABITS_5 = 5,
|
||||
SM_DATABITS_6 = 6,
|
||||
SM_DATABITS_7 = 7,
|
||||
SM_DATABITS_8 = 8
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \page Enumerations
|
||||
/// \subsection sm_parity Parity
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
SM_PARITY_NONE = 0,
|
||||
SM_PARITY_ODD = 1,
|
||||
SM_PARITY_EVEN = 2,
|
||||
SM_PARITY_MARK = 3,
|
||||
SM_PARITY_SPACE = 4
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \page Enumerations
|
||||
/// \subsection sm_stopbits Stopbits
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
SM_STOPBITS_1 = 0,
|
||||
SM_STOPBITS_1_5 = 1,
|
||||
SM_STOPBITS_2 = 2
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \page Enumerations
|
||||
/// \subsection sm_comtype Communications Type
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
SM_COMTYPE_RS485 = 0,
|
||||
SM_COMTYPE_ETHERNET = 1,
|
||||
SM_COMTYPE_USB = 2,
|
||||
SM_COMTYPE_RS232 = 3,
|
||||
SM_COMTYPE_EXPANSION = 4,
|
||||
SM_COMTYPE_RS422 = 5,
|
||||
SM_COMTYPE_WIRELESS = 6,
|
||||
SM_COMTYPE_INTELLIGENT = 7,
|
||||
SM_COMTYPE_P_O_ETH = 8,
|
||||
SM_COMTYPE_P_O_USB = 9
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \subsection ad_reference Analog to Digital Voltage Reference
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
ANALOG = 0,
|
||||
GROUND = 1,
|
||||
AD_REFERENCE = 2,
|
||||
FLOATING = 3,
|
||||
DA_CHANNEL_1 = 4,
|
||||
DA_CHANNEL_2 = 8
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \subsection ad_channel_modes Analog to Digital Channel Modes
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
SINGLE_ENDED = 0,
|
||||
DIFFERENTIAL = 1,
|
||||
CURRENT_LOOP = 2
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \subsection channel_ranges Channel Range Values
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
ZERO_TO_FIVE = 0,
|
||||
PLUS_MINUS_FIVE = 1,
|
||||
ZERO_TO_TEN = 2,
|
||||
PLUS_MINUS_TEN = 3,
|
||||
ZERO_TO_FIFTEEN = 2,
|
||||
PLUS_MINUS_FIFTEEN = 3
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \section sme_enumerations SeaMAX Ethernet Enumerations
|
||||
///
|
||||
/// \subsection network_types Network Types
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
NETWORK_INFRASTRUCTURE = 0,
|
||||
NETWORK_ADHOC = 1
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \subsection security_enum Security Type
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
SECURITY_NONE = 0,
|
||||
SECURITY_WEP_OPEN_64 = 1,
|
||||
SECURITY_WEP_SHARED_64 = 2,
|
||||
SECURITY_WEP_OPEN_128 = 3,
|
||||
SECURITY_WEP_SHARED_128 = 4,
|
||||
SECURITY_WPA_TKIP = 5,
|
||||
SECURITY_WPA2_AES = 6,
|
||||
|
||||
SECURITY_UNKNOWN = 0xFF
|
||||
};
|
||||
/// \endcode
|
||||
///
|
||||
/// \subsection seckey_enum Key Type
|
||||
/// \code
|
||||
enum
|
||||
{
|
||||
HEX_KEY = 0,
|
||||
PASSPHRASE_KEY = 1
|
||||
|
||||
};
|
||||
/// \endcode
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
Binary file not shown.
Reference in New Issue
Block a user