Welcome to astm-serial documentation!¶
astm client with python for example arduino communication please visit our github
How to install :
pip install astm-serial
Quickstart
-
class
astm_serial.client.
AstmConn
(port='/dev/ttyACM0', baudrate=9600, timeout=10)¶ Abstract class that implements astm e1381 basically physical layer with rs232 or serial connection
-
close_session
()¶ End the communication data will send EOT to host :return: EOT
-
get_data
()¶ Get the data that is ready on the device :returns: the raw data :rtype:str
-
nak_handler
()¶ If server send NAK or Not Acknowledge the client will be send EOT and close_session :return: EOT
-
open_session
()¶ Get the session communication in ASTM :send: data ENQ :return: data ACK
-
send_command
(command)¶ Send a command and check if it is positively acknowledged :param command: The command to send :type command: str :raises IOError: if the negative acknowledged or a unknown response is returned <STX>[FN][TEXT]<ETB>[C1][C2]<CR><LF>
-