OutNetwork
- class sharpy.io.network_interface.OutNetwork(host=None, port=None)[source]
Output network socket settings
If
send_on_demand
isTrue
, SHARPy will only output data when it receives a request for it. The request message can be any message under 1024 bytes. SHARPy will reply to the socket that sent the request with the latest time step information. Otherwise, it will send data at the end of each time step to the specified destination clients.If the
NetworkLoader
settingsend_output_to_all_clients
isTrue
, then the clients from which the input signal is received will also be added to the destination client address book.Note
If sending/receiving data across the net or LAN, make sure that your firewall has the desired ports open, otherwise the signals will not make it through.
The settings that this solver accepts are given by a dictionary, with the following key-value pairs:
Name
Type
Description
Default
address
str
Own network address.
127.0.0.1
port
int
Own port for output network
65000
send_on_demand
bool
Waits for a signal demanding the output data. Else, sends to destination buffer
True
destination_address
list(str)
List of addresses to send output data. If
send_on_demand
isFalse
this is a required setting.[]
destination_ports
list(int)
List of ports number for the destination addresses.
[]