Poller

class ingenialink.canopen.poller_node.Poller(servo, number_channels)[source]

Register poller for CANOpen communications.

Parameters
  • servo (Servo) – Servo.

  • number_channels (int) – Number of channels.

Raises

ILCreationError – If the poller could not be created.

acquire_callback_poller_data()[source]

Aquire callback for poller data.

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
Returns

Status code.

Return type

int

ch_disable_all()[source]

Disable all channels.

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)

reset_acq()[source]

Resets the aquired channels.

start()[source]

Start poller.

stop()[source]

Stop poller.

class ingenialink.canopen.poller_node.PollerTimer(time, cb)[source]

Custom timer for the Poller.

Parameters
  • time (int) – Timeout to use for the timer.

  • cb (function) – Callback.