Poller¶
-
class
ingenialink.canopen.poller.
CanopenPoller
(servo, num_channels)[source]¶ Register poller for CANOpen communications.
- Parameters
servo (CanopenServo) – Servo.
num_channels (int) – Number of channels.
- Raises
ILCreationError – If the poller could not be created.
-
ch_configure
(channel, reg)[source]¶ Configure a poller channel mapping.
- Parameters
channel (int) – Channel to be configured.
reg (Register) – Register to associate to the given channel.
- Returns
Status code.
- Return type
int
- Raises
ILStateError – The poller is already running.
ILValueError – Channel out of range.
TypeError – If the register is not valid.
-
ch_disable
(channel)[source]¶ Disable a channel.
- Parameters
channel (int) – Channel to be disabled.
- Raises
ILStateError – The poller is already running.
ILValueError – Channel out of range.
- Returns
Status code.
- Return type
int
-
configure
(t_s, sz)[source]¶ Configure data.
- Parameters
t_s (int, float) – Polling period (s).
sz (int) – Buffer size.
- Returns
Status code.
- Return type
int
- Raises
ILStateError – The poller is already running.
-
property
data
¶ Time vector, array of data vectors and a flag indicating if data was lost.
- Type
tuple (list, list, bool)
-
property
num_channels
¶ Number of channels in the poller.
- Type
int