The Hub's protocol methods. More...
#include <ports.h>
Data Fields | |
int(* | probe )(struct dyn_prop_t *hub) |
[M] Probe ports on a Hub The probe function inserts all attached devices found into the 'ports' member of the Hub structure | |
int(* | create )(uint32_t hub, const char *name) |
[M] Create a connection to a port | |
int(* | open )(struct DCDevice *d, int portindex) |
Open device on Hub. | |
int(* | close )(struct DCDevice *d) |
Close the device. | |
int(* | send )(struct peer *p, struct property_packet_hdr *h, const char *data, size_t len) |
Method to send packet data to the device. | |
int(* | recv )(struct peer *p, struct property_packet_hdr **h, unsigned short timeout) |
Method to receive data from the device. |
As a Hub represents a driver for a physical communication protocol (abbreviated as 'Phy' in this document), it has to implement a few methods to access its (possibly virtual) ports.
Some methods are relevant for the Master only and are marked with a [M].
See tcp.c and ipcommon.c for details.
portindex | The index of the port within the Hubs port list |