cloudFPGA (cF) API
1.0
The documentation of the source code of cloudFPGA (cF)
|
Functions | |
def | tcp_tx_loop (sock, message, count, verbose=False) |
def | tcp_tx_slowpace (sock, message, count, pause, verbose=False) |
def | tcp_tx_payload_ramp (sock, message, count, pause=0.0, verbose=False) |
def | tcp_tx_seg_size_ramp (sock, message, count, pause=0.0, verbose=False) |
Variables | |
parser = argparse.ArgumentParser(description='A script to send TCP data to an FPGA module.') | |
type | |
str | |
default | |
help | |
int | |
action | |
float | |
args = parser.parse_args() | |
ipFpga = getFpgaIpv4(args) | |
instId = getInstanceId(args) | |
ipResMngr = getResourceManagerIpv4(args) | |
portFpga = RECV_MODE_LSN_PORT | |
portResMngr = getResourceManagerPort(args) | |
tuple | fpgaAssociation = (str(ipFpga), portFpga) |
int | tcpSP = portFpga + 49152 |
tuple | hostAssociation = (ipSaStr, tcpSP) |
tcpSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
seed = args.seed | |
size = args.size | |
count = args.loop_count | |
message = str_rand_gen(size) | |
verbose = args.verbose | |
def tc_TcpSend.tcp_tx_loop | ( | sock, | |
message, | |||
count, | |||
verbose = False |
|||
) |
TCP Tx Single-Thread Loop. :param sock The socket to send/receive to/from. :param message The message string to sent. :param count The number of segments to send. :param verbose Enables verbosity. :return None
Definition at line 38 of file tc_TcpSend.py.
def tc_TcpSend.tcp_tx_payload_ramp | ( | sock, | |
message, | |||
count, | |||
pause = 0.0 , |
|||
verbose = False |
|||
) |
TCP Tx Single-Thread Ramp. Send a buffer of bytes with 64-bit unsigned integer numbers ramping up from 1 to len(message). :param sock The socket to send/receive to/from. :param message The message string to sent. :param count The number of segments to send. :param pause The idle duration between two segments (in seconds) :param verbose Enables verbosity. :return None
Definition at line 116 of file tc_TcpSend.py.
def tc_TcpSend.tcp_tx_seg_size_ramp | ( | sock, | |
message, | |||
count, | |||
pause = 0.0 , |
|||
verbose = False |
|||
) |
Send a ramp of increasing segment sizes starting from 1 bytes up to len(message). :param sock The socket to send/receive to/from. :param message The message string to sent. :param count The number of segments to send. :param pause The idle duration between two segments (in seconds) :param verbose Enables verbosity. :return None
Definition at line 199 of file tc_TcpSend.py.
def tc_TcpSend.tcp_tx_slowpace | ( | sock, | |
message, | |||
count, | |||
pause, | |||
verbose = False |
|||
) |
TCP Tx test at reduce speed (by inserting a sleep duration in between two transmissions) :param sock The socket to send/receive to/from. :param message The message string to sent. :param count The number of segments to send. :param pause The idle duration between two segments (in seconds) :param verbose Enables verbosity. :return None
Definition at line 75 of file tc_TcpSend.py.
tc_TcpSend.action |
Definition at line 257 of file tc_TcpSend.py.
tc_TcpSend.args = parser.parse_args() |
Definition at line 272 of file tc_TcpSend.py.
tc_TcpSend.count = args.loop_count |
Definition at line 383 of file tc_TcpSend.py.
tc_TcpSend.default |
Definition at line 247 of file tc_TcpSend.py.
tc_TcpSend.float |
Definition at line 261 of file tc_TcpSend.py.
Definition at line 310 of file tc_TcpSend.py.
tc_TcpSend.help |
Definition at line 248 of file tc_TcpSend.py.
tuple tc_TcpSend.hostAssociation = (ipSaStr, tcpSP) |
Definition at line 322 of file tc_TcpSend.py.
tc_TcpSend.instId = getInstanceId(args) |
Definition at line 285 of file tc_TcpSend.py.
tc_TcpSend.int |
Definition at line 249 of file tc_TcpSend.py.
tc_TcpSend.ipFpga = getFpgaIpv4(args) |
Definition at line 281 of file tc_TcpSend.py.
tc_TcpSend.ipResMngr = getResourceManagerIpv4(args) |
Definition at line 289 of file tc_TcpSend.py.
string tc_TcpSend.message = str_rand_gen(size) |
Definition at line 387 of file tc_TcpSend.py.
tc_TcpSend.portFpga = RECV_MODE_LSN_PORT |
Definition at line 293 of file tc_TcpSend.py.
tc_TcpSend.portResMngr = getResourceManagerPort(args) |
Definition at line 297 of file tc_TcpSend.py.
tc_TcpSend.seed = args.seed |
Definition at line 367 of file tc_TcpSend.py.
tc_TcpSend.size = args.size |
Definition at line 373 of file tc_TcpSend.py.
tc_TcpSend.str |
Definition at line 247 of file tc_TcpSend.py.
tc_TcpSend.tcpSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
Definition at line 327 of file tc_TcpSend.py.
Definition at line 321 of file tc_TcpSend.py.
tc_TcpSend.type |
Definition at line 247 of file tc_TcpSend.py.
tc_TcpSend.verbose = args.verbose |
Definition at line 391 of file tc_TcpSend.py.