ParallelPort

class ParallelPort(self)

Bases: pybind11_object

Parallel port management under unix.

The code below shows how to send a data over the parallel port.

#include <visp3/io/vpParallelPort.h>

int main()
{
#ifdef VISP_HAVE_PARPORT
  vpParallelPort parport;

  unsigned char data = 5; // 0x00000101 = 5 in decimal
  parport.sendData(data); // D0 and D2 are set to logical level 1
#endif
}

Constructor to access to a parallel port.

Open and initialise the parallel port by sending 0 to the data bus.

Set the default device to “/dev/parport0”.

Methods

__init__

Constructor to access to a parallel port.

getData

Get the last data sent to the parallel port.

sendData

Send a data to the parallel port.

Inherited Methods

Operators

__doc__

__init__

Constructor to access to a parallel port.

__module__

Attributes

__annotations__

__init__(self)

Constructor to access to a parallel port.

Open and initialise the parallel port by sending 0 to the data bus.

Set the default device to “/dev/parport0”.

getData(self) int

Get the last data sent to the parallel port.

sendData(self, data: int) None

Send a data to the parallel port.

The code bellow shows how to set D0 and D2 to logical level 1:

vpParallelPort parport;

unsigned char data = 5; // 0x00000101 = 5 in decimal
parport.sendData(data); // D0 and D2 are set to logical level 1
Parameters:
data: int

Value [D7, D6, … D0] to send to the data bus.