1. New EPICS version 3.14.12
2. Get rid of warnings because new EPICS version and new targets
This commit is contained in:
24
drvS7plcFW.c
24
drvS7plcFW.c
@ -1,7 +1,7 @@
|
||||
/* $Date: 2010/09/22 13:44:37 $ */
|
||||
/* $Id: drvS7plcFW.c,v 1.1 2010/09/22 13:44:37 anicic Exp $ */
|
||||
/* $Date: 2012/03/06 10:53:08 $ */
|
||||
/* $Id: drvS7plcFW.c,v 1.2 2012/03/06 10:53:08 anicic Exp $ */
|
||||
/* $Name: $ */
|
||||
/* $Revision: 1.1 $ */
|
||||
/* $Revision: 1.2 $ */
|
||||
|
||||
/*
|
||||
* NOTE: s7plcFWwriteThread -is not used for writting (we write direct),
|
||||
@ -19,14 +19,20 @@
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#ifdef __vxworks
|
||||
#if defined(vxWorks) || defined(__vxworks)
|
||||
#include <sockLib.h>
|
||||
#include <taskLib.h>
|
||||
#include <selectLib.h>
|
||||
#include <taskHookLib.h>
|
||||
#define in_addr_t unsigned long
|
||||
#else
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __rtems__
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#include <drvSup.h>
|
||||
#include <devLib.h>
|
||||
#include <epicsVersion.h>
|
||||
@ -62,7 +68,7 @@
|
||||
#define RECONNECT_DELAY 10.0 /* delay before reconnect [s] */
|
||||
|
||||
static char cvsid[] __attribute__((unused)) =
|
||||
"$Id: drvS7plcFW.c,v 1.1 2010/09/22 13:44:37 anicic Exp $";
|
||||
"$Id: drvS7plcFW.c,v 1.2 2012/03/06 10:53:08 anicic Exp $";
|
||||
|
||||
STATIC long s7plcFWIoReport(int level);
|
||||
STATIC long s7plcFWInit();
|
||||
@ -623,7 +629,7 @@ STATIC int s7plcFWdoFetch(s7plcFWStation *station, int org, int db, int offs, in
|
||||
req[0xd] = s7len % 0x100;
|
||||
|
||||
epicsMutexMustLock(station->fetchIo);
|
||||
status = write(station->fetchSocket, req, 16);
|
||||
status = write(station->fetchSocket, (void *) req, 16);
|
||||
epicsMutexUnlock(station->fetchIo);
|
||||
if (status != 16) {
|
||||
s7plcFWDebugLog(3, "s7plcFWdoFetch: write 16 byte header failed, returned status = %d, errno = %d\n", status, errno);
|
||||
@ -637,7 +643,7 @@ STATIC int s7plcFWdoFetch(s7plcFWStation *station, int org, int db, int offs, in
|
||||
}
|
||||
|
||||
epicsMutexMustLock(station->fetchIo);
|
||||
status = read(station->fetchSocket, ack, 16);
|
||||
status = read(station->fetchSocket, (void *) ack, 16);
|
||||
epicsMutexUnlock(station->fetchIo);
|
||||
if(status < 16) {
|
||||
s7plcFWDebugLog(3, "s7plcFWdoFetch: Got too few bytes (%d) ACK from PLC!\n", status);
|
||||
@ -701,7 +707,7 @@ STATIC int s7plcFWdoWrite(s7plcFWStation *station, char *data, int offs, int len
|
||||
req[0xd] = s7len % 0x100;
|
||||
|
||||
epicsMutexMustLock(station->writeIo);
|
||||
status = write(station->writeSocket, req, 16);
|
||||
status = write(station->writeSocket, (void *) req, 16);
|
||||
dstatus = write(station->writeSocket, data, len);
|
||||
epicsMutexUnlock(station->writeIo);
|
||||
|
||||
@ -724,7 +730,7 @@ STATIC int s7plcFWdoWrite(s7plcFWStation *station, char *data, int offs, int len
|
||||
}
|
||||
|
||||
epicsMutexMustLock(station->writeIo);
|
||||
if((status = read(station->writeSocket, ack, 16)) < 16) {
|
||||
if((status = read(station->writeSocket, (void *) ack, 16)) < 16) {
|
||||
s7plcFWDebugLog(3, "Got too few bytes (%d) ACK from PLC!\n", status);
|
||||
/* printf("AD84: s7plcFWdoWrite: read too few bytes (%d) ACK from PLC!\n", status); */
|
||||
epicsMutexUnlock(station->writeIo);
|
||||
|
Reference in New Issue
Block a user