From: Mazet Laurent Date: Thu, 27 Mar 2025 19:29:06 +0000 (+0100) Subject: update documentation X-Git-Tag: v1.0~88 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=913562ea875fb6684bbd95157e0278e5205f7545;p=morep.git update documentation --- diff --git a/morep.h b/morep.h index a7e3bdf..247e9f0 100644 --- a/morep.h +++ b/morep.h @@ -26,9 +26,6 @@ __BEGIN_DECLS The common message passing library offers unreliable connection oriented data blocks exchange messaging between software modules over raw Ethernet packets. - - morep values returned by MOREP_Connect are standard Linux file descriptors - that can be used in select()/poll() system calls. */ /** @@ -37,14 +34,12 @@ __BEGIN_DECLS Establish a connection between a local MOREP and a remote MOREP. Block until connection is established or refused. - @param local_address local address of the MOREP with the following - syntax: 'rep://macaddress/ethertype + @param url url of the MOREP with the following syntax: 'interface://macaddress/ethertype + - interface name - macaddress format is xx:xx:xx:xx:xx:xx - ethertype is a number from 1536 to 65355 - Can be NULL if local address dot not need to be specified - @param remote_address same format as for local_address - @return a new file descriptor associated with this connection + @return a new MOREP descriptor associated with this connection @see MOREP_Close() @see MOREP_Send() @@ -55,9 +50,9 @@ int MOREP_Connect (char *url); /** @ingroup MOREP - Destroy a MOREP. + Close a connection and relase its descriptor. - @param morep file descriptor retuned by MOREP_Connect() + @param index descriptor retuned by MOREP_Connect() @see MOREP_Connect() */ @@ -69,12 +64,13 @@ int MOREP_Close (int index); Send a message over an existing MOREP connection. Will block until resolution in case of congestion. - @param morep file descriptor retuned by MOREP_Connect() + @param index MOREP descriptor retuned by MOREP_Connect() @param msgtype a user defined message type identifier, transported transparently - @param data a pointer to the buffer containing the message to be - transmitted - @param len length of the message + @param buffer a pointer to the message to be transmitted + @param len length of the message. Length must be less than 16 * (ETHERSIZE - 4) - 1 bytes + + @return sequence number of the transmit message @see MOREP_Connect() */ @@ -83,40 +79,23 @@ int MOREP_Send (int index, uint8_t msgtype, uint8_t *buffer, int len); /** @ingroup MOREP - Received a message over an existing MOREP connection. Returns - immediately if MOREP not set to blocking mode + Received a message over an existing MOREP connection. - @param morep file descriptor retuned by MOREP_Connect() - @param msgtype a pointer to an unsigned long to receive the user + @param index MOREP descriptor retuned by MOREP_Connect() + @param msgtype a pointer to retreive the user defined message type identifier, transported transparently @param buffer a pointer to the reception buffer - @param buflen length of the reception buffer + @param buflen length of the received message + + By carreful that recevied message can be as large as 16 * (ETHERSIZE - 4) - 1 bytes - @return length of the message or 0 if no message was pending + @return sequence number of the received message @see MOREP_Connect() */ int MOREP_Receive (int index, uint8_t *msgtype, uint8_t *buffer, int *len); -/** - @ingroup MOREP - - Received a message over an existing MOREP connection with a timeout - - @param morep file descriptor retuned by MOREP_Connect() - @param msgtype a pointer to an unsigned long to receive the user - defined message type identifier, transported transparently - @param buffer a pointer to the reception buffer - @param buflen length of the reception buffer - @param ms Exit after microseconds if now data is received - - @return length of the message or 0 if no message was pending - - @see MOREP_Connect() -*/ -int MOREP_Receive_timeout (int morep, unsigned long *msgtype, unsigned char *buffer, int buflen, int ms); - __END_DECLS #endif /* __MOREP_H__ */