#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/functional.h>

#include "icsneo/communication/network.h"

namespace icsneo {

void init_network(pybind11::module_& m) {
	pybind11::class_<Network> network(m, "Network");

	pybind11::enum_<_icsneo_netid_t>(network, "_icsneo_netid_t")
		.value("Device", _icsneo_netid_t::icsneo_netid_device)
		.value("HSCAN", _icsneo_netid_t::icsneo_netid_hscan)
		.value("MSCAN", _icsneo_netid_t::icsneo_netid_mscan)
		.value("SWCAN", _icsneo_netid_t::icsneo_netid_swcan)
		.value("LSFTCAN", _icsneo_netid_t::icsneo_netid_lsftcan)
		.value("FordSCP", _icsneo_netid_t::icsneo_netid_fordscp)
		.value("J1708", _icsneo_netid_t::icsneo_netid_j1708)
		.value("Aux", _icsneo_netid_t::icsneo_netid_aux)
		.value("J1850VPW", _icsneo_netid_t::icsneo_netid_j1850vpw)
		.value("ISO9141", _icsneo_netid_t::icsneo_netid_iso9141)
		.value("DiskData", _icsneo_netid_t::icsneo_netid_disk_data)
		.value("Main51", _icsneo_netid_t::icsneo_netid_main51)
		.value("RED", _icsneo_netid_t::icsneo_netid_red)
		.value("SCI", _icsneo_netid_t::icsneo_netid_sci)
		.value("ISO9141_2", _icsneo_netid_t::icsneo_netid_iso9141_2)
		.value("ISO14230", _icsneo_netid_t::icsneo_netid_iso14230)
		.value("LIN", _icsneo_netid_t::icsneo_netid_lin)
		.value("OP_Ethernet1", _icsneo_netid_t::icsneo_netid_op_ethernet1)
		.value("OP_Ethernet2", _icsneo_netid_t::icsneo_netid_op_ethernet2)
		.value("OP_Ethernet3", _icsneo_netid_t::icsneo_netid_op_ethernet3)
		.value("RED_EXT_MEMORYREAD", _icsneo_netid_t::icsneo_netid_red_ext_memoryread)
		.value("RED_INT_MEMORYREAD", _icsneo_netid_t::icsneo_netid_red_int_memoryread)
		.value("RED_DFLASH_READ", _icsneo_netid_t::icsneo_netid_red_dflash_read)
		.value("NeoMemorySDRead", _icsneo_netid_t::icsneo_netid_neo_memory_sdread)
		.value("CAN_ERRBITS", _icsneo_netid_t::icsneo_netid_can_errbits)
		.value("NeoMemoryWriteDone", _icsneo_netid_t::icsneo_netid_neo_memory_write_done)
		.value("RED_WAVE_CAN1_LOGICAL", _icsneo_netid_t::icsneo_netid_red_wave_can1_logical)
		.value("RED_WAVE_CAN2_LOGICAL", _icsneo_netid_t::icsneo_netid_red_wave_can2_logical)
		.value("RED_WAVE_LIN1_LOGICAL", _icsneo_netid_t::icsneo_netid_red_wave_lin1_logical)
		.value("RED_WAVE_LIN2_LOGICAL", _icsneo_netid_t::icsneo_netid_red_wave_lin2_logical)
		.value("RED_WAVE_LIN1_ANALOG", _icsneo_netid_t::icsneo_netid_red_wave_lin1_analog)
		.value("RED_WAVE_LIN2_ANALOG", _icsneo_netid_t::icsneo_netid_red_wave_lin2_analog)
		.value("RED_WAVE_MISC_ANALOG", _icsneo_netid_t::icsneo_netid_red_wave_misc_analog)
		.value("RED_WAVE_MISCDIO2_LOGICAL", _icsneo_netid_t::icsneo_netid_red_wave_miscdio2_logical)
		.value("RED_NETWORK_COM_ENABLE_EX", _icsneo_netid_t::icsneo_netid_red_network_com_enable_ex)
		.value("RED_NEOVI_NETWORK", _icsneo_netid_t::icsneo_netid_red_neovi_network)
		.value("RED_READ_BAUD_SETTINGS", _icsneo_netid_t::icsneo_netid_red_read_baud_settings)
		.value("RED_OLDFORMAT", _icsneo_netid_t::icsneo_netid_red_oldformat)
		.value("RED_SCOPE_CAPTURE", _icsneo_netid_t::icsneo_netid_red_scope_capture)
		.value("RED_HARDWARE_EXCEP", _icsneo_netid_t::icsneo_netid_red_hardware_excep)
		.value("RED_GET_RTC", _icsneo_netid_t::icsneo_netid_red_get_rtc)
		.value("ISO9141_3", _icsneo_netid_t::icsneo_netid_iso9141_3)
		.value("HSCAN2", _icsneo_netid_t::icsneo_netid_hscan2)
		.value("HSCAN3", _icsneo_netid_t::icsneo_netid_hscan3)
		.value("OP_Ethernet4", _icsneo_netid_t::icsneo_netid_op_ethernet4)
		.value("OP_Ethernet5", _icsneo_netid_t::icsneo_netid_op_ethernet5)
		.value("ISO9141_4", _icsneo_netid_t::icsneo_netid_iso9141_4)
		.value("LIN2", _icsneo_netid_t::icsneo_netid_lin2)
		.value("LIN3", _icsneo_netid_t::icsneo_netid_lin3)
		.value("LIN4", _icsneo_netid_t::icsneo_netid_lin4)
		.value("RED_App_Error", _icsneo_netid_t::icsneo_netid_red_app_error)
		.value("CGI", _icsneo_netid_t::icsneo_netid_cgi)
		.value("Reset_Status", _icsneo_netid_t::icsneo_netid_reset_status)
		.value("FB_Status", _icsneo_netid_t::icsneo_netid_fb_status)
		.value("App_Signal_Status", _icsneo_netid_t::icsneo_netid_app_signal_status)
		.value("Read_Datalink_Cm_Tx_Msg", _icsneo_netid_t::icsneo_netid_read_datalink_cm_tx_msg)
		.value("Read_Datalink_Cm_Rx_Msg", _icsneo_netid_t::icsneo_netid_read_datalink_cm_rx_msg)
		.value("Logging_Overflow", _icsneo_netid_t::icsneo_netid_logging_overflow)
		.value("ReadSettings", _icsneo_netid_t::icsneo_netid_read_settings)
		.value("HSCAN4", _icsneo_netid_t::icsneo_netid_hscan4)
		.value("HSCAN5", _icsneo_netid_t::icsneo_netid_hscan5)
		.value("RS232", _icsneo_netid_t::icsneo_netid_rs232)
		.value("UART", _icsneo_netid_t::icsneo_netid_uart)
		.value("UART2", _icsneo_netid_t::icsneo_netid_uart2)
		.value("UART3", _icsneo_netid_t::icsneo_netid_uart3)
		.value("UART4", _icsneo_netid_t::icsneo_netid_uart4)
		.value("SWCAN2", _icsneo_netid_t::icsneo_netid_swcan2)
		.value("Ethernet_DAQ", _icsneo_netid_t::icsneo_netid_ethernet_daq)
		.value("Data_To_Host", _icsneo_netid_t::icsneo_netid_data_to_host)
		.value("TextAPI_To_Host", _icsneo_netid_t::icsneo_netid_textapi_to_host)
		.value("SPI1", _icsneo_netid_t::icsneo_netid_spi1)
		.value("OP_Ethernet6", _icsneo_netid_t::icsneo_netid_op_ethernet6)
		.value("Red_VBat", _icsneo_netid_t::icsneo_netid_red_vbat)
		.value("OP_Ethernet7", _icsneo_netid_t::icsneo_netid_op_ethernet7)
		.value("OP_Ethernet8", _icsneo_netid_t::icsneo_netid_op_ethernet8)
		.value("OP_Ethernet9", _icsneo_netid_t::icsneo_netid_op_ethernet9)
		.value("OP_Ethernet10", _icsneo_netid_t::icsneo_netid_op_ethernet10)
		.value("OP_Ethernet11", _icsneo_netid_t::icsneo_netid_op_ethernet11)
		.value("FlexRay1a", _icsneo_netid_t::icsneo_netid_flexray1a)
		.value("FlexRay1b", _icsneo_netid_t::icsneo_netid_flexray1b)
		.value("FlexRay2a", _icsneo_netid_t::icsneo_netid_flexray2a)
		.value("FlexRay2b", _icsneo_netid_t::icsneo_netid_flexray2b)
		.value("LIN5", _icsneo_netid_t::icsneo_netid_lin5)
		.value("FlexRay", _icsneo_netid_t::icsneo_netid_flexray)
		.value("FlexRay2", _icsneo_netid_t::icsneo_netid_flexray2)
		.value("OP_Ethernet12", _icsneo_netid_t::icsneo_netid_op_ethernet12)
		.value("I2C", _icsneo_netid_t::icsneo_netid_i2c)
		.value("MOST25", _icsneo_netid_t::icsneo_netid_most25)
		.value("MOST50", _icsneo_netid_t::icsneo_netid_most50)
		.value("MOST150", _icsneo_netid_t::icsneo_netid_most150)
		.value("Ethernet", _icsneo_netid_t::icsneo_netid_ethernet)
		.value("GMFSA", _icsneo_netid_t::icsneo_netid_gmfsa)
		.value("TCP", _icsneo_netid_t::icsneo_netid_tcp)
		.value("HSCAN6", _icsneo_netid_t::icsneo_netid_hscan6)
		.value("HSCAN7", _icsneo_netid_t::icsneo_netid_hscan7)
		.value("LIN6", _icsneo_netid_t::icsneo_netid_lin6)
		.value("LSFTCAN2", _icsneo_netid_t::icsneo_netid_lsftcan2)
		.value("LogicalDiskInfo", _icsneo_netid_t::icsneo_netid_logical_disk_info)
		.value("WiVICommand", _icsneo_netid_t::icsneo_netid_wivi_command)
		.value("ScriptStatus", _icsneo_netid_t::icsneo_netid_script_status)
		.value("EthPHYControl", _icsneo_netid_t::icsneo_netid_eth_phy_control)
		.value("ExtendedCommand", _icsneo_netid_t::icsneo_netid_extended_command)
		.value("ExtendedData", _icsneo_netid_t::icsneo_netid_extended_data)
		.value("FlexRayControl", _icsneo_netid_t::icsneo_netid_flexray_control)
		.value("CoreMiniPreLoad", _icsneo_netid_t::icsneo_netid_coremini_preload)
		.value("HW_COM_Latency_Test", _icsneo_netid_t::icsneo_netid_hw_com_latency_test)
		.value("DeviceStatus", _icsneo_netid_t::icsneo_netid_device_status)
		.value("UDP", _icsneo_netid_t::icsneo_netid_udp)
		.value("ForwardedMessage", _icsneo_netid_t::icsneo_netid_forwarded_message)
		.value("I2C2", _icsneo_netid_t::icsneo_netid_i2c2)
		.value("I2C3", _icsneo_netid_t::icsneo_netid_i2c3)
		.value("I2C4", _icsneo_netid_t::icsneo_netid_i2c4)
		.value("Ethernet2", _icsneo_netid_t::icsneo_netid_ethernet2)
		.value("A2B1", _icsneo_netid_t::icsneo_netid_a2b1)
		.value("A2B2", _icsneo_netid_t::icsneo_netid_a2b2)
		.value("Ethernet3", _icsneo_netid_t::icsneo_netid_ethernet3)
		.value("WBMS", _icsneo_netid_t::icsneo_netid_wbms)
		.value("DWCAN9", _icsneo_netid_t::icsneo_netid_dwcan9)
		.value("DWCAN10", _icsneo_netid_t::icsneo_netid_dwcan10)
		.value("DWCAN11", _icsneo_netid_t::icsneo_netid_dwcan11)
		.value("DWCAN12", _icsneo_netid_t::icsneo_netid_dwcan12)
		.value("DWCAN13", _icsneo_netid_t::icsneo_netid_dwcan13)
		.value("DWCAN14", _icsneo_netid_t::icsneo_netid_dwcan14)
		.value("DWCAN15", _icsneo_netid_t::icsneo_netid_dwcan15)
		.value("DWCAN16", _icsneo_netid_t::icsneo_netid_dwcan16)
		.value("LIN7", _icsneo_netid_t::icsneo_netid_lin7)
		.value("LIN8", _icsneo_netid_t::icsneo_netid_lin8)
		.value("SPI2", _icsneo_netid_t::icsneo_netid_spi2)
		.value("MDIO1", _icsneo_netid_t::icsneo_netid_mdio1)
		.value("MDIO2", _icsneo_netid_t::icsneo_netid_mdio2)
		.value("MDIO3", _icsneo_netid_t::icsneo_netid_mdio3)
		.value("MDIO4", _icsneo_netid_t::icsneo_netid_mdio4)
		.value("MDIO5", _icsneo_netid_t::icsneo_netid_mdio5)
		.value("MDIO6", _icsneo_netid_t::icsneo_netid_mdio6)
		.value("MDIO7", _icsneo_netid_t::icsneo_netid_mdio7)
		.value("MDIO8", _icsneo_netid_t::icsneo_netid_mdio8)
		.value("OP_Ethernet13", _icsneo_netid_t::icsneo_netid_op_ethernet13)
		.value("OP_Ethernet14", _icsneo_netid_t::icsneo_netid_op_ethernet14)
		.value("OP_Ethernet15", _icsneo_netid_t::icsneo_netid_op_ethernet15)
		.value("OP_Ethernet16", _icsneo_netid_t::icsneo_netid_op_ethernet16)
		.value("SPI3", _icsneo_netid_t::icsneo_netid_spi3)
		.value("SPI4", _icsneo_netid_t::icsneo_netid_spi4)
		.value("SPI5", _icsneo_netid_t::icsneo_netid_spi5)
		.value("SPI6", _icsneo_netid_t::icsneo_netid_spi6)
		.value("SPI7", _icsneo_netid_t::icsneo_netid_spi7)
		.value("SPI8", _icsneo_netid_t::icsneo_netid_spi8)
		.value("LIN9", _icsneo_netid_t::icsneo_netid_lin9)
		.value("LIN10", _icsneo_netid_t::icsneo_netid_lin10)
		.value("LIN11", _icsneo_netid_t::icsneo_netid_lin11)
		.value("LIN12", _icsneo_netid_t::icsneo_netid_lin12)
		.value("LIN13", _icsneo_netid_t::icsneo_netid_lin13)
		.value("LIN14", _icsneo_netid_t::icsneo_netid_lin14)
		.value("LIN15", _icsneo_netid_t::icsneo_netid_lin15)
		.value("LIN16", _icsneo_netid_t::icsneo_netid_lin16)
		.value("Any", _icsneo_netid_t::icsneo_netid_any)
		.value("Invalid", _icsneo_netid_t::icsneo_netid_invalid);
	
    network.def(pybind11::init<_icsneo_netid_t>());
}

} // namespace icsneo 

