cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
Functions | |
def | tcp_rx_loop (clientSock, serverSock, size, ip_da, tcp_dp, count, verbose=False) |
Variables | |
parser = argparse.ArgumentParser(description='A script to receive TCP data from an FPGA module.') | |
type | |
str | |
default | |
help | |
int | |
action | |
args = parser.parse_args() | |
ipFpga = getFpgaIpv4(args) | |
instId = getInstanceId(args) | |
ipResMngr = getResourceManagerIpv4(args) | |
portFpgaServer = XMIT_MODE_LSN_PORT | |
portResMngr = getResourceManagerPort(args) | |
tuple | fpgaServerAssociation = (str(ipFpga), portFpgaServer) |
tcpClientSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
hostname = socket.gethostname() | |
ipHostStr = socket.gethostbyname(hostname) | |
ipHost = int(ipaddress.IPv4Address(ipHostStr)) | |
int | dpHost = 2718 |
tuple | hostListenAssociation = (str(ipHostStr), dpHost) |
tcpListenSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
reqMsgAsBytes = struct.pack(">IHH", ipHost, dpHost, 0) | |
tcpServerSock | |
fpgaClientAssociation | |
seed = args.seed | |
size = args.size | |
count = args.loop_count | |
verbose = args.verbose | |
def tc_TcpTest.tcp_rx_loop | ( | clientSock, | |
serverSock, | |||
size, | |||
ip_da, | |||
tcp_dp, | |||
count, | |||
verbose = False |
|||
) |
TCP Rx Single-Thread Ramp. Requests the FPGA to open a new active port and expects to receive 'count' segments of 'size' bytes. Each segment is made of the following repetitive pattern '48692066726f6d200x464d4b553630210a' which decodes into the string "Hi from FMKU60\n". :param clientSock The socket to send to. :param serverSock The socket to receive from. :param size The size of the expected segment. :param ip_da The destination address of the host. :param tcp_dp The active destination port number that the FPGA is requested to open. :param count The number of segments to receive. :param verbose Enables verbosity. :return None
Definition at line 41 of file tc_TcpTest.py.
tc_TcpTest.action |
Definition at line 170 of file tc_TcpTest.py.
tc_TcpTest.args = parser.parse_args() |
Definition at line 173 of file tc_TcpTest.py.
tc_TcpTest.count = args.loop_count |
Definition at line 307 of file tc_TcpTest.py.
tc_TcpTest.default |
Definition at line 152 of file tc_TcpTest.py.
int tc_TcpTest.dpHost = 2718 |
Definition at line 240 of file tc_TcpTest.py.
tc_TcpTest.fpgaClientAssociation |
Definition at line 284 of file tc_TcpTest.py.
tuple tc_TcpTest.fpgaServerAssociation = (str(ipFpga), portFpgaServer) |
Definition at line 209 of file tc_TcpTest.py.
tc_TcpTest.help |
Definition at line 153 of file tc_TcpTest.py.
Definition at line 241 of file tc_TcpTest.py.
tc_TcpTest.hostname = socket.gethostname() |
Definition at line 232 of file tc_TcpTest.py.
tc_TcpTest.instId = getInstanceId(args) |
Definition at line 185 of file tc_TcpTest.py.
tc_TcpTest.int |
Definition at line 154 of file tc_TcpTest.py.
tc_TcpTest.ipFpga = getFpgaIpv4(args) |
Definition at line 181 of file tc_TcpTest.py.
Definition at line 237 of file tc_TcpTest.py.
tc_TcpTest.ipHostStr = socket.gethostbyname(hostname) |
Definition at line 233 of file tc_TcpTest.py.
tc_TcpTest.ipResMngr = getResourceManagerIpv4(args) |
Definition at line 189 of file tc_TcpTest.py.
tc_TcpTest.portFpgaServer = XMIT_MODE_LSN_PORT |
Definition at line 193 of file tc_TcpTest.py.
tc_TcpTest.portResMngr = getResourceManagerPort(args) |
Definition at line 197 of file tc_TcpTest.py.
tc_TcpTest.reqMsgAsBytes = struct.pack(">IHH", ipHost, dpHost, 0) |
Definition at line 269 of file tc_TcpTest.py.
tc_TcpTest.seed = args.seed |
Definition at line 292 of file tc_TcpTest.py.
tc_TcpTest.size = args.size |
Definition at line 298 of file tc_TcpTest.py.
tc_TcpTest.str |
Definition at line 152 of file tc_TcpTest.py.
tc_TcpTest.tcpClientSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
Definition at line 214 of file tc_TcpTest.py.
tc_TcpTest.tcpListenSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
Definition at line 246 of file tc_TcpTest.py.
tc_TcpTest.tcpServerSock |
Definition at line 284 of file tc_TcpTest.py.
tc_TcpTest.type |
Definition at line 152 of file tc_TcpTest.py.
tc_TcpTest.verbose = args.verbose |
Definition at line 310 of file tc_TcpTest.py.