nidas v1.2.3
|
Everything needed to access the board. More...
Public Attributes | |
unsigned int | ioport |
unsigned long | addr |
int | irq |
struct class * | class |
struct device * | device |
char | deviceName [32] |
dev_t | pc104sg_device |
Linux device. | |
struct cdev | pc104sg_cdev |
Linux character device. | |
struct irig_device * | dev |
Information needed by file operations. | |
spinlock_t | dev_lock |
spinlock used to control access to irig_device member. | |
atomic_t | num_opened |
How many concurrent opens of the device. | |
unsigned char | IntMask |
The three possible interrupts generated by this card are enabled with bits 5,6,7 of the status port: | |
spinlock_t | lock |
Spinlock to control concurrent access to board registers and shared variables in this structure. | |
int | TMsecClockTicker |
Our clock ticker, 1/10s of milliseconds since 00:00 GMT. | |
int | WriteClock |
Index into TMsecClock of the next clock value to be written. | |
int | count100Hz |
enum clockState | clockState |
Current clock state. | |
enum clockAction | clockAction |
Action to be performed at the beginning of the next 100 Hz tasklet, either NO_ACTION or RESET_COUNTERS. | |
enum notifyClients | notifyClients |
If clockAction is RESET_COUNTERS, whether to notify clients after resetting our software clocks. | |
struct pc104sg_status | status |
Status structure accessed by IRIG_GET_STATUS ioctl. | |
unsigned char | extendedStatus |
Instantaneous value of extended status bits, read from DP RAM at 100 Hz. | |
unsigned char | lastStatus |
Value of last extendedStatus, so we can detect SYNC <-> NOSYNC transitions. | |
int | lastSyncTime |
last time that software clock was set against a sync'd irig clock. | |
int | DP_RamExtStatusEnabled |
Set to true if ISR should send requests for status from dual-ported RAM. | |
int | DP_RamExtStatusRequested |
Set to true if ISR has sent a request for status from dual-ported RAM. | |
struct tasklet_struct | tasklet100Hz |
atomic_t | pending100Hz |
How many 100Hz ticks are yet unhandled in tasklet? | |
struct irig_callback * | oneHzCallback |
Our 1 Hz callback. | |
struct clockSnapShot | snapshot |
Snapshot of the hardware and software clock and status. | |
int | doSnapShot |
Set to true if the interrupt service routine should take a snapshot. | |
int | askedSnapShot |
Toward the end of a second, the bottom half asks the ISR for a clock snapshot. | |
struct clockSnapShot | resetSnapshot |
Snapshot taken by the ISR when clockAction == RESET_COUNTERS. | |
int | resetSnapshotDone |
RESETS snapshot has been taken. | |
unsigned char | statusOR |
An OR of the status bits since the last 1Hz snapshot. | |
struct list_head | CallbackLists [IRIG_NUM_RATES] |
struct list_head | CallbackPool |
Pool of allocated callback entries. | |
spinlock_t | cblist_lock |
Spinlock to control concurrent access to callback lists. | |
struct list_head | pendingAdds |
Callback entries that are to be added to the active list on next pass though loop. | |
struct irig_callback * | pendingRemoves [CALLBACK_POOL_SIZE] |
Callback entries that are to be removed on next pass though loop. | |
int | nPendingRemoves |
atomic_t | nPendingCallbackChanges |
wait_queue_head_t | callbackWaitQ |
wait_queue for tasks that want to wait until their callback is definitely not running. | |
int | max100HzBacklog |
int | ndtLast |
Number of 100 Hz delta-Ts the softare clock was off on the last check. | |
int | ndtNSecs |
Everything needed to access the board.
unsigned long pc104sg_board::addr |
int pc104sg_board::askedSnapShot |
Toward the end of a second, the bottom half asks the ISR for a clock snapshot.
This is used so that it doesn't ask twice in the second.
struct list_head pc104sg_board::CallbackLists[IRIG_NUM_RATES] |
struct list_head pc104sg_board::CallbackPool |
Pool of allocated callback entries.
wait_queue_head_t pc104sg_board::callbackWaitQ |
wait_queue for tasks that want to wait until their callback is definitely not running.
spinlock_t pc104sg_board::cblist_lock |
Spinlock to control concurrent access to callback lists.
struct class* pc104sg_board::class |
enum clockAction pc104sg_board::clockAction |
Action to be performed at the beginning of the next 100 Hz tasklet, either NO_ACTION or RESET_COUNTERS.
enum clockState pc104sg_board::clockState |
Current clock state.
int pc104sg_board::count100Hz |
struct irig_device* pc104sg_board::dev |
Information needed by file operations.
spinlock_t pc104sg_board::dev_lock |
spinlock used to control access to irig_device member.
dev member is accessed by a tasklet in software interrupt context so we must use a spinlock, not a mutex.
struct device* pc104sg_board::device |
char pc104sg_board::deviceName[32] |
int pc104sg_board::doSnapShot |
Set to true if the interrupt service routine should take a snapshot.
This is the 1 Hz clock quality snapshot.
int pc104sg_board::DP_RamExtStatusEnabled |
Set to true if ISR should send requests for status from dual-ported RAM.
int pc104sg_board::DP_RamExtStatusRequested |
Set to true if ISR has sent a request for status from dual-ported RAM.
unsigned char pc104sg_board::extendedStatus |
Instantaneous value of extended status bits, read from DP RAM at 100 Hz.
unsigned char pc104sg_board::IntMask |
The three possible interrupts generated by this card are enabled with bits 5,6,7 of the status port:
5 = heartbeat 6 = match 7 = external-time-tag
Writing a 0 to bits 0-4 causes other things, like board reset, so we set those bits to 1 here in the interrupt mask.
unsigned int pc104sg_board::ioport |
int pc104sg_board::irq |
unsigned char pc104sg_board::lastStatus |
Value of last extendedStatus, so we can detect SYNC <-> NOSYNC transitions.
int pc104sg_board::lastSyncTime |
last time that software clock was set against a sync'd irig clock.
spinlock_t pc104sg_board::lock |
Spinlock to control concurrent access to board registers and shared variables in this structure.
int pc104sg_board::max100HzBacklog |
int pc104sg_board::ndtLast |
Number of 100 Hz delta-Ts the softare clock was off on the last check.
int pc104sg_board::ndtNSecs |
enum notifyClients pc104sg_board::notifyClients |
If clockAction is RESET_COUNTERS, whether to notify clients after resetting our software clocks.
atomic_t pc104sg_board::nPendingCallbackChanges |
int pc104sg_board::nPendingRemoves |
atomic_t pc104sg_board::num_opened |
How many concurrent opens of the device.
struct irig_callback* pc104sg_board::oneHzCallback |
Our 1 Hz callback.
Checks the clock snapshot, and sends a data sample if the device is opened.
struct cdev pc104sg_board::pc104sg_cdev |
Linux character device.
dev_t pc104sg_board::pc104sg_device |
Linux device.
atomic_t pc104sg_board::pending100Hz |
How many 100Hz ticks are yet unhandled in tasklet?
struct list_head pc104sg_board::pendingAdds |
Callback entries that are to be added to the active list on next pass though loop.
struct irig_callback* pc104sg_board::pendingRemoves[CALLBACK_POOL_SIZE] |
Callback entries that are to be removed on next pass though loop.
struct clockSnapShot pc104sg_board::resetSnapshot |
Snapshot taken by the ISR when clockAction == RESET_COUNTERS.
int pc104sg_board::resetSnapshotDone |
RESETS snapshot has been taken.
struct clockSnapShot pc104sg_board::snapshot |
Snapshot of the hardware and software clock and status.
struct pc104sg_status pc104sg_board::status |
Status structure accessed by IRIG_GET_STATUS ioctl.
unsigned char pc104sg_board::statusOR |
An OR of the status bits since the last 1Hz snapshot.
struct tasklet_struct pc104sg_board::tasklet100Hz |
int pc104sg_board::TMsecClockTicker |
Our clock ticker, 1/10s of milliseconds since 00:00 GMT.
It is signed, since we are often computing time differences, and it is handy to initialize it to -1. There are 864,000,000 1/10 milliseconds in a day, so as a 32 bit signed integer, it has enough range for +- 2.4 days, but generally we restrict its value to the range 0:863,999,999.
int pc104sg_board::WriteClock |
Index into TMsecClock of the next clock value to be written.