| ioPAC RTU Controllers C/C++ Sample Code Programming Guide

- Main Page
- Modules
- Data Structures
- Files

Macros | Functions
SystemInfo
Library » Misc

## Macros
#define | ETHERNET_ADAPTER_RJ45 0
#define | ETHERNET_ADAPTER_M12 1
#define | SWITCH_DUMP_MODE 0
#define | SWITCH_VLAN_MODE 1

## Functions
IO_ERR_CODE | MX_RTU_Module_Info_Get (UINT8 slot, struct Module_Info *module_info)
IO_ERR_CODE | MX_RTU_Total_Slots_Get (UINT32 *num)
IO_ERR_CODE | MX_RTU_Slot_Inserted_Get (UINT32 *state)
IO_ERR_CODE | MX_RTU_Ethernet_Adapter_Type_Get (UINT32 *type)
IO_ERR_CODE | MX_RTU_CPU_Switch_Mode_Get (UINT32 *mode)
UINT32 | MX_RTU_API_Version_Get (void)
UINT32 | MX_RTU_API_BuildDate_Get (void)
UINT32 | MX_RTU_System_Version_Get (void)
UINT32 | MX_RTU_System_BuildDate_Get (void)
IO_ERR_CODE | MX_RTU_System_Hot_Plug_Connect_Get (UINT32 *state)
IO_ERR_CODE | MX_RTU_System_Hot_Plug_Disconnect_Get (UINT32 *state)
MODULE_RW_ERR_CODE | MX_RTU_Module_FWR_BuildDate_Get (UINT8 slot, UINT32 *date)

## Detailed Description

Sample Code:
system_info.c

## Macro Definition Documentation

#define ETHERNET_ADAPTER_RJ45 0

#define ETHERNET_ADAPTER_M12 1

#define SWITCH_DUMP_MODE 0

#define SWITCH_VLAN_MODE 1

## Function Documentation

IO_ERR_CODE MX_RTU_Module_Info_Get | ( | UINT8 | slot,
|  | struct Module_Info * | module_info
| ) |  |

Parameters

  [in] | slot | slot 1 ~ 12.
  [out] | module_info | The module information of slot.

Returns
  IO_ERR_CODE

IO_ERR_CODE MX_RTU_Total_Slots_Get | ( | UINT32 * | num | ) |

Parameters

  [out] | num | Total slots of this product.

Returns
  IO_ERR_CODE

IO_ERR_CODE MX_RTU_Slot_Inserted_Get | ( | UINT32 * | state | ) |

Parameters

  [out] | state | For example, state = 0x6 stands for slot 1 and slot 2 are inserted.

Returns
  IO_ERR_CODE

IO_ERR_CODE MX_RTU_Ethernet_Adapter_Type_Get | ( | UINT32 * | type | ) |

Parameters

  [out] | type | ETHERNET_ADAPTER_RJ45 or ETHERNET_ADAPTER_M12 .

Returns
  IO_ERR_CODE

IO_ERR_CODE MX_RTU_CPU_Switch_Mode_Get | ( | UINT32 * | mode | ) |

Parameters

  [out] | mode | SWITCH_DUMP_MODE or SWITCH_VLAN_MODE .

Returns
  IO_ERR_CODE

UINT32 MX_RTU_API_Version_Get | ( | void |  | ) |

Returns
  For example, 0x01000000 is 1.0.0 , final byte is always 0.

UINT32 MX_RTU_API_BuildDate_Get | ( | void |  | ) |

Returns
  For example, 0x0d03010e is 2013.03.01-14:00:00.

UINT32 MX_RTU_System_Version_Get | ( | void |  | ) |

Returns
  For example, 0x01000000 is 1.0.0 , final byte is always 0.

UINT32 MX_RTU_System_BuildDate_Get | ( | void |  | ) |

Returns
  For example, 0x0d03010e is 2013.03.01-14:00:00.

IO_ERR_CODE MX_RTU_System_Hot_Plug_Connect_Get | ( | UINT32 * | state | ) |

Parameters

  [out] | state | For example, state = 0x6 stands for slot 1 and slot 2 are hot-plug connecting.

Returns
  IO_ERR_CODE

IO_ERR_CODE MX_RTU_System_Hot_Plug_Disconnect_Get | ( | UINT32 * | state | ) |

Parameters

  [out] | state | For example, state = 0x6 stands for slot 1 and slot 2 are hot-plug disconnecting.

Returns
  IO_ERR_CODE

MODULE_RW_ERR_CODE MX_RTU_Module_FWR_BuildDate_Get | ( | UINT8 | slot,
|  | UINT32 * | date
| ) |  |

Parameters

  [in] | slot | slot 0: Built-in IO Ports, slot 1 ~ 12: Expansion IO Ports.
  [out] | date | Module firmware build date. Hex Format: (0x)YYMMDDHH

Returns
  MODULE_RW_ERR_CODE