#include <stdio.h>
#include <errno.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/time.h>
#include <epicsTime.h>
#include <epicsVersion.h>
#include <epicsMutex.h>
#include <epicsThread.h>
#include <epicsStdio.h>
#include <callback.h>
#include <drvSup.h>
#include <recGbl.h>
#include <longinRecord.h>
#include <aiRecord.h>
#include <menuConvert.h>
#include <dbScan.h>
#include <iocsh.h>
#include <initHooks.h>
#include "evr/evr.h"
#include <epicsExport.h>
Go to the source code of this file.
◆ NTPD_SEG0
#define NTPD_SEG0 0x4E545030 |
◆ RETRY_TIME
◆ SYNC
#define SYNC |
( |
| ) |
do{}while(0) |
◆ epicsExportAddress() [1/4]
epicsExportAddress |
( |
drvet |
, |
|
|
ntpShared |
|
|
) |
| |
◆ epicsExportAddress() [2/4]
epicsExportAddress |
( |
dset |
, |
|
|
devNtpShmLiOk |
|
|
) |
| |
◆ epicsExportAddress() [3/4]
epicsExportAddress |
( |
dset |
, |
|
|
devNtpShmLiFail |
|
|
) |
| |
◆ epicsExportAddress() [4/4]
epicsExportAddress |
( |
dset |
, |
|
|
devNtpShmAiDelta |
|
|
) |
| |
◆ epicsExportRegistrar()
epicsExportRegistrar |
( |
ntpShmRegister |
| ) |
|
◆ time2ntp()
void time2ntp |
( |
const char * |
evrname, |
|
|
int |
segid, |
|
|
int |
event |
|
) |
| |
Definition at line 266 of file ntpShm.cpp.
271 else if(event<=0 || event >255) {
272 fprintf(stderr,
"Invalid 1Hz event # %d\n", event);
275 if(segid<0 || segid>4) {
276 fprintf(stderr,
"Invalid segment ID %d\n", segid);
281 fprintf(stderr,
"Unknown EVR: %s\n", evrname);
285 EVR *evr =
dynamic_cast<EVR*
>(obj);
287 fprintf(stderr,
"\"%s\" is not an EVR\n", evrname);
291 epicsThreadOnce(&ntponce, &ntpshminit, 0);
293 epicsMutexMustLock(ntpShm.
ntplock);
296 epicsMutexUnlock(ntpShm.
ntplock);
297 fprintf(stderr,
"ntpShm already initialized.\n");
301 ntpShm.
event = event;
303 ntpShm.
segid = segid;
305 epicsMutexUnlock(ntpShm.
ntplock);
306 }
catch(std::exception& e) {
307 fprintf(stderr,
"Error: %s\n", e.what());
static Object * getObject(const std::string &name)
#define MRF_EVENT_TS_COUNTER_RST