B
    åòP]
  ã               @   sR   d Z yddlmZ W n  ek
r4   ddlmZ Y nX ddlZG dd„ deƒZdS )zYLCM type definitions
This file automatically generated by lcm.
DO NOT MODIFY BY HAND!!!!
é    N)ÚBytesIOc               @   sª   e Zd ZddddddddgZd	d
d
d
d
d
d
dgZddddddddggZdd„ Zdd„ Zdd„ Zdd„ Z	e
e	ƒZ	dd„ Ze
eƒZdZdd„ Ze
eƒZdZdd„ Ze
eƒZdS )Útotal_focus_imageÚ	timestampÚ	frameRateÚwidthÚheightÚdataTypeÚ	pixelTypeÚdataSizeÚdataÚint64_tÚint32_tZbyteNc             C   s4   d| _ d| _d| _d| _d| _d| _d| _d| _d S )Nr   Ú )r   r   r   r   r   r	   r
   r   )Úself© r   ú7C:\software\python\lcm-test1\exlcm\total_focus_image.pyÚ__init__   s    ztotal_focus_image.__init__c             C   s&   t ƒ }| t ¡ ¡ |  |¡ | ¡ S )N)r   Úwriter   Ú_get_packed_fingerprintÚ_encode_oneÚgetvalue)r   Úbufr   r   r   Úencode   s    
ztotal_focus_image.encodec             C   sJ   |  t d| j| j| j| j| j| j| j	¡¡ |  t
| jd | j	… ƒ¡ d S )Nz>qiiiiii)r   ÚstructÚpackr   r   r   r   r   r	   r
   Ú	bytearrayr   )r   r   r   r   r   r   #   s    ,ztotal_focus_image._encode_onec             C   s<   t | dƒr| }nt| ƒ}| d¡t ¡ kr2tdƒ‚t |¡S )NÚreadé   zDecode error)Úhasattrr   r   r   r   Ú
ValueErrorÚ_decode_one)r   r   r   r   r   Údecode'   s    
ztotal_focus_image.decodec             C   sF   t ƒ }t d|  d¡¡\|_|_|_|_|_|_	|_
|  |j
¡|_|S )Nz>qiiiiiié    )r   r   Úunpackr   r   r   r   r   r   r	   r
   r   )r   r   r   r   r   r    1   s    .ztotal_focus_image._decode_onec             C   s,   t | krdS d}|d> d@ |d?  d@ }|S )Nr   l   wN‹Jh# é   l   ÿÿÿÿ é?   )r   )ÚparentsÚtmphashr   r   r   Ú_get_hash_recursive9   s
     z%total_focus_image._get_hash_recursivec               C   s$   t jd krt dt  g ¡¡t _t jS )Nz>Q)r   Ú_packed_fingerprintr   r   r(   r   r   r   r   r   A   s    
z)total_focus_image._get_packed_fingerprint)Ú__name__Ú
__module__Ú__qualname__Ú	__slots__Ú__typenames__Ú__dimensions__r   r   r   r!   Ústaticmethodr    Ú_hashr(   r)   r   r   r   r   r   r      s    
r   )	Ú__doc__ZcStringIO.StringIOÚStringIOr   ÚImportErrorÚior   Úobjectr   r   r   r   r   Ú<module>   s   