#include "../include/Service_conversion.h"

namespace environment {
namespace sim2os {

  int service2int (service_t num_service)
  {
    return static_cast<int>(num_service);
  }
  
  service_t int2service (int val)
  {
    switch (val)
      {
      case SERVICE_OPEN          : return SERVICE_OPEN ;
      case SERVICE_CLOSE         : return SERVICE_CLOSE;
      case SERVICE_READ          : return SERVICE_READ ;
      case SERVICE_WRITE         : return SERVICE_WRITE;
      case SERVICE_TIME          : return SERVICE_TIME ;
      case SERVICE_CLOCK         : return SERVICE_CLOCK;
      case SERVICE_LSEEK         : return SERVICE_LSEEK;
      case SERVICE_UNIMPLEMENTED : return SERVICE_UNIMPLEMENTED;
      default                    : return SERVICE_UNDEFINED;
      }//end switch
  }

};
};
