Ejemplo n.º 1
0
/**
 * Close this Transport.
 * @return Zero on success, nonzero otherwise
 * @post Tranport will be unconfigured, regardless of success/failure.
 */
int Transport::close()
{
    int retval = 0;
    if( configured ) {
        flush();
        retval = closeComm();
    }
    configured = false;
    return retval;
}
Ejemplo n.º 2
0
/**
 * @brief Destructor.
 * @return
 *
 * Delete the internal parser (and its internal transform) if needed,
 * and close serial port if it is open.
 */
mems::IMUSampler::~IMUSampler()
{
  if ( parser_ )
  {
    deleteParser();
  }
  if ( comm_ )
  {
    closeComm();
  }
}
Ejemplo n.º 3
0
CtrlComm::~CtrlComm() {
        closeComm();
        delete serial_;
        delete carSocket_;
}