Add new function to send a user data packet from master to slave

This commit is contained in:
Stefan Wahren
2013-10-13 14:52:45 +02:00
parent d5f06ec910
commit 9e23818152
2 changed files with 63 additions and 0 deletions

View File

@ -287,6 +287,18 @@ int mbus_send_switch_baudrate_frame(mbus_handle * handle, int address, long baud
*/
int mbus_send_request_frame(mbus_handle * handle, int address);
/**
* Sends user data frame (SND_UD) to given slave using "unified" handle
*
* @param handle Initialized handle
* @param address Address (0-255)
* @param data User data
* @param data_size Byte count of user data
*
* @return Zero when successful.
*/
int mbus_send_user_data_frame(mbus_handle * handle, int address, const unsigned char *data, size_t data_size);
/**
* Sends a request and read replies until no more records available
* or limit is reached.