style guide part 2
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
#define F_REPLY "format_reply"
|
||||
|
||||
// Defines used by UDP callback
|
||||
#define MAX_DATA_SIZE 30 // Define the maximum expected data size
|
||||
#define UDP_QUESTION1 "Where are you?v1.0"
|
||||
#define MAX_DATA_SIZE 30 // Define the maximum expected data size
|
||||
#define UDP_QUESTION1 "Where are you?v1.0" // Expected request from UDP client
|
||||
|
||||
/**
|
||||
* @struct owner_details_t
|
||||
@@ -46,13 +46,62 @@ typedef struct {
|
||||
}owner_details_t;
|
||||
|
||||
// The following functions are used for owner details (those that must be available in main)
|
||||
|
||||
/**
|
||||
* @fn uint8_t udp_broadcast_set_owner_details(owner_details_t*, const char*, const char*)
|
||||
* @brief set_owner_details() is the interface that can be used in other files
|
||||
* to set the owner's details
|
||||
*
|
||||
* @param owner owner_details_t structure, it contains information about the owner
|
||||
* @param name string containing the new owner's name
|
||||
* @param surname string containing the new owner's surname
|
||||
* @return setting owner details error
|
||||
* - 1: no error occured, details were set
|
||||
* - 0: an error occured, all or some details weren't set or owner pointer is NULL
|
||||
*/
|
||||
uint8_t udp_broadcast_set_owner_details(owner_details_t*, const char* , const char*);
|
||||
|
||||
/**
|
||||
* @fn char udp_broadcast_get_owner_details_name*(owner_details_t)
|
||||
* @brief get_owner_details_name() can be used to get the current owner's name
|
||||
*
|
||||
* @param owner owner_details_t structure, it contains information about the owner
|
||||
* @return name of owner
|
||||
* this name is set by @see udp_broadcast_set_owner_details_name()
|
||||
*/
|
||||
char* udp_broadcast_get_owner_details_name(owner_details_t*);
|
||||
|
||||
/**
|
||||
* @fn char udp_broadcast_get_owner_details_surname*(const owner_details_t)
|
||||
* @brief get_owner_details_surname() can be used to get the current owner's surname
|
||||
*
|
||||
* @param owner owner_details_t structure, it contains information about the owner
|
||||
* @return surname of owner
|
||||
* this name is set by @see udp_broadcast_set_owner_details_surname()
|
||||
*/
|
||||
char* udp_broadcast_get_owner_details_surname(owner_details_t*);
|
||||
|
||||
/**
|
||||
* @fn char udp_broadcast_get_owner_details_reply*()
|
||||
* @brief get_owner_details_reply() can be used to get the current UDP reply
|
||||
*
|
||||
* @return reply for UDP broadcast
|
||||
* this reply is formatted by @see format_reply()
|
||||
*/
|
||||
char* udp_broadcast_get_owner_details_reply();
|
||||
|
||||
// The following functions are used for UDP (those that must be available in main)
|
||||
|
||||
/**
|
||||
* @fn err_t udp_broadcast_init()
|
||||
* @brief init_UDP_server() initialises the UDP connection so that it listens for all traffic on
|
||||
* port 6400
|
||||
*
|
||||
* @return lwIP error code.
|
||||
* - ERR_OK. Successful. No error occurred.
|
||||
* - ERR_USE. The specified ipaddr and port are already bound to by another UDP PCB.
|
||||
*/
|
||||
|
||||
err_t udp_broadcast_init();
|
||||
|
||||
#endif /* INC_UDP_BROADCAST_H_ */
|
||||
|
||||
Reference in New Issue
Block a user