/*!
  \file
  \brief sci_control.c のダミー実装

  \author Satofumi KAMIMURA

  $Id: sci_control.cpp 1703 2010-02-17 16:52:32Z satofumi $
*/

#include "sci_control.h"
#include <string>

using namespace std;


static string buffer_;


std::string sci_buffer(void)
{
  return buffer_;
}


void sci_clearBuffer(void)
{
  buffer_.clear();
}


void sci_initialize(unsigned char priority, long baudrate)
{
  (void)priority;
  (void)baudrate;

  // !!!
}


int sci_send(const char* data, int size)
{
  for (int i = 0; i < size; ++i) {
    char ch = data[i];
    buffer_.push_back(ch);
  }

  return size;
}


int sci_receive(char* data, int size)
{
  (void)data;
  (void)size;

  // !!!

  return 0;
}


int sci_readableSize(void)
{
  // !!!

  return -1;
}


int sci_sendableSize(void)
{
  // !!!

  return -1;
}


bool sci_isSending(void)
{
  // !!!

  return false;
}
