기본 콘텐츠로 건너뛰기

UNIX C errno 정리( 에러 번호 )

#define EPERM   1   /* Operation not permitted      */
#define ENOENT  2   /* No such file or directory        */
#define ESRCH   3   /* No such process          */
#define EINTR   4   /* interrupted system call      */
#define EIO 5   /* I/O error                */
#define ENXIO   6   /* No such device or address        */
#define E2BIG   7   /* Arg list too long            */
#define ENOEXEC 8   /* Exec format error            */
#define EBADF   9   /* Bad file descriptor          */
#define ECHILD  10  /* No child processes           */
#define EAGAIN  11  /* Resource temporarily unavailable */
#define ENOMEM  12  /* Not enough space         */
#define EACCES  13  /* Permission denied            */
#define EFAULT  14  /* Bad address              */
#define ENOTBLK 15  /* Block device required        */
#define EBUSY   16  /* Resource busy            */
#define EEXIST  17  /* File exists              */
#define EXDEV   18  /* Improper link            */
#define ENODEV  19  /* No such device           */
#define ENOTDIR 20  /* Not a directory          */
#define EISDIR  21  /* Is a directory           */
#define EINVAL  22  /* Invalid argument         */
#define ENFILE  23  /* Too many open files in system    */
#define EMFILE  24  /* Too many open files          */
#define ENOTTY  25  /* Inappropriate I/O control operation  */
#define ETXTBSY 26  /* Text file busy           */
#define EFBIG   27  /* File too large           */
#define ENOSPC  28  /* No space left on device      */
#define ESPIPE  29  /* Invalid seek             */
#define EROFS   30  /* Read only file system        */
#define EMLINK  31  /* Too many links           */
#define EPIPE   32  /* Broken pipe              */
#define EDOM    33  /* Domain error within math function    */
#define ERANGE  34  /* Result too large         */
#define ENOMSG  35  /* No message of desired type       */
#define EIDRM   36  /* Identifier removed           */
#define ECHRNG  37  /* Channel number out of range      */
#define EL2NSYNC 38 /* Level 2 not synchronized     */
#define EL3HLT  39  /* Level 3 halted           */
#define EL3RST  40  /* Level 3 reset            */
#define ELNRNG  41  /* Link number out of range     */
#define EUNATCH 42  /* Protocol driver not attached     */
#define ENOCSI  43  /* No CSI structure available       */
#define EL2HLT  44  /* Level 2 halted           */
#define EDEADLK 45  /* Resource deadlock avoided        */
#define ENOTREADY   46  /* Device not ready     */
#define EWRPROTECT  47  /* Write-protected media    */
#define EFORMAT     48  /* Unformatted media        */
#define ENOLCK      49  /* No locks available       */
#define ENOCONNECT      50      /* no connection                */
#define ESTALE          52      /* no filesystem                */
#define EDIST       53  /* old, currently unused AIX errno*/
#define EWOULDBLOCK     EAGAIN   /* Operation would block   */
#define EWOULDBLOCK 54
#define EINPROGRESS     55      /* Operation now in progress */
#define EALREADY        56      /* Operation already in progress */
#define ENOTSOCK        57      /* Socket operation on non-socket */
#define EDESTADDRREQ    58      /* Destination address required */
#define EDESTADDREQ     EDESTADDRREQ /* Destination address required */
#define EMSGSIZE        59      /* Message too long */
#define EPROTOTYPE      60      /* Protocol wrong type for socket */
#define ENOPROTOOPT     61      /* Protocol not available */
#define EPROTONOSUPPORT 62      /* Protocol not supported */
#define ESOCKTNOSUPPORT 63      /* Socket type not supported */
#define EOPNOTSUPP      64      /* Operation not supported on socket */
#define EPFNOSUPPORT    65      /* Protocol family not supported */
#define EAFNOSUPPORT    66      /* Address family not supported by protocol family */
#define EADDRINUSE      67      /* Address already in use */
#define EADDRNOTAVAIL   68      /* Can't assign requested address */
#define ENETDOWN        69      /* Network is down */
#define ENETUNREACH     70      /* Network is unreachable */
#define ENETRESET       71      /* Network dropped connection on reset */
#define ECONNABORTED    72      /* Software caused connection abort */
#define ECONNRESET      73      /* Connection reset by peer */
#define ENOBUFS         74      /* No buffer space available */
#define EISCONN         75      /* Socket is already connected */
#define ENOTCONN        76      /* Socket is not connected */
#define ESHUTDOWN       77      /* Can't send after socket shutdown */
#define ETIMEDOUT       78      /* Connection timed out */
#define ECONNREFUSED    79      /* Connection refused */
#define EHOSTDOWN       80      /* Host is down */
#define EHOSTUNREACH    81      /* No route to host */
#define ERESTART    82  /* restart the system call */
#define EPROCLIM    83  /* Too many processes */
#define EUSERS      84  /* Too many users */
#define ELOOP       85  /* Too many levels of symbolic links      */
#define ENAMETOOLONG    86  /* File name too long             */
#define ENOTEMPTY   EEXIST  /* Directory not empty */
#define ENOTEMPTY   87
#define EDQUOT      88  /* Disc quota exceeded */
#define ECORRUPT        89      /* Invalid file system control data */
#define EREMOTE     93  /* Item is not local to host */
#define ENOSYS      109 /* Function not implemented  POSIX */
#define EMEDIA      110     /* media surface error */
#define ESOFT           111     /* I/O completed, but needs relocation */
#define ENOATTR     112     /* no attribute found */
#define ESAD        113 /* security authentication denied */
#define ENOTRUST    114 /* not a trusted program */
#define ETOOMANYREFS    115     /* Too many references: can't splice */
#define EILSEQ      116     /* Invalid wide character */
#define ECANCELED   117     /* asynchronous i/o cancelled */
#define ENOSR       118 /* temp out of streams resources */
#define ETIME       119 /* I_STR ioctl timed out */
#define EBADMSG     120 /* wrong message type at stream head */
#define EPROTO      121 /* STREAMS protocol error */
#define ENODATA     122 /* no message ready at stream head */
#define ENOSTR      123 /* fd is not a stream */
#define ECLONEME    ERESTART /* this is the way we clone a stream ... */
#define ENOTSUP     124 /* POSIX threads unsupported value */
#define EMULTIHOP       125     /* multihop is not allowed */
#define ENOLINK         126     /* the link has been severed */
#define EOVERFLOW       127     /* value too large to be stored in data type */

댓글

이 블로그의 인기 게시물

Baud Rate 와 Bit Rate 의 차이점

출처 - http://solvline.com/technical_info/tech_note_view.php?no=22&fno=&PHPSESSID=f5f096a5b1090ca017552de78745b8aa 1. Bit Rate 와 Baud Rate 의 정의 1.1 Bit Rate 정의 비트 레이트 (Bit Rate) 는 초당 얼마나 많은 데이터 비트 (‘1’ 또는 ‘ 0’) 를 전송할 수 있는가를 나타내는 말이다 . 또 우리가 자주 쓰는 BPS 라는 말이 있는데 이는 Bit Per Second 로서 초당 보낼 수 있는 비트의 수를 나타낸다 . 이는 모뎀의 전송속도를 측정하는 단위로 사용되어 졌다 . 일반적으로 28,800 모뎀이라면 28,800bps 의 전송속도를 나타내는 것이다 . 예를 들어 , 2400bit/second(bps) 라면 초당 2400 개의 비트 정보를 전달할 수 있다는 뜻이다 . 이는 반대로 이야기하면 1 비트 정보를 보내기 위해서 416.6us 의 시간 (1s/2400bit) 이 필요하다는 이야기이다 . 1.2 Baud Rate 보 레이트 (Baud Rate) 는 초당 얼마나 많은 심볼 (Symbol, 의미 있는 데이터 묶음 ) 을 전송할 수 있는가를 나타내는 말이다 . 이는 이론적인 통신 단위로 초당 신호 (Signal) 요소의 수 를 나타낸다 . 만약 하나의 신호요소가 2 비트로 구성되어 있는 경우라면 보는 BPS 의 반이 된다 . 즉 , 1 보 동안 2 비트가 전송된다 . 일반적으로 신호를 1 비트로 여긴다면 BPS 와 같은 단위가 된다 . 심볼이란 말은 의미 있는 데이터 비트의 묶음이다 . 일반적으로 시리얼 통신에서는 데이터 비트가 8-bit 를 사용하므로 이를 하나의 심볼이라고 이야기 할 수 있다 . 1 개의 symbol ( 또는 character) 는 8 개의 bit 정보와 같다 . 예를 들어 , 2400 baud rate 를 갖는다는 말은 1 초에 2400 개의

시리얼(Serial) 이란?

출처 - http://www.ni.com/white-paper/2895/ko/#toc4 시리얼은 거의 모든 PC에서 표준으로 사용되는 디바이스 통신 프로토콜입니다. 시리얼의 개념을 USB의 개념과 잘 구분하십시오. 대부분의 컴퓨터에는 2개의 RS232 기반 시리얼 포트가 있습니다. 시리얼은 또한 여러가지 디바이스에서 계측을 위한 일반 통신 프로토콜이며, 여러 GPIB 호환 디바이스에는 RS232 포트가 장착되어 있습니다. 뿐만 아니라, 원격 샘플링 디바이스로 데이터 수집을 하는 경우에도 시리얼 통신을 사용할 수 있습니다. 시리얼 통신의 개념은 간단합니다. 시리얼 포트는 정보의 바이트를 한번에 한 비트씩 순차적으로 송수신합니다. 한번에 전체 바이트를 동시에 전달하는 병렬 통신과 비교하면 시리얼 통신은 속도가 느리지만 훨씬 간단하며 장거리에도 사용할 수 있습니다. 예를 들어, 병렬 통신용 IEEE 488 스펙을 보면 기기간 케이블링은 총 20 m 미만이어야 하며, 두 개의 디바이스간은 2 m 미만이어야 합니다. 반면 시리얼 통신은 최대 1.2 Km의 통신거리를 보장합니다. 통상 엔지니어들은 ASCII 데이터를 전송할 때 시리얼 통신을 사용합니다. 이 때 송신용 (Tx), 수신용 (Rx), 그라운드용 (GND)의 세 가지의 전송 라인을 사용하여 통신합니다. 시리얼은 비동기식이므로 포트는 한 라인에서 데이터를 전송하고 다른 라인에서 데이터를 수신합니다. 핸드쉐이킹용 라인도 사용 가능하지만 필수 요구사항은 아닙니다. 시리얼 통신의 가장 중요한 특징에는 보드 속도 (baud rate), 데이터 비트, 정지 비트, 패리티가 있습니다. 두 개의 포트가 통신하기 위해서는 이러한 파라미터가 반드시 적절하게 맞춰져야 합니다. 보드 속도는 통신의 속도를 측정하는 수치이며 초당 비트 전송 숫자로 표시됩니다. 예를 들어 300 보드 속도는 초당 300 비트를 의미합니다. 엔지니어들이 흔히 말하는 클럭 주기는 보드 속도를 의미합니다. 따라서 프로토콜에 4800