Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Accelerator Control System
epics-support
csm
Commits
7ce75835
Commit
7ce75835
authored
Apr 25, 2018
by
Franksen, Benjamin
Browse files
cvtRecord: use typed rset
parent
7a60ea17
Changes
2
Hide whitespace changes
Inline
Side-by-side
cvtRecordApp/Makefile
View file @
7ce75835
...
...
@@ -9,7 +9,9 @@ DBD += cvtRecordSupport.dbd
LIB_SRCS
=
cvtRecord.c
LIBRARY_IOC
+=
cvtRecord
LIBRARY
+=
cvtRecord
USR_CFLAGS
+=
-DUSE_TYPED_RSET
include
$(TOP)/configure/RULES
#-----------------------------------------------
...
...
cvtRecordApp/cvtRecord.c
View file @
7ce75835
...
...
@@ -44,52 +44,6 @@
#define nerrmsg(name,msg,args...) genmsg(errlogFatal,name,msg, ## args)
#define errmsg(msg,args...) genmsg(errlogFatal,pcvt->name,msg, ## args)
/* standard EPICS record support stuff */
/* Create RSET - Record Support Entry Table*/
#define report NULL
static
long
initialize
();
static
long
init_record
();
static
long
process
();
static
long
special
();
#define get_value NULL
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
static
long
get_units
();
static
long
get_precision
();
#define get_enum_str NULL
#define get_enum_strs NULL
#define put_enum_str NULL
static
long
get_graphic_double
();
static
long
get_control_double
();
static
long
get_alarm_double
();
struct
rset
cvtRSET
=
{
RSETNUMBER
,
report
,
initialize
,
init_record
,
process
,
special
,
get_value
,
cvt_dbaddr
,
get_array_info
,
put_array_info
,
get_units
,
get_precision
,
get_enum_str
,
get_enum_strs
,
put_enum_str
,
get_graphic_double
,
get_control_double
,
get_alarm_double
};
epicsExportAddress
(
rset
,
cvtRSET
);
/*
* General Remarks
* ===============
...
...
@@ -162,8 +116,9 @@ static epicsMessageQueueId initConversionQ;
* during record initialization (init_record).
*/
static
long
init_record
(
struct
cvtRecord
*
pcvt
,
int
pass
)
static
long
init_record
(
struct
dbCommon
*
prec
,
int
pass
)
{
struct
cvtRecord
*
pcvt
=
(
struct
cvtRecord
*
)
prec
;
void
*
sub
;
if
(
pass
==
0
)
{
...
...
@@ -199,8 +154,9 @@ static long init_record(struct cvtRecord *pcvt, int pass)
return
0
;
}
static
long
process
(
struct
cvtRecord
*
pcvt
)
static
long
process
(
struct
dbCommon
*
prec
)
{
struct
cvtRecord
*
pcvt
=
(
struct
cvtRecord
*
)
prec
;
long
status
=
0
;
pcvt
->
pact
=
TRUE
;
...
...
@@ -328,7 +284,7 @@ static long get_units(struct dbAddr *paddr, char *units)
return
0
;
}
static
long
get_precision
(
struct
dbAddr
*
paddr
,
long
*
precision
)
static
long
get_precision
(
const
struct
dbAddr
*
paddr
,
long
*
precision
)
{
struct
cvtRecord
*
pcvt
=
(
struct
cvtRecord
*
)
paddr
->
precord
;
int
fieldIndex
=
dbGetFieldIndex
(
paddr
);
...
...
@@ -858,3 +814,35 @@ error:
if
(
initConversionQ
)
epicsMessageQueueDestroy
(
initConversionQ
);
return
-
1
;
}
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define get_value NULL
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
#define get_enum_str NULL
#define get_enum_strs NULL
#define put_enum_str NULL
rset
cvtRSET
=
{
RSETNUMBER
,
report
,
initialize
,
init_record
,
process
,
special
,
get_value
,
cvt_dbaddr
,
get_array_info
,
put_array_info
,
get_units
,
get_precision
,
get_enum_str
,
get_enum_strs
,
put_enum_str
,
get_graphic_double
,
get_control_double
,
get_alarm_double
};
epicsExportAddress
(
rset
,
cvtRSET
);
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment