Esto eliminará la página "get_bin_from_frame_flags"
. Por favor, asegúrate de que es lo que quieres.
def get_bin_from_frame_flags(self, bytearray_of_frame):
The "get_bin_from_frame_flags" method is used to return the frame-flags as a binary. If CRC-Check is active, it will check the byte-frame and raises a Value_Error, if a CRC-Error was detected.
The "self" argument is pointing to the object, which calls the method.
The "bytearray_of_frame" argument is the frame what you get, when you receive data from the serial port.
Type -> string(binary)
>>> # create an object of the Xcom-API-Class
>>> Object = Xcom_API()
>>>
>>> # create a variable with a received frame
>>> Frame = bytearray(b'\\xAA\\x37\\x65\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x0E\\x00\\xAA\\x66\\x02\\x01\\x01\\x00\\xB8\\x0B\\x00\\x00\\x01\\x00\\x00\\x40\\x42\\x42\\x8B\\x46')
>>>
>>> # call the Method 'get_bin_from_frame_flags'
>>> Answer = Object.get_bin_from_frame_flags(Frame)
>>>
>>> # print Answer
>>> print(Answer)
'0b00110111'
Hochschule Anhalt | Anhalt University of Applied Sciences | Department 6 EMW
Xcom-API
Tobias Müller, M. Eng.
📧 Tobias.Mueller@HS-Anhalt.de
© es-lab.de, 31.10.2017
Esto eliminará la página "get_bin_from_frame_flags"
. Por favor, asegúrate de que es lo que quieres.