Data Structures | Macros | Typedefs | Functions
iothinxio.h File Reference

Moxa ioThinx Library More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  MODULE_INFO
 

Macros

#define IOTHINX_ERR_OK   0
 
#define IOTHINX_ERR_INIT   1
 
#define IOTHINX_ERR_SLOT   2
 
#define IOTHINX_ERR_ARGUMENT   3
 
#define IOTHINX_ERR_CONFIG   4
 
#define IOTHINX_ERR_RANGE   5
 
#define IOTHINX_ERR_COMMUNICATION   6
 
#define IOTHINX_BUS_OK   0
 
#define IOTHINX_BUS_ERROR   1
 
#define DI_MODE_DI   0
 
#define DI_MODE_COUNTER   1
 
#define CNT_TRIGGER_RISING   0
 
#define CNT_TRIGGER_FALLING   1
 
#define CNT_TRIGGER_BOTH   2
 
#define DO_MODE_DO   0
 
#define DO_MODE_PWM   1
 
#define AI_RANGE_DISABLE   0
 
#define AI_RANGE_0_10V   1
 
#define AI_RANGE_0_20mA   2
 
#define AI_RANGE_4_20mA_BURNOUT   3
 
#define AI_RANGE_4_20mA   4
 
#define AI_RANGE_10V   5
 
#define AO_RANGE_DISABLE   0
 
#define AO_RANGE_0_10_V   1
 
#define AO_RANGE_0_20mA   2
 
#define AO_RANGE_4_20mA   3
 
#define TC_SENSOR_TYPE_J   0
 
#define TC_SENSOR_TYPE_K   1
 
#define TC_SENSOR_TYPE_T   2
 
#define TC_SENSOR_TYPE_E   3
 
#define TC_SENSOR_TYPE_R   4
 
#define TC_SENSOR_TYPE_S   5
 
#define TC_SENSOR_TYPE_B   6
 
#define TC_SENSOR_TYPE_N   7
 
#define TC_SENSOR_TYPE_75_126_MV   14
 
#define TC_SENSOR_TYPE_39_062_MV   15
 
#define TC_SENSOR_TYPE_19_532_MV   16
 
#define TC_SENSOR_TYPE_DISABLE   63
 
#define RTD_SENSOR_TYPE_PT50   0
 
#define RTD_SENSOR_TYPE_PT100   1
 
#define RTD_SENSOR_TYPE_PT200   2
 
#define RTD_SENSOR_TYPE_PT500   3
 
#define RTD_SENSOR_TYPE_PT1000   4
 
#define RTD_SENSOR_TYPE_8X   14
 
#define RTD_SENSOR_TYPE_4X   15
 
#define RTD_SENSOR_TYPE_2X   16
 
#define RTD_SENSOR_TYPE_1X   17
 
#define RTD_SENSOR_TYPE_JPT100   20
 
#define RTD_SENSOR_TYPE_JPT200   21
 
#define RTD_SENSOR_TYPE_JPT500   22
 
#define RTD_SENSOR_TYPE_JPT1000   23
 
#define RTD_SENSOR_TYPE_NI100   30
 
#define RTD_SENSOR_TYPE_NI200   31
 
#define RTD_SENSOR_TYPE_NI500   32
 
#define RTD_SENSOR_TYPE_NI1000   33
 
#define RTD_SENSOR_TYPE_NI120   34
 
#define RTD_SENSOR_TYPE_DISABLE   63
 
#define SYS_PWR_STATUS_CONNECTED   0
 
#define SYS_PWR_STATUS_WARNING   1
 
#define FIELD_PWR_STATUS_CONNECTED   0
 
#define FIELD_PWR_STATUS_DISCONNECTED   1
 
#define FIELD_PWR_STATUS_WARNING   2
 
#define LED_STATE_DARK   0
 
#define LED_STATE_GREEN   1
 
#define LED_STATE_RED   2
 
#define LED_CHANNEL_U1   1
 
#define LED_CHANNEL_U2   2
 
#define PUSH_BUTTON_RELEASED   0
 
#define PUSH_BUTTON_PRESSED   1
 
#define SERIAL_PORT_1   0
 
#define SERIAL_PORT_2   1
 
#define SERIAL_PORT_3   2
 
#define SERIAL_PORT_4   3
 
#define SERIAL_INTERFACE_RS232   0
 
#define SERIAL_INTERFACE_RS485_2WIRE   1
 
#define SERIAL_INTERFACE_RS422   2
 

Typedefs

typedef int32_t IOTHINX_ERR
 

Functions

IOTHINX_ERR ioThinx_IO_Client_Init (void)
 
IOTHINX_ERR ioThinx_IO_GetBusStatus (uint8_t *p_status)
 
IOTHINX_ERR ioThinx_IO_Config_Reload (void)
 
IOTHINX_ERR ioThinx_DI_GetValues (uint32_t slot, uint32_t *p_values)
 
IOTHINX_ERR ioThinx_DI_GetCntValues (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DI_SetCntValues (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DI_GetCntStarts (uint32_t slot, uint32_t *p_starts)
 
IOTHINX_ERR ioThinx_DI_SetCntStarts (uint32_t slot, uint32_t starts)
 
IOTHINX_ERR ioThinx_DI_SetCntStops (uint32_t slot, uint32_t stops)
 
IOTHINX_ERR ioThinx_DI_GetCntOverflows (uint32_t slot, uint32_t *p_overflows)
 
IOTHINX_ERR ioThinx_DI_SetCntOverflows (uint32_t slot, uint32_t overflows)
 
IOTHINX_ERR ioThinx_DI_Config_GetModes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_DI_Config_SetModes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_DI_Config_GetFilters (uint32_t slot, uint8_t start, uint8_t count, uint16_t buf[])
 
IOTHINX_ERR ioThinx_DI_Config_SetFilters (uint32_t slot, uint8_t start, uint8_t count, uint16_t buf[])
 
IOTHINX_ERR ioThinx_DI_Config_GetCntTriggers (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_DI_Config_SetCntTriggers (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_DI_Config_GetCntValues (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DI_Config_SetCntValues (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DO_GetValues (uint32_t slot, uint32_t *p_values)
 
IOTHINX_ERR ioThinx_DO_SetValues (uint32_t slot, uint32_t values)
 
IOTHINX_ERR ioThinx_DO_GetPwmCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DO_SetPwmCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DO_GetPwmStarts (uint32_t slot, uint32_t *p_starts)
 
IOTHINX_ERR ioThinx_DO_SetPwmStarts (uint32_t slot, uint32_t starts)
 
IOTHINX_ERR ioThinx_DO_SetPwmStops (uint32_t slot, uint32_t stops)
 
IOTHINX_ERR ioThinx_DO_GetPwmConfigures (uint32_t slot, uint8_t start, uint8_t count, uint16_t frequencies[], uint16_t duty_cycles[])
 
IOTHINX_ERR ioThinx_DO_SetPwmConfigures (uint32_t slot, uint8_t start, uint8_t count, uint16_t frequencies[], uint16_t duty_cycles[])
 
IOTHINX_ERR ioThinx_DO_Config_GetModes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_DO_Config_SetModes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_DO_Config_GetPwmCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DO_Config_SetPwmCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_DO_Config_GetPwmConfigures (uint32_t slot, uint8_t start, uint8_t count, uint16_t frequencies[], uint16_t duty_cycles[])
 
IOTHINX_ERR ioThinx_DO_Config_SetPwmConfigures (uint32_t slot, uint8_t start, uint8_t count, uint16_t frequencies[], uint16_t duty_cycles[])
 
IOTHINX_ERR ioThinx_Relay_GetValues (uint32_t slot, uint32_t *p_values)
 
IOTHINX_ERR ioThinx_Relay_SetValues (uint32_t slot, uint32_t values)
 
IOTHINX_ERR ioThinx_Relay_GetTotalCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_Relay_GetCurrentCounts (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_Relay_ResetCurrentCounts (uint32_t slot, uint32_t resets)
 
IOTHINX_ERR ioThinx_AI_GetEngs (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_AI_GetMinEngs (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_AI_GetMaxEngs (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_AI_GetRaws (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_AI_GetMinRaws (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_AI_GetMaxRaws (uint32_t slot, uint8_t start, uint8_t count, uint32_t buf[])
 
IOTHINX_ERR ioThinx_AI_ResetMins (uint32_t slot, uint32_t resets)
 
IOTHINX_ERR ioThinx_AI_ResetMaxs (uint32_t slot, uint32_t resets)
 
IOTHINX_ERR ioThinx_AI_GetStatuss (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_AI_Config_GetRanges (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_AI_Config_SetRanges (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_AI_Config_GetBurnoutValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_AI_Config_SetBurnoutValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_AO_GetEngs (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_AO_SetEngs (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_AO_GetRaws (uint32_t slot, uint8_t start, uint8_t count, uint16_t buf[])
 
IOTHINX_ERR ioThinx_AO_SetRaws (uint32_t slot, uint8_t start, uint8_t count, uint16_t buf[])
 
IOTHINX_ERR ioThinx_AO_GetStatuss (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_AO_Config_GetRanges (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_AO_Config_SetRanges (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_TC_GetValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_TC_GetMinValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_TC_GetMaxValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_TC_ResetMins (uint32_t slot, uint32_t resets)
 
IOTHINX_ERR ioThinx_TC_ResetMaxs (uint32_t slot, uint32_t resets)
 
IOTHINX_ERR ioThinx_TC_GetStatuss (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_TC_SetCalibrations (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_TC_ResetCalibrations (uint32_t slot, uint8_t start, uint8_t count)
 
IOTHINX_ERR ioThinx_TC_Config_GetSensorTypes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_TC_Config_SetSensorTypes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_RTD_GetValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_RTD_GetMinValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_RTD_GetMaxValues (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_RTD_ResetMins (uint32_t slot, uint32_t resets)
 
IOTHINX_ERR ioThinx_RTD_ResetMaxs (uint32_t slot, uint32_t resets)
 
IOTHINX_ERR ioThinx_RTD_GetStatuss (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_RTD_SetCalibrations (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_RTD_ResetCalibrations (uint32_t slot, uint8_t start, uint8_t count)
 
IOTHINX_ERR ioThinx_RTD_Config_GetSensorTypes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_RTD_Config_SetSensorTypes (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_PWR_GetSysStatus (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_PWR_GetFieldStatus (uint32_t slot, uint8_t start, uint8_t count, uint8_t buf[])
 
IOTHINX_ERR ioThinx_PWR_Config_GetAlarms (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_PWR_Config_SetAlarms (uint32_t slot, uint8_t start, uint8_t count, float buf[])
 
IOTHINX_ERR ioThinx_Misc_GetModuleInfo (uint8_t slot, struct MODULE_INFO *p_module_info)
 
IOTHINX_ERR ioThinx_Misc_GetModuleInfoML (uint8_t slot, struct MODULE_INFO *p_module_info)
 
IOTHINX_ERR ioThinx_Misc_GetModuleCount (uint32_t *p_module_count)
 
IOTHINX_ERR ioThinx_Misc_GetModuleCountML (uint32_t *p_module_count)
 
IOTHINX_ERR ioThinx_Misc_GetRotarySwitchState (uint32_t slot, uint8_t *p_state)
 
IOTHINX_ERR ioThinx_Misc_SetUserLedState (uint32_t slot, uint8_t channel, uint8_t state)
 
IOTHINX_ERR ioThinx_Misc_GetPushButtonState (uint32_t slot, uint8_t *p_state)
 
IOTHINX_ERR ioThinx_Misc_GetLocateState (uint32_t slot, uint8_t *p_state)
 
IOTHINX_ERR ioThinx_Misc_SetLocateState (uint32_t slot, uint8_t state)
 
IOTHINX_ERR ioThinx_Serial_GetDevName (uint32_t slot, uint32_t port, uint8_t *name)
 
IOTHINX_ERR ioThinx_Serial_SetInterface (uint32_t slot, uint32_t port, uint32_t interface)
 
IOTHINX_ERR ioThinx_Serial_GetInterface (uint32_t slot, uint32_t port, uint32_t *interface)
 

Detailed Description

Moxa ioThinx Library

Date
2018-10-07
Author
Wanhan Hsieh
Version
V1.0

Definition in file iothinxio.h.