6.7. Network operation functions

6.7.1. esConnectPorts

EC_T_DWORD esConnectPorts(EC_T_DWORD dwInstanceId1, EC_T_WORD wCfgFixedAddress1, EC_T_BYTE byPort1, EC_T_DWORD dwInstanceId2, EC_T_WORD wCfgFixedAddress2, EC_T_BYTE byPort2)

Connect a slave ESC port to another slave ESC port or to a network adapter.

Parameters
  • dwInstanceId1 – [in] Simulator Instance ID of Port1

  • wCfgFixedAddress1 – [in] Slave’s station address of Port1. 0: network adapter

  • byPort1 – [in] ESC port of Port1. 0, 1, 2, 3: port A, port B, port C, port D

  • dwInstanceId2 – [in] Simulator Instance ID of Port2

  • wCfgFixedAddress2 – [in] Slave’s station address of Port2. 0: network adapter

  • byPort2 – [in] ESC port of Port2. 0, 1, 2, 3: port A, port B, port C, port D

Returns

EC_E_NOERROR or error code

6.7.2. esDisconnectPort

EC_T_DWORD esDisconnectPort(EC_T_DWORD dwInstanceId, EC_T_WORD wCfgFixedAddress, EC_T_BYTE byPort)

Disconnect a slave ESC port or a network adapter.

Parameters
  • dwInstanceId – [in] Simulator Instance ID

  • wCfgFixedAddress – [in] Slave’s station address. 0: network adapter

  • byPort – [in] ESC port. 0, 1, 2, 3: port A, port B, port C, port D

Returns

EC_E_NOERROR or error code

6.7.3. esPowerSlave

EC_T_DWORD esPowerSlave(EC_T_DWORD dwInstanceId, EC_T_WORD wCfgFixedAddress, EC_T_BOOL bOn)

Power on or power off a slave.

Parameters
  • dwInstanceId – [in] Simulator Instance ID

  • wCfgFixedAddress – [in] Slave’s station address

  • bOn – [in] 0: switch off, 1: switch on

Returns

EC_E_NOERROR or error code