CASP Python Libraries
This documentation primarily focuses on the usage of functions from 'casp', 'casp_be', 'casp_gpio' and 'casp_udio' namespaces.
Loading...
Searching...
No Matches
_casp_process.CaspGpioProcess Class Reference

CaspGpioProcess class provides interfaces to create, read/write and terminate 'casp_gpio_bridge' executable as a subprocess. More...

Public Member Functions

 init (self, str casp_file="casp_gpio_bridge")
 Starts a subprocess for 'casp_gpio_bridge' executable with command line interface (CLI) enabled.
str write (self, str cmd, list[str] arguments=None)
 Data exchange betweem the python side interfaces and the executable is in the form of 'command' and a list of corresponding 'arguments'.
 close (self)
 Closes or terminates the subprocess and waits till subprocess is terminated before returning.

Detailed Description

CaspGpioProcess class provides interfaces to create, read/write and terminate 'casp_gpio_bridge' executable as a subprocess.

A global object of this class casp_gpio_proc is also created in this module. It is used by upper level interfaces from casp_gpio.py module.

Definition at line 188 of file _casp_process.py.

Member Function Documentation

◆ init()

_casp_process.CaspGpioProcess.init ( self,
str casp_file = "casp_gpio_bridge" )

Starts a subprocess for 'casp_gpio_bridge' executable with command line interface (CLI) enabled.

Arguments:

casp_file: allows user to specify different version of the executable when required. In most cases this argument is not required to be specified by the user.

Definition at line 193 of file _casp_process.py.

◆ write()

str _casp_process.CaspGpioProcess.write ( self,
str cmd,
list[str] arguments = None )

Data exchange betweem the python side interfaces and the executable is in the form of 'command' and a list of corresponding 'arguments'.

This interface writes the command along with its argument list to the subprocess. Waits for the response and returns the response received from the subprocess.

Arguments:

cmd: command string to write to the subprocess

arguments: argument list to write to the subprocess

Return Value:

Response string received from the subprocess

Definition at line 215 of file _casp_process.py.

◆ close()

_casp_process.CaspGpioProcess.close ( self)

Closes or terminates the subprocess and waits till subprocess is terminated before returning.

Definition at line 244 of file _casp_process.py.


The documentation for this class was generated from the following file: