Example #1
0
 def enquire_link(self):
     """
     This method is used by client to ensure the connectivity with server.
     """
     P = EnquireLink()
     P.sequence_number = Integer(self._next_seq_num(), 4)
     data = P.encode()
     self.pdus.update({P.sequence_number.value: {'req': P, 'resp': '', 'read': 'false'}})
     self.socket.send(data)
Example #2
0
 def enquire_link(self):
         P = EnquireLink()
         P.sequence_number = Integer(self._next_seq_num(), 4)
         data = P.encode()
         self.pdus.update({P.sequence_number.value: {'req': P}})
         self.socket.send(data)
Example #3
0
def test_01_enquirelink_encode():
    "Test EnquireLink encoding"
    P = EnquireLink()
    
    assert '00 00 00 10 00 00 00 15 00 00 00 00 00 00 00 01 '  == hex_convert(P.encode(),150)