LinuxÏ´®¿Ú±à³ÌÖ®¶þ£º¶Á´®¿ÚºÍд´®¿Ú
1£¬´ò¿ª´®¿Ú
/**´ò¿ª´®¿Ú£¬dev ´®¿ÚÉ豸Ãû£¬ mode ´ò¿ª·½Ê½£¬**/
int opendev(char *dev,mode_t mode)
{
int fd;
fd = open(dev, mode);
if (-1 == fd){
perror("Can't Open Serial Port");
return -1;
}
else{
fcntl(fd, F_SETFL, FNDELAY);
return fd;
}
}
2£¬Ð´´®¿Ú
#define FALSE -1
#define TRUE 0
#define NET_PORT 19988
#define MAX_BUF_SIZE 4096
struct net2net_buf{
int len;
char buf[MAX_BUF_SIZE];
};
#define RSDEV_NAME "/dev/ttyS1"
int main(void)
{
int rsfd = 0;
int nwrite;
char input_buf[64];
rsfd = opendev(RSDEV_NAME,O_RDWR | O_NOCTTY |
Ïà¹ØÎĵµ£º
±¾ÎĽ«Í¨¹ýÓÃÓÚÏò¶ÓÁз¢ËÍÏûÏ¢ºÍ´Ó¶ÓÁнÓÊÕÏûÏ¢µÄʾÀýÓ¦ÓóÌÐò˵Ã÷ÈçºÎÔÚ Linux ÉÏ×ÅÊÖ°²×°ºÍÅäÖà WebSphere MQ£¬ÒÔ¼°ÈçºÎΪ MQ »·¾³¿ª·¢ Java Ó¦ÓóÌÐò¡£
ÒýÑÔ
±¾ÎĵÄÄ¿±êÊÇÈÃÄúÇáËÉʵÏÖ Linux® É쵀 IBM® WebSphere® MQ ÈëÃÅ¡£ÓÉÓÚ´ó²¿·Ö Linux ·þÎñÆ÷²¢Ã»ÓÐͼÐÎÓû§½çÃæ£¬Òò´Ë±¾ÎĽ«ËµÃ÷ÈçºÎʹÓÃÃüÁîÐй¤¾ ......
UnixÖеĺ¯ÊýselectºÍpollÓÃÀ´£¬Ö§³ÖUnixÖÐI/O¸´ÓõŦÄÜ£¬ÔÚUnixÖÐI/OÄ£ÐÍ¿ÉÒÔ·ÖΪÒÔÒ»¼¸ÖÖ£º
£¨1£©×èÈûI/O
£¨2£©·Ç×èÈûI/O
£¨3£©I/O¸´Óã¨selectºÍpoll£©
£¨4£©ÐźÅÇý¶¯I/O(SIGIO)
£¨5£©Òì²½I/O
ÆäÖУ¬ÏÖÔڱȽÏÁ÷ÐеÄI/OÄ£ÐÍÊÇ×èÈûI/OÄ£ÐÍ.×èÈûI/OÊǵ±Ó¦ÓóÌÐòºÍÄں˽»»»Êý¾Ýʱ£¬ÓÉÓÚÄں˻¹Ã»ÓÐ×¼±¸ºÃ ......
LINUX£¨ÔËÐÐÔÚVWMARE£©ÉÏ×Ô´øµÄSVN£¬WindowsÉÏ×°µÄÊÇTortoiseSVN-1.6.7.18415-win32-svn-1.6.9.msi¡£
ÔÚLinuxÉÏÅäÖÃSNV¡£
1¡¢´´½¨repository¡£
> svnadmin create /myhome/svnhome/project
ÆäÖÐsvnhomeÊÇ·ÅsvnµÄĿ¼£¬ÏÂÒ»¼¶ÊDz»Í¬µÄrepositoryÃû¡£
2¡¢×¼±¸ºÃÔ´´úÂë¡£°´ÏÂÁÐĿ¼Åźá£
project/branches
project/ ......
1£¬´®¿Ú²Ù×÷ÐèÒªµÄÍ·Îļþ
¡¡¡¡#include¡¡¡¡ <stdio.h>¡¡¡¡¡¡/* ±ê×¼ÊäÈëÊä³ö¶¨Òå */
¡¡¡¡#include¡¡¡¡ <stdlib.h>¡¡¡¡ /* ±ê×¼º¯Êý¿â¶¨Òå */
¡¡¡¡#include¡¡¡¡ <unistd.h>¡¡¡¡ /* Unix ±ê×¼º¯Êý¶¨Òå */
¡¡¡¡#include¡¡¡¡ <sys/types.h>¡¡
¡¡¡¡#include¡¡¡¡ <sys/stat.h>¡¡
¡¡¡¡#incl ......