Gateway
feral3gp.feral.Gateway
¶
Bases: JavaDelegate
Source code in feral3gp/feral/fcapi/gateway.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
add_network_port(port_name)
¶
A port with the given name is created to listen for incoming fcapi connections, and a FERAL port of that name is created to communicate with the rest of the FERAL simulation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port_name
|
str
|
The name of the port to be created |
required |
Source code in feral3gp/feral/fcapi/gateway.py
39 40 41 42 43 44 45 |
|
add_protocol(protocol, port=0)
¶
Add a protocol to the Gateway
Parameters:
Name | Type | Description | Default |
---|---|---|---|
protocol
|
TransmissionBackend
|
the protocol to be used |
required |
port
|
int
|
the port to be used. 0, if the Gateway shall choose a port on its own. |
0
|
Source code in feral3gp/feral/fcapi/gateway.py
31 32 33 34 35 36 37 |
|
get_listening_port(protocol)
¶
Get the port that the fcapi is listening on for a specific protocol. Especially useful if the fcapi has been allowed to choose the port by itself
Returns:
Type | Description |
---|---|
int
|
The port that the fcapi listens on. If not listening on that protocol -1. |
Source code in feral3gp/feral/fcapi/gateway.py
23 24 25 26 27 28 29 |
|
feral3gp.feral.GatewayConfig
dataclass
¶
Source code in feral3gp/feral/fcapi/gateway_config.py
27 28 29 30 31 32 33 |
|
feral3gp.feral.BackendConfig
dataclass
¶
Configuration of the backend that is used to establish a connection between FCAPI clients and the gateway
Source code in feral3gp/feral/fcapi/gateway_config.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|