Python Client  0.0.0.0
Python wrapper for Corelink DLL
corelink_recv_data.py
Go to the documentation of this file.
1 """
2  @file corelink_recv_data.py
3  A container for data from dll callbacks.
4 """
5 # pylint: disable=too-few-public-methods
6 # Dictionaries are not alwasy best
7 class RecvData:
8  """
9  Recv Data
10  """
11  def __init__(self, *arg):
12  # Replicating Assignment Operator
13  if len(arg)==1:
14  self.recv_id = arg[0].recvID
15  self.send_id = arg[0].sendID
16  self.data = arg[0].data
17  self.hdr_len = arg[0].hdrLen
18  self.msg_len = arg[0].msgLen
19  # Replicating Copy Operator
20  elif len(arg)==5:
21  self.recv_id = arg[0]
22  self.send_id = arg[1]
23  self.data = arg[2]
24  self.hdr_len = arg[3]
25  self.msg_len = arg[4]
26  # assert type(self.recvID) == ctypes.c_int,"recvId is not in ctypes.c_int"
27  # assert type(self.sendID) == ctypes.c_int,"sendId is not in ctypes.c_int"
28  # assert type(self.data) == ctypes.c_char_p,"data is not in ctypes.c_char_p"
29  # assert type(self.hdrLen) == ctypes.c_int,"hdrLen is not in ctypes.c_int"
30  # assert type(self.msgLen) == ctypes.c_int,"msgLen is not in ctypes.c_int"