redvypr.devices.network.network_device

network device

Configuration options for a network device:


  • devicemodulename: network_device deviceconfig:

    name: tcpserial1 # The name, must be unique config:

    address: <ip> # Address IP, localhost. <broadcast> for UDP broadcast in local network. <ip> for local ip port: 10001 # Port serialize: str # yaml,str default yaml protocol: tcp # tcp, udp default tcp direction: publish # publish, receive default receive data: nmea # dictionary keys, default all tcp_reconnect: True # Try to reconnect to host if connection was closed tcp_numreconnect: 10 # The number of reconnection attempts

Functions

get_ip()

handle_tcp_client_send(client, threadqueue, ...)

packet_to_raw(data_dict, config)

Function that processes the data_dict to a serialized datastream sendable over network connections

raw_to_packet(datab, config)

Packs the received raw data into a packet that can be sent via the dataqueue

start_tcp_recv(dataqueue, datainqueue, ...)

TCP receiving

start_tcp_send(dataqueue, datainqueue, ...)

TCP publishing, this thread waits for TCP connections connections.

start_udp_recv(dataqueue, datainqueue, ...)

UDP receiving

start_udp_send(dataqueue, datainqueue, ...)

UDP publishing

yaml_dump(data)

Classes

Device(*args, **kwargs)

initDeviceWidget(*args, **kwargs)