(cardPoll) (cardPoll card_id) (cardPoll card_id poll_ms [point_name [update_divisor]]])
The target card ID (0..3). If no card ID is specified, the query form of the command is repeated for all initialized cards. If only the card ID is specified (no additional parameters) then that card is queried for its polling parameters, and no changes are made.
The polling period, in milliseconds, for the specified card. Values less than the QNX system ticksize will effectively be limited to the ticksize (i.e., for poll periods less than the default ticksize of 10ms, the ticksize must be changed).
The name of the point to count the number of polls. Default is task_name/cardcard_id/poll. If the Cascade DataHub is available (see the datahub command), then the value of this point is published to the datahub (see the update_divisor parameter).
Specifies how often to publish the poll count point to the Cascade DataHub. To reduce the impact on performance of unnecessarily frequent updates, the value is only published every update_divisor counts. If not specified, then it is calculated based on the poll_ms to produce an update of once per second.
In response to a query or successful setting of a card:
(cardPoll card_id poll_ms point_name update_divisor)
Otherwise, one of the following error messages:
(error "cardPoll DR_ERR_CARD_INVALID (time) invalid card: card_id") (error "cardPoll DR_ERR_INTR_CMD (time) Card interrupt in use. Command ignored")
This command sets or queries the polling parameters associated with a card. If a card does not use interrupts, then the driver must periodically poll the card to check for status and availability of new data from the fieldbus (and opportunity to write data to the fieldbus). The cardPoll command must be used to set the polling period, otherwise the interface to the fieldbus will not occur. The cardPoll command is normally specified in the configuration file, but may be subsequently modified or queried at any time. A count of the number of polls is kept in an associated point, which is published to the Cascade DataHub if available.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.