Poller

class ingenialink.poller.Poller(servo: Servo, num_channels: int)[source]

Register poller for CANOpen/Ethernet communications.

Parameters:
  • servo – Servo.

  • num_channels – Number of channels.

ch_configure(channel: int, reg: Register, subnode: int = 1) int[source]

Configure a poller channel mapping.

Parameters:
  • channel – Channel to be configured.

  • reg – Register to associate to the given channel.

  • subnode – Subnode for the register.

Returns:

Status code.

Raises:
  • ILStateError – The poller is already running.

  • ILValueError – Channel out of range.

  • TypeError – If the register is not valid.

ch_disable(channel: int) int[source]

Disable a channel.

Parameters:

channel – Channel to be disabled.

Raises:
Returns:

Status code.

ch_disable_all() int[source]

Disable all channels.

Returns:

Status code.

configure(t_s: float, sz: int) int[source]

Configure data.

Parameters:
  • t_s – Polling period (s).

  • sz – Buffer size.

Returns:

Status code.

Raises:

ILStateError – The poller is already running.

run() None[source]

Start the poller.

stop() None[source]

Stop poller.

property data: tuple[list[float], list[list[float]], bool]

Time vector, array of data vectors and a flag indicating if data was lost.

property num_channels: int

Number of channels in the poller.

property servo: Servo

Servo instance to be used.