IO

Digital Input/Output

Use this class to create the arguments to pass into the ADAM object

class adam_io.digital_io.DigitalInput(xml_string: str)[source]

Digital Input class to be received from ADAM

initialize it with the xml string then use it like a read-only list; d = DigitalInput(xml_str) d[0] === DI0 d[1] === DI1 … === … … === … … === … d[11] === DI11

class adam_io.digital_io.DigitalOutput(quantity: int = 6, array: Optional[List[int]] = None, xml_string: Optional[str] = None)[source]

Digital Output class to send as a request to ADAM If the same object is going to be used, do not forget to clear the object after each use otherwise, might send stale data to

  • initialize with a quantity, the default is 6 which is the number of digital outputs 6050D has

  • fill in as required

  • get in the dict form to send in the POST body

array(array: List[Optional[int]])[source]
Parameters

array – set the values of the internal digital output dictionary to the input array

as_dict()[source]

same as __call__ :return: the data ready to be sent over to ADAM

clear()[source]

clears the values of the internal digital output dictionary

parse(xml_string: str)[source]
Parameters

xml_string – response string from ADAM