Implement mbus_set_primary_address()

This function sends a frame to change primary address of a slave.
This commit is contained in:
Stefan Wahren
2018-03-21 21:29:44 +01:00
parent 2680079db4
commit 73d58a9f7d
2 changed files with 38 additions and 0 deletions

View File

@ -307,6 +307,17 @@ int mbus_send_request_frame(mbus_handle * handle, int address);
*/
int mbus_send_user_data_frame(mbus_handle * handle, int address, const unsigned char *data, size_t data_size);
/**
* Sends frame to change primary address of given slave using "unified" handle
*
* @param handle Initialized handle
* @param old_address Old Address (0-255)
* @param new_address New Address (0-250)
*
* @return Zero when successful.
*/
int mbus_set_primary_address(mbus_handle * handle, int old_address, int new_address);
/**
* Sends a request and read replies until no more records available
* or limit is reached.