Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
227bb83f60 | |||
4edff374d0 | |||
9273476135 |
@ -25,6 +25,10 @@ HEADERS += src/StreamFormatConverter.h
|
|||||||
HEADERS += src/StreamBuffer.h
|
HEADERS += src/StreamBuffer.h
|
||||||
HEADERS += src/StreamError.h
|
HEADERS += src/StreamError.h
|
||||||
HEADERS += src/StreamVersion.h
|
HEADERS += src/StreamVersion.h
|
||||||
|
HEADERS += src/StreamProtocol.h
|
||||||
|
HEADERS += src/StreamBusInterface.h
|
||||||
|
HEADERS += src/StreamCore.h
|
||||||
|
HEADERS += src/MacroMagic.h
|
||||||
|
|
||||||
CPPFLAGS += -DSTREAM_INTERNAL -I$(COMMON_DIR)
|
CPPFLAGS += -DSTREAM_INTERNAL -I$(COMMON_DIR)
|
||||||
|
|
||||||
|
@ -24,8 +24,15 @@
|
|||||||
#include "StreamError.h"
|
#include "StreamError.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#if defined(__vxworks) || defined(vxWorks)
|
#if defined(__vxworks) || defined(vxWorks)
|
||||||
|
#include <version.h>
|
||||||
|
#if defined(_WRS_VXWORKS_MAJOR) && _WRS_VXWORKS_MAJOR > 6 || (_WRS_VXWORKS_MAJOR == 6 && _WRS_VXWORKS_MINOR > 8)
|
||||||
|
#include <stdint.h>
|
||||||
|
#define PRIX32 "X"
|
||||||
|
#define PRIu32 "u"
|
||||||
|
#else
|
||||||
#define PRIX32 "lX"
|
#define PRIX32 "lX"
|
||||||
#define PRIu32 "lu"
|
#define PRIu32 "lu"
|
||||||
|
#endif
|
||||||
#define PRIX8 "X"
|
#define PRIX8 "X"
|
||||||
#define SCNx8 "hhx"
|
#define SCNx8 "hhx"
|
||||||
#define uint_fast8_t uint8_t
|
#define uint_fast8_t uint8_t
|
||||||
|
@ -71,6 +71,10 @@ INC += StreamFormatConverter.h
|
|||||||
INC += StreamBuffer.h
|
INC += StreamBuffer.h
|
||||||
INC += StreamError.h
|
INC += StreamError.h
|
||||||
INC += StreamVersion.h
|
INC += StreamVersion.h
|
||||||
|
INC += StreamProtocol.h
|
||||||
|
INC += StreamBusInterface.h
|
||||||
|
INC += StreamCore.h
|
||||||
|
INC += MacroMagic.h
|
||||||
|
|
||||||
# switch off annoying rset warnings in 3.16+
|
# switch off annoying rset warnings in 3.16+
|
||||||
CPPFLAGS += -DUSE_TYPED_RSET
|
CPPFLAGS += -DUSE_TYPED_RSET
|
||||||
|
@ -171,10 +171,10 @@ static long writeData(dbCommon *record, format_t *format)
|
|||||||
break;
|
break;
|
||||||
#ifdef DBR_INT64
|
#ifdef DBR_INT64
|
||||||
case DBF_INT64:
|
case DBF_INT64:
|
||||||
dval = ((epicsInt64 *)aai->bptr)[nowd];
|
dval = (double)((epicsInt64 *)aai->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
case DBF_UINT64:
|
case DBF_UINT64:
|
||||||
dval = ((epicsUInt64 *)aai->bptr)[nowd];
|
dval = (double)((epicsUInt64 *)aai->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
@ -214,10 +214,10 @@ static long writeData(dbCommon *record, format_t *format)
|
|||||||
{
|
{
|
||||||
#ifdef DBR_INT64
|
#ifdef DBR_INT64
|
||||||
case DBF_INT64:
|
case DBF_INT64:
|
||||||
lval = ((epicsInt64 *)aai->bptr)[nowd];
|
lval = (long)((epicsInt64 *)aai->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
case DBF_UINT64:
|
case DBF_UINT64:
|
||||||
lval = ((epicsUInt64 *)aai->bptr)[nowd];
|
lval = (long)((epicsUInt64 *)aai->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
|
@ -200,10 +200,10 @@ static long writeData(dbCommon *record, format_t *format)
|
|||||||
break;
|
break;
|
||||||
#ifdef DBR_INT64
|
#ifdef DBR_INT64
|
||||||
case DBF_INT64:
|
case DBF_INT64:
|
||||||
dval = ((epicsInt64 *)aao->bptr)[nowd];
|
dval = (double)((epicsInt64 *)aao->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
case DBF_UINT64:
|
case DBF_UINT64:
|
||||||
dval = ((epicsUInt64 *)aao->bptr)[nowd];
|
dval = (double)((epicsUInt64 *)aao->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
@ -243,10 +243,10 @@ static long writeData(dbCommon *record, format_t *format)
|
|||||||
{
|
{
|
||||||
#ifdef DBR_INT64
|
#ifdef DBR_INT64
|
||||||
case DBF_INT64:
|
case DBF_INT64:
|
||||||
lval = ((epicsInt64 *)aao->bptr)[nowd];
|
lval = (long)((epicsInt64 *)aao->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
case DBF_UINT64:
|
case DBF_UINT64:
|
||||||
lval = ((epicsUInt64 *)aao->bptr)[nowd];
|
lval = (long)((epicsUInt64 *)aao->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
|
@ -73,7 +73,7 @@ static long readData(dbCommon *record, format_t *format)
|
|||||||
if (record->pact) return DO_NOT_CONVERT;
|
if (record->pact) return DO_NOT_CONVERT;
|
||||||
/* In @init handler, no processing, enforce monitor updates. */
|
/* In @init handler, no processing, enforce monitor updates. */
|
||||||
ao->omod = ao->oval != val;
|
ao->omod = ao->oval != val;
|
||||||
ao->orbv = ao->oval = val;
|
ao->orbv = (epicsInt32)(ao->oval = val);
|
||||||
monitor_mask = recGblResetAlarms(record);
|
monitor_mask = recGblResetAlarms(record);
|
||||||
if (!(fabs(ao->mlst - val) <= ao->mdel))
|
if (!(fabs(ao->mlst - val) <= ao->mdel))
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,7 @@ static long readData(dbCommon *record, format_t *format)
|
|||||||
{
|
{
|
||||||
lsi->val[length] = 0;
|
lsi->val[length] = 0;
|
||||||
}
|
}
|
||||||
lsi->len = length;
|
lsi->len = (epicsUInt32)length;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ static long readData(dbCommon *record, format_t *format)
|
|||||||
{
|
{
|
||||||
lso->val[length] = 0;
|
lso->val[length] = 0;
|
||||||
}
|
}
|
||||||
lso->len = length;
|
lso->len = (epicsUInt32)length;
|
||||||
if (record->pact) return OK;
|
if (record->pact) return OK;
|
||||||
/* In @init handler, no processing, enforce monitor updates. */
|
/* In @init handler, no processing, enforce monitor updates. */
|
||||||
monitor_mask = recGblResetAlarms(record);
|
monitor_mask = recGblResetAlarms(record);
|
||||||
|
@ -172,10 +172,10 @@ static long writeData(dbCommon *record, format_t *format)
|
|||||||
break;
|
break;
|
||||||
#ifdef DBR_INT64
|
#ifdef DBR_INT64
|
||||||
case DBF_INT64:
|
case DBF_INT64:
|
||||||
dval = ((epicsInt64 *)wf->bptr)[nowd];
|
dval = (double)((epicsInt64 *)wf->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
case DBF_UINT64:
|
case DBF_UINT64:
|
||||||
dval = ((epicsUInt64 *)wf->bptr)[nowd];
|
dval = (double)((epicsUInt64 *)wf->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
@ -215,10 +215,10 @@ static long writeData(dbCommon *record, format_t *format)
|
|||||||
{
|
{
|
||||||
#ifdef DBR_INT64
|
#ifdef DBR_INT64
|
||||||
case DBF_INT64:
|
case DBF_INT64:
|
||||||
lval = ((epicsInt64 *)wf->bptr)[nowd];
|
lval = (long)((epicsInt64 *)wf->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
case DBF_UINT64:
|
case DBF_UINT64:
|
||||||
lval = ((epicsUInt64 *)wf->bptr)[nowd];
|
lval = (long)((epicsUInt64 *)wf->bptr)[nowd];
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case DBF_LONG:
|
case DBF_LONG:
|
||||||
|
Reference in New Issue
Block a user