
    Xhf                     <    d Z ddlmZ ddlmZ  G d d          ZdS )aK  
Copyright 2009-2010 Mozes, Inc.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
    )	pdu_types)PDUCorruptErrorc                        e Zd Zd Zd Zd ZdS )IEncoderc                     t                      )z?Takes an object representing the type and returns a byte stringNotImplementedError)selfvalues     a/home/jenkins/workspace/simtester-sanitize/venv/lib/python3.11/site-packages/smpp/pdu/encoding.pyencodezIEncoder.encode       !###    c                     t                      )z@Takes file stream in and returns an object representing the typer   )r
   files     r   decodezIEncoder.decode   r   r   c                     |                     |          }t          |          }|dk    rt          dt          j        j                  ||k    r$t          d||fz  t          j        j                  |S )Nr   zUnexpected EOFz,Length mismatch. Expecting %d bytes. Read %d)readlenr   r   CommandStatusESME_RINVMSGLEN)r
   r   size	bytesReadlengths        r   r   zIEncoder.read   s|    IIdOO	YQ;;!"2I4K4[\\\T>>!"PTXZ`Sa"aclcz  dK  L  L  Lr   N)__name__
__module____qualname__r   r   r    r   r   r   r      sA        $ $ $$ $ $    r   r   N)__doc__smpp.pdur   smpp.pdu.errorr   r   r   r   r   <module>r"      sg           * * * * * *         r   