コード例 #1
0
ファイル: ext_serial_utils.c プロジェクト: pkahlert/EPE-MES
/* Function: ExtCloseSerialConnection ==========================================
 * Abstract:
 *  Close the connection with the target.
 */
PRIVATE boolean_T ExtCloseSerialConnection(ExtSerialPort *portDev)
{
    ExtResetSerialConnection();

    return(ExtSerialPortDisconnect(portDev));

} /* end ExtCloseSerialConnection */
コード例 #2
0
/* Function: ExtForceDisconnect ================================================
 * Abstract:
 *  Called by rt_UploadServerWork() in ext_svr.c when there is an extmode
 *  communication error (e.g. a tcp/ip disconnection between the host and target
 *  caused by a cable problem or extremely high network traffic).  In this case,
 *  we want the target to disconnect from the host even if it can't communicate
 *  with the host because we assume that the communication problem caused the
 *  host to disconnect.  This function will perform all steps necessary to
 *  shutdown the communication and leave the target in a state ready to be
 *  reconnected.
 */
void ExtForceDisconnect(ExtUserData *UD)
{
    ExtSerialPortDisconnect(UD->portDev);
    UD->portDev = NULL;
}