Functional Description
3-3
section “Using GPS for System Timekeeping” for details. Generally, only the master
RCIM needs a GPS; slaves use one of the software methods available for syncronizing
their POSIX clock to the master.
Direct Access to the Clocks
1
The device file
/dev/rcim
N
/sclk
(where
N
is the RCIM card number starting from
zero) can be used to access the RCIM clocks directly using
mmap(2)
. From the address
returned by
mmap
, the following offsets are used to access the clock fields:
0x0
upper 32-bits of tick clock
0x8
lower 32-bits of tick clock
0x10
status and control (cannot be modified)
0x100
POSIX clock seconds
0x108
POSIX clock nanoseconds
0x110
status and control (cannot be modified)
These offsets are defined in the header file
/usr/include/linux.h
(with names
beginning with
RCIM_SYNCCLOCK_
).
To set the value of the POSIX clock, the
rcim_clocksync(1)
utility can be used in
interactive mode using the “update” command.
Synchronizing the Clocks
1
The sections below describe the techniques and tools used to synchronize the clocks on
the RCIM.
The rcim_clocksync Utility
1
The
rcim_clocksync(1)
utility can be used to reset the tick clocks on all connected
RCIMs to zero to provide a common time stamp across the system. This synchronization
operation occurs automatically when the RCIM master system boots. As slave systems
become available, it will be necessary to reissue this command to synchronize the tick
clocks across the RCIM chain, however, this can be automated (see the section
“Automatic Synchronization” below).
rcim_clocksync
can also be used to
synchronize the POSIX clocks on all connected RCIMs. This procedure is described in the
section “Synchronizing the POSIX Clock.”
Note that the system clock is synchronized with the RCIM and when
rcim_clocksync
is run other than at system boot, there are consequences and should be used with caution.
On RCIM III and RCIM II, master and slave system times are synchronized with the
POSIX clock; on RCIM I, the times are synchronized with the tick clock. When system
time stops advancing, time-based functions using those clocks will stop.
Synchronization always succeeds on the RCIM master or isolated system; an error is
returned if synchronization is attempted on an RCIM slave system.
Specifying
rcim_clocksync
with no options on the RCIM master system synchronizes
all tick clocks in the RCIM chain.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Содержание RCIM I
Страница 105: ...RCIM User s Guide B 4 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 109: ...Index 4 RCIM User s Guide Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 110: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 111: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...